[PATCH] kexec: set prstatus.pr_pid to cpu id when current->pid is 0

Eric W. Biederman ebiederm at xmission.com
Tue Aug 3 04:15:04 EDT 2010


Hui Zhu <teawater at gmail.com> writes:

> On Tue, Aug 3, 2010 at 15:37, Eric W. Biederman <ebiederm at xmission.com> wrote:
>> Hui Zhu <teawater at gmail.com> writes:
>>
>
> Equal 0 is not a bug, the trouble is a lot of core's pid is same.
>
> This is what gdb say:
> /* Found an old thread with the same id.  It has to be dead,
>        otherwise we wouldn't be adding a new thread with the same id.
>        The OS is reusing this id --- delete it, and recreate a new
>        one.  */

gdb bug compatibility is not a primary goal.  Having an extensible
format and not inventing it totally out of the blue is the goal.

The goal was always that something could post process the output of
the kernel crashdump and create something that is gdb compatible.  It
looks to me like it would take just a moment to strip out all of the
idle threads.

Claiming the pid is the cpu number when the pid is the idle pid gives
you no insulation against duplication, and it looses information.

Eric



More information about the kexec mailing list