Re: [PATCH 1/2] fs/proc: do_task_stat: Fix ESP not readable during coredump

2024-12-22 Thread Oleg Nesterov
Hi Nam, On 12/20, Nam Cao wrote: > > > Can't the trivial patch below fix the problem? > > It can. In fact this is the original fix we had. I thought that checking a > single "core_state" is simpler than checking 3 flags, oh well.. > > Can you send a proper patch, or should I do it? Can you send V

Re: [PATCH 1/2] fs/proc: do_task_stat: Fix ESP not readable during coredump

2024-12-20 Thread Nam Cao
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, > > > ppid = task_tgid_nr_ns(task->real_

Re: [PATCH 1/2] fs/proc: do_task_stat: Fix ESP not readable during coredump

2024-12-17 Thread Oleg Nesterov
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, > > ppid = task_tgid_nr_ns(task->real_parent, ns); > > pgid = task_pgrp_nr_ns(task, ns); > > > > + /*

Re: [PATCH 1/2] fs/proc: do_task_stat: Fix ESP not readable during coredump

2024-12-17 Thread Oleg Nesterov
On 11/06, Nam Cao wrote: > > @@ -534,6 +517,23 @@ static int do_task_stat(struct seq_file *m, struct > pid_namespace *ns, > ppid = task_tgid_nr_ns(task->real_parent, ns); > pgid = task_pgrp_nr_ns(task, ns); > > + /* > + * esp and eip are intenti

Re: [PATCH 1/2] fs/proc: do_task_stat: Fix ESP not readable during coredump

2024-12-17 Thread Thomas Gleixner
On Wed, Nov 06 2024 at 10:22, Nam Cao wrote: > Commit 0a1eb2d474ed ("fs/proc: Stop reporting eip and esp in > /proc/PID/stat") disabled stack pointer reading, because it is generally > dangerous to do so. > > Commit fd7d56270b52 ("fs/proc: Report eip/esp in /prod/PID/stat for > coredumping") made a

Re: [PATCH 1/2] fs/proc: do_task_stat: Fix ESP not readable during coredump

2024-11-06 Thread John Ogness
On 2024-11-06, Nam Cao wrote: > Commit 0a1eb2d474ed ("fs/proc: Stop reporting eip and esp in > /proc/PID/stat") disabled stack pointer reading, because it is generally > dangerous to do so. > > Commit fd7d56270b52 ("fs/proc: Report eip/esp in /prod/PID/stat for > coredumping") made an exception fo

[PATCH 1/2] fs/proc: do_task_stat: Fix ESP not readable during coredump

2024-11-06 Thread Nam Cao
Commit 0a1eb2d474ed ("fs/proc: Stop reporting eip and esp in /proc/PID/stat") disabled stack pointer reading, because it is generally dangerous to do so. Commit fd7d56270b52 ("fs/proc: Report eip/esp in /prod/PID/stat for coredumping") made an exception for coredumping thread, because for this cas