summaryrefslogtreecommitdiffstats
path: root/tools/thermal
diff options
context:
space:
mode:
authorSidhartha Kumar <sidhartha.kumar@oracle.com>2022-04-21 16:35:52 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2022-04-21 20:01:10 -0700
commit18d609daa546c919fd36b62a7b510c18de4b4af8 (patch)
treed76cd1b8ae8a66653554e9b1b82e001e5d49eadd /tools/thermal
parent9c85a9bae267f6b5e5e374d0d023bbbe9db096d3 (diff)
downloadlinux-18d609daa546c919fd36b62a7b510c18de4b4af8.tar.bz2
selftest/vm: verify remap destination address in mremap_test
Because mremap does not have a MAP_FIXED_NOREPLACE flag, it can destroy existing mappings. This causes a segfault when regions such as text are remapped and the permissions are changed. Verify the requested mremap destination address does not overlap any existing mappings by using mmap's MAP_FIXED_NOREPLACE flag. Keep incrementing the destination address until a valid mapping is found or fail the current test once the max address is reached. Link: https://lkml.kernel.org/r/20220420215721.4868-2-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'tools/thermal')
0 files changed, 0 insertions, 0 deletions