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]
Date:   Fri, 19 Aug 2022 21:37:29 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Bagas Sanjaya' <bagasdotme@...il.com>,
        Masahiro Yamada <masahiroy@...nel.org>,
        "linux-kbuild@...r.kernel.org" <linux-kbuild@...r.kernel.org>
CC:     Nick Desaulniers <ndesaulniers@...gle.com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Randy Dunlap <rdunlap@...radead.org>,
        Richard Purdie <richard.purdie@...uxfoundation.org>,
        Jonathan Corbet <corbet@....net>,
        Michal Marek <michal.lkml@...kovi.net>,
        "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [RFC PATCH 2/3] kconfig: allow to choose the shell for $(shell )
 functions

From: Bagas Sanjaya
> Sent: 19 August 2022 09:59
> 
> On 8/19/22 13:56, Masahiro Yamada wrote:
> > GNU Make uses /bin/sh by default for running recipe lines and $(shell )
> > functions. You can change the shell by setting the 'SHELL' variable.
> > Unlike most variables, 'SHELL' is never set from the environment. [1]
> >
> > Currently, Kconfig does not provide any way to change the default shell.
> > /bin/sh is always used for running $(shell,...) because do_shell() is
> > implemented by using popen(3).
> >
> > This commit allows users to change the shell for Kconfig in a similar
> > way to GNU Make; you can set the 'SHELL' variable in a Kconfig file to
> > override the default shell. It is not taken from the environment. The
> > change is effective only for $(shell,...) invocations called after the
> > 'SHELL' assignment.
> >
> 
> Hmmm...
> 
> Can we say that if we run SHELL=/bin/bash make nconfig, Kconfig will use
> $SHELL but we can't set it as environment variable?

That just puts it into the environment for the single command.
You'd need to pass it as a command line argument to make.

(Or pass it in a different environment variable and then assign
it within the makefile.)

Or just remove the crappy bashisms and write portable shell scripts.
Just be glad you're not trying to use the SYSV /bin/sh.
(And avoid the other bugs that make dash fail to run most of the
scripts I write.)

Compex echo requests can be replaced by printf (without penalty
since it will be a shell builtin).

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ