From patchwork Fri Jun 21 00:24:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Leoshkevich X-Patchwork-Id: 13706584 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 B4DA6C2BA18 for ; Fri, 21 Jun 2024 00:28:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4AF368D0107; Thu, 20 Jun 2024 20:27:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4379F8D0106; Thu, 20 Jun 2024 20:27:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1C7DB8D0107; Thu, 20 Jun 2024 20:27:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id E1C3D8D0104 for ; Thu, 20 Jun 2024 20:27:09 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 6D26A140668 for ; Fri, 21 Jun 2024 00:27:09 +0000 (UTC) X-FDA: 82253006178.20.423A3FF Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf12.hostedemail.com (Postfix) with ESMTP id 0D92B4000E for ; Fri, 21 Jun 2024 00:27:06 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=MuA06LqS; spf=pass (imf12.hostedemail.com: domain of iii@linux.ibm.com designates 148.163.156.1 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=1718929622; 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=DXm/8KlK4N921DfV+IBogkr8tQk+QLpe9vmu5KL+8TXr00+JqhDGgc9iN/Ma2klr+psN2F FW+66UCVwRcA9YsvEF4a3P+s+hdkc3M2QKmUQuPR33UPL4QqQuAWdCvqeaBO+D60OF5RAH mcqdk3OvPXYIXOCXirM8Tllhn8AHcJA= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=MuA06LqS; spf=pass (imf12.hostedemail.com: domain of iii@linux.ibm.com designates 148.163.156.1 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=1718929622; a=rsa-sha256; cv=none; b=pR7Ct0y//D9PIsIkcAVDcQOIeIAtmBXHOjiQg7hHR9MQ26RGe+Ij1ajDWQVzwwM3jEt9oI 11Ew6jJpznyrhKeeD9/hm9X8/EzF9YX6pRkP7HVjLKtkTjp6ZEehc0Q36T0uq4IFwvhqAc AzsbdHJzqIiipHZtWbh9C3W+c73gkbQ= Received: from pps.filterd (m0353726.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45KNQc7l017321; Fri, 21 Jun 2024 00:26:32 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=MuA06LqSJ2nf+w2bOgaUPEvvxXxSd oFuCpFwi9JKoALiVkO4uqXaWq1FUll3Vr9teZ/4ZG/syHAFCv43AuZmo6YtZNGHQ Qmk4XDZ46N0o1kh+mQEWCzO7zbd3ZTh5UhaE7/SSVdGau7xLGF65lrHs7LJdpJS8 QJaYxUGDBGIhyBB5F047Cj1mLTeSmOx1AQ7zE7JRMbKS3dlTSH+EHIBfFBPVXywu 3VUI8rKS1LxN5IhY/rlQQmP1O91RsUZQXl2dgJKXdQEprirXUsDzsufXMgrZpGLt MRBko9+9TA1ojTVB+oaqpR1dzrDAPUbICQ4D8AWJH2wBrmTKS4kJpz6fw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yvvrdr89y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Jun 2024 00:26:31 +0000 (GMT) Received: from m0353726.ppops.net (m0353726.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 45L0QU8u009337; Fri, 21 Jun 2024 00:26:30 GMT Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yvvrdr89r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Jun 2024 00:26:30 +0000 (GMT) Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 45L0KnaS019946; Fri, 21 Jun 2024 00:26:29 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3yvrqujnw1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Jun 2024 00:26:29 +0000 Received: from smtpav01.fra02v.mail.ibm.com (smtpav01.fra02v.mail.ibm.com [10.20.54.100]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 45L0QNa656361470 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 21 Jun 2024 00:26:25 GMT Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A32F02004F; Fri, 21 Jun 2024 00:26:23 +0000 (GMT) Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 81F572004D; Fri, 21 Jun 2024 00:26:22 +0000 (GMT) Received: from heavy.ibm.com (unknown [9.171.10.44]) by smtpav01.fra02v.mail.ibm.com (Postfix) with ESMTP; Fri, 21 Jun 2024 00:26:22 +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 v6 03/39] kmsan: Disable KMSAN when DEFERRED_STRUCT_PAGE_INIT is enabled Date: Fri, 21 Jun 2024 02:24:37 +0200 Message-ID: <20240621002616.40684-4-iii@linux.ibm.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240621002616.40684-1-iii@linux.ibm.com> References: <20240621002616.40684-1-iii@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: UM8xOfNifosib3PyMS4PrVZSIaVvXwYa X-Proofpoint-ORIG-GUID: toQ6s0bg_q3_98lVFmOUcEXGd-YIb3ZT 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-20_09,2024-06-20_04,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 mlxlogscore=999 spamscore=0 adultscore=0 phishscore=0 mlxscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2406140001 definitions=main-2406200174 X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 0D92B4000E X-Stat-Signature: czas7r39yt7x8djiinfuhn9gpqge5jeb X-HE-Tag: 1718929626-619569 X-HE-Meta: U2FsdGVkX1/T75AOYIfHXYLEvD8e9c3PHEYSNIvrZSMJCiZd/0DDUEeNSmag71QSHf/6Cpl3UuHyRSDGOpWmLNB1DjlcY8MHjrueNrsfT3AaGdrXCurBWAFeU/7GtpiSOFvWlgC9qbSXcPHuYMFgg2J7E1GPX8HqueN6RFSMgsK5z3kYdz8yRPEvzViMkgePpXg/gNpuDMuDLhknWy+5iODLnPTTlMkdHVcf3fAEYyDar++Z7ZTR4L9VJMdta+KpMO1NJuic9JzteAK3dGllITK5FHjglJNYP+bUdkJJdYk6vw3ryXtlglj5bLhtZ3JXDDBzRr51YpUbHrAAnTdAkibKHrsbSElcAgQ4o0vtbwW4gusrSkotdfN//CwKN9WBoKUKuD3Ekje8cDHHJKiBTeOT8hpvdNamNH42dYVNZGlS+dgAo6e8jSA8VDCgHfC7XT+bund1pgEFd81yYU96FIV5L+xAm4cq0ZQRju8mJc7C5z/IoDrJbhTI/yP7pjUcBrz/BuaE1HXPLNbcTIWVF7OiBi5jYdQvNhNetdT9sObHWzohtFIPgGuQnPUAKdKMzmruyqSva62H+ZfNQm1RVIEVcA4jF/5w+LLCt00B8ZoWt3qAcG6xiLjCP8yHJEvEajI2oI1Y4xQG4VdI1HP2QJdPGdk/ctEGGtt2378iyv4Cs5qGdIA2vOH6fCNUuvDsG/A46jVHsyJ2Smrl+7FMVa4XOr9E6/9zumyRnhC/dAdDDTQjfvssN5VZyL/QCE/lWR6K4VYTPZJvVhzRqkFMLzEw61o/z+yWyQi2F8wXWJwKrbrgX2fpLt+vBwf7LmYrRu5QYPEIiZmCpc4PuniGU0J+53FiLPqAAjLHKTPAWPWINCSyZ/+LAiPgh5t+PHFUt4hOhQo1ZJEIo8g11i4dGR077HSJXUisES7nxm84yLmpJR3m3MPr8JrM3BQihuzzhVhQX46E2cfEggK8TPR +7gD9Tz1 k+LHjZkdL1xjmR+faAIf9yt+Ye3t1FdW1zVpApdXBKKNU8pR2hzA7gu3GOUIjk0v1HqJFBGMWe+546idgEnbco+TDaXSTBr7VR+p4w2OecYbPa3pDlqEn+vq0/j2EAssWRPFmniphoRvbbj64vbJoVvhxJZfZX41l3OFO0y2+z2cDleNxWo5tyeiCikK/zlRM6Vx1AHWf9J0wEa5luHQZKCfsfpNX+vlrBwzBpP8UUzFBewZQIHZ26XToTiYm8BSc5EV45A/mG2ohjISssUmWQqWX2sfnzTLptOMmKP5k66POio4qWyaeNBFptf4d8gcxqFNl X-Bogosity: Ham, tests=bogofilter, spamicity=0.000002, 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