Fix vm kselftest build
Subsystems (2)
cover Fix vm kselftest build
This patchset reverts duplicates of two backported commits that created exact copies of functions added by the original backports.
Oleksandr Tymoshenko (2):
Revert "selftest/vm: verify remap destination address in mremap_test" Revert "selftest/vm: verify mmap addr in mremap_test"
tools/testing/selftests/vm/mremap_test.c | 53 ------------------------ 1 file changed, 53 deletions(-)
Signature · 1 line
2.37.0.170.g444d1eabd0-goog
PATCH 1/2 Revert "selftest/vm: verify remap destination address in mremap_test"
This reverts commit 0b4e16093e081a3ab08b0d6cedf79b249f41b248.
The upstream commit 18d609daa546 ("selftest/vm: verify remap destination address in mremap_test") was backported as commit 2688d967ec65 ("selftest/vm: verify remap destination address in mremap_test"). Repeated backport introduced the duplicate of function is_remap_region_valid to the file breakign the vm selftest build.
--- tools/testing/selftests/vm/mremap_test.c | 24 ------------------------ 1 file changed, 24 deletions(-)
tools/testing/selftests/vm/mremap_test.c +0 -24
@@ -66,30 +66,6 @@ enum { .expect_failure = should_fail \ } -/* -* Returns false if the requested remap region overlaps with an -* existing mapping (e.g text, stack) else returns true. -*/ -static bool is_remap_region_valid (void *addr,unsigned long long size) -{ -void *remap_addr =NULL ; -bool ret = true; - -/* Use MAP_FIXED_NOREPLACE flag to ensure region is not mapped */ - remap_addr =mmap (addr, size,PROT_READ |PROT_WRITE , -MAP_FIXED_NOREPLACE |MAP_ANONYMOUS |MAP_SHARED , --1 ,0 ); - -if (remap_addr ==MAP_FAILED ) { -if (errno ==EEXIST ) - ret = false; - }else { -munmap (remap_addr, size); - } - -return ret; -} -/* Returns mmap_min_addr sysctl tunable from procfs */ static unsigned long long get_mmap_min_addr (void ) {
Signature · 1 line
2.37.0.170.g444d1eabd0-goog
PATCH 2/2 Revert "selftest/vm: verify mmap addr in mremap_test"
In reply to Oleksandr TymoshenkoThis reverts commit e8b9989597daac896b3400b7005f24bf15233d9a.
The upstream commit 9c85a9bae267 ("selftest/vm: verify mmap addr in mremap_test") was backported as commit a17404fcbfd0 ("selftest/vm:
verify mmap addr in mremap_test"). Repeated backport introduced the duplicate of function get_mmap_min_addr to the file breakign the vm selftest build.
--- tools/testing/selftests/vm/mremap_test.c | 29 ------------------------ 1 file changed, 29 deletions(-)
tools/testing/selftests/vm/mremap_test.c +0 -29
@@ -66,35 +66,6 @@ enum { .expect_failure = should_fail \ } -/* Returns mmap_min_addr sysctl tunable from procfs */ -static unsigned long long get_mmap_min_addr (void ) -{ -FILE *fp; -int n_matched; -static unsigned long long addr; - -if (addr) -return addr; - - fp =fopen ("/proc/sys/vm/mmap_min_addr" ,"r" ); -if (fp ==NULL ) { -ksft_print_msg ("Failed to open /proc/sys/vm/mmap_min_addr: %s\n" , -strerror (errno)); -exit (KSFT_SKIP ); - } - - n_matched =fscanf (fp,"%llu" , &addr); -if (n_matched !=1 ) { -ksft_print_msg ("Failed to read /proc/sys/vm/mmap_min_addr: %s\n" , -strerror (errno)); -fclose (fp); -exit (KSFT_SKIP ); - } - -fclose (fp); -return addr; -} -/* * Returns false if the requested remap region overlaps with an * existing mapping (e.g text, stack) else returns true.
Signature · 1 line
2.37.0.170.g444d1eabd0-goog
Greg KH
maintainerQuoted 9 lines · Oleksandr Tymoshenko
This patchset reverts duplicates of two backported commits that created exact copies of functions added by the original backports.
Oleksandr Tymoshenko (2):
Revert "selftest/vm: verify remap destination address inmremap_test" Revert "selftest/vm: verify mmap addr inmremap_test"tools/testing/selftests/vm/mremap_test.c | 53 ------------------------ 1 file changed, 53 deletions(-)
For what stable tree(s) are you wanting these to be applied to?
thanks,
greg k-h
Quoted 5 lines · Greg KH
Quoted 3 lines · Oleksandr Tymoshenko
This patchset reverts duplicates of two backported commits that created exact copies of functions added by the original backports.
Quoted 8 lines
Quoted 6 lines
Oleksandr Tymoshenko (2):
Revert "selftest/vm: verify remap destination address inmremap_test" Revert "selftest/vm: verify mmap addr inmremap_test"tools/testing/selftests/vm/mremap_test.c | 53 ------------------------ 1 file changed, 53 deletions(-)For what stable tree(s) are you wanting these to be applied to?
5.15, only this branch is affected
Greg KH
maintainerQuoted 10 lines · Oleksandr Tymoshenko
Quoted 9 lines · Greg KH
Quoted 7 lines · Oleksandr Tymoshenko
This patchset reverts duplicates of two backported commits that created exact copies of functions added by the original backports.
Oleksandr Tymoshenko (2):
Revert "selftest/vm: verify remap destination address inmremap_test" Revert "selftest/vm: verify mmap addr inmremap_test"
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
tools/testing/selftests/vm/mremap_test.c | 53 ------------------------ 1 file changed, 53 deletions(-)For what stable tree(s) are you wanting these to be applied to?
5.15, only this branch is affected
thanks, now queued up.
greg k-h