From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 251D576034 for ; Thu, 11 Jul 2024 09:42:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720690975; cv=none; b=B9EvUMceI1aNcJ54Nxs3QhOMo63Mt9f4Ig0N1/sE2/zpuWXnrYsqHJaevXBjGYX6jYw0sgggY3vbt03q5bRLQHzz92MJTwOP+XdGXfkS9ry8kypI7doNUHhzcGEMsV0ixBtbXfOC4aaE/XV+RG2JN+fBxqKuA4dK5SP6DZfDgdg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720690975; c=relaxed/simple; bh=QTM9T8AYTfuCc0onvkoEiTtO6FGgF/nRD2TV2OSmrFA=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=orVrh9vpECE9BZc40wEhQxvN+HFJ3K9BgRsDgFooyZ0401B9eQD+5nkmo4+TZ6MDGciLNjXgq9K+lKk1pHxYh1D3ZjbIBsX4qcsk6+2zyR2EgQEcsha/Hx3V2kqGPZ6XwXmbwZysw6ZrumztlT+YMZiSa8elV19L1rjXsXmFXeo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=bISWvid7; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="bISWvid7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41D9EC4AF07; Thu, 11 Jul 2024 09:42:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1720690974; bh=QTM9T8AYTfuCc0onvkoEiTtO6FGgF/nRD2TV2OSmrFA=; h=Subject:To:Cc:From:Date:From; b=bISWvid79N0EryIZSMyG9dXHhq1LE4CKUHAgGJz9ZcQk7pM4NsxxHBb6zII6kjxuZ hpdHGCKR14DWU8FEwETAclQheVrsaGo33F5kKqkdo12Y8W8+TkSGHm4zfVt2GA290Z oZbHMmB2JU8K5UBtR0ILAPyUVZTwyDDxrSq8H52c= Subject: FAILED: patch "[PATCH] s390: Mark psw in __load_psw_mask() as __unitialized" failed to apply to 6.6-stable tree To: svens@linux.ibm.com,agordeev@linux.ibm.com,hca@linux.ibm.com Cc: From: Date: Thu, 11 Jul 2024 11:42:51 +0200 Message-ID: <2024071151-recital-stage-0612@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.6-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 . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y git checkout FETCH_HEAD git cherry-pick -x 7278a8fb8d032dfdc03d9b5d17e0bc451cdc1492 # git commit -s git send-email --to '' --in-reply-to '2024071151-recital-stage-0612@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^.. Possible dependencies: 7278a8fb8d03 ("s390: Mark psw in __load_psw_mask() as __unitialized") thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 7278a8fb8d032dfdc03d9b5d17e0bc451cdc1492 Mon Sep 17 00:00:00 2001 From: Sven Schnelle Date: Tue, 30 Apr 2024 16:30:01 +0200 Subject: [PATCH] s390: Mark psw in __load_psw_mask() as __unitialized Without __unitialized, the following code is generated when INIT_STACK_ALL_ZERO is enabled: 86: d7 0f f0 a0 f0 a0 xc 160(16,%r15), 160(%r15) 8c: e3 40 f0 a0 00 24 stg %r4, 160(%r15) 92: c0 10 00 00 00 08 larl %r1, 0xa2 98: e3 10 f0 a8 00 24 stg %r1, 168(%r15) 9e: b2 b2 f0 a0 lpswe 160(%r15) The xc is not adding any security because psw is fully initialized with the following instructions. Add __unitialized to the psw definitiation to avoid the superfluous clearing of psw. Reviewed-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Alexander Gordeev diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h index 1e2fc6d6963c..07ad5a1df878 100644 --- a/arch/s390/include/asm/processor.h +++ b/arch/s390/include/asm/processor.h @@ -314,8 +314,8 @@ static inline void __load_psw(psw_t psw) */ static __always_inline void __load_psw_mask(unsigned long mask) { + psw_t psw __uninitialized; unsigned long addr; - psw_t psw; psw.mask = mask;