From patchwork Wed Jun 19 15:43:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Leoshkevich X-Patchwork-Id: 13704125 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 C4210C27C53 for ; Wed, 19 Jun 2024 15:45:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 13AC86B0096; Wed, 19 Jun 2024 11:45:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0EA566B00A1; Wed, 19 Jun 2024 11:45:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E32886B0096; Wed, 19 Jun 2024 11:45:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id B097B8D007A for ; Wed, 19 Jun 2024 11:45:53 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 47C511613D2 for ; Wed, 19 Jun 2024 15:45:53 +0000 (UTC) X-FDA: 82248063786.10.1CD43F4 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf30.hostedemail.com (Postfix) with ESMTP id E6A9B8000E for ; Wed, 19 Jun 2024 15:45:49 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=CtakO450; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf30.hostedemail.com: domain of iii@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=iii@linux.ibm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1718811941; 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=A5/DP3QFUFkYA2+5kJImY20b3CDMSHPGwimqBdu525I=; b=oELdxjChFDDwxePJBk7+7qYwM/2y4xbzT28+KbvHK5klHi1e8pLOLKysjfD74MGGhu9aCM QF1E9cWm6WyMyDestwDlvAoiut+QjfWmN+AeYB+Ha8Q43yZsSVq625Dn6osO8apYb5eXnS 3xEix2rJD8xxCf5xhg2Yiv/7EvvrhMA= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1718811941; a=rsa-sha256; cv=none; b=l/0V1wXQCRtv6jpOOlA0x7FtxkzB5AF8hOIqoQyrQcsIV9+ueECa5r448L8WVpOPX5Djrz TE5ymqI4TD+US1WSLIGeLAYfhhzvrcNFMT47S/QPUVcriTf8hToBIqdhQMam5irx3IELE1 5UbvT94PaeAhm9BrrqZvdbsMk1T+UE8= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=CtakO450; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf30.hostedemail.com: domain of iii@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=iii@linux.ibm.com Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45JBQxnG000599; Wed, 19 Jun 2024 15:45:42 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=A5/DP3QFUFkYA 2+5kJImY20b3CDMSHPGwimqBdu525I=; b=CtakO450sQcJgXgkBy1bjm81C53zM yJ5epMOJP2nf9GycX3u5YrCSZFPIhrm3N1d60sn6tFMUqru4yvN1mJIWxPeR5F/l vMdFf6sR2J0MKX2VPcfeYYSS0PL9ZVh4hh0gRnOd0nhc6/ue2o2sL2fnQFK4GxpJ QK6XvMbmc80HFJBAJNJoLB6XVLuKU0saHEWJtmk1uaSY04oFs0Ro2oENDn9jWvt9 lnRqxXyD62D4UuPnHZecDdIoiXp3WrxUoZ/IhCt8KCiOnUKn0RngnnpT2my+wRs4 IKiQhXpcrGsrED5QqKX5ycWQiCLqEvlnwwOSnma5HcZaNCdbeMrekz3Rg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yux7j0tc4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Jun 2024 15:45:42 +0000 (GMT) Received: from m0360072.ppops.net (m0360072.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 45JFjKNI028655; Wed, 19 Jun 2024 15:45:41 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yux7j0tc1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Jun 2024 15:45:41 +0000 (GMT) Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 45JE5DL3011442; Wed, 19 Jun 2024 15:45:41 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3yspsndtma-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Jun 2024 15:45:40 +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 45JFjYq752101422 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Jun 2024 15:45:37 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DEF4320049; Wed, 19 Jun 2024 15:45:34 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 90E2D2004F; Wed, 19 Jun 2024 15:45:34 +0000 (GMT) Received: from black.boeblingen.de.ibm.com (unknown [9.155.200.166]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 19 Jun 2024 15:45:34 +0000 (GMT) From: Ilya Leoshkevich To: Alexander Gordeev , Alexander Potapenko , Andrew Morton , Christoph Lameter , David Rientjes , Heiko Carstens , 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 v5 03/37] kmsan: Disable KMSAN when DEFERRED_STRUCT_PAGE_INIT is enabled Date: Wed, 19 Jun 2024 17:43:38 +0200 Message-ID: <20240619154530.163232-4-iii@linux.ibm.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240619154530.163232-1-iii@linux.ibm.com> References: <20240619154530.163232-1-iii@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: U2iqZBrWGML5qKAAmgUyvul0yztgMxYE X-Proofpoint-ORIG-GUID: 9tolQzDfTmptut_LScM49Q1sPF4ZToeh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-19_02,2024-06-19_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 mlxscore=0 malwarescore=0 clxscore=1015 impostorscore=0 adultscore=0 bulkscore=0 phishscore=0 spamscore=0 priorityscore=1501 lowpriorityscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2406190115 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: E6A9B8000E X-Stat-Signature: u43hecuwtkczey6z9u3hm8mwcmk5u16f X-Rspam-User: X-HE-Tag: 1718811949-905409 X-HE-Meta: U2FsdGVkX1+UAT/OdTI213D39hJIktU3h461K4e7E2tQd9xdC1sQpC50jjj/0HiSVeQ+M1AId9kJSDP1f32UvwrNmDAIrm0PW7fPCOhmk3nOa9+0K4yDHbg4xvmJh9EMsZyXYtcJf9Ar8gFnI5BQNfdhLKME7yqkNFL1SbGRpKyRErlA/hdpfZr5/1GjOFlC1xbTRWN/3QNiOaqhNIukVuE1MAlx0ae0+dSS/d7H36wN5HihMmlGzC5SPUfumLtW+lO8JIS0VXzF1ZrpRcpVsvgpE82dsLCpuoJq+vS9Xe3HedKuxFHRCmXJTBZXUXJWB3iufVzSL0GjwZtZygb2MPfM/VfP7ZJHLz4yxjJ6EvYxu334sI32ba8vHACDW/HhymcJRmaXjZ4b8TY4++Xi9M4qN584/6EFjvhC9dsnmbVXn/Wu6bPHcBFO1WmJi1UUz8LoOMvUtk425lNVeokbYvrwT3UaYqX7NbnLtSTxxng3/qfCwJR+t1xWbFCLOw94PXk7HiVu6p549Mq6IX4N1SvK2PjPPz5fqS/OHBPKY24qD20KCOn6dEOD0R58QqO++HOLVM1CoqhGthw2maCTF7f+zWQ/nHhB3pH7o7Q3FbmQfonikvncHynwy/eiXG4PiaUkNCLLg7Y6lhUiDXp3iP98poOjpUjN+S5Q6k5T4bDWvNSCBrxyOBuXNzBVnNATMxUCBaq7IvMOfErm7gP65cYwoV8fwKdRWRzKS9qqMdBK30WP2PiIVrVCC7D2DLq6Muvo/XviEB6qTbmQxqFn8H9CCupR0v9BTJDek8IREHAscImkU2ufMOxX8XXp6OaWvombRhgao3L3YADELLoR4tu/53BM8t800+BwjG/LSseH8ujemDw8U3e444utYj1x6d/LRVnzkLy50VaWjDd5xKzqEIx5/oJLmj0C0y9GDFP3rJo00pWH07WI2OaY9oaVy2pkKiHkurWVdeNgald fouWB4RU L5DxcEDJkT4rB/F6ljZ1cfF/cdszcCEsktbm6g7lSLivnUsxniVJfedRYa5vVuIOfBzZNrLQQaLjQPJ45XIJBUor9V30TJcCCOuX0BkwaL1zvM/SzAi6TfDNtFouogfMv3oQQUbvKZdo9x+DtxnRID/SlBn1RcUYiFY3oZ9fnPbV4bRLKJAdfuzZSQvQ8JAOoYiQZTI86ttG26Ag9M9lUX9o3puibYXIjDVeOz1IZuuYasoNNBJcqohI0ddnyk2UGdB9eEHEOvnnjS3f1D79khvdTHj4/3AbJBgaSZEIE5CNCL6YxKKTCgpUmswwpSRUQaJit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: KMSAN relies on memblock returning all available pages to it (see kmsan_memblock_free_pages()). It partitions these pages into 3 categories: pages available to the buddy allocator, shadow pages and origin pages. This partitioning is static. If new pages appear after kmsan_init_runtime(), it is considered an error. DEFERRED_STRUCT_PAGE_INIT causes this, so mark it as incompatible with KMSAN. Reviewed-by: Alexander Potapenko Signed-off-by: Ilya Leoshkevich --- mm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/Kconfig b/mm/Kconfig index b4cb45255a54..9791fce5d0a7 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -946,6 +946,7 @@ config DEFERRED_STRUCT_PAGE_INIT depends on SPARSEMEM depends on !NEED_PER_CPU_KM depends on 64BIT + depends on !KMSAN select PADATA help Ordinarily all struct pages are initialised during early boot in a