Messages in this thread | | | Subject | Re: [PATCH 0/5 v2] [GIT PULL] x86/jump label: Paranoid checks and 2 or 5 byte nops | From | Steven Rostedt <> | Date | Thu, 02 Feb 2012 17:53:10 -0500 |
| |
On Thu, 2012-02-02 at 14:07 -0800, H. Peter Anvin wrote:
> Would it make more sense to keep track of three states: > > "Default" > "Enabled" > "Disabled"
Well, it is only default on start up, and every jump label is initialized then to the ideal nop. Either at boot up, or on module load.
What's nice is that the jump label init calls call the "_static" version of the update (arch_jump_label_transform_static()), and the enable/disable calls the non "_static" version (arch_jump_label_transform()). This means that we can set the "init" flag depending on which way we got into the common code. The upper layer only needs to know if the field is enabled or disabled. Remember this is a x86 specific thing. Other archs do not have a different "default" nop. There's no reason to save a "default" state, as that would require changing the common arch layers of jump label.
-- Steve
| |