Commit 0ef62b4b authored by Linux Patches Robot's avatar Linux Patches Robot Committed by Tomasz Nowicki
Browse files

UPSTREAM: selftest mm/mseal: fix test_seal_mremap_move_dontunmap_anyaddr

the syscall remap accepts following:

mremap(src, size, size, MREMAP_MAYMOVE | MREMAP_DONTUNMAP, dst)

when the src is sealed, the call will fail with error code:
EPERM

Previously, the test uses hard-coded 0xdeaddead as dst, and it
will fail on the system with newer glibc installed.

This patch removes test's dependency on glibc for mremap(), also
fix the test and remove the hardcoded address.

Link: https://lkml.kernel.org/r/20240807212320.2831848-1-jeffxu@chromium.org


Fixes: 4926c7a5 ("selftest mm/mseal memory sealing")
Signed-off-by: default avatarJeff Xu <jeffxu@chromium.org>
Reported-by: default avatarPedro Falcato <pedro.falcato@gmail.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 072cd213)

BUG=b:344650370
TEST=precheckin

Signed-off-by: default avatarLinux Patches Robot <linux-patches-robot@chromeos-missing-patches.google.com.iam.gserviceaccount.com>
Change-Id: I50eb079b12d5b47c0cad88e3a97dcd14ff192127
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5879988


Reviewed-by: default avatarJeff Xu <jeffxu@google.com>
Reviewed-by: default avatarJorge Lucangeli Obes <jorgelo@chromium.org>
Commit-Queue: Jeff Xu <jeffxu@google.com>
Tested-by: default avatarJeff Xu <jeffxu@google.com>
Reviewed-by: default avatarSean Paul <sean@poorly.run>
Signed-off-by: default avatarMateusz Urbańczyk <urbanczyk@google.com>
parent 867c7cd4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment