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] [day] [month] [year] [list]
Message-ID: <CAFULd4aPtQ4YmBunxYf_jkSkw50rLgYqD_upnYqt8PH3NzYNWg@mail.gmail.com>
Date:   Mon, 4 Dec 2023 15:03:11 +0100
From:   Uros Bizjak <ubizjak@...il.com>
To:     x86@...nel.org, linux-kernel@...r.kernel.org
Cc:     kernel test robot <lkp@...el.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        "H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH -tip v2 3/3] x86/percpu: Avoid sparse warning with cast to
 named address space

On Mon, Dec 4, 2023 at 12:20 AM Uros Bizjak <ubizjak@...il.com> wrote:
>
> Currently sparse does not know about __seg_fs and __seg_fs named
> address space qualifiers. Avoid thousands of warnings about unexpected
> keyword at the end of cast operator by removing named address space
> qualifier from __my_cpu_type() when __CHECKER__ is defined.

We have discussed this issue a bit on the linux-sparse ML [1], and the
proposed solution is to define:

+#define __seg_gs __attribute__((address_space(__seg_gs)))
+#define __seg_fs __attribute__((address_space(__seg_fs)))

as done in the attached patch.

[1] https://lore.kernel.org/linux-sparse/CAFULd4YMcHhkSR4P5tq3ghLQyUCkiTOKS6PQd1Bec-2NicUiwQ@mail.gmail.com/T/#md048c918cd2145c822727e3aa401326e1660842f

Uros.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ