Re: [PATCH] proc: report eip and esp for all threads when coredumping
From: John Ogness
Date: Sun May 26 2019 - 15:45:03 EST
Hi Andrew,
On 2019-05-25, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> Please send along a signed-off-by: for this?
>From my response:
On 2019-05-25, John Ogness <john.ogness@xxxxxxxxxxxxx> wrote:
> AFAICT core_state does not need to be set before the other lines. But
> there may be some side effects that I overlooked!
The changes I showed were more of a suggestion for Jan than an actual
patch. For a signed-off-by I'll need to do some deeper looking to make
sure what I suggested was safe. Also, we probably need a barrier to make
sure the task flag is cleared before setting core_state. Or instead, we
probably should set core_state after releasing the siglock, setting it
where the PF_DUMPCORE flag is set.
It seems to me that checking for a non-NULL core_state and checking for
the PF_DUMPCORE flag are both used throughout the kernel to identify
core dumps in action. So I think it makes sense to set them "at the same
time". (Or perhaps eliminate PF_DUMPCORE altogether and just use a
non-NULL core_state to identify core dumping.)
I will take a closer look at this.
John Ogness