1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/tools/testing/selftests/mm
Muhammad Usama Anjum b808f62921 selftests: mm: fix build errors on armhf
The __NR_mmap isn't found on armhf.  The mmap() is commonly available
system call and its wrapper is present on all architectures.  So it should
be used directly.  It solves problem for armhf and doesn't create problem
for other architectures.

Remove sys_mmap() functions as they aren't doing anything else other than
calling mmap().  There is no need to set errno = 0 manually as glibc
always resets it.

For reference errors are as following:

  CC       seal_elf
seal_elf.c: In function 'sys_mmap':
seal_elf.c:39:33: error: '__NR_mmap' undeclared (first use in this function)
   39 |         sret = (void *) syscall(__NR_mmap, addr, len, prot,
      |                                 ^~~~~~~~~

mseal_test.c: In function 'sys_mmap':
mseal_test.c:90:33: error: '__NR_mmap' undeclared (first use in this function)
   90 |         sret = (void *) syscall(__NR_mmap, addr, len, prot,
      |                                 ^~~~~~~~~

Link: https://lkml.kernel.org/r/20240809082511.497266-1-usama.anjum@collabora.com
Fixes: 4926c7a52d ("selftest mm/mseal memory sealing")
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Cc: Jeff Xu <jeffxu@chromium.org>
Cc: Kees Cook <kees@kernel.org>
Cc: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-09-01 17:58:59 -07:00
..
.gitignore Random number generator updates for Linux 6.11-rc1. 2024-07-24 10:29:50 -07:00
charge_reserved_hugetlb.sh selftests/mm: save and restore nr_hugepages value 2024-02-22 15:38:55 -08:00
check_config.sh selftests/mm: give scripts execute permission 2023-07-14 09:24:31 -07:00
compaction_test.c selftests/mm: compaction_test: fix off by one in check_compaction() 2024-08-15 22:16:15 -07:00
config selftests: mm: add pagemap ioctl tests 2023-10-18 14:34:13 -07:00
cow.c The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
droppable.c mm: add MAP_DROPPABLE for designating always lazily freeable mappings 2024-07-19 20:22:12 +02:00
gup_longterm.c The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
gup_test.c selftests/mm: fix build warnings on ppc64 2024-05-24 11:55:06 -07:00
hmm-tests.c selftests: avoid using SKIP(exit()) in harness fixure setup 2024-03-05 19:25:36 -08:00
hugepage-mmap.c selftests: mm: hugepage-mmap: conform to TAP format output 2024-01-05 10:17:48 -08:00
hugepage-mremap.c selftests/mm: remove local __NR_* definitions 2024-07-03 19:30:16 -07:00
hugepage-shm.c selftests: mm: remove duplicate unneeded defines 2023-06-19 16:19:25 -07:00
hugepage-vmemmap.c selftests: mm: hugepage-vmemmap fails on 64K page size systems 2024-01-12 15:20:48 -08:00
hugetlb-madvise.c selftests/mm: skip the hugetlb-madvise tests on unmet hugepage requirements 2024-03-12 13:07:18 -07:00
hugetlb-read-hwpoison.c selftests/mm: add tests for HWPOISON hugetlbfs read 2023-08-18 10:12:27 -07:00
hugetlb-soft-offline.c selftest/mm: test enable_soft_offline behaviors 2024-07-04 18:06:00 -07:00
hugetlb_dio.c selftest: mm: Test if hugepage does not get leaked during __bio_release_pages() 2024-07-03 19:29:59 -07:00
hugetlb_fault_after_madv.c selftests/mm: add a new test for madv and hugetlb 2023-10-18 14:34:16 -07:00
hugetlb_madv_vs_map.c selftests/mm: hugetlb_madv_vs_map: avoid test skipping by querying hugepage size at runtime 2024-05-11 15:41:37 -07:00
hugetlb_reparenting_test.sh selftests/mm: save and restore nr_hugepages value 2024-02-22 15:38:55 -08:00
khugepaged.c selftests/mm/khugepaged: enlighten for multi-size THP 2023-12-20 14:48:12 -08:00
ksm_functional_tests.c selftests/mm: remove local __NR_* definitions 2024-07-03 19:30:16 -07:00
ksm_tests.c selftests/mm: ksm_tests should only MADV_HUGEPAGE valid memory 2024-01-25 23:52:21 -08:00
madv_populate.c selftests/mm: ksft_exit functions do not return 2024-05-06 13:57:20 -06:00
Makefile selftests: memfd_secret: don't build memfd_secret test on unsupported arches 2024-08-15 22:16:15 -07:00
map_fixed_noreplace.c selftests: mm: make map_fixed_noreplace test names stable 2024-06-15 10:43:07 -07:00
map_hugetlb.c selftests/mm: map_hugetlb: conform test to TAP format output 2024-02-22 10:24:48 -08:00
map_populate.c selftests/mm: map_populate: conform test to TAP format output 2024-02-22 10:24:48 -08:00
mdwe_test.c Revert "selftests/harness: remove use of LINE_MAX" 2024-05-19 14:36:20 -07:00
memfd_secret.c selftests/mm: remove local __NR_* definitions 2024-07-03 19:30:16 -07:00
migration.c selftests/mm: make migration test robust to failure 2023-08-18 10:12:43 -07:00
mkdirty.c selftests/mm: remove local __NR_* definitions 2024-07-03 19:30:16 -07:00
mlock-random-test.c selftests/mm: mlock-random-test: conform test to TAP format output 2024-02-22 10:24:48 -08:00
mlock2-tests.c selftests/mm: parse VMA range in one go 2024-04-25 20:56:07 -07:00
mlock2.h selftests/mm: remove local __NR_* definitions 2024-07-03 19:30:16 -07:00
mrelease_test.c selftests/mm: mrelease_test: conform test to TAP format output 2024-02-22 10:24:49 -08:00
mremap_dontunmap.c selftests/mm: mremap_dontunmap: conform test to TAP format output 2024-02-22 10:24:49 -08:00
mremap_test.c minmax: make generic MIN() and MAX() macros available everywhere 2024-07-28 15:49:18 -07:00
mseal_helpers.h selftests/mm: mseal, self_elf: rename TEST_END_CHECK to REPORT_TEST_PASS 2024-07-03 19:30:07 -07:00
mseal_test.c selftests: mm: fix build errors on armhf 2024-09-01 17:58:59 -07:00
on-fault-limit.c selftests/mm: run_vmtests: remove sudo and conform to tap 2024-02-22 15:38:55 -08:00
pagemap_ioctl.c selftests/mm: remove local __NR_* definitions 2024-07-03 19:30:16 -07:00
pkey-helpers.h selftests/mm: Substitute attribute with a macro 2023-10-13 14:08:36 -06:00
pkey-powerpc.h selftests: mm: remove duplicate unneeded defines 2023-06-19 16:19:25 -07:00
pkey-x86.h selftests: mm: remove duplicate unneeded defines 2023-06-19 16:19:25 -07:00
protection_keys.c selftests/mm: remove local __NR_* definitions 2024-07-03 19:30:16 -07:00
run_vmtests.sh selftests: memfd_secret: don't build memfd_secret test on unsupported arches 2024-08-15 22:16:15 -07:00
seal_elf.c selftests: mm: fix build errors on armhf 2024-09-01 17:58:59 -07:00
settings selftests/mm: run all tests from run_vmtests.sh 2023-08-18 10:12:43 -07:00
soft-dirty.c selftests/mm: ksft_exit functions do not return 2024-05-06 13:57:20 -06:00
split_huge_page_test.c selftests/mm: use asm volatile to not optimize mmap read variable 2024-07-03 19:30:07 -07:00
test_hmm.sh selftests/mm: give scripts execute permission 2023-07-14 09:24:31 -07:00
test_vmalloc.sh selftests/mm: give scripts execute permission 2023-07-14 09:24:31 -07:00
thp_settings.c selftests/mm: support multi-size THP interface in thp_settings 2023-12-20 14:48:12 -08:00
thp_settings.h selftests/mm: support multi-size THP interface in thp_settings 2023-12-20 14:48:12 -08:00
thuge-gen.c selftests: centralize -D_GNU_SOURCE= to CFLAGS in lib.mk 2024-07-10 12:14:51 -07:00
transhuge-stress.c selftests/mm: transhuge-stress: conform to TAP format output 2024-02-22 10:24:49 -08:00
uffd-common.c selftests/mm: remove local __NR_* definitions 2024-07-03 19:30:16 -07:00
uffd-common.h selftests/mm: fix build warnings on ppc64 2024-05-24 11:55:06 -07:00
uffd-stress.c mm: turn off test_uffdio_wp if CONFIG_PTE_MARKER_UFFD_WP is not configured. 2024-07-04 18:05:58 -07:00
uffd-unit-tests.c selftests/mm: remove local __NR_* definitions 2024-07-03 19:30:16 -07:00
va_high_addr_switch.c selftests/mm: skip test for non-LPA2 and non-LVA systems 2024-07-26 14:33:10 -07:00
va_high_addr_switch.sh selftests/mm: va_high_addr_switch: reduce test noise 2024-07-03 19:29:56 -07:00
virtual_address_range.c selftests/mm: confirm VA exhaustion without reliance on correctness of mmap() 2024-04-25 20:56:01 -07:00
vm_util.c selftests/mm: transhuge-stress: conform to TAP format output 2024-02-22 10:24:49 -08:00
vm_util.h selftests/mm: include strings.h for ffsl 2024-04-05 11:21:30 -07:00
write_hugetlb_memory.sh selftests/mm: switch to bash from sh 2024-01-25 23:52:20 -08:00
write_to_hugetlbfs.c selftests/vm: rename selftests/vm to selftests/mm 2023-01-18 17:12:56 -08:00