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:   Thu, 29 Jun 2023 15:03:20 +0200
From:   "Arnd Bergmann" <arnd@...db.de>
To:     "Thomas Zimmermann" <tzimmermann@...e.de>,
        "Helge Deller" <deller@....de>, "Daniel Vetter" <daniel@...ll.ch>,
        "Dave Airlie" <airlied@...il.com>
Cc:     linux-kernel@...r.kernel.org, linux-alpha@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-efi@...r.kernel.org,
        "linux-csky@...r.kernel.org" <linux-csky@...r.kernel.org>,
        linux-hexagon@...r.kernel.org, linux-ia64@...r.kernel.org,
        loongarch@...ts.linux.dev, linux-mips@...r.kernel.org,
        linuxppc-dev@...ts.ozlabs.org, linux-riscv@...ts.infradead.org,
        linux-sh@...r.kernel.org, sparclinux@...r.kernel.org,
        dri-devel@...ts.freedesktop.org, linux-hyperv@...r.kernel.org,
        linux-fbdev@...r.kernel.org, linux-staging@...ts.linux.dev,
        Linux-Arch <linux-arch@...r.kernel.org>,
        "Richard Henderson" <richard.henderson@...aro.org>,
        "Ivan Kokshaysky" <ink@...assic.park.msu.ru>,
        "Matt Turner" <mattst88@...il.com>,
        "Russell King" <linux@...linux.org.uk>,
        "Catalin Marinas" <catalin.marinas@....com>,
        "Will Deacon" <will@...nel.org>, guoren <guoren@...nel.org>,
        "Brian Cain" <bcain@...cinc.com>,
        "Huacai Chen" <chenhuacai@...nel.org>,
        "WANG Xuerui" <kernel@...0n.name>,
        "Thomas Bogendoerfer" <tsbogend@...ha.franken.de>,
        "Dinh Nguyen" <dinguyen@...nel.org>,
        "Michael Ellerman" <mpe@...erman.id.au>,
        "Nicholas Piggin" <npiggin@...il.com>,
        "Christophe Leroy" <christophe.leroy@...roup.eu>,
        "Paul Walmsley" <paul.walmsley@...ive.com>,
        "Palmer Dabbelt" <palmer@...belt.com>,
        "Albert Ou" <aou@...s.berkeley.edu>,
        "Yoshinori Sato" <ysato@...rs.sourceforge.jp>,
        "Rich Felker" <dalias@...c.org>,
        "John Paul Adrian Glaubitz" <glaubitz@...sik.fu-berlin.de>,
        "David S . Miller" <davem@...emloft.net>,
        "Thomas Gleixner" <tglx@...utronix.de>,
        "Ingo Molnar" <mingo@...hat.com>, "Borislav Petkov" <bp@...en8.de>,
        "Dave Hansen" <dave.hansen@...ux.intel.com>, x86@...nel.org,
        "H. Peter Anvin" <hpa@...or.com>,
        "Chris Zankel" <chris@...kel.net>,
        "Max Filippov" <jcmvbkbc@...il.com>,
        "Kees Cook" <keescook@...omium.org>,
        "Paul E. McKenney" <paulmck@...nel.org>,
        "Peter Zijlstra" <peterz@...radead.org>,
        "Frederic Weisbecker" <frederic@...nel.org>,
        "Andrew Morton" <akpm@...ux-foundation.org>,
        "Ard Biesheuvel" <ardb@...nel.org>,
        "Sami Tolvanen" <samitolvanen@...gle.com>,
        "Juerg Haefliger" <juerg.haefliger@...onical.com>,
        "Geert Uytterhoeven" <geert@...ux-m68k.org>,
        "Anshuman Khandual" <anshuman.khandual@....com>,
        "Niklas Schnelle" <schnelle@...ux.ibm.com>,
        "Russell King" <rmk+kernel@...linux.org.uk>,
        "Linus Walleij" <linus.walleij@...aro.org>,
        "Sebastian Reichel" <sebastian.reichel@...labora.com>,
        "Mike Rapoport" <rppt@...nel.org>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        "Zi Yan" <ziy@...dia.com>
Subject: Re: [PATCH 06/12] arch: Declare screen_info in <asm/screen_info.h>

On Thu, Jun 29, 2023, at 13:45, Thomas Zimmermann wrote:

> diff --git a/include/asm-generic/screen_info.h 
> b/include/asm-generic/screen_info.h
> new file mode 100644
> index 0000000000000..6fd0e50fabfcd
> --- /dev/null
> +++ b/include/asm-generic/screen_info.h
> @@ -0,0 +1,12 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +
> +#ifndef _ASM_GENERIC_SCREEN_INFO_H
> +#define _ASM_GENERIC_SCREEN_INFO_H
> +
> +#include <uapi/linux/screen_info.h>
> +
> +#if defined(CONFIG_ARCH_HAS_SCREEN_INFO)
> +extern struct screen_info screen_info;
> +#endif
> +
> +#endif /* _ASM_GENERIC_SCREEN_INFO_H */
> diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h
> index eab7081392d50..c764b9a51c24b 100644
> --- a/include/linux/screen_info.h
> +++ b/include/linux/screen_info.h
> @@ -4,6 +4,6 @@
> 
>  #include <uapi/linux/screen_info.h>
> 
> -extern struct screen_info screen_info;
> +#include <asm/screen_info.h>
> 

What is the purpose of adding a file in asm-generic? If all
architectures use the same generic file, I'd just leave the
declaration in include/linux/. I wouldn't bother adding the
#ifdef either, but I can see how that helps turn a link
error into an earlier compile error.

      Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ