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] [day] [month] [year] [list]
Date:	Mon, 9 Jun 2014 13:40:10 +0200
From:	Sam Ravnborg <sam@...nborg.org>
To:	Masahiro Yamada <yamada.m@...panasonic.com>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>,
	linux-kbuild@...r.kernel.org
Subject: Re: [Question] Why CONFIG_SHELL

On Mon, Jun 09, 2014 at 07:25:48PM +0900, Masahiro Yamada wrote:
> Hi Sam,
> 
> 
> On Mon, 9 Jun 2014 09:49:35 +0200
> Sam Ravnborg <sam@...nborg.org> wrote:
> 
> > On Mon, Jun 09, 2014 at 02:04:12PM +0900, Masahiro Yamada wrote:
> > > Hi experts.
> > > 
> > > I think all the macros with CONFIG_ prefix are supposed to be
> > > defined in Kconfig.
> > > But I've been long wondering why there exists one exception:
> > > CONFIG_SHELL.
> > > 
> > > Is there any historical, or special reason?
> > It has been like this as far back as I remmeber.
> > I assume that one has planned to set the shell in Kconfig back then.
> >  
> > > Is it good to rename it to KBUILD_SHELL or something else?
> > Please do so, to free up the CONFIG_ namespace.
> > 
> > I the end Michal will decide if he want this cleanup.
> > On the top of my head I see no problems in doing this,
> > but maybe there are some out-of-tree modules or similar
> > we need to consider...
> 
> Thanks for your commet.
> 
> Another question popped up.
> 
> 
> CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
>           else if [ -x /bin/bash ]; then echo /bin/bash; \
>           else echo sh; fi ; fi)
> 
> 
> If  bash is not found on the system,  CONFIG_SHELL falls back to  "sh".
> 
> Does it mean,  all shell scripts are written as  sh-compatible ?
Not all - but most.
All shell scripts that are invoked with $(CONFIG_SHELL) must be sh-compatible,
or in practice dash compatible as well as bash compatible.
The preference is bash as expressed with the above code.

	Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ