From patchwork Tue Apr 4 09:10:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Heimes X-Patchwork-Id: 1764742 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=vIFmFq8b; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PrMSR6XC1z1yZc for ; Tue, 4 Apr 2023 19:11:03 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1pjcgr-0007bP-DS; Tue, 04 Apr 2023 09:10:57 +0000 Received: from smtp-relay-canonical-0.internal ([10.131.114.83] helo=smtp-relay-canonical-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1pjcgp-0007b0-PM for kernel-team@lists.ubuntu.com; Tue, 04 Apr 2023 09:10:55 +0000 Received: from T570.fritz.box (p5b175c27.dip0.t-ipconnect.de [91.23.92.39]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 894C240DB7 for ; Tue, 4 Apr 2023 09:10:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1680599454; bh=YBLuonFYhMJZZUM4+mJOtyDbvbGgZ17S0ngUfMd9994=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=vIFmFq8btIELvmGMFI2JBrL4W054CSCrOzvREhxHn/0PE+etdNKYpeZBjDgWi5prz vcylDCFXz10H5C2ixZVswQmpWONwllttjdGa/0cNV2k8oNZMQ0Ncv+eZV5yqQ0eOaO wnkOME0CHtUW8ufQH/7Og7II+wpSSv8MmPmKCqyjjYtI5elKxKEX1An+LpK+vqq2CY ZxzWvBew82Bel6XW1FN+WpN7yLwe/lSHTOVkiREo94vtm7FL9rNjT2z7AsO1vCPZcd 04UfGWHtord7N3TF8rF2L40hEsqPMOMmuWNIHjR/Lb7kl3UzPmPqM5oquFzAjjLBNp W8CgC6aYyhhvQ== From: frank.heimes@canonical.com To: kernel-team@lists.ubuntu.com Subject: [SRU][K][J][PATCH 1/1] s390/uaccess: add missing earlyclobber annotations to __clear_user() Date: Tue, 4 Apr 2023 11:10:48 +0200 Message-Id: <20230404091049.142933-2-frank.heimes@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230404091049.142933-1-frank.heimes@canonical.com> References: <20230404091049.142933-1-frank.heimes@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Heiko Carstens BugLink: https://bugs.launchpad.net/bugs/2013088 Add missing earlyclobber annotation to size, to, and tmp2 operands of the __clear_user() inline assembly since they are modified or written to before the last usage of all input operands. This can lead to incorrect register allocation for the inline assembly. Fixes: 6c2a9e6df604 ("[S390] Use alternative user-copy operations for new hardware.") Reported-by: Mark Rutland Link: https://lore.kernel.org/all/20230321122514.1743889-3-mark.rutland@arm.com/ Cc: stable@vger.kernel.org Reviewed-by: Gerald Schaefer Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik (cherry picked from commit 89aba4c26fae4e459f755a18912845c348ee48f3) Signed-off-by: Frank Heimes --- arch/s390/lib/uaccess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/lib/uaccess.c b/arch/s390/lib/uaccess.c index 720036fb1924..d44214072779 100644 --- a/arch/s390/lib/uaccess.c +++ b/arch/s390/lib/uaccess.c @@ -172,7 +172,7 @@ unsigned long __clear_user(void __user *to, unsigned long size) "4: slgr %0,%0\n" "5:\n" EX_TABLE(0b,2b) EX_TABLE(6b,2b) EX_TABLE(3b,5b) EX_TABLE(7b,5b) - : "+a" (size), "+a" (to), "+a" (tmp1), "=a" (tmp2) + : "+&a" (size), "+&a" (to), "+a" (tmp1), "=&a" (tmp2) : "a" (empty_zero_page), [spec] "d" (spec.val) : "cc", "memory", "0"); return size;