From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Parisc List <linux-parisc@vger.kernel.org>
Subject: Re: what's parisc execve_wrapper doing in the end?
Date: Thu, 04 Oct 2012 13:57:54 +0100 [thread overview]
Message-ID: <1349355474.2706.21.camel@dabdike.int.hansenpartnership.com> (raw)
In-Reply-To: <20121004122201.GI23473@ZenIV.linux.org.uk>
On Thu, 2012-10-04 at 13:22 +0100, Al Viro wrote:
> On Thu, Oct 04, 2012 at 11:02:16AM +0100, James Bottomley wrote:
>
> > It's plausible. I just verified the theory that the branch is redundant
> > by successfully booting with this patch applied.
>
> Somewhat related question: does CONFIG_HPUX work at all?
I don't believe so. It's been bitrotting for some time.
> What we have there
> is this:
> mfctl %cr30,%r1
> xor %r1,%r30,%r30 /* ye olde xor trick */
> xor %r1,%r30,%r1
> xor %r1,%r30,%r30
> ldo TASK_SZ_ALGN+FRAME_SIZE(%r30),%r30 /* set up kernel stack */
> followed by saving registers into &((struct task_struct *)cr30)->thread.regs.
> cr30 contains something very different, though - struct thread_info *.
> Had been that way since 2002 or so. And after we'd been finished with
> syscall, we'll get to hpux_syscall_exit, tweak r22/r28 a bit and
> sod off to syscall_exit. Which does
> mfctl %cr30, %r1
> LDREG TI_TASK(%r1),%r1
> and eventually restores the values of registers saved in
> &(struct task_struct)r1->thread.regs. Except that here the value of r1 is
> ((struct thread_info *)cr30)->task, not cr30 itself. Which matches what we
> have in current.h (and do_fork(), etc.), but not what we'd done when we
> entered the syscall. IOW, the values we restore will have nothing to do
> with what we saved.
>
> Unless I'm missing something really subtle, it looks like HPUX compat had
> been very noticably broken since at least 2002. Comments?
I think it probably has. I don't believe there's anyone left with hpux
binaries actually checking it.
James
next prev parent reply other threads:[~2012-10-04 12:57 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
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 [this message]
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=1349355474.2706.21.camel@dabdike.int.hansenpartnership.com \
--to=james.bottomley@hansenpartnership.com \
--cc=linux-parisc@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/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