On 07/02/2024 05:45, Chaitanya S Prakash wrote:
[...]
diff --git a/tools/testing/selftests/arm64/morello/mmap.c b/tools/testing/selftests/arm64/morello/mmap.c index 2dd4ccdb0d2a..6228df563a0a 100644 --- a/tools/testing/selftests/arm64/morello/mmap.c +++ b/tools/testing/selftests/arm64/morello/mmap.c @@ -19,6 +19,12 @@ #define PROBE_MODE_TOUCH 0x01 #define PROBE_MODE_VERIFY 0x02 +/* As the minimum address is configurable, consider the default value of
- CONFIG_LSM_MMAP_MIN_ADDR which is 65536 (64K) for a fixed address.
- */
+#define address (pagesize << 4)
"address" is a very generic name for a constant. Maybe min_addr?
Also the default value of CONFIG_LSM_MMAP_MIN_ADDR is not linked to the page size, so better to hardcode the value.
+static unsigned long pagesize; static inline int probe_mem_range(void *addr, size_t size, int mode) { @@ -127,8 +133,10 @@ TEST(test_syscall_mmap2) syscall_mmap2(); } -int main(void) +int main(int argc __maybe_unused, char **argv __maybe_unused, char **envp __maybe_unused, struct morello_auxv *auxv)
Nit: that line should be wrapped.
Kevin