On Mon, Jun 23, 2014 at 11:12:42PM +0100, Peter Maydell wrote: > On 23 June 2014 22:40, Paul Burton <p...@archlinuxmips.org> wrote: > > The ptr argument to the ipc syscall was incorrectly being used as the > > value of the argument union for the SEMCTL call. It is actually, as its > > name would suggest, a pointer to that union. > > Have you checked this on other architectures than MIPS? > I have a vague recollection that there are between-arch > differences regarding handling of the semctl argument...
I haven't tried running code for any other targets, but the pointer is dereferenced from generic code in Linux, see ipc/syscall.c: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/ipc/syscall.c#n39 > Also, VERIFY_READ doesn't seem right for some of the > semctl operations which will modify the target_semun. > > thanks > -- PMM That part I think you're right about, I'll switch to VERIFY_WRITE. Thanks, Paul
signature.asc
Description: Digital signature