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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNAQy66UAWy+tyLYpzf51brdwVESAK8igcHud=4=-v5QxmQ@mail.gmail.com>
Date:   Sat, 20 Aug 2022 02:41:13 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Nick Desaulniers <ndesaulniers@...gle.com>
Cc:     Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Peter Zijlstra <peterz@...radead.org>, X86 ML <x86@...nel.org>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        "open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-um@...ts.infradead.org, kvm@...r.kernel.org,
        clang-built-linux <llvm@...ts.linux.dev>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Alexei Starovoitov <ast@...nel.org>
Subject: Re: [PATCH] Kconfig: eradicate CC_HAS_ASM_GOTO

On Sat, Aug 20, 2022 at 2:28 AM Nick Desaulniers
<ndesaulniers@...gle.com> wrote:
>
> On Fri, Aug 19, 2022 at 10:16 AM Alexandre Belloni
> <alexandre.belloni@...tlin.com> wrote:
> >
> > On 19/08/2022 10:00:53-0700, Nick Desaulniers wrote:
> > > GCC has supported asm goto since 4.5, and Clang has since version 9.0.0.
> > > The minimum supported versions of these tools for the build according to
> > > Documentation/process/changes.rst are 5.1 and 11.0.0 respectively.
> > >
> > > Remove the feature detection script, Kconfig option, and clean up some
> > > fallback code that is no longer supported.
> > >
> > > The removed script was also testing for a GCC specific bug that was
> > > fixed in the 4.7 release.
> > >
> > > The script was also not portable; users of Dash shell reported errors
> > > when it was invoked.
> > >
> >
> > To be clear, the script was portable, what is not working with dash is
> > the current detection of CC_HAS_ASM_GOTO_TIED_OUTPUT. I'll try the other
> > suggestion from Masahiro.
>
> Ah, that was his point about echo; that makes more sense.
>
> Unless a v2 is required, perhaps Masahiro would be kind enough to drop
> this sentence from the commit message when applying?

I can if there is nothing else to fix.


And, Alexandre's Reported-by is irrelevant.

As for the subject prefix "Kconfig:",
I prefer something else, for example,
"asm goto:" or "jump label:".

I want to reserve "Kconfig:" for changes in scripts/kconfig/.


>
> >
> > > --- a/arch/x86/include/asm/cpufeature.h
> > > +++ b/arch/x86/include/asm/cpufeature.h
> > > @@ -155,11 +155,11 @@ extern void clear_cpu_cap(struct cpuinfo_x86 *c, unsigned int bit);
> > >
> > >  #define setup_force_cpu_bug(bit) setup_force_cpu_cap(bit)
> > >
> > > -#if defined(__clang__) && !defined(CONFIG_CC_HAS_ASM_GOTO)
> > > +#if defined(__clang__) && __clang_major__ < 9
> >
> > Shouldn't we simply mandates clang >= 9 and drop the whole section? This
> > is what you do later on.
>
> I considered it, but I don't think it would be safe to do so in this
> header.  If you look at the comment block below it, it mentions that
> these kernel headers are being sucked into UAPI headers that are used
> outside of the kernel builds, such as when building eBPF programs.  So
> we don't know what userspace tools might be consuming these headers.
> The original intent of the guard was to not break eBPF compilation
> with older clang releases, so I've retained. that functionality.
>
> + Alexei to review
> (author of
> commit b1ae32dbab50 ("x86/cpufeature: Guard asm_volatile_goto usage
> for BPF compilation")


I am not sure at this point.
Wait for the input from Alexei.






> ).
> --
> Thanks,
> ~Nick Desaulniers



-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ