Re: [PATCH 0/5 v2] [GIT PULL] x86/jump label: Paranoid checks and2 or 5 byte nops

From: H. Peter Anvin
Date: Thu Feb 02 2012 - 17:07:47 EST


On 02/02/2012 02:04 PM, Steven Rostedt wrote:
commit 7bbd9688727dd30cd44b90b3c9c35f0f66af77ff
Author: Steven Rostedt<srostedt@xxxxxxxxxx>
Date: Thu Feb 2 16:55:43 2012 -0500

x86/jump labels: Handle initialization of enabled nops

When jump labels are initialized at boot up, they are compared
to the default_nop before switching to the ideal nop.

But if a jump label is enabled by default on start up, the
enabled code does not test against the default nop, only the
ideal nop. But as this jump label has not been converted to the
ideal nop, it fails the check, and will crash the box.

The enabled path needs to be aware of initialization too.

Reported-by: Ingo Molnar<mingo@xxxxxxx>
Signed-off-by: Steven Rostedt<rostedt@xxxxxxxxxxx>


Would it make more sense to keep track of three states:

"Default"
"Enabled"
"Disabled"

-?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/