Configured process_madvise with upstream syscall number

Fixing the syscall mapping which was done wrongly by
'commit f4ed73112f ("mm/madvise: introduce process_madvise()
syscall: an external memory hinting API")' by correcting the syscall
number.

unistd#close_range cts testcase is expecting errno as ENOSYS
because msm-5.4 does not support close_range syscall, but it
receives errno as EINVAL because process_madvise is configured
with 436 which is close_range syscall number which leads to
this cts testcase failure. Hence, configured process_madvise
with proper upstream syscall number to fix this cts failure.

Applications using process_madvise that are built with previous
headers needs to be rebuilt. Otherwise the program would not
work as expected.

Change-Id: If524d109aa1f4072e9ed03d7d9f70cc517fd59dc
Signed-off-by: Saranya R <quic_sarar@quicinc.com>
This commit is contained in:
Saranya R 2023-08-31 16:40:12 +05:30 committed by Swetha Chikkaboraiah
parent 02923fa81a
commit ab1865af0c
18 changed files with 79 additions and 19 deletions

View File

@ -475,4 +475,8 @@
543 common fspick sys_fspick
544 common pidfd_open sys_pidfd_open
# 545 reserved for clone3
546 common process_madvise sys_process_madvise
# 546 reserved for close_range
# 547 reserved for openat2
# 548 reserved for pidfd_getfd
# 549 reserved for faccessat2
550 common process_madvise sys_process_madvise

View File

@ -449,4 +449,8 @@
433 common fspick sys_fspick
434 common pidfd_open sys_pidfd_open
435 common clone3 sys_clone3
436 common process_madvise sys_process_madvise
# 436 reserved for close_range
# 437 reserved for openat2
# 438 reserved for pidfd_getfd
# 439 reserved for faccessat2
440 common process_madvise sys_process_madvise

View File

@ -38,7 +38,7 @@
#define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE + 5)
#define __ARM_NR_COMPAT_END (__ARM_NR_COMPAT_BASE + 0x800)
#define __NR_compat_syscalls 437
#define __NR_compat_syscalls 441
#endif
#define __ARCH_WANT_SYS_CLONE

View File

@ -879,7 +879,7 @@ __SYSCALL(__NR_fspick, sys_fspick)
__SYSCALL(__NR_pidfd_open, sys_pidfd_open)
#define __NR_clone3 435
__SYSCALL(__NR_clone3, sys_clone3)
#define __NR_process_madvise 436
#define __NR_process_madvise 440
__SYSCALL(__NR_process_madvise, sys_process_madvise)
/*

View File

@ -356,4 +356,8 @@
433 common fspick sys_fspick
434 common pidfd_open sys_pidfd_open
# 435 reserved for clone3
436 common process_madvise sys_process_madvise
# 436 reserved for close_range
# 437 reserved for openat2
# 438 reserved for pidfd_getfd
# 439 reserved for faccessat2
440 common process_madvise sys_process_madvise

View File

@ -435,4 +435,8 @@
433 common fspick sys_fspick
434 common pidfd_open sys_pidfd_open
# 435 reserved for clone3
436 common process_madvise sys_process_madvise
# 436 reserved for close_range
# 437 reserved for openat2
# 438 reserved for pidfd_getfd
# 439 reserved for faccessat2
440 common process_madvise sys_process_madvise

View File

@ -441,4 +441,8 @@
433 common fspick sys_fspick
434 common pidfd_open sys_pidfd_open
435 common clone3 sys_clone3
436 common process_madvise sys_process_madvise
# 436 reserved for close_range
# 437 reserved for openat2
# 438 reserved for pidfd_getfd
# 439 reserved for faccessat2
440 common process_madvise sys_process_madvise

View File

@ -374,4 +374,8 @@
433 n32 fspick sys_fspick
434 n32 pidfd_open sys_pidfd_open
435 n32 clone3 __sys_clone3
436 n32 process_madvise sys_process_madvise
# 436 reserved for close_range
# 437 reserved for openat2
# 438 reserved for pidfd_getfd
# 439 reserved for faccessat2
440 n32 process_madvise sys_process_madvise

View File

@ -350,4 +350,8 @@
433 n64 fspick sys_fspick
434 n64 pidfd_open sys_pidfd_open
435 n64 clone3 __sys_clone3
436 n64 process_madvise sys_process_madvise
# 436 reserved for close_range
# 437 reserved for openat2
# 438 reserved for pidfd_getfd
# 439 reserved for faccessat2
440 n64 process_madvise sys_process_madvise

View File

@ -433,4 +433,8 @@
433 common fspick sys_fspick
434 common pidfd_open sys_pidfd_open
435 common clone3 sys_clone3_wrapper
436 common process_madvise sys_process_madvise
# 436 reserved for close_range
# 437 reserved for openat2
# 438 reserved for pidfd_getfd
# 439 reserved for faccessat2
440 common process_madvise sys_process_madvise

View File

@ -517,4 +517,8 @@
433 common fspick sys_fspick
434 common pidfd_open sys_pidfd_open
435 nospu clone3 ppc_clone3
436 common process_madvise sys_process_madvise
# 436 reserved for close_range
# 437 reserved for openat2
# 438 reserved for pidfd_getfd
# 439 reserved for faccessat2
440 common process_madvise sys_process_madvise

View File

@ -438,4 +438,8 @@
433 common fspick sys_fspick sys_fspick
434 common pidfd_open sys_pidfd_open sys_pidfd_open
435 common clone3 sys_clone3 sys_clone3
443 common process_madvise sys_process_madvise sys_process_madvise
# 436 reserved for close_range
# 437 reserved for openat2
# 438 reserved for pidfd_getfd
# 439 reserved for faccessat2
440 common process_madvise sys_process_madvise sys_process_madvise

View File

@ -438,4 +438,8 @@
433 common fspick sys_fspick
434 common pidfd_open sys_pidfd_open
# 435 reserved for clone3
436 common process_madvise sys_process_madvise
# 436 reserved for close_range
# 437 reserved for openat2
# 438 reserved for pidfd_getfd
# 439 reserved for faccessat2
440 common process_madvise sys_process_madvise

View File

@ -481,4 +481,8 @@
433 common fspick sys_fspick
434 common pidfd_open sys_pidfd_open
# 435 reserved for clone3
436 common process_madvise sys_process_madvise
# 436 reserved for close_range
# 437 reserved for openat2
# 438 reserved for pidfd_getfd
# 439 reserved for faccessat2
440 common process_madvise sys_process_madvise

View File

@ -440,4 +440,8 @@
433 i386 fspick sys_fspick __ia32_sys_fspick
434 i386 pidfd_open sys_pidfd_open __ia32_sys_pidfd_open
435 i386 clone3 sys_clone3 __ia32_sys_clone3
436 i386 process_madvise sys_process_madvise
# 436 reserved for close_range
# 437 reserved for openat2
# 438 reserved for pidfd_getfd
# 439 reserved for faccessat2
440 i386 process_madvise sys_process_madvise

View File

@ -357,7 +357,11 @@
433 common fspick __x64_sys_fspick
434 common pidfd_open __x64_sys_pidfd_open
435 common clone3 __x64_sys_clone3/ptregs
436 common process_madvise sys_process_madvise
# 436 reserved for close_range
# 437 reserved for openat2
# 438 reserved for pidfd_getfd
# 439 reserved for faccessat2
440 common process_madvise sys_process_madvise
#
# x32-specific system call numbers start at 512 to avoid cache impact

View File

@ -406,4 +406,8 @@
433 common fspick sys_fspick
434 common pidfd_open sys_pidfd_open
435 common clone3 sys_clone3
443 common process_madvise sys_process_madvise
# 436 reserved for close_range
# 437 reserved for openat2
# 438 reserved for pidfd_getfd
# 439 reserved for faccessat2
440 common process_madvise sys_process_madvise

View File

@ -850,11 +850,11 @@ __SYSCALL(__NR_pidfd_open, sys_pidfd_open)
#define __NR_clone3 435
__SYSCALL(__NR_clone3, sys_clone3)
#endif
#define __NR_process_madvise 436
#define __NR_process_madvise 440
__SYSCALL(__NR_process_madvise, sys_process_madvise)
#undef __NR_syscalls
#define __NR_syscalls 437
#define __NR_syscalls 441
/*
* 32 bit systems traditionally used different