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(-)
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.
Fixes: 0b4e16093e08 ("selftest/vm: verify remap destination address in mremap_test") Signed-off-by: Oleksandr Tymoshenko ovt@google.com --- tools/testing/selftests/vm/mremap_test.c | 24 ------------------------ 1 file changed, 24 deletions(-)
diff --git a/tools/testing/selftests/vm/mremap_test.c b/tools/testing/selftests/vm/mremap_test.c index 8f4dbbd60c09..efcbf537b3d5 100644 --- a/tools/testing/selftests/vm/mremap_test.c +++ b/tools/testing/selftests/vm/mremap_test.c @@ -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) {
This 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.
Fixes: e8b9989597da ("selftest/vm: verify mmap addr in mremap_test") Signed-off-by: Oleksandr Tymoshenko ovt@google.com --- tools/testing/selftests/vm/mremap_test.c | 29 ------------------------ 1 file changed, 29 deletions(-)
diff --git a/tools/testing/selftests/vm/mremap_test.c b/tools/testing/selftests/vm/mremap_test.c index efcbf537b3d5..e3ce33a9954e 100644 --- a/tools/testing/selftests/vm/mremap_test.c +++ b/tools/testing/selftests/vm/mremap_test.c @@ -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.
On Fri, Jul 15, 2022 at 11:15:40PM +0000, Oleksandr Tymoshenko wrote:
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(-)
For what stable tree(s) are you wanting these to be applied to?
thanks,
greg k-h
On Fri, Jul 15, 2022 at 10:06 PM Greg KH gregkh@linuxfoundation.org wrote:
On Fri, Jul 15, 2022 at 11:15:40PM +0000, Oleksandr Tymoshenko wrote:
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(-)
For what stable tree(s) are you wanting these to be applied to?
5.15, only this branch is affected
On Sat, Jul 16, 2022 at 11:11:02AM -0700, Oleksandr Tymoshenko wrote:
On Fri, Jul 15, 2022 at 10:06 PM Greg KH gregkh@linuxfoundation.org wrote:
On Fri, Jul 15, 2022 at 11:15:40PM +0000, Oleksandr Tymoshenko wrote:
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(-)
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
linux-stable-mirror@lists.linaro.org