diff options
| author | Borislav Petkov <bp@suse.de> | 2015-01-18 12:57:41 +0100 | 
|---|---|---|
| committer | Borislav Petkov <bp@suse.de> | 2015-02-23 13:44:16 +0100 | 
| commit | 6620ef28c812b4782b10adb676580c2847d2bec8 (patch) | |
| tree | a3244d1713210f4ad45eb90825ae89d7a8dd62d4 /kernel/locking/rtmutex.c | |
| parent | 8e65f6e03a90927b8de16c15da976baa6c3fff69 (diff) | |
x86/lib/clear_page_64.S: Convert to ALTERNATIVE_2 macro
Move clear_page() up so that we can get 2-byte forward JMPs when
patching:
  apply_alternatives: feat: 3*32+16, old: (ffffffff8130adb0, len: 5), repl: (ffffffff81d0b859, len: 5)
  ffffffff8130adb0: alt_insn: 90 90 90 90 90
  recompute_jump: new_displ: 0x0000003e
  ffffffff81d0b859: rpl_insn: eb 3e 66 66 90
even though the compiler generated 5-byte JMPs which we padded with 5
NOPs.
Also, make the REP_GOOD version be the default as the majority of
machines set REP_GOOD. This way we get to save ourselves the JMP:
  old insn VA: 0xffffffff813038b0, CPU feat: X86_FEATURE_REP_GOOD, size: 5, padlen: 0
  clear_page:
  ffffffff813038b0 <clear_page>:
  ffffffff813038b0:       e9 0b 00 00 00          jmpq ffffffff813038c0
  repl insn: 0xffffffff81cf0e92, size: 0
  old insn VA: 0xffffffff813038b0, CPU feat: X86_FEATURE_ERMS, size: 5, padlen: 0
  clear_page:
  ffffffff813038b0 <clear_page>:
  ffffffff813038b0:       e9 0b 00 00 00          jmpq ffffffff813038c0
  repl insn: 0xffffffff81cf0e92, size: 5
   ffffffff81cf0e92:      e9 69 2a 61 ff          jmpq ffffffff81303900
  ffffffff813038b0 <clear_page>:
  ffffffff813038b0:       e9 69 2a 61 ff          jmpq ffffffff8091631e
Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'kernel/locking/rtmutex.c')
0 files changed, 0 insertions, 0 deletions
