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>] [day] [month] [year] [list]
Message-ID: <20180523101451.GH13470@e103592.cambridge.arm.com>
Date:   Wed, 23 May 2018 11:14:52 +0100
From:   Dave Martin <Dave.Martin@....com>
To:     Will Deacon <will.deacon@....com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Catalin Marinas <Catalin.Marinas@....com>,
        Fenghua Yu <fenghua.yu@...el.com>,
        "H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...nel.org>,
        Ivan Kokshaysky <ink@...assic.park.msu.ru>,
        James Hogan <jhogan@...nel.org>,
        Kees Cook <keescook@...omium.org>,
        Matt Turner <mattst88@...il.com>,
        Michael Ellerman <mpe@...erman.id.au>,
        Paul Mackerras <paulus@...ba.org>,
        Ralf Baechle <ralf@...ux-mips.org>,
        Richard Henderson <rth@...ddle.net>,
        Rich Felker <dalias@...c.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Tony Luck <tony.luck@...el.com>,
        "x86@...nel.org" <x86@...nel.org>,
        Yoshinori Sato <ysato@...rs.sourceforge.jp>
Subject: Re: [RFC PATCH 01/11] prctl: Support movement of arch prctls out of
 common code

On Mon, May 21, 2018 at 07:28:26PM +0100, Will Deacon wrote:
> Hi Dave,
> 
> On Mon, May 14, 2018 at 06:14:17PM +0100, Dave Martin wrote:
> > The core framework for the prctl() syscall is unloved and looking
> > rather crusty these days.  It also relies on defining ancillary
> > boilerplate macros for each prctl() in order to control conditional
> > compilation of the different prctl calls.  We have better ways to
> > do this now, using Kconfig.
> > 
> > This patch defines a new arch hook arch_syscall().  Architectures
> > that implemement arch-specific syscalls can now select
> > HAVE_ARCH_SYSCALL in their Kconfig and define this function
> > appropriately.
> > 
> > The core prctl() implementation now matches option against the list
> > of common or legacy prctls, deferring to prctl_arch() if an
> > unrecognised option is encountered.
> > 
> > (arch_prctl() would have been a nicer name, but it conflicts with the
> > pre-existing syscall of the same name on x86, particularly in the um
> > code.)
> > 
> > No functional change.
> 
> [...]
> 
> > diff --git a/include/uapi/linux/prctl.h b/include/uapi/linux/prctl.h
> > index af5f8c2..c911ff0 100644
> > --- a/include/uapi/linux/prctl.h
> > +++ b/include/uapi/linux/prctl.h
> > @@ -1,6 +1,6 @@
> >  /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
> > -#ifndef _LINUX_PRCTL_H
> > -#define _LINUX_PRCTL_H
> > +#ifndef _UAPI_LINUX_PRCTL_H
> > +#define _UAPI_LINUX_PRCTL_H
> 
> Is it safe to rename this #define, or is there a possibility that userspace
> could be using it for something and relying on it not changing?
> 
> Other than that:
> 
> Acked-by: Will Deacon <will.deacon@....com>

I think that header guards are generally viewed as being private to a
project and not API.  codesearch.debian.net yields few hits, where there
are actual #ifdefs on this symbol, they seem to be pastes of the kernel
headers:

https://codesearch.debian.net/search?q=_LINUX_PRCTL_H&perpkg=1

 -> android, linux, dietlibc ... gnome-chess (?)


There is plenty of precedent in the Howells special:

607ca46e97a1 ("UAPI: (Scripted) Disintegrate include/linux")

See for example <{,uapi/}linux/loop.h>.

Cheers
---Dave

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ