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: <1999963356.6490608.1692479867613.JavaMail.zimbra@nod.at>
Date:   Sat, 19 Aug 2023 23:17:47 +0200 (CEST)
From:   Richard Weinberger <richard@....at>
To:     davidgow <davidgow@...gle.com>
Cc:     anton ivanov <anton.ivanov@...bridgegreys.com>,
        Johannes Berg <johannes@...solutions.net>,
        tglx <tglx@...utronix.de>, mingo <mingo@...hat.com>,
        bp <bp@...en8.de>, dave hansen <dave.hansen@...ux.intel.com>,
        hpa <hpa@...or.com>, Arnd Bergmann <arnd@...db.de>,
        Noah Goldstein <goldstein.w.n@...il.com>,
        linux-um <linux-um@...ts.infradead.org>, x86 <x86@...nel.org>,
        linux-arch <linux-arch@...r.kernel.org>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        linux-kselftest <linux-kselftest@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] asm-generic: current: Don't include thread-info.h
 if building asm

----- Ursprüngliche Mail -----
> Von: "davidgow" <davidgow@...gle.com>
> asm/current.h is included by some assembly files (either directly, or
> indirectly). This works on some architectures (such as x86), as their
> implementation of current.h is careful to not include any C, but the
> asm-generic version includes linux/thread-info.h unconditionally, which
> leads to errors when either C code or non-asm-compatible preprocessor
> directives are included.
> 
> Just wrap the contents behind an #ifndef __ASSEMBLY__ to avoid any C
> code making its way in.
> 
> Signed-off-by: David Gow <davidgow@...gle.com>
> ---
> 
> This is requrired for patch #2 here, as UML uses this asm-generic
> header, but works with x86 assembly files which are expecting the x86
> current.h, which is assembly-friendly.
> 
> ---
> include/asm-generic/current.h | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/include/asm-generic/current.h b/include/asm-generic/current.h
> index 3a2e224b9fa0..9c2aeecbd05a 100644
> --- a/include/asm-generic/current.h
> +++ b/include/asm-generic/current.h
> @@ -2,9 +2,11 @@
> #ifndef __ASM_GENERIC_CURRENT_H
> #define __ASM_GENERIC_CURRENT_H
> 
> +#ifndef __ASSEMBLY__
> #include <linux/thread_info.h>
> 
> #define get_current() (current_thread_info()->task)
> #define current get_current()
> +#endif
> 
> #endif /* __ASM_GENERIC_CURRENT_H */

I'm fine with the UML side of this change but the generic part needs Arnd's ACK.

Thanks,
//richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ