From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A18CC433EF for ; Thu, 23 Sep 2021 17:49:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EAE316109E for ; Thu, 23 Sep 2021 17:49:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242407AbhIWRvE (ORCPT ); Thu, 23 Sep 2021 13:51:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239489AbhIWRvA (ORCPT ); Thu, 23 Sep 2021 13:51:00 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82893C061574 for ; Thu, 23 Sep 2021 10:49:28 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: gtucker) with ESMTPSA id DA8B81F411C5 Subject: Re: [PATCH] x86/fpu/signal: save_xstate_epilog: fix return polarity To: Anders Roxell , tglx@linutronix.de, mingo@redhat.com, bp@alien8.de Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Remi Duraffort , Nick Desaulniers , andrew.cooper3@citrix.com, "kernelci-results@groups.io" References: <20210922200901.1823741-1-anders.roxell@linaro.org> From: Guillaume Tucker Message-ID: <2b9a6fd8-0e54-059c-aeb1-c08cb2b8804d@collabora.com> Date: Thu, 23 Sep 2021 18:49:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20210922200901.1823741-1-anders.roxell@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 > Fixes: a2a8fd9a3efd ("x86/fpu/signal: Change return code of restore_fpregs_from_user() to boolean") > Tested-by: Nick Desaulniers > Link: https://github.com/ClangBuiltLinux/linux/issues/1461 > Signed-off-by: Anders Roxell > 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" For the record, see more details about it here: https://github.com/kernelci/kernelci-project/issues/53 Best wishes, Guillaume