Message ID | 20240621002616.40684-20-iii@linux.ibm.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 97919C2BA18 for <linux-mm@archiver.kernel.org>; Fri, 21 Jun 2024 00:27:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 17E308D00EC; Thu, 20 Jun 2024 20:27:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 041708D00FD; Thu, 20 Jun 2024 20:27:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D5F928D00EC; Thu, 20 Jun 2024 20:27:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id AA2018D00FD for <linux-mm@kvack.org>; Thu, 20 Jun 2024 20:27:01 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 6853DA22F4 for <linux-mm@kvack.org>; Fri, 21 Jun 2024 00:27:01 +0000 (UTC) X-FDA: 82253005842.02.D00226B Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf10.hostedemail.com (Postfix) with ESMTP id 12843C0003 for <linux-mm@kvack.org>; Fri, 21 Jun 2024 00:26:58 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=mjcB1DbW; spf=pass (imf10.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=1718929609; 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=o5OLh1G5igJ7wfCkEas83RRSlonR9xfZGMUuvDY/DE0=; b=VObuItVc9jBWgQN3Gt8dbC7pXdFr0uF2FRQQ4qlVCZ9++zTzLOJBrAy7yyKJSx6R4o6eVS dOJcagREyOcdw4ABVxnZhzMCnmXSRdTOr2+Z1o7sjwPzltBvkrXKY56aQds7iz0t5dw+23 KmNUE3GGX8pO70zHilwurbTr65b3o7U= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1718929609; a=rsa-sha256; cv=none; b=XIYD2j5A+1s32X7EazuBDXre4DAXqu1l0nZ73v6hhEBELmJ9H+1WEaYlXATZ2m5as7vmvZ LIgGIhIewZsTz54dgRxScO963ecH2s3t54ortQB2zXuM1VxKvVW8F8HRyavc1Pgf8r2wB/ YcULDkqZE1jGZ5z5+F4Tqp3N8cpMKAs= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=mjcB1DbW; spf=pass (imf10.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 Received: from pps.filterd (m0353729.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45L0Qjxo017866; Fri, 21 Jun 2024 00:26:51 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=o5OLh1G5igJ7w fCkEas83RRSlonR9xfZGMUuvDY/DE0=; b=mjcB1DbWafMJ6821w+jAR8OeMJZ6v xocLKnfxJWTQtHkYo3qMsfhMm6Z440kaILsExcd146aULYF0xufV1B9jUX0NinZD Da7lXSLvTn9RThgMuOFcJ4FRwxkfk5nGHDcLVuOWIO8+0Inoe7Lj+8x4GynGx2u4 taWm5PFe/SEtrWRRjuHb9HV1rV55Qj9AHzy4Gk15/jHY92ZWpJumKWax2oFiCDMC aGgybBaa/Mri4X8bbVNbw+/UIGLjff/9rr74aWuOiel/9W5TgubRDw1N/zl09Ats pKMblfr85FZWnD4DKAighxCmxY+SU6sni5qh8dGhPtV3ZJfrONJlm4aPw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yvx4g02na-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Jun 2024 00:26:51 +0000 (GMT) Received: from m0353729.ppops.net (m0353729.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 45L0QogX017926; Fri, 21 Jun 2024 00:26:50 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 3yvx4g02n6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Jun 2024 00:26:50 +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 45KLcxoc031347; Fri, 21 Jun 2024 00:26:48 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3yvrrq2nbb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Jun 2024 00:26:48 +0000 Received: from smtpav01.fra02v.mail.ibm.com (smtpav01.fra02v.mail.ibm.com [10.20.54.100]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 45L0QhwD41943326 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 21 Jun 2024 00:26:45 GMT Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3AA5F2004B; Fri, 21 Jun 2024 00:26:43 +0000 (GMT) Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1905920043; Fri, 21 Jun 2024 00:26:42 +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:42 +0000 (GMT) From: Ilya Leoshkevich <iii@linux.ibm.com> To: Alexander Gordeev <agordeev@linux.ibm.com>, Alexander Potapenko <glider@google.com>, Andrew Morton <akpm@linux-foundation.org>, Christoph Lameter <cl@linux.com>, David Rientjes <rientjes@google.com>, Heiko Carstens <hca@linux.ibm.com>, Joonsoo Kim <iamjoonsoo.kim@lge.com>, Marco Elver <elver@google.com>, Masami Hiramatsu <mhiramat@kernel.org>, Pekka Enberg <penberg@kernel.org>, Steven Rostedt <rostedt@goodmis.org>, Vasily Gorbik <gor@linux.ibm.com>, Vlastimil Babka <vbabka@suse.cz> Cc: Christian Borntraeger <borntraeger@linux.ibm.com>, Dmitry Vyukov <dvyukov@google.com>, 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 <mark.rutland@arm.com>, Roman Gushchin <roman.gushchin@linux.dev>, Sven Schnelle <svens@linux.ibm.com>, Ilya Leoshkevich <iii@linux.ibm.com> Subject: [PATCH v6 19/39] mm: kfence: Disable KMSAN when checking the canary Date: Fri, 21 Jun 2024 02:24:53 +0200 Message-ID: <20240621002616.40684-20-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 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 8qSPJ9dagl9d4HYS4smcsKnsM2CTqo8A X-Proofpoint-ORIG-GUID: 7LaTOJcW5B_v5GZ1BZoY_IdSR_2nuz-u 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_11,2024-06-20_04,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 bulkscore=0 impostorscore=0 mlxlogscore=999 phishscore=0 priorityscore=1501 clxscore=1015 mlxscore=0 spamscore=0 suspectscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2406140001 definitions=main-2406210001 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 12843C0003 X-Stat-Signature: 9m75fmgif1xih1ekdr16eefga5gpshsa X-HE-Tag: 1718929618-626206 X-HE-Meta: U2FsdGVkX1+EMtkieaMBlmBJ6uRq0Vrhc7Mae86uQBJz7OUxsdXsKBxS199p9y8spo9hXDcIHLEdgmzFoWAhywk5Yn3R5Wj5zHYrLcdY6pGYhVzHocYfYKHefg1adfbJcz4m7/UKq+yldzVgMmZ5cqphASJ2xwQW3vmLa3B5t9KIhcL975aunPdR0lSUYjDAQJGMZ/TYyTnzYZXaXwCp2WDhKeKqf1c9bKuh6f3CKtK3i5P/leDQnaz+1KQ3YkAFD4EPql8Ok4upKcdoDfHmg2fnA9SBakpC9HoGfwU0w1wuVzQTh2NT0/RJqJQlKo9tfdSVuD4j/vsmMckI5TewB/e2iafZQ5loGplOIE1rHx/fqB34NOohKp2h1p6fiUXOSgjmIGccboGCSSH0zPANBqxUccDoHIQ8n2nVoulxLSMEzrIyQZgvMEn7KNP6n4E5jpDsoexnPVRzHa92BGoYeCb4OJm3v1HjIAL1zSWdEoXxO2yjAj2TWAOpQft6CrEZlCRy61AkZVrzoY7cJV6sbLC5e6yO9G9L8XraoynHg/w2ibYMy6lirb3NmOyGQWgun+v9rC3S3gbnsHL5Y/E6A6IifnD09gkVMcqEGZC50LJMHdJTJh2EMfupMzYR27/50wiGVn11GLzBF2ab9se1OCdA0lzDaYduFDkNS/+8L+jzPPitq98RiT59ZWXpTQTkJwn8zJBh/IaJkQGWhMPex2KYAZrB+g+w5C0hoArIX0ckAkbzq3Vrz4EojTAtv+jzWJ+Vbqi0+q9UX31rwO3TZvm8u1jSWiHzeP+pHnaxq9Mc3QcPXhxeKNHsH62TUVB/7bRYqRtJbKs1pChmHRkSePMTv57wVo8NG1c9Y/+ZAzBGz9cS/OAlvzExInNbE5OMCNZA00GCCbcqZzAGRfkEdsZ2MkWziUOhRSSDYttV2MSLo7mqVsf7p4CFi9qcTyrA9zNA7qRSWOhe2USyXZ9 7izOjYZP L5yf/N7cFOfUbGdl8qiHct1kSKrywv+c9nr0WrSVYuzHz1NBq/Kl9DA206ghhCai+9Y1jwKl3pFLpyBeCCq9RQRP2kvq3WeHzdzENSao6ViKM36leQceirsDnNoeKNO+UNBjLAHYjBw8Bi1mv58uoqjOk3a0vZs+GpW9HUj8nZdzmWyXLgUWhQ9c640zoARojH5Yq+QTg4GFuov0zw5ueajGNJeQGiTlBSMBw5g7jdbJ1Woh0yvYX2BBW5PNwT15RPxHam3z+4RIF8s/x0quIqXIg5A== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000025, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
kmsan: Enable on s390
|
expand
|
diff --git a/mm/kfence/core.c b/mm/kfence/core.c index 964b8482275b..83f8e78827c0 100644 --- a/mm/kfence/core.c +++ b/mm/kfence/core.c @@ -305,8 +305,14 @@ metadata_update_state(struct kfence_metadata *meta, enum kfence_object_state nex WRITE_ONCE(meta->state, next); } +#ifdef CONFIG_KMSAN +#define check_canary_attributes noinline __no_kmsan_checks +#else +#define check_canary_attributes inline +#endif + /* Check canary byte at @addr. */ -static inline bool check_canary_byte(u8 *addr) +static check_canary_attributes bool check_canary_byte(u8 *addr) { struct kfence_metadata *meta; unsigned long flags; @@ -341,7 +347,8 @@ static inline void set_canary(const struct kfence_metadata *meta) *((u64 *)addr) = KFENCE_CANARY_PATTERN_U64; } -static inline void check_canary(const struct kfence_metadata *meta) +static check_canary_attributes void +check_canary(const struct kfence_metadata *meta) { const unsigned long pageaddr = ALIGN_DOWN(meta->addr, PAGE_SIZE); unsigned long addr = pageaddr;