Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-14 Thread Ujjwal Kumar
On 14/10/20 11:16 am, Lukas Bulwahn wrote: > > > On Tue, 13 Oct 2020, Ujjwal Kumar wrote: > >> checkpatch.pl checks for invalid EXECUTE_PERMISSIONS on source >> files. The script leverages filename extensions and its path in >> the repository to decide whethe

Re: [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-13 Thread Ujjwal Kumar
On 13/10/20 5:31 pm, Ujjwal Kumar wrote: > checkpatch.pl checks for invalid EXECUTE_PERMISSIONS on source > files. The script leverages filename extensions and its path in > the repository to decide whether to allow execute permissions on > the file or not. > > Based on curren

[RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-13 Thread Ujjwal Kumar
positive report but in the end we will have less false positives as we will be handling some of the unhandled cases. Signed-off-by: Ujjwal Kumar --- Changes in v2: - Spelling correction and add example to commit message - Code style changes - Remove unncessary function argument - Use non

Re: [PATCH v2 2/2] kbuild: use interpreters to invoke scripts

2020-10-12 Thread Ujjwal Kumar
voking a script file without setting the x bits will give a permission denied error. Similar thing happens when 'shell function' tries to invoke the provided script. So the task was simply to prepend the $CONFIG_SHELL (or $SHELL whichever is configured; simple sh would also suffice) with the script file in 'shell function'. > (defaulting to /bin/sh - what else;-). > Flags for the shell can BTW set with ".SHELLFLAGS = ". setting flags might not be the solution either. > > So please > -) learn basic "Makefile" + "make" before brainlessly patching >a Makefile. > -) actually testy your changes to make sure the patch didn't >broke anything > -) and - last but not least - check if there isn't a shell >already set (and which). btw, I do agree with your points. > > MfG, > Bernd > If I said anything incorrect please correct me. Thanks Ujjwal Kumar

Re: [PATCH v2 2/2] kbuild: use interpreters to invoke scripts

2020-10-12 Thread Ujjwal Kumar
On 12/10/20 11:50 pm, Lukas Bulwahn wrote: > > > On Mon, 12 Oct 2020, Ujjwal Kumar wrote: > >> We cannot rely on execute bits to be set on files in the repository. >> The build script should use the explicit interpreter when invoking any >> script from the rep

[PATCH v2 2/2] kbuild: use interpreters to invoke scripts

2020-10-12 Thread Ujjwal Kumar
/lkml/202008271102.FEB906C88@keescook/ Suggested-by: Andrew Morton Suggested-by: Kees Cook Suggested-by: Lukas Bulwahn Signed-off-by: Ujjwal Kumar --- Makefile | 4 ++-- arch/arm64/kernel/vdso/Makefile | 2 +- arch/arm64/kernel/vdso32/Makefile | 2 +- arch/ia64

[PATCH v2 1/2] kconfig: use interpreters to invoke scripts

2020-10-12 Thread Ujjwal Kumar
/lkml/202008271102.FEB906C88@keescook/ Suggested-by: Andrew Morton Suggested-by: Kees Cook Suggested-by: Lukas Bulwahn Signed-off-by: Ujjwal Kumar --- init/Kconfig | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/init/Kconfig b/init/Kconfig index c9446911cf41

[PATCH v2 0/2] use interpreters to invoke scripts

2020-10-12 Thread Ujjwal Kumar
prepare Following changes in PATCH 2/2 are not yet tested: arch/arm64/kernel/vdso32/Makefile arch/nds32/kernel/vdso/Makefile scripts/Makefile.build --- Changes in v2: - Changes suggested by Masahiro Yamada $($(CONFIG_SHELL)-> $(shell $(CONFIG_SHELL) Ujjwal Kumar (2): kconfig:

Re: [PATCH RFC 0/2] use interpreters to invoke scripts

2020-10-12 Thread Ujjwal Kumar
On 12/10/20 9:48 pm, Masahiro Yamada wrote: > On Sun, Oct 4, 2020 at 12:19 AM Ujjwal Kumar > wrote: >> >> This patch series aims at removing the dependency on execute >> bit of the scripts in the kbuild system. >> >> If not working with fresh clone of li

[PATCH] checkpatch: improve EXECUTE_PERMISSIONS tests

2020-10-12 Thread Ujjwal Kumar
unnecessary group capture regexp with non-capturing group. Suggested-by: Joe Perches Signed-off-by: Ujjwal Kumar --- scripts/checkpatch.pl | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index fab38b493cef..aa8417b5 100755

Re: [RFC PATCH] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-12 Thread Ujjwal Kumar
On 12/10/20 11:47 am, Joe Perches wrote: > On Mon, 2020-10-12 at 11:19 +0530, Ujjwal Kumar wrote: >> checkpatch.pl checks for invalid EXECUTE_PERMISSIONS on source >> files. The script leverages filename extensions and its path in >> the repository to decide whether to allo

[RFC PATCH] checkpatch: add shebang check to EXECUTE_PERMISSIONS

2020-10-11 Thread Ujjwal Kumar
of the unhandled cases. Signed-off-by: Ujjwal Kumar --- Apologies, I forgot to include linux-kernel@vger.kernel.org so I'm now resending. scripts/checkpatch.pl | 19 +++ 1 file changed, 19 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index fab38b493cef

[PATCH RFC 2/2] kbuild: use interpreters to invoke scripts

2020-10-03 Thread Ujjwal Kumar
/lkml/202008271102.FEB906C88@keescook/ Suggested-by: Andrew Morton Suggested-by: Kees Cook Suggested-by: Lukas Bulwahn Signed-off-by: Ujjwal Kumar --- Makefile | 4 ++-- arch/arm64/kernel/vdso/Makefile | 2 +- arch/arm64/kernel/vdso32/Makefile | 2 +- arch/ia64

[PATCH RFC 1/2] kconfig: use interpreters to invoke scripts

2020-10-03 Thread Ujjwal Kumar
/lkml/202008271102.FEB906C88@keescook/ Suggested-by: Andrew Morton Suggested-by: Kees Cook Suggested-by: Lukas Bulwahn Signed-off-by: Ujjwal Kumar --- init/Kconfig | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/init/Kconfig b/init/Kconfig index 91456ac0ef20

[PATCH RFC 0/2] use interpreters to invoke scripts

2020-10-03 Thread Ujjwal Kumar
prepare Following changes in PATCH 2/2 are not yet tested: arch/arm64/kernel/vdso32/Makefile arch/nds32/kernel/vdso/Makefile scripts/Makefile.build Ujjwal Kumar (2): kconfig: use interpreters to invoke scripts kbuild: use interpreters to invoke scripts Makefile | 4