Re: Debugging 64-bit kernel crashes involving

"Carlos O'Donell" <[email protected]>
Newsgroups gmane.linux.ports.hppa
Message-ID <[email protected]>
On 3/8/07, Kyle McMartin <[email protected]> wrote:
> On Tue, Feb 27, 2007 at 06:02:10PM -0600, James Bottomley wrote:
> > +     /* need to be executing in user context */
> > +     if (regs->iasq[0] != 0 || regs->iasq[1] != 0) {
>
> Is there a reason we can't use user_space() from ptrace.h here? You may have
> just spotted a subtle bug elsewhere since user_space only checks iasq[1]...
>

I would have checked both for the sake of consistency.

Upon entry to the syscall both iasq[0] and iasq[1] will be user
spaces, so only checking iasq[1] is OK. In the case of interruption it
would only matter if iasq[0]==user, and iasq[1]!=user, but this would
mean we interrupted the kernel on a return to userspace. If such a
thing can happen, then yes, we should probably check both in
"user_space()" and add comments.

I haven't thought very hard about this, so ICBW.

Are we considering James' patch for inclusion into git.parisc-linux.org?

Cheers,
Carlos.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.