public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/4] x86, alternatives: Insn padding and more robust JMPs
@ 2015-01-05 15:00 Borislav Petkov
  2015-01-05 15:00 ` [RFC PATCH 1/4] x86, copy_user: Remove FIX_ALIGNMENT define Borislav Petkov
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Borislav Petkov @ 2015-01-05 15:00 UTC (permalink / raw)
  To: X86 ML; +Cc: LKML

From: Borislav Petkov <bp@suse.de>

Hi all,

this is something which hpa and I talked about recently: the ability for
the alternatives code to add padding to the original instruction in case
the replacement is longer and also to be able to simply write "jmp" and
not care about which JMP exactly the compiler generates and whether the
relative offsets are correct.

So this is a stab at it, it seems to boot in kvm here but it needs more
staring to make sure we're actually generating the proper code at all
times.

Thus the RFC tag, comments/suggestions are welcome.

Thanks.

Borislav Petkov (4):
  x86, copy_user: Remove FIX_ALIGNMENT define
  x86, alternatives: Cleanup DPRINTK macro
  alternatives: Add instruction padding
  alternatives: Make JMPs more robust

 arch/x86/include/asm/alternative-asm.h |  38 ++++++++++
 arch/x86/include/asm/alternative.h     |  34 +++++----
 arch/x86/include/asm/cpufeature.h      |  12 +--
 arch/x86/kernel/alternative.c          | 130 +++++++++++++++++++++++++++------
 arch/x86/lib/copy_page_64.S            |  34 ++++-----
 arch/x86/lib/copy_user_64.S            |  44 ++---------
 6 files changed, 193 insertions(+), 99 deletions(-)

-- 
2.2.0.33.gc18b867


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-01-05 17:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-05 15:00 [RFC PATCH 0/4] x86, alternatives: Insn padding and more robust JMPs Borislav Petkov
2015-01-05 15:00 ` [RFC PATCH 1/4] x86, copy_user: Remove FIX_ALIGNMENT define Borislav Petkov
2015-01-05 15:00 ` [RFC PATCH 2/4] x86, alternatives: Cleanup DPRINTK macro Borislav Petkov
2015-01-05 17:16   ` Joe Perches
2015-01-05 15:00 ` [RFC PATCH 3/4] alternatives: Add instruction padding Borislav Petkov
2015-01-05 15:00 ` [RFC PATCH 4/4] alternatives: Make JMPs more robust Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox