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

2019-06-06 Thread Aleksandar Markovic
On Jun 5, 2019 11:13 PM, "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 > singl

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

2019-06-05 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