From: Simon Horman <horms@verge.net.au>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Hui Zhu <teawater@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
WANG Cong <xiyou.wangcong@gmail.com>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Simon Kagstrom <simon.kagstrom@netinsight.net>,
kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
gdb@sourceware.org
Subject: Re: [PATCH] kexec: set prstatus.pr_pid to cpu id when current->pid is 0
Date: Tue, 03 Aug 2010 08:37:00 -0000 [thread overview]
Message-ID: <20100803083647.GB15434@verge.net.au> (raw)
In-Reply-To: <m1d3u0un7b.fsf@fess.ebiederm.org>
On Tue, Aug 03, 2010 at 01:15:04AM -0700, Eric W. Biederman wrote:
> Hui Zhu <teawater@gmail.com> writes:
>
> > On Tue, Aug 3, 2010 at 15:37, Eric W. Biederman <ebiederm@xmission.com> wrote:
> >> Hui Zhu <teawater@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.
Agreed, there clearly an ambiguity brought in by this patch as the range
of valid values for pids and cpus is essentially the same.
Doing this in user-space is the right place, though I'm not really
convinced its even correct there.
prev parent reply other threads:[~2010-08-03 8:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <AANLkTikuUi=i6Lk-ZpE65Gr0tWOeVnrnpWPe85T=J=Ph@mail.gmail.com>
[not found] ` <m1zkx4w3hx.fsf@fess.ebiederm.org>
2010-08-03 7:45 ` Hui Zhu
2010-08-03 8:15 ` Eric W. Biederman
2010-08-03 8:37 ` Simon Horman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100803083647.GB15434@verge.net.au \
--to=horms@verge.net.au \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=gdb@sourceware.org \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=simon.kagstrom@netinsight.net \
--cc=teawater@gmail.com \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox