diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2020-07-03 14:25:50 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2020-09-04 12:46:07 +0100 |
commit | 93f067f6caf5941cc730e99ce72042304e0e6ff5 (patch) | |
tree | 9909eeb3f842bbcb594976c7d02967c783f3ee03 /arch/arm64/include/asm | |
parent | 39d08e8318c49c5fd2bda9cadfd2bc54d2d3dfd8 (diff) |
arm64: mte: Allow {set,get}_tagged_addr_ctrl() on non-current tasks
In preparation for ptrace() access to the prctl() value, allow calling
these functions on non-current tasks.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/include/asm')
-rw-r--r-- | arch/arm64/include/asm/mte.h | 8 | ||||
-rw-r--r-- | arch/arm64/include/asm/processor.h | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/arch/arm64/include/asm/mte.h b/arch/arm64/include/asm/mte.h index c93047eff9fe..1a919905295b 100644 --- a/arch/arm64/include/asm/mte.h +++ b/arch/arm64/include/asm/mte.h @@ -23,8 +23,8 @@ void mte_copy_page_tags(void *kto, const void *kfrom); void flush_mte_state(void); void mte_thread_switch(struct task_struct *next); void mte_suspend_exit(void); -long set_mte_ctrl(unsigned long arg); -long get_mte_ctrl(void); +long set_mte_ctrl(struct task_struct *task, unsigned long arg); +long get_mte_ctrl(struct task_struct *task); #else @@ -46,11 +46,11 @@ static inline void mte_thread_switch(struct task_struct *next) static inline void mte_suspend_exit(void) { } -static inline long set_mte_ctrl(unsigned long arg) +static inline long set_mte_ctrl(struct task_struct *task, unsigned long arg) { return 0; } -static inline long get_mte_ctrl(void) +static inline long get_mte_ctrl(struct task_struct *task) { return 0; } diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index e1b1c2a6086e..fec204d28fce 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h @@ -319,10 +319,10 @@ extern void __init minsigstksz_setup(void); #ifdef CONFIG_ARM64_TAGGED_ADDR_ABI /* PR_{SET,GET}_TAGGED_ADDR_CTRL prctl */ -long set_tagged_addr_ctrl(unsigned long arg); -long get_tagged_addr_ctrl(void); -#define SET_TAGGED_ADDR_CTRL(arg) set_tagged_addr_ctrl(arg) -#define GET_TAGGED_ADDR_CTRL() get_tagged_addr_ctrl() +long set_tagged_addr_ctrl(struct task_struct *task, unsigned long arg); +long get_tagged_addr_ctrl(struct task_struct *task); +#define SET_TAGGED_ADDR_CTRL(arg) set_tagged_addr_ctrl(current, arg) +#define GET_TAGGED_ADDR_CTRL() get_tagged_addr_ctrl(current) #endif /* |