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=-8.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED 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 C4C6FC282F6 for ; Mon, 21 Jan 2019 10:40:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9537720663 for ; Mon, 21 Jan 2019 10:40:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548067210; bh=F0P8SaNdWeyMEoG0x2XyeWcvIXOZr73vWCrNmI8die4=; h=Subject:To:Cc:From:Date:List-ID:From; b=d4gQdSVGuI+CBlR++OPqmNAZb8I323FBLQh1MJ+dfiqREZzig6cVjnEmpOw/Z4xT+ pwkRmmu1q1/ouMpi8kRRqD5+l1jh/gCxBJ60FFsLPXXMYIwriiv1FHOqPG3mRuPOaI Huo9f+AUQfd3hkvVlK23LxQ1Mo58W01SldMd/7sg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727384AbfAUKkK (ORCPT ); Mon, 21 Jan 2019 05:40:10 -0500 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:57033 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726678AbfAUKkK (ORCPT ); Mon, 21 Jan 2019 05:40:10 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 3ADD911D8E; Mon, 21 Jan 2019 05:40:09 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 21 Jan 2019 05:40:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=d1IKQU JG5wA3A2oAh92TvRXfvhE9fzjvGYDdScKt9XY=; b=aju8y+LDicSySI0fpDlA6/ dfi+/6aU8MppyYAVLJ6ME4OtTQwWsd9OocfJSRHMDU2mUIi93XOj2x/AhxFTnitG OPrcRpGpMoCSe/zR/9m9xZJ4RozFYqBxQ4n+COQT+xoOq107Tzv7lmX7B3Lq9FTE 0B/2Lq2oB5Y1QuHarJkNRSkzAJMFRXA3Pqt3aBdQ6N0DqT3QNxotj97OtXthLvkZ Jj1PYdjRZDGNAThawZA1giuKxBus5G6Apq/XnhHio2dMUo9w6xTSoKe9HY6AsEGa OVk29NF5/iE4riZMbhx6DgIao+qNnCbdHerO0qSK9US7Suv/47vQj2eCqU/+GIZQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrheeigddulecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthenuceurghilhhouhhtmecufedt tdenucgoufhprghmkfhpucdlfedttddmnecujfgurhepuffvhfffkfggtgfgsehtkeertd dttdflnecuhfhrohhmpeeoghhrvghgkhhhsehlihhnuhigfhhouhhnuggrthhiohhnrdho rhhgqeenucfkphepkeefrdekiedrkeelrddutdejnecurfgrrhgrmhepmhgrihhlfhhroh hmpehgrhgvgheskhhrohgrhhdrtghomhenucevlhhushhtvghrufhiiigvpeef X-ME-Proxy: Received: from localhost (5356596b.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 9CE3B10106; Mon, 21 Jan 2019 05:40:08 -0500 (EST) Subject: FAILED: patch "[PATCH] powerpc/tm: Limit TM code inside PPC_TRANSACTIONAL_MEM" failed to apply to 4.9-stable tree To: leitao@debian.org, linux-kernel.bfrz@manchmal.in-ulm.de, mpe@ellerman.id.au Cc: From: Date: Mon, 21 Jan 2019 11:40:07 +0100 Message-ID: <154806720715789@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.9-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 897bc3df8c5aebb54c32d831f917592e873d0559 Mon Sep 17 00:00:00 2001 From: Breno Leitao Date: Wed, 9 Jan 2019 11:16:45 -0200 Subject: [PATCH] powerpc/tm: Limit TM code inside PPC_TRANSACTIONAL_MEM Commit e1c3743e1a20 ("powerpc/tm: Set MSR[TS] just prior to recheckpoint") moved a code block around and this block uses a 'msr' variable outside of the CONFIG_PPC_TRANSACTIONAL_MEM, however the 'msr' variable is declared inside a CONFIG_PPC_TRANSACTIONAL_MEM block, causing a possible error when CONFIG_PPC_TRANSACTION_MEM is not defined. error: 'msr' undeclared (first use in this function) This is not causing a compilation error in the mainline kernel, because 'msr' is being used as an argument of MSR_TM_ACTIVE(), which is defined as the following when CONFIG_PPC_TRANSACTIONAL_MEM is *not* set: #define MSR_TM_ACTIVE(x) 0 This patch just fixes this issue avoiding the 'msr' variable usage outside the CONFIG_PPC_TRANSACTIONAL_MEM block, avoiding trusting in the MSR_TM_ACTIVE() definition. Cc: stable@vger.kernel.org Reported-by: Christoph Biedl Fixes: e1c3743e1a20 ("powerpc/tm: Set MSR[TS] just prior to recheckpoint") Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c index bd5e6834ca69..6794466f6420 100644 --- a/arch/powerpc/kernel/signal_64.c +++ b/arch/powerpc/kernel/signal_64.c @@ -755,11 +755,12 @@ SYSCALL_DEFINE0(rt_sigreturn) if (restore_tm_sigcontexts(current, &uc->uc_mcontext, &uc_transact->uc_mcontext)) goto badframe; - } + } else #endif - /* Fall through, for non-TM restore */ - if (!MSR_TM_ACTIVE(msr)) { + { /* + * Fall through, for non-TM restore + * * Unset MSR[TS] on the thread regs since MSR from user * context does not have MSR active, and recheckpoint was * not called since restore_tm_sigcontexts() was not called