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]
Message-ID: <CAADnVQKLtnfbaJCbbe=JY+85kBKfiUv9hjW+bumO_Y_YovuFow@mail.gmail.com>
Date: Tue, 20 Jan 2026 20:52:09 -0800
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Ihor Solodrai <ihor.solodrai@...ux.dev>
Cc: Gary Guo <gary@...yguo.net>, Thomas Weißschuh <linux@...ssschuh.net>, 
	Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, 
	Andrii Nakryiko <andrii@...nel.org>, Martin KaFai Lau <martin.lau@...ux.dev>, 
	Eduard Zingerman <eddyz87@...il.com>, Song Liu <song@...nel.org>, 
	Yonghong Song <yonghong.song@...ux.dev>, John Fastabend <john.fastabend@...il.com>, 
	KP Singh <kpsingh@...nel.org>, Stanislav Fomichev <sdf@...ichev.me>, Hao Luo <haoluo@...gle.com>, 
	Jiri Olsa <jolsa@...nel.org>, bpf <bpf@...r.kernel.org>, 
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] scripts/gen-btf.sh: fix shebang for NixOS

On Tue, Jan 20, 2026 at 8:50 PM Ihor Solodrai <ihor.solodrai@...ux.dev> wrote:
>
>
>
> On 1/20/26 3:54 PM, Gary Guo wrote:
> >> [...]
> >>
> >> So it's trivial to put $(CONFIG_SHELL) in front of it. But then it
> >> must be migrated to #!/bin/sh, right?
> >
> > Documentation/kbuild/makefiles.rst says:
> >
> > Make rules may invoke scripts to build the kernel. The rules shall
> > always provide the appropriate interpreter to execute the script. They
> > shall not rely on the execute bits being set, and shall not invoke the
> > script directly. For the convenience of manual script invocation, such
> > as invoking ./scripts/checkpatch.pl, it is recommended to set execute
> > bits on the scripts nonetheless.
> >
> > Kbuild provides variables $(CONFIG_SHELL), $(AWK), $(PERL),
> > and $(PYTHON3) to refer to interpreters for the respective
> > scripts.
> >
> > So I suppose it would need to migate to POSIX shell...
>
> That's my blunder then.
>
> I'll send a patch tomorrow to make gen-btf.sh runnable with /bin/sh

Isn't the current patch enough?
-#!/bin/bash
+#!/usr/bin/env bash

I don't think all kernel build scripts are pure 'sh'.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ