Re: sparc_pipe(2)

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

 



From: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Date: Tue, 20 Mar 2018 17:02:26 +0000

> While looking through the syscall wrappers there:
> sys_sigreturn:  
>         call    do_sigreturn
>          add    %sp, STACKFRAME_SZ, %o0
> 
>         ld      [%curptr + TI_FLAGS], %l5
>         andcc   %l5, _TIF_SYSCALL_TRACE, %g0
>         be      1f
>          nop
> 
>         call    syscall_trace
>          mov    1, %o1
> which seems to rely upon do_sigreturn() leaving its %i0 alone, while
> sys_rt_sigreturn:
>         call    do_rt_sigreturn
>          add    %sp, STACKFRAME_SZ, %o0
> 
>         ld      [%curptr + TI_FLAGS], %l5
>         andcc   %l5, _TIF_SYSCALL_TRACE, %g0
>         be      1f
>          nop
> 
>         add     %sp, STACKFRAME_SZ, %o0
>         call    syscall_trace
>          mov    1, %o1
> doesn't count upon the same for do_rt_sigreturn().  I'm not saying that
> any of that is in any way critical (sparc32 kernel, for fsck sake...),
> just curious about the difference here.  IIRC, there's nothing to
> prevent void foo(void *p) stomping on its %i0; it's unlikely to happen
> in either case, but why the difference in callers?

Good catch, I think %o0 has to be reloaded in the do_sigreturn case.

> Anyway, I've put together some cleanups ({COMPAT_,}SYSCALL_DEFINE
> conversions, getting rid of SIGN... wrappers) in
> git.kernel.org:/pub/scm/linux/kernel/git/viro/vfs.git misc.sparc
> Do you see any obviour problems with the stuff in there?  It's not
> urgent - the real fun with compat wrappers will be on mips and s390,
> anyway; sparc is fairly benign in that respect...

Nothing in there seems objectionable to me.

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



[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux