Re: [PATCH] coredump: Do not lock during 'comm' reporting

2024-09-29 Thread Vegard Nossum
;comm, sizeof(comm) - 1, 0); Reverting Linus's revert, applying the patch in this thread, and then changing it to that memcpy_and_pad above, everything seems to work well. Tested-by: Vegard Nossum (However, I have not looked at the _safety_ of omitting task_lock()...) I'm also wonde

Re: [RFC PATCH 00/11] output a valid shell script when running 'make -n'

2024-09-25 Thread Vegard Nossum
nflict. Can/should I wait for -rc1 and resubmit it for inclusion then? Thanks, Vegard On 19/08/2024 18:02, Vegard Nossum wrote: This patch series lets 'make -n' output a shell script that can be used to build the kernel without any further use of make. For example: make defco

[RFC PATCH 09/11] kbuild: simplify commands in --dry-run mode

2024-08-19 Thread Vegard Nossum
executes the command if any dependencies have changed. - $cmd_and_fixdep executes the command and updates ..cmd. Skip all of that in --dry-run mode and just execute the command. Signed-off-by: Vegard Nossum --- scripts/Kbuild.include | 27 +++ 1 file changed, 27

[RFC PATCH 00/11] output a valid shell script when running 'make -n'

2024-08-19 Thread Vegard Nossum
;make -n htmldocs') are not at all guaranteed to produce meaningful output; certain kernel configs may also not work, especially those that rely on external tools like e.g. Rust. [1]: https://www.openwall.com/lists/oss-security/2024/04/17/3 [2]: https://www.gnu.org/software/make/manual/make.html#T

[RFC PATCH 07/11] kbuild: define 'make' as a no-op in --dry-run mode

2024-08-19 Thread Vegard Nossum
Output 'make() { :; }' at the start of the script in order to make all 'make' invocations in the resulting build script no-ops (GNU Make will actually execute -- and print -- all recipe lines that include $(MAKE), even when invoked with -n). Signed-off-by: Vegard Nossu

[RFC PATCH 02/11] kbuild: document some prerequisites

2024-08-19 Thread Vegard Nossum
hich are expected to be created by the parent Makefile) by adding them to the PHONY list of each respective Makefile. Signed-off-by: Vegard Nossum --- arch/x86/boot/compressed/Makefile | 6 ++ scripts/Makefile.modfinal | 5 + scripts/Makefile.modpost | 4 scr

[RFC PATCH 05/11] kbuild: execute modules.order recipe in --dry-run mode

2024-08-19 Thread Vegard Nossum
modules.order is read by scripts/Makefile.modfinal to determine which modules to build, so we need this recipe to execute if we want to be able to output the recipes for building modules in dry-run mode. Signed-off-by: Vegard Nossum --- scripts/Makefile.build | 2 +- 1 file changed, 1 insertion

[RFC PATCH 11/11] kbuild: suppress echoing of commands in --dry-run mode

2024-08-19 Thread Vegard Nossum
If the user ran 'make -n' then we will already print all commands. Signed-off-by: Vegard Nossum --- Makefile | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index d08ade5791c2e..a1a3e96a10ea2 100644 --- a/Makefile +++ b/Makefile @@ -9

[RFC PATCH 10/11] kbuild: don't test for file presence in --dry-run mode

2024-08-19 Thread Vegard Nossum
' invocations and is necessary for 'make --dry-run' to work. Signed-off-by: Vegard Nossum --- scripts/Makefile.modpost | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index 65f2bdc702369..139fa0b087b6d 100644 -

[RFC PATCH 08/11] kbuild: make link-vmlinux.sh respect $dry_run

2024-08-19 Thread Vegard Nossum
Make link-vmlinux.sh print the commands it wants to run instead of actually running them when $dry_run is defined. This is needed in order for make -n/--dry-run to output a complete build script. Signed-off-by: Vegard Nossum --- scripts/Makefile.vmlinux | 15 -- scripts/link

[RFC PATCH 06/11] kbuild: set $dry_run when running in --dry-run mode

2024-08-19 Thread Vegard Nossum
manual/make.html#Testing-Flags Signed-off-by: Vegard Nossum --- Makefile | 5 + 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 58f3843ccfac6..953951157ec92 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,11 @@ $(if $(filter __%, $(MAKECMDGOALS)), \ PHONY := __all

[RFC PATCH 04/11] kbuild: don't execute .ko recipe in --dry-run mode

2024-08-19 Thread Vegard Nossum
Prefixing a line in a make recipe with + makes that command execute even in --dry-run mode. We don't need that here; remove it. Fixes: 5f9ae91f7c0d ("kbuild: Build kernel module BTFs if BTF is enabled and pahole supports it") Cc: Andrii Nakryiko Cc: Alexei Starovoitov Signed

[RFC PATCH 03/11] kbuild: pass KERNELVERSION and LOCALVERSION explicitly to setlocalversion

2024-08-19 Thread Vegard Nossum
These environment variables are passed when invoking 'make', but if running 'make -n' we need to pass them explicitly so they become part of the printed command. Signed-off-by: Vegard Nossum --- Makefile | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a

[RFC PATCH 01/11] kbuild: ignore .config rule for make --always-make

2024-08-19 Thread Vegard Nossum
nstruction. [1]: https://www.gnu.org/software/make/manual/make.html#Testing-Flags Signed-off-by: Vegard Nossum --- Makefile | 5 + 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 44c02a6f60a14..f09c036daf2f5 100644 --- a/Makefile +++ b/Makefile @@ -757,6 +757,10 @@ ifde

Re: [RFC PATCH] VMCI: Silence memcpy() run-time false positive warning

2024-01-04 Thread Vegard Nossum
On 01/01/2024 14:55, Greg Kroah-Hartman wrote: On Mon, Jan 01, 2024 at 05:08:28AM -0800, Harshit Mogalapalli wrote: One possible way to silence the warning is to split the memcpy() into two parts -- one -- copying the msg and second taking care of payload. And what are the performance impact