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:   Fri, 10 Nov 2023 12:19:42 +0100
From:   "Arnd Bergmann" <arnd@...db.de>
To:     "Thomas Huth" <thuth@...hat.com>,
        "Geert Uytterhoeven" <geert@...ux-m68k.org>,
        linux-m68k@...ts.linux-m68k.org,
        "Greg Ungerer" <gerg@...ux-m68k.org>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] m68k: Avoid CONFIG_COLDFIRE switch in uapi header

On Fri, Nov 10, 2023, at 11:31, Thomas Huth wrote:
> We should not use any CONFIG switches in uapi headers since
> these only work during kernel compilation. They are not defined
> for userspace. Let's use the __mcoldfire__ switch from the
> compiler here instead.
>
> Signed-off-by: Thomas Huth <thuth@...hat.com>
> ---
>  Marked as RFC since I didn't test it - I'd appreciate if someone
>  could give it a try on a real system.
>
>  arch/m68k/include/uapi/asm/ptrace.h | 2 +-
>  scripts/headers_install.sh          | 1 -
>  2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/m68k/include/uapi/asm/ptrace.h 
> b/arch/m68k/include/uapi/asm/ptrace.h
> index 5b50ea592e00..ebd9fccb3d11 100644
> --- a/arch/m68k/include/uapi/asm/ptrace.h
> +++ b/arch/m68k/include/uapi/asm/ptrace.h
> @@ -39,7 +39,7 @@ struct pt_regs {
>    long     d0;
>    long     orig_d0;
>    long     stkadj;
> -#ifdef CONFIG_COLDFIRE
> +#ifdef __mcoldfire__
>    unsigned format :  4; /* frame format specifier */
>    unsigned vector : 12; /* vector offset */
>    unsigned short sr;

I think this should be harmless, but I'm not sure we even
need the structure in a uapi header: about half the architectures
define this in a user-visible way, while the others don't.

On csky, powerpc and microblaze, pt_regs is used inside
of the 'struct sigcontext' definition, but I don't think
this was ever the case on m68k.

The other one that is accessed in userspace is 'struct
user_regs_struct', but this one is actually not in the
uapi headers on m68k or x86.

     Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ