kernel_samsung_a53x/tools/testing/selftests/vm
Nico Pache 8a1a843381 selftests: mm: fix map_hugetlb failure on 64K page size systems
[ Upstream commit 91b80cc5b39f00399e8e2d17527cad2c7fa535e2 ]

On systems with 64k page size and 512M huge page sizes, the allocation and
test succeeds but errors out at the munmap.  As the comment states, munmap
will failure if its not HUGEPAGE aligned.  This is due to the length of
the mapping being 1/2 the size of the hugepage causing the munmap to not
be hugepage aligned.  Fix this by making the mapping length the full
hugepage if the hugepage is larger than the length of the mapping.

Link: https://lkml.kernel.org/r/20240119131429.172448-1-npache@redhat.com
Signed-off-by: Nico Pache <npache@redhat.com>
Cc: Donet Tom <donettom@linux.vnet.ibm.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 23:19:35 +01:00
..
charge_reserved_hugetlb.sh selftests/mm: switch to bash from sh 2024-11-18 23:19:35 +01:00
compaction_test.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
config Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gup_benchmark.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hmm-tests.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hugepage-mmap.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hugepage-shm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hugetlb_reparenting_test.sh selftests/mm: fix awk usage in charge_reserved_hugetlb.sh and hugetlb_reparenting_test.sh that may cause error 2024-11-08 11:26:12 +01:00
khugepaged.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
map_fixed_noreplace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
map_hugetlb.c selftests: mm: fix map_hugetlb failure on 64K page size systems 2024-11-18 23:19:35 +01:00
map_populate.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mlock-random-test.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mlock2-tests.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mlock2.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mremap_dontunmap.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
on-fault-limit.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pkey-helpers.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pkey-powerpc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pkey-x86.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
protection_keys.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
run_vmtests Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
test_hmm.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
test_vmalloc.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
thuge-gen.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
transhuge-stress.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
userfaultfd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
va_128TBswitch.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
virtual_address_range.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
write_hugetlb_memory.sh selftests/mm: switch to bash from sh 2024-11-18 23:19:35 +01:00
write_to_hugetlbfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00