lkml.org 
[lkml]   [2021]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] x86/fpu/signal: save_xstate_epilog: fix return polarity
From
Date
On 22/09/2021 21:09, Anders Roxell wrote:
> Fix the missing return code polarity in function 'save_xstate_epilog()'.
>
> Reported-by: Remi Duraffort <remi.duraffort@linaro.org>
> Fixes: a2a8fd9a3efd ("x86/fpu/signal: Change return code of restore_fpregs_from_user() to boolean")
> Tested-by: Nick Desaulniers <ndesaulniers@google.com>
> Link: https://github.com/ClangBuiltLinux/linux/issues/1461
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> Cc: andrew.cooper3@citrix.com
> ---
> arch/x86/kernel/fpu/signal.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/fpu/signal.c b/arch/x86/kernel/fpu/signal.c
> index 68f03da2012e..39c7bae97daf 100644
> --- a/arch/x86/kernel/fpu/signal.c
> +++ b/arch/x86/kernel/fpu/signal.c
> @@ -106,7 +106,7 @@ static inline bool save_xstate_epilog(void __user *buf, int ia32_frame)
> err = __copy_to_user(&x->i387.sw_reserved, sw_bytes, sizeof(*sw_bytes));
>
> if (!use_xsave())
> - return err;
> + return !err;
>
> err |= __put_user(FP_XSTATE_MAGIC2,
> (__u32 __user *)(buf + fpu_user_xstate_size));
>

This patch has probably been applied already, but since the issue
got bisected and then the fix was verified by KernelCI:

Tested-by: "kernelci.org bot" <bot@kernelci.org>


For the record, see more details about it here:

https://github.com/kernelci/kernelci-project/issues/53

Best wishes,
Guillaume

\
 
 \ /
  Last update: 2021-09-23 19:50    [W:0.033 / U:0.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site