Subject: Re: [PATCH] [v3] x86, pkeys: fix siginfo ABI breakage from new field

From: Dave Hansen <[email-masked]>
Date: Tue, 1 Mar 2016 04:48:36 -0800

On 03/01/2016 12:09 AM, Ingo Molnar wrote:
> Btw., what we should not have used in a modern user ABI are variable size 
> pointers:
> 
>                                 struct {
>                                         void __user *_lower;
>                                         void __user *_upper;
>                                 } _addr_bnd;
> 
> we should have used constant size structure elements for that, such as __u64.
> 
> Had we done that, the pkeys change would not have been a problem either.
> 
> Is it too late to change that, is there any si_code=SEGV_BNDERR usage in 
> user-space?

Yes, the libmpx code that gcc links in looks for si_code=SEGV_BNDERR
and, by default, will just just warn about the bounds exception (rather
than letting the app die.

This bit of code will be linked into basically anything using MPX.