Re: [Qemu-devel] [PATCH v7 2/6] linux-user: Validate mmap/mprotect prot value

2019-08-20 Thread Peter Maydell
On Sat, 3 Aug 2019 at 22:08, Richard Henderson wrote: > > The kernel will return -EINVAL for bits set in the prot argument > that are unknown or invalid. Previously we were simply cropping > out the bits that we care about. > > Introduce validate_prot_to_pageflags to perform this check in a > sin

[Qemu-devel] [PATCH v7 2/6] linux-user: Validate mmap/mprotect prot value

2019-08-03 Thread Richard Henderson
The kernel will return -EINVAL for bits set in the prot argument that are unknown or invalid. Previously we were simply cropping out the bits that we care about. Introduce validate_prot_to_pageflags to perform this check in a single place between the two syscalls. Differentiate between the targe