Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1404182

Re: [PATCH] x86, signals: add missing signal_compat code for x86 features

From Ingo Molnar <mingo@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH] x86, signals: add missing signal_compat code for x86 features
Date 2016-05-20 09:10 +0200
Message-ID <rAMJj-2rs-5@gated-at.bofh.it> (permalink)
References <rAjxD-pB-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


* Dave Hansen <dave@sr71.net> wrote:

> Sending this out early so folks can have a look.  I haven't let
> it run through a full set of tests, so buyer beware, but it would
> have a hard time hurting anything other than the already-broken
> 32-bit compat signal code.
> 
> ---
> 
> From: Dave Hansen <dave.hansen@linux.intel.com>
> 
> 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.

Hm, while fixing this, could we please also add individual unit tests to 
tools/testing/selftests/x86/, and also structure the code in a fashion or add a 
comment or so to make sure future extensions add both a compat handler and a unit 
test as well?

I.e. perhaps do a (build time) fixed-size check of siginfo structure in the compat 
code, and break the build if that check has not been updated? Or something like 
that.

Thanks,

	Ingo

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] x86, signals: add missing signal_compat code for x86 features Dave Hansen <dave@sr71.net> - 2016-05-19 02:00 +0200
  Re: [PATCH] x86, signals: add missing signal_compat code for x86  features Ingo Molnar <mingo@kernel.org> - 2016-05-20 09:10 +0200
    Re: [PATCH] x86, signals: add missing signal_compat code for x86  features Dave Hansen <dave@sr71.net> - 2016-05-25 00:40 +0200
      RE: [PATCH] x86, signals: add missing signal_compat code for x86  features "Luck, Tony" <tony.luck@intel.com> - 2016-05-25 00:50 +0200

csiph-web