Message ID | 20250325121624.523258-34-guoren@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | rv64ilp32_abi: Build CONFIG_64BIT kernel-self with ILP32 ABI | expand |
Context | Check | Description |
---|---|---|
bjorn/pre-ci_am | success | Success |
bjorn/build-rv32-defconfig | fail | build-rv32-defconfig |
bjorn/build-rv64-clang-allmodconfig | fail | build-rv64-clang-allmodconfig |
bjorn/build-rv64-gcc-allmodconfig | fail | build-rv64-gcc-allmodconfig |
bjorn/build-rv64-nommu-k210-defconfig | success | build-rv64-nommu-k210-defconfig |
bjorn/build-rv64-nommu-k210-virt | success | build-rv64-nommu-k210-virt |
bjorn/checkpatch | success | checkpatch |
bjorn/dtb-warn-rv64 | success | dtb-warn-rv64 |
bjorn/header-inline | success | header-inline |
bjorn/kdoc | success | kdoc |
bjorn/module-param | success | module-param |
bjorn/verify-fixes | success | verify-fixes |
bjorn/verify-signedoff | success | verify-signedoff |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index da3ba1a79ad5..0d436b0217fd 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -962,7 +962,11 @@ struct mm_struct { unsigned long start_brk, brk, start_stack; unsigned long arg_start, arg_end, env_start, env_end; +#ifdef CONFIG_64BIT + unsigned long long saved_auxv[AT_VECTOR_SIZE]; /* for /proc/PID/auxv */ +#else unsigned long saved_auxv[AT_VECTOR_SIZE]; /* for /proc/PID/auxv */ +#endif struct percpu_counter rss_stat[NR_MM_COUNTERS]; diff --git a/kernel/sys.c b/kernel/sys.c index cb366ff8703a..81c0d94ff50d 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -2008,7 +2008,11 @@ static int validate_prctl_map_addr(struct prctl_mm_map *prctl_map) static int prctl_set_mm_map(int opt, const void __user *addr, unsigned long data_size) { struct prctl_mm_map prctl_map = { .exe_fd = (u32)-1, }; +#ifdef CONFIG_64BIT + unsigned long long user_auxv[AT_VECTOR_SIZE]; +#else unsigned long user_auxv[AT_VECTOR_SIZE]; +#endif struct mm_struct *mm = current->mm; int error; @@ -2122,7 +2126,11 @@ static int prctl_set_auxv(struct mm_struct *mm, unsigned long addr, * up to the caller to provide sane values here, otherwise userspace * tools which use this vector might be unhappy. */ +#ifdef CONFIG_64BIT + unsigned long long user_auxv[AT_VECTOR_SIZE] = {}; +#else unsigned long user_auxv[AT_VECTOR_SIZE] = {}; +#endif if (len > sizeof(user_auxv)) return -EINVAL;