lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <163238764483.25758.11716568924329080028.tip-bot2@tip-bot2>
Date:   Thu, 23 Sep 2021 09:00:44 -0000
From:   "tip-bot2 for Anders Roxell" <tip-bot2@...utronix.de>
To:     linux-tip-commits@...r.kernel.org
Cc:     Remi Duraffort <remi.duraffort@...aro.org>,
        Anders Roxell <anders.roxell@...aro.org>,
        Borislav Petkov <bp@...e.de>,
        Nick Desaulniers <ndesaulniers@...gle.com>, x86@...nel.org,
        linux-kernel@...r.kernel.org
Subject: [tip: x86/fpu] x86/fpu/signal: Fix missed conversion to correct
 boolean retval in save_xstate_epilog()

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@...aro.org>
AuthorDate:    Wed, 22 Sep 2021 22:09:01 +02:00
Committer:     Borislav Petkov <bp@...e.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@...aro.org>
Signed-off-by: Anders Roxell <anders.roxell@...aro.org>
Signed-off-by: Borislav Petkov <bp@...e.de>
Tested-by: Nick Desaulniers <ndesaulniers@...gle.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));

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ