Re: what's parisc execve_wrapper doing in the end?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux