The *32bit_compat* functions were originally named to be consistent with is_32bit_task() used by various non-arm64 archs. x86 also appears to use in_32bit_syscall().
See original commits: ("arch: add compat helpers specific to 32-bit") ("arm64: rename is_compat_thread to is_32bit_compat_thread")
compat32 matches the config option CONFIG_COMPAT32, and is closer to how 32-bit compat is commonly called/referred to. Save a few characters by renaming functions:
in_32bit_compat_syscall -> in_compat32_syscall is_32bit_compat_task -> is_compat32_task is_32bit_compat_thread -> is_compat32_thread
Signed-off-by: Zachary Leaf zachary.leaf@arm.com Cc: Kristina Martsenko kristina.martsenko@arm.com --- arch/arm64/include/asm/compat.h | 6 +++--- arch/arm64/include/asm/ftrace.h | 2 +- arch/arm64/include/asm/mmu_context.h | 2 +- arch/arm64/include/asm/syscall.h | 6 +++--- arch/arm64/kernel/fpsimd.c | 6 +++--- arch/arm64/kernel/hw_breakpoint.c | 2 +- arch/arm64/kernel/perf_regs.c | 2 +- arch/arm64/kernel/pointer_auth.c | 6 +++--- arch/arm64/kernel/process.c | 16 ++++++++-------- arch/arm64/kernel/ptrace.c | 10 +++++----- arch/arm64/kernel/signal.c | 2 +- arch/arm64/kernel/syscall.c | 2 +- arch/mips/include/asm/compat.h | 2 +- arch/parisc/include/asm/compat.h | 2 +- arch/powerpc/include/asm/compat.h | 2 +- arch/s390/include/asm/compat.h | 2 +- arch/sparc/include/asm/compat.h | 4 ++-- arch/x86/include/asm/compat.h | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 2 +- drivers/input/input.c | 2 +- fs/ext4/dir.c | 2 +- fs/nfs/dir.c | 2 +- include/linux/compat.h | 10 +++++----- kernel/time/time.c | 2 +- mm/util.c | 2 +- 26 files changed, 50 insertions(+), 50 deletions(-)
diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h index 40cd9f48eb53..d673b829b30c 100644 --- a/arch/arm64/include/asm/compat.h +++ b/arch/arm64/include/asm/compat.h @@ -107,7 +107,7 @@ static inline void __user *compat_ptr(compat_uptr_t uptr) #define COMPAT_USE_64BIT_TIME 1 #endif
-static inline int is_32bit_compat_task(void) +static inline int is_compat32_task(void) { return IS_ENABLED(CONFIG_COMPAT32) && test_thread_flag(TIF_32BIT); } @@ -118,14 +118,14 @@ static inline int is_compat_task(void) (IS_ENABLED(CONFIG_COMPAT64) && test_thread_flag(TIF_64BIT_COMPAT)); }
-static inline int is_32bit_compat_thread(struct thread_info *thread) +static inline int is_compat32_thread(struct thread_info *thread) { return IS_ENABLED(CONFIG_COMPAT32) && test_ti_thread_flag(thread, TIF_32BIT); }
#else /* !CONFIG_COMPAT */
-static inline int is_32bit_compat_thread(struct thread_info *thread) +static inline int is_compat32_thread(struct thread_info *thread) { return 0; } diff --git a/arch/arm64/include/asm/ftrace.h b/arch/arm64/include/asm/ftrace.h index da9735c84bd3..c4367a3205bf 100644 --- a/arch/arm64/include/asm/ftrace.h +++ b/arch/arm64/include/asm/ftrace.h @@ -175,7 +175,7 @@ static inline void arch_ftrace_set_direct_caller(struct ftrace_regs *fregs, #define ARCH_TRACE_IGNORE_COMPAT_SYSCALLS static inline bool arch_trace_is_compat_syscall(struct pt_regs *regs) { - return is_32bit_compat_task(); + return is_compat32_task(); }
#if defined(CONFIG_FTRACE_SYSCALLS) && defined(CONFIG_CHERI_PURECAP_UABI) diff --git a/arch/arm64/include/asm/mmu_context.h b/arch/arm64/include/asm/mmu_context.h index 937b2dc682e7..0f115f3d67c8 100644 --- a/arch/arm64/include/asm/mmu_context.h +++ b/arch/arm64/include/asm/mmu_context.h @@ -275,7 +275,7 @@ task_cpu_possible_mask(struct task_struct *p) if (!static_branch_unlikely(&arm64_mismatched_32bit_el0)) return cpu_possible_mask;
- if (!is_32bit_compat_thread(task_thread_info(p))) + if (!is_compat32_thread(task_thread_info(p))) return cpu_possible_mask;
return system_32bit_el0_cpumask(); diff --git a/arch/arm64/include/asm/syscall.h b/arch/arm64/include/asm/syscall.h index 3ba1e4a616ec..450bd368032b 100644 --- a/arch/arm64/include/asm/syscall.h +++ b/arch/arm64/include/asm/syscall.h @@ -48,7 +48,7 @@ static inline long syscall_get_return_value(struct task_struct *task, { unsigned long val = regs->regs[0];
- if (is_32bit_compat_thread(task_thread_info(task))) + if (is_compat32_thread(task_thread_info(task))) val = sign_extend64(val, 31);
return val; @@ -69,7 +69,7 @@ static inline void syscall_set_return_value(struct task_struct *task, if (error) val = error;
- if (is_32bit_compat_thread(task_thread_info(task))) + if (is_compat32_thread(task_thread_info(task))) val = lower_32_bits(val);
regs->regs[0] = val; @@ -93,7 +93,7 @@ static inline void syscall_get_arguments(struct task_struct *task, */ static inline int syscall_get_arch(struct task_struct *task) { - if (is_32bit_compat_thread(task_thread_info(task))) + if (is_compat32_thread(task_thread_info(task))) return AUDIT_ARCH_ARM;
return AUDIT_ARCH_AARCH64; diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c index 145639a6785c..9b1ba420bcfb 100644 --- a/arch/arm64/kernel/fpsimd.c +++ b/arch/arm64/kernel/fpsimd.c @@ -954,7 +954,7 @@ int sve_set_current_vl(unsigned long arg) vl = arg & PR_SVE_VL_LEN_MASK; flags = arg & ~vl;
- if (!system_supports_sve() || is_32bit_compat_task()) + if (!system_supports_sve() || is_compat32_task()) return -EINVAL;
ret = vec_set_vector_length(current, ARM64_VEC_SVE, vl, flags); @@ -967,7 +967,7 @@ int sve_set_current_vl(unsigned long arg) /* PR_SVE_GET_VL */ int sve_get_current_vl(void) { - if (!system_supports_sve() || is_32bit_compat_task()) + if (!system_supports_sve() || is_compat32_task()) return -EINVAL;
return vec_prctl_status(ARM64_VEC_SVE, 0); @@ -1441,7 +1441,7 @@ void do_sve_acc(unsigned long esr, struct pt_regs *regs) { /* Even if we chose not to use SVE, the hardware could still trap: */ if (unlikely(!system_supports_sve()) || - WARN_ON(is_32bit_compat_task())) { + WARN_ON(is_compat32_task())) { force_signal_inject(SIGILL, ILL_ILLOPC, regs->pc, 0); return; } diff --git a/arch/arm64/kernel/hw_breakpoint.c b/arch/arm64/kernel/hw_breakpoint.c index 70de3f0bae73..8e5392c7f213 100644 --- a/arch/arm64/kernel/hw_breakpoint.c +++ b/arch/arm64/kernel/hw_breakpoint.c @@ -168,7 +168,7 @@ static int is_compat_bp(struct perf_event *bp) * deprecated behaviour if we use unaligned watchpoints in * AArch64 state. */ - return tsk && is_32bit_compat_thread(task_thread_info(tsk)); + return tsk && is_compat32_thread(task_thread_info(tsk)); }
/** diff --git a/arch/arm64/kernel/perf_regs.c b/arch/arm64/kernel/perf_regs.c index 4afbd1ac45d5..91ac6f753916 100644 --- a/arch/arm64/kernel/perf_regs.c +++ b/arch/arm64/kernel/perf_regs.c @@ -92,7 +92,7 @@ int perf_reg_validate(u64 mask)
u64 perf_reg_abi(struct task_struct *task) { - if (is_32bit_compat_thread(task_thread_info(task))) + if (is_compat32_thread(task_thread_info(task))) return PERF_SAMPLE_REGS_ABI_32; else return PERF_SAMPLE_REGS_ABI_64; diff --git a/arch/arm64/kernel/pointer_auth.c b/arch/arm64/kernel/pointer_auth.c index 6e9bc6dcfa5e..017219bd96b9 100644 --- a/arch/arm64/kernel/pointer_auth.c +++ b/arch/arm64/kernel/pointer_auth.c @@ -18,7 +18,7 @@ int ptrauth_prctl_reset_keys(struct task_struct *tsk, unsigned long arg) if (!system_supports_address_auth() && !system_supports_generic_auth()) return -EINVAL;
- if (is_32bit_compat_thread(task_thread_info(tsk))) + if (is_compat32_thread(task_thread_info(tsk))) return -EINVAL;
if (!arg) { @@ -72,7 +72,7 @@ int ptrauth_set_enabled_keys(struct task_struct *tsk, unsigned long keys, if (!system_supports_address_auth()) return -EINVAL;
- if (is_32bit_compat_thread(task_thread_info(tsk))) + if (is_compat32_thread(task_thread_info(tsk))) return -EINVAL;
if ((keys & ~PR_PAC_ENABLED_KEYS_MASK) || (enabled & ~keys)) @@ -97,7 +97,7 @@ int ptrauth_get_enabled_keys(struct task_struct *tsk) if (!system_supports_address_auth()) return -EINVAL;
- if (is_32bit_compat_thread(task_thread_info(tsk))) + if (is_compat32_thread(task_thread_info(tsk))) return -EINVAL;
if (tsk->thread.sctlr_user & SCTLR_ELx_ENIA) diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index cff890a14d41..ddd661ad1e9d 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -257,7 +257,7 @@ static void tls_thread_flush(void) if (system_supports_tpidr2()) write_sysreg_s(0, SYS_TPIDR2_EL0);
- if (is_32bit_compat_task()) { + if (is_compat32_task()) { current->thread.uw.tp_value = 0;
/* @@ -349,7 +349,7 @@ asmlinkage void ret_from_fork(void) asm("ret_from_fork");
static user_uintptr_t *task_user_tls(struct task_struct *tsk) { - if (is_32bit_compat_thread(task_thread_info(tsk))) + if (is_compat32_thread(task_thread_info(tsk))) return &tsk->thread.uw.tp2_value; else return &tsk->thread.uw.tp_value; @@ -408,7 +408,7 @@ int copy_thread(struct task_struct *p, const struct kernel_clone_args *args) p->thread.tpidr2_el0 = read_sysreg_s(SYS_TPIDR2_EL0);
if (stack_start) { - if (is_32bit_compat_thread(task_thread_info(p))) { + if (is_compat32_thread(task_thread_info(p))) { childregs->compat_sp = (ptraddr_t)stack_start; } else { childregs->sp = (ptraddr_t)stack_start; @@ -467,7 +467,7 @@ static void tls_thread_switch(struct task_struct *next) { tls_preserve_current_state();
- if (is_32bit_compat_thread(task_thread_info(next))) + if (is_compat32_thread(task_thread_info(next))) write_sysreg(next->thread.uw.tp_value, tpidrro_el0); else if (!arm64_kernel_unmapped_at_el0()) write_sysreg(0, tpidrro_el0); @@ -525,7 +525,7 @@ static void erratum_1418040_thread_switch(struct task_struct *next) !this_cpu_has_cap(ARM64_WORKAROUND_1418040)) return;
- if (is_32bit_compat_thread(task_thread_info(next))) + if (is_compat32_thread(task_thread_info(next))) sysreg_clear_set(cntkctl_el1, ARCH_TIMER_USR_VCT_ACCESS_EN, 0); else sysreg_clear_set(cntkctl_el1, 0, ARCH_TIMER_USR_VCT_ACCESS_EN); @@ -674,7 +674,7 @@ void arch_setup_new_exec(void) { unsigned long mmflags = 0;
- if (is_32bit_compat_task()) { + if (is_compat32_task()) { mmflags = MMCF_AARCH32;
/* @@ -717,7 +717,7 @@ long set_tagged_addr_ctrl(struct task_struct *task, unsigned long arg) unsigned long valid_mask = PR_TAGGED_ADDR_ENABLE; struct thread_info *ti = task_thread_info(task);
- if (is_32bit_compat_thread(ti)) + if (is_compat32_thread(ti)) return -EINVAL;
if (system_supports_mte()) @@ -747,7 +747,7 @@ long get_tagged_addr_ctrl(struct task_struct *task) long ret = 0; struct thread_info *ti = task_thread_info(task);
- if (is_32bit_compat_thread(ti)) + if (is_compat32_thread(ti)) return -EINVAL;
if (test_ti_thread_flag(ti, TIF_TAGGED_ADDR)) diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index 6422fdc5153f..7ada3877e2f6 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -175,7 +175,7 @@ static void ptrace_hbptriggered(struct perf_event *bp, const char *desc = "Hardware breakpoint trap (ptrace)";
#ifdef CONFIG_COMPAT - if (is_32bit_compat_task()) { + if (is_compat32_task()) { int si_errno = 0; int i;
@@ -2290,9 +2290,9 @@ const struct user_regset_view *task_user_regset_view(struct task_struct *task) * 32-bit children use an extended user_aarch32_ptrace_view to allow * access to the TLS register. */ - if (is_32bit_compat_task()) + if (is_compat32_task()) return &user_aarch32_view; - else if (is_32bit_compat_thread(task_thread_info(task))) + else if (is_compat32_thread(task_thread_info(task))) return &user_aarch32_ptrace_view; #endif return &user_aarch64_view; @@ -2343,7 +2343,7 @@ static void report_syscall(struct pt_regs *regs, enum ptrace_syscall_dir dir) * - Syscall stops behave differently to seccomp and pseudo-step traps * (the latter do not nobble any registers). */ - regno = (is_32bit_compat_task() ? 12 : 7); + regno = (is_compat32_task() ? 12 : 7); saved_reg = regs->regs[regno]; regs->regs[regno] = dir;
@@ -2479,7 +2479,7 @@ int valid_user_regs(struct user_pt_regs *regs, struct task_struct *task) /* https://lore.kernel.org/lkml/20191118131525.GA4180@willie-the-truck */ user_regs_reset_single_step(regs, task);
- if (is_32bit_compat_thread(task_thread_info(task))) + if (is_compat32_thread(task_thread_info(task))) return valid_compat_regs(regs); else return valid_native_regs(regs); diff --git a/arch/arm64/kernel/signal.c b/arch/arm64/kernel/signal.c index 9e1e9c54a3e4..987308694592 100644 --- a/arch/arm64/kernel/signal.c +++ b/arch/arm64/kernel/signal.c @@ -1323,7 +1323,7 @@ static int setup_rt_frame(int usig, struct ksignal *ksig, sigset_t *set, static void setup_restart_syscall(struct pt_regs *regs) { #ifdef CONFIG_COMPAT32 - if (is_32bit_compat_task()) { + if (is_compat32_task()) { compat_setup_restart_syscall(regs); return; } diff --git a/arch/arm64/kernel/syscall.c b/arch/arm64/kernel/syscall.c index ca939ec04a79..d676effeeff1 100644 --- a/arch/arm64/kernel/syscall.c +++ b/arch/arm64/kernel/syscall.c @@ -23,7 +23,7 @@ static long do_ni_syscall(struct pt_regs *regs, int scno) { #ifdef CONFIG_COMPAT32 long ret; - if (is_32bit_compat_task()) { + if (is_compat32_task()) { ret = compat_arm_syscall(regs, scno); if (ret != -ENOSYS) return ret; diff --git a/arch/mips/include/asm/compat.h b/arch/mips/include/asm/compat.h index 489361c6847b..800aada3c277 100644 --- a/arch/mips/include/asm/compat.h +++ b/arch/mips/include/asm/compat.h @@ -154,6 +154,6 @@ static inline int is_compat_task(void) { return test_thread_flag(TIF_32BIT_ADDR); } -#define is_32bit_compat_task is_compat_task +#define is_compat32_task is_compat_task
#endif /* _ASM_COMPAT_H */ diff --git a/arch/parisc/include/asm/compat.h b/arch/parisc/include/asm/compat.h index e6c84fcbb87f..494f7f0cce92 100644 --- a/arch/parisc/include/asm/compat.h +++ b/arch/parisc/include/asm/compat.h @@ -137,6 +137,6 @@ static inline int is_compat_task(void) { return __is_compat_task(current); } -#define is_32bit_compat_task is_compat_task +#define is_compat32_task is_compat_task
#endif /* _ASM_PARISC_COMPAT_H */ diff --git a/arch/powerpc/include/asm/compat.h b/arch/powerpc/include/asm/compat.h index f3f7b51054dc..06e2f176b815 100644 --- a/arch/powerpc/include/asm/compat.h +++ b/arch/powerpc/include/asm/compat.h @@ -109,7 +109,7 @@ static inline int is_compat_task(void) { return is_32bit_task(); } -#define is_32bit_compat_task is_compat_task +#define is_compat32_task is_compat_task
#endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_COMPAT_H */ diff --git a/arch/s390/include/asm/compat.h b/arch/s390/include/asm/compat.h index 55b801c44dfe..10ef245e1434 100644 --- a/arch/s390/include/asm/compat.h +++ b/arch/s390/include/asm/compat.h @@ -134,7 +134,7 @@ static inline int is_compat_task(void) { return test_thread_flag(TIF_31BIT); } -#define is_32bit_compat_task is_compat_task +#define is_compat32_task is_compat_task
#endif
diff --git a/arch/sparc/include/asm/compat.h b/arch/sparc/include/asm/compat.h index 1d2e5ad1c894..56f52502fcba 100644 --- a/arch/sparc/include/asm/compat.h +++ b/arch/sparc/include/asm/compat.h @@ -148,7 +148,7 @@ static inline int is_compat_task(void) { return test_thread_flag(TIF_32BIT); } -#define is_32bit_compat_task is_compat_task +#define is_compat32_task is_compat_task
static inline bool in_compat_syscall(void) { @@ -156,7 +156,7 @@ static inline bool in_compat_syscall(void) return pt_regs_trap_type(current_pt_regs()) == 0x110; } #define in_compat_syscall in_compat_syscall -#define in_32bit_compat_syscall in_compat_syscall +#define in_compat32_syscall in_compat_syscall #endif
#endif /* _ASM_SPARC64_COMPAT_H */ diff --git a/arch/x86/include/asm/compat.h b/arch/x86/include/asm/compat.h index 2f7facbb592c..5dcb9afbcb9c 100644 --- a/arch/x86/include/asm/compat.h +++ b/arch/x86/include/asm/compat.h @@ -100,7 +100,7 @@ static inline bool in_compat_syscall(void) return in_32bit_syscall(); } #define in_compat_syscall in_compat_syscall /* override the generic impl */ -#define in_32bit_compat_syscall in_compat_syscall +#define in_compat32_syscall in_compat_syscall #define compat_need_64bit_alignment_fixup in_ia32_syscall #endif
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c index 57bbf4a4ee2d..d1fd4eec97f7 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c @@ -132,7 +132,7 @@ static int kfd_open(struct inode *inode, struct file *filep) if (iminor(inode) != 0) return -ENODEV;
- is_32bit_user_mode = in_32bit_compat_syscall(); + is_32bit_user_mode = in_compat32_syscall();
if (is_32bit_user_mode) { dev_warn(kfd_device, diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c index 5a037594450d..210bb5c9e876 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c @@ -1427,7 +1427,7 @@ static struct kfd_process *create_process(const struct task_struct *thread) err = kfd_event_init_process(process); if (err) goto err_event_init; - process->is_32bit_user_mode = in_32bit_compat_syscall(); + process->is_32bit_user_mode = in_compat32_syscall();
process->pasid = kfd_pasid_alloc(); if (process->pasid == 0) { diff --git a/drivers/input/input.c b/drivers/input/input.c index b74f7b536ad6..13985b40772a 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -1074,7 +1074,7 @@ static int input_bits_to_string(char *buf, int buf_size, { int len = 0;
- if (in_32bit_compat_syscall()) { + if (in_compat32_syscall()) { u32 dword = bits >> 32; if (dword || !skip_empty) len += snprintf(buf, buf_size, "%x ", dword); diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c index 87b105a00cd0..cfa1b4e54209 100644 --- a/fs/ext4/dir.c +++ b/fs/ext4/dir.c @@ -315,7 +315,7 @@ static int ext4_readdir(struct file *file, struct dir_context *ctx) static inline int is_32bit_api(void) { #ifdef CONFIG_COMPAT - return in_32bit_compat_syscall(); + return in_compat32_syscall(); #else return (BITS_PER_LONG == 32); #endif diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 8689d5a06078..3649258ff9ab 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -460,7 +460,7 @@ static inline int is_32bit_api(void) { #ifdef CONFIG_COMPAT - return in_32bit_compat_syscall(); + return in_compat32_syscall(); #else return (BITS_PER_LONG == 32); #endif diff --git a/include/linux/compat.h b/include/linux/compat.h index d72881d525ac..68fd4787048f 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h @@ -1020,19 +1020,19 @@ int kcompat_sys_fstatfs64(unsigned int fd, compat_size_t sz, #ifndef in_compat_syscall static inline bool in_compat_syscall(void) { return is_compat_task(); } #endif -#ifndef in_32bit_compat_syscall -static inline bool in_32bit_compat_syscall(void) { return is_32bit_compat_task(); } +#ifndef in_compat32_syscall +static inline bool in_compat32_syscall(void) { return is_compat32_task(); } #endif
#else /* !CONFIG_COMPAT */
#define is_compat_task() (0) -#define is_32bit_compat_task() (0) +#define is_compat32_task() (0) /* Ensure no one redefines in_compat_syscall() under !CONFIG_COMPAT */ #define in_compat_syscall in_compat_syscall static inline bool in_compat_syscall(void) { return false; } -#define in_32bit_compat_syscall in_32bit_compat_syscall -static inline bool in_32bit_compat_syscall(void) { return false; } +#define in_compat32_syscall in_compat32_syscall +static inline bool in_compat32_syscall(void) { return false; }
#endif /* CONFIG_COMPAT */
diff --git a/kernel/time/time.c b/kernel/time/time.c index 3d9be77e0425..1e2133b201cc 100644 --- a/kernel/time/time.c +++ b/kernel/time/time.c @@ -791,7 +791,7 @@ int get_timespec64(struct timespec64 *ts, ts->tv_sec = kts.tv_sec;
/* Zero out the padding in compat mode */ - if (in_32bit_compat_syscall()) + if (in_compat32_syscall()) kts.tv_nsec &= 0xFFFFFFFFUL;
/* In 32-bit mode, this drops the padding */ diff --git a/mm/util.c b/mm/util.c index 61de3bf7712b..0f7d66d77354 100644 --- a/mm/util.c +++ b/mm/util.c @@ -371,7 +371,7 @@ unsigned long randomize_page(unsigned long start, unsigned long range) unsigned long __weak arch_randomize_brk(struct mm_struct *mm) { /* Is the current task 32bit ? */ - if (!IS_ENABLED(CONFIG_64BIT) || is_32bit_compat_task()) + if (!IS_ENABLED(CONFIG_64BIT) || is_compat32_task()) return randomize_page(mm->brk, SZ_32M);
return randomize_page(mm->brk, SZ_1G);