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, 18 Aug 2022 10:14:01 +0100
From:   Richard Purdie <richard.purdie@...uxfoundation.org>
To:     Randy Dunlap <rdunlap@...radead.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        alexandre.belloni@...tlin.com,
        Masahiro Yamada <masahiroy@...nel.org>
Cc:     Sean Christopherson <seanjc@...gle.com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] init/Kconfig: fix CC_HAS_ASM_GOTO_TIED_OUTPUT test with
 dash

On Wed, 2022-08-17 at 16:52 -0700, Randy Dunlap wrote:
> 
> On 8/17/22 16:46, Nick Desaulniers wrote:
> > On Thu, Aug 4, 2022 at 12:03 PM <alexandre.belloni@...tlin.com> wrote:
> > > 
> > > From: Alexandre Belloni <alexandre.belloni@...tlin.com>
> > > 
> > > When using dash as /bin/sh, the CC_HAS_ASM_GOTO_TIED_OUTPUT test fails
> > > with a syntax error which is not the one we are looking for:
> > 
> > Thanks for the patch, though I think I'd rather see `/bin/bash`
> > hardcoded. Bash is a non-optional requirement as of
> > commit da4288b95baa ("scripts/check-local-export: avoid 'wait $!' for
> > process substitution")
> > scripts/ is kind of a mess...
> > 
> 
> Well, once upon a time, we took patches to remove bash-isms (convert to
> standard shell)...
> No longer, AFAICT.

This problem is a little more subtle. 

As far as I could work out, exec() is used on entries like this in
kConfig. exec() falls back to /bin/sh so it is hard to see where this
would be changed to be /bin/bash.

I have no issue with bash being required and used and if someone can
work out how to make that happen for the exec() calls, I'm fine with
that. It would probably require some parsing of the "code" being passed
to kConfig to decide how to call exec().

What worries me is seeing the kernel behaviour changing depending on
whether /bin/sh is dash or bash and I think that should be fixed as a
more urgent matter.

I'd hope Alexandre's patch could be taken in the meantime as it doesn't
really hurt anything and does fix a very unexpected behaviour change
depending on the host system setup.

Cheers,

Richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ