From patchwork Tue Apr 4 09:10:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Heimes X-Patchwork-Id: 1764744 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=mcTIgT/F; 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 4PrMSR61YHz1yZY 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-0007bh-KK; 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 1pjcgq-0007b7-1g for kernel-team@lists.ubuntu.com; Tue, 04 Apr 2023 09:10:56 +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 C1DA73F59B for ; Tue, 4 Apr 2023 09:10:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1680599455; bh=91WiCYUi2/4Yn8jeFuahkFWpeIawBsCmV03G6VU3tKk=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=mcTIgT/FTIch0BJRzFtSw0HLPjtN06xxvJMDBFZ1ILXAEb1Snb/y+HB+EeGLDVue7 D5WQSKYudvW4pylZ+H5n3X/0m8Q5k0WFz5+lxP3lbA4T5IdnkVyVhs/+C5xO8GnXQK g0szkfyAOPfvpfJ0gBkMdHnqCD3SHIeYybjWNo9WtAUP8g11RUHz+v6wWgG3YKgxvl UyctlxlAGTQ2T6b8ANoMyrtzhLXwk8c1wZWCIhwaalgvXdcTvveEETO/qcTZL2i4tG G9w2vmJlK2Q6U0ROvhf/VOMoS+HAFsmI5b1foJocDlhccNFdHOcwQXGlYabLaH2e0e nG5ZrtVgoxaGQ== From: frank.heimes@canonical.com To: kernel-team@lists.ubuntu.com Subject: [SRU][F][B][PATCH 1/1] s390/uaccess: add missing earlyclobber annotations to __clear_user() Date: Tue, 4 Apr 2023 11:10:49 +0200 Message-Id: <20230404091049.142933-3-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 (backported 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 0267405ab7c6..fcfd78f99cb4 100644 --- a/arch/s390/lib/uaccess.c +++ b/arch/s390/lib/uaccess.c @@ -339,7 +339,7 @@ static inline unsigned long clear_user_mvcos(void __user *to, unsigned long size "4: slgr %0,%0\n" "5:\n" EX_TABLE(0b,2b) EX_TABLE(3b,5b) - : "+a" (size), "+a" (to), "+a" (tmp1), "=a" (tmp2) + : "+&a" (size), "+&a" (to), "+a" (tmp1), "=&a" (tmp2) : "a" (empty_zero_page), "d" (reg0) : "cc", "memory"); return size; }