lkml.org 
[lkml]   [2016]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86, pkeys: fix siginfo ABI breakage from new field
Hi H.,

On Sat, 27 Feb 2016 11:35:08 -0800 "H. Peter Anvin" <hpa@zytor.com> wrote:
>
> On February 27, 2016 11:16:44 AM PST, Dave Hansen <dave@sr71.net> wrote:
> >On 02/27/2016 03:41 AM, Ingo Molnar wrote:
> >> * Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >>> > On Fri, 26 Feb 2016 09:44:00 -0800 "H. Peter Anvin"
> ><hpa@zytor.com> wrote:
> >>>> > > __u64 is okay, "unsigned long" is really messy in the presence
> >of 32-on-64 bit ABIs...
> >>> >
> >>> > Yeah, but unfortunately, any 64 bit scalar type here will change
> >the
> >>> > alignment of the enclosing unions on (some) 32 bit platforms and
> >thus
> >>> > break the ABI.
> >> Then a different solution has to be found.
> >
> >I've acked Stephen's initial patch changing the 'u64' to an 'int'. x86
> >only needs 4 bits, and in the remote chance that a future
> >implementation
> >needed more space, we could easily add a second 32-bit field "_pkey_hi"
> >or something that wouldn't have the alignment issues of a true 64-bit
> >type.
> >
> >How should we get Stephen's patch in to the tip tree?
>
> u32?

It would have to be __u32, but we already use int and unsigned int
extensively in the siginfo structure (which are both always assumed to
be 32 bits). So "unsigned int" probably makes most sense.

I will submit that patch - with Dave's Ack.
--
Cheers,
Stephen Rothwell

\
 
 \ /
  Last update: 2016-02-28 01:01    [W:0.067 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site