[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2078734b-fba5-8207-a73a-3eee4b899256@arm.com>
Date: Fri, 10 Jan 2020 18:42:38 +0000
From: Suzuki Kuruppassery Poulose <suzuki.poulose@....com>
To: Catalin Marinas <catalin.marinas@....com>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
will@...nel.org, maz@...nel.org, mark.rutland@....com,
dave.martin@....com, ard.biesheuvel@...aro.org,
christoffer.dall@....com, Will Deacon <will.deacon@....com>
Subject: Re: [PATCH v2 5/7] arm64: ptrace: nofpsimd: Fail FP/SIMD regset
operations
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
Powered by blists - more mailing lists