1. 14 6月, 2016 3 次提交
    • D
      x86/signals: Add build-time checks to the siginfo compat code · 02e8fda2
      Dave Hansen 提交于
      There were at least 3 features added to the __SI_FAULT area of the
      siginfo struct that did not make it to the compat siginfo:
      
      	1. The si_addr_lsb used in SIGBUS's sent for machine checks
      	2. The upper/lower bounds for MPX SIGSEGV faults
      	3. The protection key for pkey faults
      
      There was also some turmoil when I was attempting to add the pkey
      field because it needs to be a fixed size on 32 and 64-bit and
      not have any alignment constraints.
      
      This patch adds some compile-time checks to the compat code to
      make it harder to screw this up.  Basically, the checks are
      supposed to trip any time someone changes the siginfo structure.
      That sounds bad, but it's what we want.  If someone changes
      siginfo, we want them to also be _forced_ to go look at the
      compat code.
      
      The details are in the comments.
      Signed-off-by: NDave Hansen <dave.hansen@linux.intel.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Dave Hansen <dave@sr71.net>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: linux-edac@vger.kernel.org
      Link: http://lkml.kernel.org/r/20160608172534.C73DAFC3@viggo.jf.intel.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      02e8fda2
    • D
      x86/signals: Add missing signal_compat code for x86 features · a4455082
      Dave Hansen 提交于
      The 32-bit siginfo is a different binary format than the 64-bit
      one.  So, when running 32-bit binaries on 64-bit kernels, we have
      to convert the kernel's 64-bit version to a 32-bit version that
      userspace can grok.
      
      We've added a few features to siginfo over the past few years and
      neglected to add them to arch/x86/kernel/signal_compat.c:
      
         1. The si_addr_lsb used in SIGBUS's sent for machine checks
         2. The upper/lower bounds for MPX SIGSEGV faults
         3. The protection key for pkey faults
      
      I caught this with some protection keys unit tests and realized
      it affected a few more features.
      
      This was tested only with my protection keys patch that looks
      for a proper value in si_pkey.  I didn't actually test the machine
      check or MPX code.
      Signed-off-by: NDave Hansen <dave.hansen@linux.intel.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Dave Hansen <dave@sr71.net>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: linux-edac@vger.kernel.org
      Link: http://lkml.kernel.org/r/20160608172533.F8F05637@viggo.jf.intel.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      a4455082
    • A
      x86/vdso/32: Assemble sigreturn.S separately · f0702555
      Andy Lutomirski 提交于
      sigreturn.S was historically included by the various
      __kernel_vsyscall implementations due to assumptions about all the
      32-bit vDSO images having the sigreturn symbols at the same address.
      
      Those assumptions were removed in v3.16, and as of v4.4, there is only
      a single 32-bit vDSO left.
      
      Simplify the build process by assembling sigreturn.S into a normal
      object file.
      Signed-off-by: NAndy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/d7b6dfde3c7397aa26977320da90448363b5a7e9.1465505753.git.luto@kernel.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      f0702555
  2. 11 6月, 2016 8 次提交
  3. 10 6月, 2016 29 次提交
反馈
建议
客服 返回
顶部