stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix vm kselftest build
@ 2022-07-15 23:15 Oleksandr Tymoshenko
  2022-07-15 23:15 ` [PATCH 1/2] Revert "selftest/vm: verify remap destination address in mremap_test" Oleksandr Tymoshenko
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Oleksandr Tymoshenko @ 2022-07-15 23:15 UTC (permalink / raw)
  To: gregkh; +Cc: sidhartha.kumar, stable, 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 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(-)

-- 
2.37.0.170.g444d1eabd0-goog


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] Revert "selftest/vm: verify remap destination address in mremap_test"
  2022-07-15 23:15 [PATCH 0/2] Fix vm kselftest build Oleksandr Tymoshenko
@ 2022-07-15 23:15 ` Oleksandr Tymoshenko
  2022-07-15 23:15 ` [PATCH 2/2] Revert "selftest/vm: verify mmap addr " Oleksandr Tymoshenko
  2022-07-16  5:06 ` [PATCH 0/2] Fix vm kselftest build Greg KH
  2 siblings, 0 replies; 6+ messages in thread
From: Oleksandr Tymoshenko @ 2022-07-15 23:15 UTC (permalink / raw)
  To: gregkh; +Cc: sidhartha.kumar, stable, Oleksandr Tymoshenko

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)
 {
-- 
2.37.0.170.g444d1eabd0-goog


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] Revert "selftest/vm: verify mmap addr in mremap_test"
  2022-07-15 23:15 [PATCH 0/2] Fix vm kselftest build Oleksandr Tymoshenko
  2022-07-15 23:15 ` [PATCH 1/2] Revert "selftest/vm: verify remap destination address in mremap_test" Oleksandr Tymoshenko
@ 2022-07-15 23:15 ` Oleksandr Tymoshenko
  2022-07-16  5:06 ` [PATCH 0/2] Fix vm kselftest build Greg KH
  2 siblings, 0 replies; 6+ messages in thread
From: Oleksandr Tymoshenko @ 2022-07-15 23:15 UTC (permalink / raw)
  To: gregkh; +Cc: sidhartha.kumar, stable, Oleksandr Tymoshenko

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.
-- 
2.37.0.170.g444d1eabd0-goog


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] Fix vm kselftest build
  2022-07-15 23:15 [PATCH 0/2] Fix vm kselftest build Oleksandr Tymoshenko
  2022-07-15 23:15 ` [PATCH 1/2] Revert "selftest/vm: verify remap destination address in mremap_test" Oleksandr Tymoshenko
  2022-07-15 23:15 ` [PATCH 2/2] Revert "selftest/vm: verify mmap addr " Oleksandr Tymoshenko
@ 2022-07-16  5:06 ` Greg KH
  2022-07-16 18:11   ` Oleksandr Tymoshenko
  2 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2022-07-16  5:06 UTC (permalink / raw)
  To: Oleksandr Tymoshenko; +Cc: sidhartha.kumar, stable

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] Fix vm kselftest build
  2022-07-16  5:06 ` [PATCH 0/2] Fix vm kselftest build Greg KH
@ 2022-07-16 18:11   ` Oleksandr Tymoshenko
  2022-07-23 14:53     ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Oleksandr Tymoshenko @ 2022-07-16 18:11 UTC (permalink / raw)
  To: Greg KH; +Cc: sidhartha.kumar, stable

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] Fix vm kselftest build
  2022-07-16 18:11   ` Oleksandr Tymoshenko
@ 2022-07-23 14:53     ` Greg KH
  0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2022-07-23 14:53 UTC (permalink / raw)
  To: Oleksandr Tymoshenko; +Cc: sidhartha.kumar, stable

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-07-23 14:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-15 23:15 [PATCH 0/2] Fix vm kselftest build Oleksandr Tymoshenko
2022-07-15 23:15 ` [PATCH 1/2] Revert "selftest/vm: verify remap destination address in mremap_test" Oleksandr Tymoshenko
2022-07-15 23:15 ` [PATCH 2/2] Revert "selftest/vm: verify mmap addr " Oleksandr Tymoshenko
2022-07-16  5:06 ` [PATCH 0/2] Fix vm kselftest build Greg KH
2022-07-16 18:11   ` Oleksandr Tymoshenko
2022-07-23 14:53     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).