mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guillaume Tucker <guillaume.tucker@collabora.com>
To: Anders Roxell <anders.roxell@linaro.org>,
	tglx@linutronix.de, mingo@redhat.com, bp@alien8.de
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
	Remi Duraffort <remi.duraffort@linaro.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	andrew.cooper3@citrix.com,
	"kernelci-results@groups.io" <kernelci-results@groups.io>
Subject: Re: [PATCH] x86/fpu/signal: save_xstate_epilog: fix return polarity
Date: Thu, 23 Sep 2021 18:49:24 +0100	[thread overview]
Message-ID: <2b9a6fd8-0e54-059c-aeb1-c08cb2b8804d@collabora.com> (raw)
In-Reply-To: <20210922200901.1823741-1-anders.roxell@linaro.org>

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

      parent reply	other threads:[~2021-09-23 17:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-22 20:09 Anders Roxell
2021-09-23  9:00 ` [tip: x86/fpu] x86/fpu/signal: Fix missed conversion to correct boolean retval in save_xstate_epilog() tip-bot2 for Anders Roxell
2021-09-23 17:49 ` Guillaume Tucker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2b9a6fd8-0e54-059c-aeb1-c08cb2b8804d@collabora.com \
    --to=guillaume.tucker@collabora.com \
    --cc=anders.roxell@linaro.org \
    --cc=andrew.cooper3@citrix.com \
    --cc=bp@alien8.de \
    --cc=kernelci-results@groups.io \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=ndesaulniers@google.com \
    --cc=remi.duraffort@linaro.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®