Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BE93C761A6 for ; Mon, 3 Apr 2023 09:44:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232300AbjDCJo2 (ORCPT ); Mon, 3 Apr 2023 05:44:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232067AbjDCJoN (ORCPT ); Mon, 3 Apr 2023 05:44:13 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F200312063 for ; Mon, 3 Apr 2023 02:43:28 -0700 (PDT) Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3339fpl8025464; Mon, 3 Apr 2023 09:42:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : mime-version; s=pp1; bh=Iz7mbwgPlKyxjKpbFvJlivCD5T324+5JzkcFV6+8eAs=; b=GrR+AYVFThde2nnS1yli9G1eTKUcd/s0oM3jbAjM/3wWU7epDkSqY4Cx2DbjMvHJL1h5 kVkNwEwPTd3bG8AxF3PuPOIbzs0thgwHIxO+zMSb0EaH+5XPXF8/gTY2R83EdGXlvZ2L 8Cr2cFLqbbgVmMfbZdOkJzLGR5LjeYWxS/NBY1wIq7M66ZxwXSVyJQgk2xeU5NtSigzn AmYz9sPv+omUs0P541DqGDOX89eLxcZPHFYQmU6piq4xZCB6ayAZGZ14irmhN8gamVaS Tth3pVu3UlSBjb9FMDPEGgXYgitiQobdmBpa5LEYkYnK+128bbHXKctivMpSmP3tb85H qA== Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3pqvd580bf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Apr 2023 09:42:52 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 332A2IhW030588; Mon, 3 Apr 2023 09:42:51 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma06ams.nl.ibm.com (PPS) with ESMTPS id 3ppbvg1gc9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Apr 2023 09:42:50 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3339glWO16581364 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 3 Apr 2023 09:42:47 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1134E2004B; Mon, 3 Apr 2023 09:42:45 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D8CAC20040; Mon, 3 Apr 2023 09:42:44 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 3 Apr 2023 09:42:44 +0000 (GMT) From: Heiko Carstens To: stable@vger.kernel.org Cc: Heiko Carstens , Mark Rutland , Gerald Schaefer , Vasily Gorbik Subject: [PATCH 4.19.y] s390/uaccess: add missing earlyclobber annotations to __clear_user() Date: Mon, 3 Apr 2023 11:42:43 +0200 Message-Id: <20230403094243.1325542-1-hca@linux.ibm.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <2023040338-emphases-eggbeater-ad1c@gregkh> References: <2023040338-emphases-eggbeater-ad1c@gregkh> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: FmBI5QNOcDBCtFsTHDavDeYl-LGXlL0f X-Proofpoint-ORIG-GUID: FmBI5QNOcDBCtFsTHDavDeYl-LGXlL0f Content-Transfer-Encoding: 8bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-03_06,2023-03-31_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=592 lowpriorityscore=0 bulkscore=0 priorityscore=1501 spamscore=0 suspectscore=0 adultscore=0 phishscore=0 impostorscore=0 malwarescore=0 clxscore=1015 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304030073 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org commit 89aba4c26fae4e459f755a18912845c348ee48f3 upstream. 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: Vasily Gorbik Signed-off-by: Heiko Carstens --- 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; } -- 2.37.2