[PATCH] selftests: Add missing gitignore entries

2024-01-25 Thread Bernd Edlinger
Prevent them from polluting git status after building selftests. Signed-off-by: Bernd Edlinger --- tools/testing/selftests/damon/.gitignore | 1 + tools/testing/selftests/thermal/intel/power_floor/.gitignore | 2 ++ tools/testing/selftests/thermal/intel/workload_hint

Re: [PATCH v14] exec: Fix dead-lock in de_thread with ptrace_attach

2024-01-23 Thread Bernd Edlinger
On 1/22/24 22:30, Kees Cook wrote: > On Mon, Jan 22, 2024 at 02:24:37PM +0100, Bernd Edlinger wrote: >> The main concern was when a set-suid program is executed by execve. >> Then it makes a difference if the current thread is traced before the >> execve or not. That means

[PATCH v15] exec: Fix dead-lock in de_thread with ptrace_attach

2024-01-22 Thread Bernd Edlinger
ts/ptrace/vmaccess.c for a test case that gets fixed by this change. Note that since the test case was originally designed to test the ptrace_attach returning an error in this situation, the test expectation needed to be adjusted, to allow the API to succeed at the first attempt. Signed-off-by: Bernd

Re: [PATCH v14] exec: Fix dead-lock in de_thread with ptrace_attach

2024-01-22 Thread Bernd Edlinger
On 1/17/24 17:38, Oleg Nesterov wrote: > On 01/17, Bernd Edlinger wrote: >> Yes. but the tracer has to do its job, and that is ptrace_attach the >> remaining treads, it does not know that it would avoid a dead-lock >> when it calls wait(), instead of ptrace_atta

Re: [PATCH v14] exec: Fix dead-lock in de_thread with ptrace_attach

2024-01-17 Thread Bernd Edlinger
race_attach() to use lock guards") > Oh, how ugly... Will this new C++-like "feature" ever make it into a stable branch? > On 01/15, Bernd Edlinger wrote: >> >> The problem happens when a tracer tries to ptrace_attach >> to a multi-threaded process, that does a

Re: [PATCH v14] exec: Fix dead-lock in de_thread with ptrace_attach

2024-01-17 Thread Bernd Edlinger
On 1/15/24 20:37, Matthew Wilcox wrote: > On Mon, Jan 15, 2024 at 08:22:19PM +0100, Bernd Edlinger wrote: >> This introduces signal->exec_bprm, which is used to >> fix the case when at least one of the sibling threads >> is traced, and therefore the trace process may dead-

[PATCH v14] exec: Fix dead-lock in de_thread with ptrace_attach

2024-01-15 Thread Bernd Edlinger
ts/ptrace/vmaccess.c for a test case that gets fixed by this change. Note that since the test case was originally designed to test the ptrace_attach returning an error in this situation, the test expectation needed to be adjusted, to allow the API to succeed at the first attempt. Signed-off-by: Bernd

[PATCH v13] exec: Fix dead-lock in de_thread with ptrace_attach

2023-11-05 Thread Bernd Edlinger
pectation needed to be adjusted, to allow the API to succeed at the first attempt. Signed-off-by: Bernd Edlinger --- fs/exec.c | 69 --- fs/proc/base.c| 6 ++ include/linux/cred.h | 1 + incl

[PATCH v12] exec: Fix dead-lock in de_thread with ptrace_attach

2023-10-29 Thread Bernd Edlinger
pectation needed to be adjusted, to allow the API to succeed at the first attempt. Signed-off-by: Bernd Edlinger --- fs/exec.c | 69 --- fs/proc/base.c| 6 ++ include/linux/cred.h | 1 + incl