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


Groups > linux.kernel > #1217822 > unrolled thread

Re: [PATCH 94/98] HACK arch/x86/include/uapi/asm/sigcontext32.h: remove _fpx_sw_bytes from union

Started byMikko Rapeli <mikko.rapeli@iki.fi>
First post2015-09-02 21:40 +0200
Last post2015-09-05 09:40 +0200
Articles 6 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 94/98] HACK arch/x86/include/uapi/asm/sigcontext32.h:  remove _fpx_sw_bytes from union Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-09-02 21:40 +0200
    [PATCH] x86/headers: Fix (old) header file dependency bug in  uapi/asm/sigcontext32.h Ingo Molnar <mingo@kernel.org> - 2015-09-03 09:50 +0200
      Re: [PATCH] x86/headers: Fix (old) header file dependency bug in  uapi/asm/sigcontext32.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-09-04 09:20 +0200
        Re: [PATCH] x86/headers: Fix (old) header file dependency bug in  uapi/asm/sigcontext32.h Ingo Molnar <mingo@kernel.org> - 2015-09-04 11:00 +0200
          Re: [PATCH] x86/headers: Fix (old) header file dependency bug in  uapi/asm/sigcontext32.h Mikko Rapeli <mikko.rapeli@iki.fi> - 2015-09-04 14:20 +0200
            Re: [PATCH] x86/headers: Fix (old) header file dependency bug in  uapi/asm/sigcontext32.h Ingo Molnar <mingo@kernel.org> - 2015-09-05 09:40 +0200

#1217822 — Re: [PATCH 94/98] HACK arch/x86/include/uapi/asm/sigcontext32.h: remove _fpx_sw_bytes from union

FromMikko Rapeli <mikko.rapeli@iki.fi>
Date2015-09-02 21:40 +0200
SubjectRe: [PATCH 94/98] HACK arch/x86/include/uapi/asm/sigcontext32.h: remove _fpx_sw_bytes from union
Message-ID<q4m30-68s-9@gated-at.bofh.it>
Hi Ingo, Thomas and Peter,

Do you have any pointers for me how arch/x86/include/uapi/asm/sigcontext32.h
could be fixed to also compile in userspace? Is definition of _fpx_sw_bytes
or _fpstate_ia32 even needed there?

Instructions to reproduce the userspace build failure are here:
https://lkml.org/lkml/2015/5/30/98

-Mikko

On Sat, May 30, 2015 at 05:39:26PM +0200, Mikko Rapeli wrote:
> I have no idea what I'm doing but this fixes header file compilation in
> userspace:
> 
> error: field ‘sw_reserved’ has incomplete type
>    struct _fpx_sw_bytes sw_reserved;
> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> ---
>  arch/x86/include/uapi/asm/sigcontext32.h | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/x86/include/uapi/asm/sigcontext32.h b/arch/x86/include/uapi/asm/sigcontext32.h
> index ad1478c..ceaaa78 100644
> --- a/arch/x86/include/uapi/asm/sigcontext32.h
> +++ b/arch/x86/include/uapi/asm/sigcontext32.h
> @@ -45,7 +45,6 @@ struct _fpstate_ia32 {
>  	__u32	padding[44];
>  	union {
>  		__u32 padding2[12];
> -		struct _fpx_sw_bytes sw_reserved;
>  	};
>  };
>  
> -- 
> 2.1.4
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1218081 — [PATCH] x86/headers: Fix (old) header file dependency bug in uapi/asm/sigcontext32.h

FromIngo Molnar <mingo@kernel.org>
Date2015-09-03 09:50 +0200
Subject[PATCH] x86/headers: Fix (old) header file dependency bug in uapi/asm/sigcontext32.h
Message-ID<q4xrs-5yf-11@gated-at.bofh.it>
In reply to#1217822
* Mikko Rapeli <mikko.rapeli@iki.fi> wrote:

> Hi Ingo, Thomas and Peter,
> 
> Do you have any pointers for me how arch/x86/include/uapi/asm/sigcontext32.h
> could be fixed to also compile in userspace? Is definition of _fpx_sw_bytes
> or _fpstate_ia32 even needed there?
> 
> Instructions to reproduce the userspace build failure are here:
> https://lkml.org/lkml/2015/5/30/98

Yeah, so this is a real bug in the headers, good find.

Also note that somewhat luckily your testcase is artificial, no real user-space 
code can contain that code at the moment because the header never built standalone 
in the past either AFAICS.

So it's an old header file dependency bug, to make it build in user-space you need 
to do this workaround:

 #include <asm/sigcontext.h>
 #include <asm/sigcontext32.h>

If you only include sigcontext32.h:

 #include <asm/sigcontext32.h>

it will fail to build.

To fix the bug:

> > --- a/arch/x86/include/uapi/asm/sigcontext32.h
> > +++ b/arch/x86/include/uapi/asm/sigcontext32.h
> > @@ -45,7 +45,6 @@ struct _fpstate_ia32 {
> >  	__u32	padding[44];
> >  	union {
> >  		__u32 padding2[12];
> > -		struct _fpx_sw_bytes sw_reserved;
> >  	};
> >  };

No, those fields are real and compat sigframe handling user-space might be relying 
on them.

Does the fix below work for you?

Thanks,

	Ingo

=========================>
From 0bcdebb70e1ae246139df71acfa744ab1629d877 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@kernel.org>
Date: Thu, 3 Sep 2015 09:35:19 +0200
Subject: [PATCH] x86/headers: Fix (old) header file dependency bug in uapi/asm/sigcontext32.h

Mikko Rapeli reported that the following standalone user-space header does not compile:

  #include <asm/sigcontext32.h>

Due to undefined 'struct __fpx_sw_bytes' which is defined in asm/sigcontext.h.

The following header order works:

  #include <asm/sigcontext.h>
  #include <asm/sigcontext32.h>

and that's probably how everyone's been using these headers for the past decade or
so, but it's a legit header file dependency bug, so include asm/sigcontext.h in
sigcontext32.h to allow it to be built standlone.

Reported-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Cc: Andy Lutomirski <luto@amacapital.net>
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>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/include/uapi/asm/sigcontext32.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/include/uapi/asm/sigcontext32.h b/arch/x86/include/uapi/asm/sigcontext32.h
index ad1478c4ae12..ff7826c41a1c 100644
--- a/arch/x86/include/uapi/asm/sigcontext32.h
+++ b/arch/x86/include/uapi/asm/sigcontext32.h
@@ -3,6 +3,8 @@
 
 #include <linux/types.h>
 
+#include <asm/sigcontext.h>
+
 /* signal context for 32bit programs. */
 
 #define X86_FXSR_MAGIC		0x0000

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1218701 — Re: [PATCH] x86/headers: Fix (old) header file dependency bug in uapi/asm/sigcontext32.h

FromMikko Rapeli <mikko.rapeli@iki.fi>
Date2015-09-04 09:20 +0200
SubjectRe: [PATCH] x86/headers: Fix (old) header file dependency bug in uapi/asm/sigcontext32.h
Message-ID<q4TrY-3vn-15@gated-at.bofh.it>
In reply to#1218081
On Thu, Sep 03, 2015 at 09:42:32AM +0200, Ingo Molnar wrote:
> 
> * Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
> 
> > Hi Ingo, Thomas and Peter,
> > 
> > Do you have any pointers for me how arch/x86/include/uapi/asm/sigcontext32.h
> > could be fixed to also compile in userspace? Is definition of _fpx_sw_bytes
> > or _fpstate_ia32 even needed there?
> > 
> > Instructions to reproduce the userspace build failure are here:
> > https://lkml.org/lkml/2015/5/30/98
> 
> Yeah, so this is a real bug in the headers, good find.
> 
> Also note that somewhat luckily your testcase is artificial, no real user-space 
> code can contain that code at the moment because the header never built standalone 
> in the past either AFAICS.
> 
> So it's an old header file dependency bug, to make it build in user-space you need 
> to do this workaround:
> 
>  #include <asm/sigcontext.h>
>  #include <asm/sigcontext32.h>
> 
> If you only include sigcontext32.h:
> 
>  #include <asm/sigcontext32.h>
> 
> it will fail to build.
> 
> To fix the bug:
> 
> > > --- a/arch/x86/include/uapi/asm/sigcontext32.h
> > > +++ b/arch/x86/include/uapi/asm/sigcontext32.h
> > > @@ -45,7 +45,6 @@ struct _fpstate_ia32 {
> > >  	__u32	padding[44];
> > >  	union {
> > >  		__u32 padding2[12];
> > > -		struct _fpx_sw_bytes sw_reserved;
> > >  	};
> > >  };
> 
> No, those fields are real and compat sigframe handling user-space might be relying 
> on them.
>
> Does the fix below work for you?

Unfortunately no:

cc -Wall -c -nostdinc -I /usr/lib/gcc/i586-linux-gnu/5/include -I /usr/lib/gcc/i
586-linux-gnu/5/include-fixed -I . -I ../headers_compile_test_include -I ../head
ers_compile_test_include/i586-linux-gnu ./asm/sigcontext32.c
In file included from ./asm/sigcontext32.c:1:0:
./asm/sigcontext32.h:12:8: error: redefinition of ‘struct _fpreg’
 struct _fpreg {
        ^
In file included from ./asm/sigcontext32.h:6:0,
                 from ./asm/sigcontext32.c:1:
./asm/sigcontext.h:56:8: note: originally defined here
 struct _fpreg {
        ^
In file included from ./asm/sigcontext32.c:1:0:
./asm/sigcontext32.h:17:8: error: redefinition of ‘struct _fpxreg’
 struct _fpxreg {
        ^
In file included from ./asm/sigcontext32.h:6:0,
                 from ./asm/sigcontext32.c:1:
./asm/sigcontext.h:61:8: note: originally defined here
 struct _fpxreg {
        ^
In file included from ./asm/sigcontext32.c:1:0:
./asm/sigcontext32.h:23:8: error: redefinition of ‘struct _xmmreg’
 struct _xmmreg {
        ^
In file included from ./asm/sigcontext32.h:6:0,
                 from ./asm/sigcontext32.c:1:
./asm/sigcontext.h:67:8: note: originally defined here
 struct _xmmreg {
        ^
FAILED: ./asm/sigcontext32.h

I guess this was the reason why I ended with the hack.

-Mikko

> Thanks,
> 
> 	Ingo
> 
> =========================>
> >From 0bcdebb70e1ae246139df71acfa744ab1629d877 Mon Sep 17 00:00:00 2001
> From: Ingo Molnar <mingo@kernel.org>
> Date: Thu, 3 Sep 2015 09:35:19 +0200
> Subject: [PATCH] x86/headers: Fix (old) header file dependency bug in uapi/asm/sigcontext32.h
> 
> Mikko Rapeli reported that the following standalone user-space header does not compile:
> 
>   #include <asm/sigcontext32.h>
> 
> Due to undefined 'struct __fpx_sw_bytes' which is defined in asm/sigcontext.h.
> 
> The following header order works:
> 
>   #include <asm/sigcontext.h>
>   #include <asm/sigcontext32.h>
> 
> and that's probably how everyone's been using these headers for the past decade or
> so, but it's a legit header file dependency bug, so include asm/sigcontext.h in
> sigcontext32.h to allow it to be built standlone.
> 
> Reported-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> Cc: Andy Lutomirski <luto@amacapital.net>
> 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>
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Ingo Molnar <mingo@kernel.org>
> ---
>  arch/x86/include/uapi/asm/sigcontext32.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/x86/include/uapi/asm/sigcontext32.h b/arch/x86/include/uapi/asm/sigcontext32.h
> index ad1478c4ae12..ff7826c41a1c 100644
> --- a/arch/x86/include/uapi/asm/sigcontext32.h
> +++ b/arch/x86/include/uapi/asm/sigcontext32.h
> @@ -3,6 +3,8 @@
>  
>  #include <linux/types.h>
>  
> +#include <asm/sigcontext.h>
> +
>  /* signal context for 32bit programs. */
>  
>  #define X86_FXSR_MAGIC		0x0000
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1218776 — Re: [PATCH] x86/headers: Fix (old) header file dependency bug in uapi/asm/sigcontext32.h

FromIngo Molnar <mingo@kernel.org>
Date2015-09-04 11:00 +0200
SubjectRe: [PATCH] x86/headers: Fix (old) header file dependency bug in uapi/asm/sigcontext32.h
Message-ID<q4V0L-5zg-33@gated-at.bofh.it>
In reply to#1218701
* Mikko Rapeli <mikko.rapeli@iki.fi> wrote:

> On Thu, Sep 03, 2015 at 09:42:32AM +0200, Ingo Molnar wrote:
> > 
> > * Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
> > 
> > > Hi Ingo, Thomas and Peter,
> > > 
> > > Do you have any pointers for me how arch/x86/include/uapi/asm/sigcontext32.h
> > > could be fixed to also compile in userspace? Is definition of _fpx_sw_bytes
> > > or _fpstate_ia32 even needed there?
> > > 
> > > Instructions to reproduce the userspace build failure are here:
> > > https://lkml.org/lkml/2015/5/30/98
> > 
> > Yeah, so this is a real bug in the headers, good find.
> > 
> > Also note that somewhat luckily your testcase is artificial, no real user-space 
> > code can contain that code at the moment because the header never built standalone 
> > in the past either AFAICS.
> > 
> > So it's an old header file dependency bug, to make it build in user-space you need 
> > to do this workaround:
> > 
> >  #include <asm/sigcontext.h>
> >  #include <asm/sigcontext32.h>
> > 
> > If you only include sigcontext32.h:
> > 
> >  #include <asm/sigcontext32.h>
> > 
> > it will fail to build.
> > 
> > To fix the bug:
> > 
> > > > --- a/arch/x86/include/uapi/asm/sigcontext32.h
> > > > +++ b/arch/x86/include/uapi/asm/sigcontext32.h
> > > > @@ -45,7 +45,6 @@ struct _fpstate_ia32 {
> > > >  	__u32	padding[44];
> > > >  	union {
> > > >  		__u32 padding2[12];
> > > > -		struct _fpx_sw_bytes sw_reserved;
> > > >  	};
> > > >  };
> > 
> > No, those fields are real and compat sigframe handling user-space might be relying 
> > on them.
> >
> > Does the fix below work for you?
> 
> Unfortunately no:
> 
> cc -Wall -c -nostdinc -I /usr/lib/gcc/i586-linux-gnu/5/include -I /usr/lib/gcc/i
> 586-linux-gnu/5/include-fixed -I . -I ../headers_compile_test_include -I ../head
> ers_compile_test_include/i586-linux-gnu ./asm/sigcontext32.c
> In file included from ./asm/sigcontext32.c:1:0:
> ./asm/sigcontext32.h:12:8: error: redefinition of ‘struct _fpreg’
>  struct _fpreg {
>         ^
> In file included from ./asm/sigcontext32.h:6:0,
>                  from ./asm/sigcontext32.c:1:
> ./asm/sigcontext.h:56:8: note: originally defined here
>  struct _fpreg {
>         ^
> In file included from ./asm/sigcontext32.c:1:0:
> ./asm/sigcontext32.h:17:8: error: redefinition of ‘struct _fpxreg’
>  struct _fpxreg {
>         ^
> In file included from ./asm/sigcontext32.h:6:0,
>                  from ./asm/sigcontext32.c:1:
> ./asm/sigcontext.h:61:8: note: originally defined here
>  struct _fpxreg {
>         ^
> In file included from ./asm/sigcontext32.c:1:0:
> ./asm/sigcontext32.h:23:8: error: redefinition of ‘struct _xmmreg’
>  struct _xmmreg {
>         ^
> In file included from ./asm/sigcontext32.h:6:0,
>                  from ./asm/sigcontext32.c:1:
> ./asm/sigcontext.h:67:8: note: originally defined here
>  struct _xmmreg {
>         ^
> FAILED: ./asm/sigcontext32.h
> 
> I guess this was the reason why I ended with the hack.

sigcontext32.h is a 64-bit only header (for compat functionality), and you are 
trying to build this on i386, right?

In theory we could unify them mostly, the two structures match mostly, except that 
'_fpstate_ia32::padding' is named 'padding1' in _fpstate, and there's also some 
legacy uglies wrt. user-space sigcontext definitions.

So this either gets cleaned up properly, with the legacy hacks/wrappers clearly 
isolated, or we could state that you shouldn't build 64-bit headers in 32-bit 
environments.

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1218883 — Re: [PATCH] x86/headers: Fix (old) header file dependency bug in uapi/asm/sigcontext32.h

FromMikko Rapeli <mikko.rapeli@iki.fi>
Date2015-09-04 14:20 +0200
SubjectRe: [PATCH] x86/headers: Fix (old) header file dependency bug in uapi/asm/sigcontext32.h
Message-ID<q4Y8j-1MD-25@gated-at.bofh.it>
In reply to#1218776
On Fri, Sep 04, 2015 at 10:58:31AM +0200, Ingo Molnar wrote:
> 
> * Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
> 
> > On Thu, Sep 03, 2015 at 09:42:32AM +0200, Ingo Molnar wrote:
> > > 
> > > * Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
> > > 
> > > > Hi Ingo, Thomas and Peter,
> > > > 
> > > > Do you have any pointers for me how arch/x86/include/uapi/asm/sigcontext32.h
> > > > could be fixed to also compile in userspace? Is definition of _fpx_sw_bytes
> > > > or _fpstate_ia32 even needed there?
> > > > 
> > > > Instructions to reproduce the userspace build failure are here:
> > > > https://lkml.org/lkml/2015/5/30/98
> > > 
> > > Yeah, so this is a real bug in the headers, good find.
> > > 
> > > Also note that somewhat luckily your testcase is artificial, no real user-space 
> > > code can contain that code at the moment because the header never built standalone 
> > > in the past either AFAICS.
> > > 
> > > So it's an old header file dependency bug, to make it build in user-space you need 
> > > to do this workaround:
> > > 
> > >  #include <asm/sigcontext.h>
> > >  #include <asm/sigcontext32.h>
> > > 
> > > If you only include sigcontext32.h:
> > > 
> > >  #include <asm/sigcontext32.h>
> > > 
> > > it will fail to build.
> > > 
> > > To fix the bug:
> > > 
> > > > > --- a/arch/x86/include/uapi/asm/sigcontext32.h
> > > > > +++ b/arch/x86/include/uapi/asm/sigcontext32.h
> > > > > @@ -45,7 +45,6 @@ struct _fpstate_ia32 {
> > > > >  	__u32	padding[44];
> > > > >  	union {
> > > > >  		__u32 padding2[12];
> > > > > -		struct _fpx_sw_bytes sw_reserved;
> > > > >  	};
> > > > >  };
> > > 
> > > No, those fields are real and compat sigframe handling user-space might be relying 
> > > on them.
> > >
> > > Does the fix below work for you?
> > 
> > Unfortunately no:
> > 
> > cc -Wall -c -nostdinc -I /usr/lib/gcc/i586-linux-gnu/5/include -I /usr/lib/gcc/i
> > 586-linux-gnu/5/include-fixed -I . -I ../headers_compile_test_include -I ../head
> > ers_compile_test_include/i586-linux-gnu ./asm/sigcontext32.c
> > In file included from ./asm/sigcontext32.c:1:0:
> > ./asm/sigcontext32.h:12:8: error: redefinition of ‘struct _fpreg’
> >  struct _fpreg {
> >         ^
> > In file included from ./asm/sigcontext32.h:6:0,
> >                  from ./asm/sigcontext32.c:1:
> > ./asm/sigcontext.h:56:8: note: originally defined here
> >  struct _fpreg {
> >         ^
> > In file included from ./asm/sigcontext32.c:1:0:
> > ./asm/sigcontext32.h:17:8: error: redefinition of ‘struct _fpxreg’
> >  struct _fpxreg {
> >         ^
> > In file included from ./asm/sigcontext32.h:6:0,
> >                  from ./asm/sigcontext32.c:1:
> > ./asm/sigcontext.h:61:8: note: originally defined here
> >  struct _fpxreg {
> >         ^
> > In file included from ./asm/sigcontext32.c:1:0:
> > ./asm/sigcontext32.h:23:8: error: redefinition of ‘struct _xmmreg’
> >  struct _xmmreg {
> >         ^
> > In file included from ./asm/sigcontext32.h:6:0,
> >                  from ./asm/sigcontext32.c:1:
> > ./asm/sigcontext.h:67:8: note: originally defined here
> >  struct _xmmreg {
> >         ^
> > FAILED: ./asm/sigcontext32.h
> > 
> > I guess this was the reason why I ended with the hack.
> 
> sigcontext32.h is a 64-bit only header (for compat functionality), and you are 
> trying to build this on i386, right?

Yes, i386 32bit.

> In theory we could unify them mostly, the two structures match mostly, except that 
> '_fpstate_ia32::padding' is named 'padding1' in _fpstate, and there's also some 
> legacy uglies wrt. user-space sigcontext definitions.
> 
> So this either gets cleaned up properly, with the legacy hacks/wrappers clearly 
> isolated, or we could state that you shouldn't build 64-bit headers in 32-bit 
> environments.

Should the sigcontext32.h have some 32bit ifdefs maybe?

I assume that the exported header files should be the same for both 64 and 32
bit i386/x86

-Mikko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1219439 — Re: [PATCH] x86/headers: Fix (old) header file dependency bug in uapi/asm/sigcontext32.h

FromIngo Molnar <mingo@kernel.org>
Date2015-09-05 09:40 +0200
SubjectRe: [PATCH] x86/headers: Fix (old) header file dependency bug in uapi/asm/sigcontext32.h
Message-ID<q5geR-2go-5@gated-at.bofh.it>
In reply to#1218883
* Mikko Rapeli <mikko.rapeli@iki.fi> wrote:

> > sigcontext32.h is a 64-bit only header (for compat functionality), and you are 
> > trying to build this on i386, right?
> 
> Yes, i386 32bit.
> 
> > In theory we could unify them mostly, the two structures match mostly, except that 
> > '_fpstate_ia32::padding' is named 'padding1' in _fpstate, and there's also some 
> > legacy uglies wrt. user-space sigcontext definitions.
> > 
> > So this either gets cleaned up properly, with the legacy hacks/wrappers clearly 
> > isolated, or we could state that you shouldn't build 64-bit headers in 32-bit 
> > environments.
> 
> Should the sigcontext32.h have some 32bit ifdefs maybe?

That gets ugly pretty fast.

> I assume that the exported header files should be the same for both 64 and 32
> bit i386/x86

Yes. I have written a small series cleaning up all these header problems - I'll 
send it out in a few minutes.

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web