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]
Message-ID: <20181214182518.GH3505@e103592.cambridge.arm.com>
Date:   Fri, 14 Dec 2018 18:25:18 +0000
From:   Dave Martin <Dave.Martin@....com>
To:     Szabolcs Nagy <Szabolcs.Nagy@....com>
Cc:     "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>, nd <nd@....com>,
        Will Deacon <Will.Deacon@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Alan Hayward <Alan.Hayward@....com>
Subject: Re: [PATCH 0/3] arm64/sve: UAPI: Disentangle ptrace.h from
 sigcontext.h

On Fri, Dec 14, 2018 at 06:13:33PM +0000, Szabolcs Nagy wrote:
> On 11/12/2018 19:26, Dave Martin wrote:
> > This patch refactors the UAPI header definitions for the Arm SVE
> > extension to avoid multiple-definition problems when userspace mixes its
> > own sigcontext.h definitions with the kernel's ptrace.h (which is
> > apparently routine).
> > 
> > A common backend header is created to hold common definitions, suitably
> > namespaced, and with an appropriate header guard.
> > 
> > See the commit message in patch 3 for further explanation of why this
> > is needed.
> > 
> > Because of the non-trivial header guard in the new sve_context.h, patch
> > 1 adds support to headers_install.sh to munge #if defined(_UAPI_FOO) in
> > a similar way to the current handling of #ifndef _UAPI_FOO.
> > 
> 
> thanks for doing this.
> 
> the patches fix the gdb build issue on musl libc with an
> additional gdb patch:
> https://sourceware.org/ml/gdb-patches/2018-12/msg00152.html
> (in userspace i'd expect users relying on signal.h providing
> whatever is in asm/sigcontext.h.)
> 
> i think sve_context.h could be made to work with direct include,
> even if that's not useful because there is no public api there.
> (and then you dont need the first patch)

My general view is that if you want the sigframe types userspace should
usually include <ucontext.h> and refer to mcontext_t.

Because the prototype for sa_sigaction() specifies a void * for the
ucontext argument, I've generally assumed that <signal.h> is not
sufficient to get ucontext_t (or mcontext_t) (but maybe I'm too paranoid
there).

Non-POSIX-flavoured software might include <asm/sigcontext.h> directly.
In glibc/musl libc will that conflict with <signal.h>, or can the two
coexist?

Cheers
---Dave

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ