lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 6 Sep 2015 08:41:45 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	Mikko Rapeli <mikko.rapeli@....fi>
Cc:	linux-kernel@...r.kernel.org,
	Andy Lutomirski <luto@...capital.net>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Denys Vlasenko <dvlasenk@...hat.com>,
	Brian Gerst <brgerst@...il.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Borislav Petkov <bp@...en8.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Oleg Nesterov <oleg@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 15/15] x86/headers: Remove <asm/sigcontext.h>


* Mikko Rapeli <mikko.rapeli@....fi> wrote:

> On Sat, Sep 05, 2015 at 01:59:43PM +0200, Ingo Molnar wrote:
> > 
> > * Mikko Rapeli <mikko.rapeli@....fi> wrote:
> > 
> > > > diff --git a/arch/x86/include/uapi/asm/sigcontext32.h b/arch/x86/include/uapi/asm/sigcontext32.h
> > > > index a92b0f0dc09e..8b870175befa 100644
> > > > --- a/arch/x86/include/uapi/asm/sigcontext32.h
> > > > +++ b/arch/x86/include/uapi/asm/sigcontext32.h
> > > > @@ -3,6 +3,6 @@
> > > >  
> > > >  /* This is a legacy file - all the type definitions are in sigcontext.h: */
> > > >  
> > > > -#include <asm/sigcontext.h>
> > > > +#include <uapi/asm/sigcontext.h>
> > > 
> > > This needs to be without uapi directory in path.
> > 
> > What do you mean?
> 
> There is not uapi in path in userspace so it fails to compile:

Ok, I see. So it's not common, but I don't think there's an outright prohibition 
for uapi headers to refer to each other:

 arch/hexagon/include/uapi/asm/signal.h:#include <uapi/asm/registers.h>
 arch/mips/include/uapi/asm/siginfo.h:#include <uapi/asm-generic/siginfo.h>
 arch/x86/include/uapi/asm/sigcontext32.h:#include <uapi/asm/sigcontext.h>

There are a couple of solutions:

  - copy the uapi/ directory if you take the kernel headers as-is

  - adapt the headers to the old user-space layout when you import them.
    (i.e. do a sed -i 's/<uapi/</' on them).

  - create a symbolic link from asm/uapi to asm/ in user-space.

The kernel side solutions are uglier:

  - We could create a symbolic link from asm/uapi/sigcontext32.h to 
    asm/uapi/sigcontext.h, although I'm not sure what the policy for that is in 
    the kernel repository - I think it's generally frowned upon.

  - We could keep asm/sigcontext.h that includes asm/uapi/sigcontext.h - a
    poor man's symbolic link.

OTOH the last option isn't all that ugly.

> This is the fix:
> 
> --- a/arch/x86/include/uapi/asm/sigcontext32.h
> +++ b/arch/x86/include/uapi/asm/sigcontext32.h
> @@ -3,6 +3,6 @@
>  
>  /* This is a legacy file - all the type definitions are in sigcontext.h: */
>  
> -#include <uapi/asm/sigcontext.h>
> +#include <asm/sigcontext.h>

There's no asm/sigcontext.h file anymore if you apply my patches - but we could 
reintroduce it to make the copy of UAPI headers to user-space work as-is.

Thanks,

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ