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:   Wed, 11 Jan 2017 13:42:02 +0100
From:   Jesper Nilsson <jesper.nilsson@...s.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     linuxppc-dev@...ts.ozlabs.org, linux-kbuild@...r.kernel.org,
        Nicolas Dichtel <nicolas.dichtel@...nd.com>,
        linux-mips@...ux-mips.org, alsa-devel@...a-project.org,
        linux-ia64@...r.kernel.org, linux-doc@...r.kernel.org,
        airlied@...ux.ie, linux-fbdev@...r.kernel.org,
        dri-devel@...ts.freedesktop.org, linux-mtd@...ts.infradead.org,
        sparclinux@...r.kernel.org, linux-arch@...r.kernel.org,
        linux-s390@...r.kernel.org, linux-am33-list@...hat.com,
        linux-c6x-dev@...ux-c6x.org, linux-rdma@...r.kernel.org,
        linux-hexagon@...r.kernel.org, linux-sh@...r.kernel.org,
        coreteam@...filter.org, fcoe-devel@...n-fcoe.org,
        xen-devel@...ts.xenproject.org, linux-snps-arc@...ts.infradead.org,
        linux-media@...r.kernel.org, uclinux-h8-devel@...ts.sourceforge.jp,
        adi-buildroot-devel@...ts.sourceforge.net,
        linux-raid@...r.kernel.org, linux-m68k@...ts.linux-m68k.org,
        openrisc@...ts.librecores.org, linux-metag@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-nfs@...r.kernel.org,
        linux-parisc@...r.kernel.org, linux-cris-kernel@...s.com,
        netdev@...r.kernel.org, linux-mmc@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-spi@...r.kernel.org,
        mmarek@...e.com, netfilter-devel@...r.kernel.org,
        linux-alpha@...r.kernel.org, nios2-dev@...ts.rocketboards.org,
        davem@...emloft.net
Subject: Re: [PATCH v2 0/7] uapi: export all headers under uapi directories

On Mon, Jan 09, 2017 at 12:33:58PM +0100, Arnd Bergmann wrote:
> On Friday, January 6, 2017 10:43:52 AM CET Nicolas Dichtel wrote:
> > Here is the v2 of this series. The first 5 patches are just cleanup: some
> > exported headers were still under a non-uapi directory.
> 
> Since this is meant as a cleanup, I commented on this to point out a cleaner
> way to do the same.
> 
> > The patch 6 was spotted by code review: there is no in-tree user of this
> > functionality.
> > The last patch remove the use of header-y. Now all files under an uapi
> > directory are exported.
> 
> Very nice!
> 
> > asm is a bit special, most of architectures export asm/<arch>/include/uapi/asm
> > only, but there is two exceptions:
> >  - cris which exports arch/cris/include/uapi/arch-v[10|32];
> 
> This is interesting, though not your problem. Maybe someone who understands
> cris better can comment on this: How is the decision made about which of
> the arch/user.h headers gets used? I couldn't find that in the sources,
> but it appears to be based on kernel compile-time settings, which is
> wrong for user space header files that should be independent of the kernel
> config.

I believe it's since the CRISv10 and CRISv32 are very different beasts,
and that is selected via kernel config...

This part of the CRIS port has been transformed a couple of times from
the original layout without uapi, and there's still some legacy silliness,
where some files might have been exported but never used from userspace
except for some corner cases.

> >  - tile which exports arch/tile/include/uapi/arch.
> > Because I don't know if the output of 'make headers_install_all' can be changed,
> > I introduce subdir-y in Kbuild file. The headers_install_all target copies all
> > asm/<arch>/include/uapi/asm to usr/include/asm-<arch> but
> > arch/cris/include/uapi/arch-v[10|32] and arch/tile/include/uapi/arch are not
> > prefixed (they are put asis in usr/include/). If it's acceptable to modify the
> > output of 'make headers_install_all' to export asm headers in
> > usr/include/asm-<arch>/asm, then I could remove this new subdir-y and exports
> > everything under arch/<arch>/include/uapi/.
> 
> I don't know if anyone still uses "make headers_install_all", I suspect
> distros these days all use "make headers_install", so it probably
> doesn't matter much.
> 
> In case of cris, it should be easy enough to move all the contents of the
> uapi/arch-*/*.h headers into the respective uapi/asm/*.h headers, they
> only seem to be referenced from there.

This would seem to be a reasonable change.

> For tile, I suspect that would not work as the arch/*.h headers are
> apparently defined as interfaces for both user space and kernel.
> 
> > Note also that exported files for asm are a mix of files listed by:
> >  - include/uapi/asm-generic/Kbuild.asm;
> >  - arch/x86/include/uapi/asm/Kbuild;
> >  - arch/x86/include/asm/Kbuild.
> > This complicates a lot the processing (arch/x86/include/asm/Kbuild is also
> > used by scripts/Makefile.asm-generic).
> > 
> > This series has been tested with a 'make headers_install' on x86 and a
> > 'make headers_install_all'. I've checked the result of both commands.
> > 
> > This patch is built against linus tree. I don't know if it should be
> > made against antoher tree.
> 
> The series should probably get merged through the kbuild tree, but testing
> it on mainline is fine here.
> 
> 	Arnd

/^JN - Jesper Nilsson
-- 
               Jesper Nilsson -- jesper.nilsson@...s.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ