lkml.org 
[lkml]   [2012]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 0/5 v2] [GIT PULL] x86/jump label: Paranoid checks and 2 or 5 byte nops
From
Date
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






\
 
 \ /
  Last update: 2012-02-02 23:55    [W:0.634 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site