From patchwork Wed Nov 15 20:31:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Leoshkevich X-Patchwork-Id: 13457303 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98AFAC2BB3F for ; Wed, 15 Nov 2023 20:35:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AC23280042; Wed, 15 Nov 2023 15:35:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A206C8003F; Wed, 15 Nov 2023 15:35:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8230F80042; Wed, 15 Nov 2023 15:35:12 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 61E418003F for ; Wed, 15 Nov 2023 15:35:12 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 44F38A079C for ; Wed, 15 Nov 2023 20:35:12 +0000 (UTC) X-FDA: 81461343264.20.322BA65 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf29.hostedemail.com (Postfix) with ESMTP id 20B4712001A for ; Wed, 15 Nov 2023 20:35:09 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=Cdrh1ziV; spf=pass (imf29.hostedemail.com: domain of iii@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=iii@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1700080510; a=rsa-sha256; cv=none; b=y+kOEo3O0aIT1+nutoGqDbO+VaU0kfTgiSdfGxFcKvJrzAEJfH0H8d4WSEHF7K2sYEvL8p /altDpDXY6QqTNcCiMtoBXdcZxroxNSqt+k6At26a297WdRB6hEmvpD3qPlyIXpQndIuM0 r7/EAcxZpmvW9XthfX8jE2J2fXHre0g= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=Cdrh1ziV; spf=pass (imf29.hostedemail.com: domain of iii@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=iii@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1700080510; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=hT5UecKAWHuvfdgWzoNOlmnaeKK0+U2DmyJXTmInAXM=; b=5PI3C9UgNPqBFnV3jwZd+4TKx6OSAlJPtup0EvfevrBI48q9TEGoJufo3vIfbaKl3dGgZO EhThKOBy6MFTqOKw7n9cI0gLpaspCql5/7z7kUM8LV2SEn+KVAxl2MDUO8+GEs+33ASVr9 go9j93izG+DwHTxMASe+ej86osWVrYo= Received: from pps.filterd (m0353722.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AFKFbK8016175; Wed, 15 Nov 2023 20:35:05 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 : mime-version : content-transfer-encoding; s=pp1; bh=hT5UecKAWHuvfdgWzoNOlmnaeKK0+U2DmyJXTmInAXM=; b=Cdrh1ziV/An604xeerh6X0d4CuAtVyp+uXxyXeMQPoUzr2D8vsDpvFn7hEH9MtscBOhK nMFmOu43T3U+GmTN5QWFZFPySUQww7sPMQ0VZG4yXVeLpkQYro+9bYePU5jbl8O/L++5 PAOoPlLeDMhYwL5hwibM5skvW+UcGfacvD9o1kntnA3oFWakcEnL6ggRPsyV5l4Kt2ZG pFr16whcppKe0xZfXVK57KijCRXEDMxmtLJibIoTLWpb0bFAHs5giaiHNkW+c8fbvFEk g6rqk2bBVvztqSBji5HKI0dquyD/od+HjREvpGdE/3ZSC5y/24/sJSg2O3gTqJkReToj OA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3ud4v2rbf1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Nov 2023 20:35:04 +0000 Received: from m0353722.ppops.net (m0353722.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3AFKYHPq004462; Wed, 15 Nov 2023 20:35:04 GMT Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3ud4v2rbet-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Nov 2023 20:35:04 +0000 Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3AFKJ36m017548; Wed, 15 Nov 2023 20:35:03 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3uamayj7fc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Nov 2023 20:35:03 +0000 Received: from smtpav01.fra02v.mail.ibm.com (smtpav01.fra02v.mail.ibm.com [10.20.54.100]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3AFKZ0rK16581344 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Nov 2023 20:35:00 GMT Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1C05B20043; Wed, 15 Nov 2023 20:35:00 +0000 (GMT) Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C41A720040; Wed, 15 Nov 2023 20:34:58 +0000 (GMT) Received: from heavy.boeblingen.de.ibm.com (unknown [9.179.9.51]) by smtpav01.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 15 Nov 2023 20:34:58 +0000 (GMT) From: Ilya Leoshkevich To: Alexander Gordeev , Alexander Potapenko , Andrew Morton , Christoph Lameter , David Rientjes , Joonsoo Kim , Marco Elver , Masami Hiramatsu , Pekka Enberg , Steven Rostedt , Vasily Gorbik , Vlastimil Babka Cc: Christian Borntraeger , Dmitry Vyukov , Hyeonggon Yoo <42.hyeyoo@gmail.com>, kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-s390@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Mark Rutland , Roman Gushchin , Sven Schnelle , Ilya Leoshkevich Subject: [PATCH 30/32] s390/unwind: Disable KMSAN checks Date: Wed, 15 Nov 2023 21:31:02 +0100 Message-ID: <20231115203401.2495875-31-iii@linux.ibm.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231115203401.2495875-1-iii@linux.ibm.com> References: <20231115203401.2495875-1-iii@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: b1P77HZr7B8FJcQWaHk2afHxOWLhT2Yq X-Proofpoint-GUID: o4JJc2oTUm0AoYvcRNRv2r_nas_qMHcx X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-15_20,2023-11-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 malwarescore=0 mlxscore=0 clxscore=1015 adultscore=0 spamscore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 phishscore=0 mlxlogscore=769 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311150163 X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 20B4712001A X-Stat-Signature: 1z845pywqg95x6khnxuww75easuo91hc X-Rspam-User: X-HE-Tag: 1700080509-401519 X-HE-Meta: U2FsdGVkX1/5Ul9+rBodxpiR64Ib3kXQjLkd25ld7rduv7Y3ikosyADn3POZjLVid8iwV9+o/E7ipwf2XUjAOfweVJRRmG92wUv8UFO3VBmZw9GriRQ0G39OtGW4dzEQrCGFkwuEk6XV1XdOI6c1+q5R0UEyVcZB3hMvmymn1Uiv8AH7vXJfBm7torM1NBq96G6HV3l7a/WJVFgNIYmewprRmZhqCznu2rhNvKWdUCsO8nU5CHf90z2OieELGPRDUbdFn+ingBCNekn5oCoyx0GM1BSGOKaoVC1OBfIqEnvhPrL3WLFj23vgcVAT2mlxisBB07gcsFZluiGM90s2VbEPqbgGMZR9xftad0oMVIfAeOL8QSFSajMqSB/RdyjBEaUdfuhXEwmWs2RYDe53YgCws25gLVweSHZxYlWBhO94rGVCKocq2lk2e9Sx0ZjyiREAUFD9OdUlNYUW7aPe5qv4vfsSbI7A7dTaL0SaFhDlFvAzciz4W5/nXTDi2m3rYuYR5k8OdlBH0RgEXIgD7x5MzmJncv62I0Tom/rirO5sd7cHlLl9TQF60+Gt1Xi7U9odMJ/zq8OZ/4FpbHayzVzjVMdeC+kOWVUJpkaUl/pFpEkiy71NTWeRm5iNp9TrfiOB+zdVVyj9cJMAeJubpLwDzCqSJ/pD3/m0pfn0Mpv0UONLI18inkoQLgv1bQeHYeuYKkYb5EPoWJY7rBiEZ8pw2HrSzvPzWY1gNZRkGu+HuA9CX2WhhHdQlevlyMouERPQwqq0BO5W2YtreERMWXNwm6Dwm9/UC9kXF5U/eJwJ+AwvaITLiUvtTXo6dNrU2+0b3+Gg7qBmbVtfLoxKUpcwZCLI4WsgpOMNxAfsXlXM8QIrmbJ3kBBZx3GeXw0YgJAvi1BIbS1ygvin2rJpRi6GtZiClNt/iVjWQf8jXzzdOeUw1as3f6+kSuMLAQq/3NBIl9SXDfLjA2AFb2F BXHwoR+1 d3jqn8BrHIIQJed4DeJYqDcMzsuNi4foVuiOnyioWt5NAqifJzvsGMfDmcGWOZjcijQFZVCdXMftKxbDaOcPWVeoQ6CYA+NaCGKRW2b/WMUlXmMO907O1bjw+2rcXtlr8v1BeIRytt2BLkKUJ/bwhja6jl42x3+gTv3wC8k+LYVpMu2P0PGABTISNwtj/UnRKaD+ZdXBQ5Ak69sHuGzfgDk1EKw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The unwind code can read uninitialized frames. Furthermore, even in the good case, KMSAN does not emit shadow for backchains. Therefore disable it for the unwinding functions. Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko --- arch/s390/kernel/unwind_bc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/s390/kernel/unwind_bc.c b/arch/s390/kernel/unwind_bc.c index 0ece156fdd7c..7ecaab24783f 100644 --- a/arch/s390/kernel/unwind_bc.c +++ b/arch/s390/kernel/unwind_bc.c @@ -49,6 +49,7 @@ static inline bool is_final_pt_regs(struct unwind_state *state, READ_ONCE_NOCHECK(regs->psw.mask) & PSW_MASK_PSTATE; } +__no_kmsan_checks bool unwind_next_frame(struct unwind_state *state) { struct stack_info *info = &state->stack_info; @@ -118,6 +119,7 @@ bool unwind_next_frame(struct unwind_state *state) } EXPORT_SYMBOL_GPL(unwind_next_frame); +__no_kmsan_checks void __unwind_start(struct unwind_state *state, struct task_struct *task, struct pt_regs *regs, unsigned long first_frame) {