public inbox for linux-parisc@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Parisc List <linux-parisc@vger.kernel.org>
Subject: Re: what's parisc execve_wrapper doing in the end?
Date: Fri, 5 Oct 2012 15:48:19 +0100	[thread overview]
Message-ID: <20121005144819.GO23473@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1349444664.3638.46.camel@dabdike.int.hansenpartnership.com>

On Fri, Oct 05, 2012 at 02:44:24PM +0100, James Bottomley wrote:
> On Fri, 2012-10-05 at 12:07 +0100, James Bottomley wrote:
> > I tried out the code at
> > 
> > git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal.git
> > experimental-kernel_thread
> > 
> > and it gives me this panic on boot.
> 
> OK, found the fix:  the idle thread is a kernel thread, but it doesn't
> come through kernel_thread().  The fix is to check for it (fortunately
> it has the signal usp == 0).

Um...  I see, but I really wonder if that's the right fix.  FWIW, sparc
will have the same problem...  Hell knows.  OTOH, it's a nice way to
get of implicit interplay between copy_thread() and idle_regs() - note
that SMP architectures doing default idle_regs() need to be damn careful
about what they do in their "is that kernel thread" logics; all-zeros
pt_regs might give varying results on user_mode(regs) tests, etc.
Might be better to go for
	if (p->flags & PF_KTHREAD) {
		if (!usp) {
			we are starting an idle thread
		} else {
			we are setting things up for kernel_thread()
		}
	} else {
		we are forking
	}
kind of logics, looking at regs only in the last case.  And to hell with
(separate and overridable) idle_regs() once everything goes that way...
 
> I'm now getting as freeing the init memory, which then hangs, so I
> suspect some type of execve failure trying to start the initrd... I'm
> debugging.

What are you using for toolchain, BTW?  With gcc 4.3 / binutils 2.20
(cross-builds) I'm getting panics from mainline kernel on parisc32 all
way back to 2.6.28...

  parent reply	other threads:[~2012-10-05 14:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20121004045150.GH23473@ZenIV.linux.org.uk>
2012-10-04  9:30 ` what's parisc execve_wrapper doing in the end? James Bottomley
2012-10-05 11:07   ` James Bottomley
2012-10-05 13:44     ` James Bottomley
2012-10-05 14:47       ` James Bottomley
2012-10-05 14:48       ` Al Viro [this message]
2012-10-05 14:55         ` James Bottomley
2012-10-05 19:21           ` Al Viro
2012-10-05 23:04           ` Al Viro
2012-10-08 11:28             ` James Bottomley
2012-10-09  9:55               ` James Bottomley
2012-10-10  4:26                 ` Al Viro
2012-10-05 22:54         ` John David Anglin
2012-10-05 23:32           ` Al Viro
2012-10-06  0:15             ` John David Anglin
     [not found] ` <20121004051359.GA24664@ZenIV.linux.org.uk>
2012-10-04 10:02   ` James Bottomley
2012-10-04 12:22     ` Al Viro
2012-10-04 12:57       ` James Bottomley
2012-10-04 13:30         ` Carlos O'Donell
2012-10-04 14:07           ` Al Viro
2012-10-05  0:00             ` John David Anglin

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=20121005144819.GO23473@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-parisc@vger.kernel.org \
    /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