Re: [PATCH] parisc: Fix ptrace: syscall number and return value modification

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

 



On 19 Jan 2016 16:08, Helge Deller wrote:
> Mike Frysinger reported that his ptrace testcase showed strange
> behaviour on parisc: It was not possible to avoid a syscall and the
> return value of a syscall couldn't be changed.
> 
> To modify a syscall number, we were missing to save the new syscall
> number to gr20 which is then picked up later in assembly again.
> 
> The effect that the return value couldn't be changed is a side-effect of
> another bug in the assembly code. When a process is ptraced, userspace
> expects each syscall to report entrance and exit of a syscall.  If a
> syscall number was given which doesn't exist, we jumped to the normal
> syscall exit code instead of informing userspace that the (non-existant)
> syscall exits. This unexpected behaviour confuses userspace and thus the
> bug was misinterpreted as if we can't change the return value.
> 
> This patch fixes both problems and was tested on 64bit kernel with
> 32bit userspace.

i've checked that i can reset the syscall # fine and mung the return
value.  i haven't checked arg replacement although i don't need that
myself (yet?).  thanks !

Tested-by: Mike Frysinger <vapier@xxxxxxxxxx>
-mike

Attachment: signature.asc
Description: Digital signature


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

  Powered by Linux