This is a great article on the subject and I like the clear explanation, with code examples on their fixes.
I don’t think I will ever forget the line “we cannot trust branches”, it’s just amazing that such a fundamental part of the CPU was broken here.