Add a test which checks that the kstkesp field in /proc/pid/stat can be
read for all threads of a coredumping process.
For full details including the motivation for this test and how it works,
see the README file added by this commit.
Reviewed-by: John Ogness
Signed-off-by: Nam Cao
---
tools
threads.
Checking of PF_EXITING was added for coredumping, so it probably can now be
removed. But it doesn't hurt to keep.
Fixes: 92307383082d ("coredump: Don't perform any cleanups before dumping
core")
Cc: sta...@vger.kernel.org
Cc: Eric W. Biederman
Acked-by: Oleg Nesterov
Ack
empty function
v1..v2 https://lore.kernel.org/lkml/cover.1730883229.git.nam...@linutronix.de/
- Change the fix patch to use PF_POSTCOREDUMP [Oleg]
Nam Cao (2):
fs/proc: do_task_stat: Fix ESP not readable during coredump
selftests: coredump: Add stackdump test
fs/proc/array.c
Add a test which checks that the kstkesp field in /proc/pid/stat can be
read for all threads of a coredumping process.
For full details including the motivation for this test and how it works,
see the README file added by this commit.
Reviewed-by: John Ogness
Signed-off-by: Nam Cao
---
tools
, and the second commit adds a selftest
to detect if this problem appears again in the future.
v2:
- Change the fix patch to use PF_POSTCOREDUMP [Oleg]
Link to v1:
https://lore.kernel.org/lkml/cover.1730883229.git.nam...@linutronix.de/
Nam Cao (2):
fs/proc: do_task_stat: Fix ESP not readable
threads.
Checking of PF_EXITING was added for coredumping, so it probably can now be
removed. But it doesn't hurt to keep.
Fixes: 92307383082d ("coredump: Don't perform any cleanups before dumping
core")
Cc: sta...@vger.kernel.org
Cc: Eric W. Biederman
Acked-by: Oleg Nesterov
S
Hi Oleg,
On Tue, Dec 17, 2024 at 04:09:14PM +0100, Oleg Nesterov wrote:
> On 12/17, Oleg Nesterov wrote:
> >
> > On 11/06, Nam Cao wrote:
> > >
> > > @@ -534,6 +517,23 @@ static int do_task_stat(struct seq_file *m, struct
> > > pid_namespace *ns,
&
Add a test which checks that the kstkesp field in /proc/pid/stat can be
read for all threads of a coredumping process.
For full details including the motivation for this test and how it works,
see the README file added by this commit.
Signed-off-by: Nam Cao
---
tools/testing/selftests/coredump
determine if coredump is
happening. This pointer is set at the beginning of coredump and is cleared
once coredump is done. Thus, while this pointer is not NULL, it is safe to
read ESP.
Fixes: 92307383082d ("coredump: Don't perform any cleanups before dumping
core")
Signed-off-
, and the second commit adds a selftest
to detect if this problem appears again in the future.
Nam Cao (2):
fs/proc: do_task_stat: Fix ESP not readable during coredump
selftests: coredump: Add stackdump test
fs/proc/array.c | 36 ++--
tools/testing/selftests
10 matches
Mail list logo