Re: [PATCH 5.10 00/79] 5.10.151-rc1 review

From: Linus Torvalds
Date: Thu Oct 27 2022 - 15:49:47 EST


On Thu, Oct 27, 2022 at 12:27 PM Pavel Machek <pavel@xxxxxxx> wrote:
>
> Alternatively you can modify the caller to do /bin/sh /scripts/... so
> it does not need a +x bit...

Generally we should be doing both.

Make it have the proper +x bit to show clearly that it's an executable
script and have 'ls' and friends show it that way when people enable
colorization or whatever.

*And* make any Makefiles and tooling use an explicit "sh" or whatever
thing, because we've traditionally let people use tar-files and patch
to generate their trees, and various stupid tools exist and get it
wrong even when we get it right in our git tree.

So belt and suspenders.

But in this case, I think our tools already do the "run shell" part:

Makefile:PAHOLE_FLAGS = $(shell PAHOLE=$(PAHOLE)
$(srctree)/scripts/pahole-flags.sh)

no? And at least in my -git tree, it's already executable.

Maybe one of those "various stipid tools exists" is in the stable
tree. I didn't check.

Linus