On Mon, Jun 23, 2014 at 11:18:25PM +0100, Paul Burton wrote: > > 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.
Actually no, I don't think you're right about that afterall. The argument union itself is never modified. I imagine if it were then it would be painful in the case of the semctl syscall where the union is passed directly as an argument, rather than as a pointer as it is for the ipc syscall. What may be modified is the data pointed to by the pointers within union semun. That is already handled by do_semctl & the translate functions it calls. /me is not fond of this API... So anyway, I believe the patch is good as-is. Thanks, Paul
signature.asc
Description: Digital signature