lkml.org 
[lkml]   [2020]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 5/7] arm64: ptrace: nofpsimd: Fail FP/SIMD regset operations
From
Date
On 10/01/2020 15:12, Catalin Marinas wrote:
> On Tue, Dec 17, 2019 at 06:34:00PM +0000, Suzuki K Poulose wrote:
>> diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c
>> index 6771c399d40c..0135b944b8db 100644
>> --- a/arch/arm64/kernel/ptrace.c
>> +++ b/arch/arm64/kernel/ptrace.c
>> @@ -637,6 +637,9 @@ static int fpr_get(struct task_struct *target, const struct user_regset *regset,
>> unsigned int pos, unsigned int count,
>> void *kbuf, void __user *ubuf)
>> {
>> + if (!system_supports_fpsimd())
>> + return -EINVAL;
>> +
>> if (target == current)
>> fpsimd_preserve_current_state();
>
> I checked the coredump code (fill_thread_core_info) and works correctly
> if we return -EINVAL here. But for completeness, we could add an
> fpr_active() callback to aarch{32,64}_regsets (x86 does the same).
>

Sure, makes sense. I have now added fpr_active() hook for the FP
regsets.

Suzuki

\
 
 \ /
  Last update: 2020-01-10 19:43    [W:0.353 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site