mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Anders Roxell" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Remi Duraffort <remi.duraffort@linaro.org>,
	Anders Roxell <anders.roxell@linaro.org>,
	Borislav Petkov <bp@suse.de>,
	Nick Desaulniers <ndesaulniers@google.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/fpu] x86/fpu/signal: Fix missed conversion to correct boolean retval in save_xstate_epilog()
Date: Thu, 23 Sep 2021 09:00:44 -0000	[thread overview]
Message-ID: <163238764483.25758.11716568924329080028.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20210922200901.1823741-1-anders.roxell@linaro.org>

The following commit has been merged into the x86/fpu branch of tip:

Commit-ID:     724fc0248d450224b19ef5b5ee41e392348f6704
Gitweb:        https://git.kernel.org/tip/724fc0248d450224b19ef5b5ee41e392348f6704
Author:        Anders Roxell <anders.roxell@linaro.org>
AuthorDate:    Wed, 22 Sep 2021 22:09:01 +02:00
Committer:     Borislav Petkov <bp@suse.de>
CommitterDate: Thu, 23 Sep 2021 10:52:20 +02:00

x86/fpu/signal: Fix missed conversion to correct boolean retval in save_xstate_epilog()

Fix the missing return code polarity in save_xstate_epilog().

 [ bp: Massage, use the right commit in the Fixes: tag ]

Fixes: 2af07f3a6e9f ("x86/fpu/signal: Change return type of copy_fpregs_to_sigframe() helpers to boolean")
Reported-by: Remi Duraffort <remi.duraffort@linaro.org>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Link: https://github.com/ClangBuiltLinux/linux/issues/1461
Link: https://lkml.kernel.org/r/20210922200901.1823741-1-anders.roxell@linaro.org
---
 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 68f03da..39c7bae 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));

  reply	other threads:[~2021-09-23  9:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-22 20:09 [PATCH] x86/fpu/signal: save_xstate_epilog: fix return polarity Anders Roxell
2021-09-23  9:00 ` tip-bot2 for Anders Roxell [this message]
2021-09-23 17:49 ` Guillaume Tucker

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=163238764483.25758.11716568924329080028.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=anders.roxell@linaro.org \
    --cc=bp@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=remi.duraffort@linaro.org \
    --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®