diff options
| author | Richard Henderson | 2020-05-19 20:56:44 +0200 |
|---|---|---|
| committer | Laurent Vivier | 2020-08-23 16:57:58 +0200 |
| commit | 9dba3ca5af80a7d4b5269685ceaa27ca04199cf4 (patch) | |
| tree | f1206d93700dbd5bdafe8d6125341e98b024eb29 /plugins/core.c | |
| parent | linux-user: Fix "print_fdset()" in "strace.c" to not print ", " after last value (diff) | |
| download | qemu-9dba3ca5af80a7d4b5269685ceaa27ca04199cf4.tar.gz qemu-9dba3ca5af80a7d4b5269685ceaa27ca04199cf4.tar.xz qemu-9dba3ca5af80a7d4b5269685ceaa27ca04199cf4.zip | |
linux-user: Validate mmap/mprotect prot value
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 target and host versions of prot. Compute the qemu internal
page_flags value at the same time.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20200519185645.3915-2-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'plugins/core.c')
0 files changed, 0 insertions, 0 deletions
