From mboxrd@z Thu Jan 1 00:00:00 1970 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 14720C54E58 for ; Wed, 13 Mar 2024 01:48:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5DD706B01FE; Tue, 12 Mar 2024 21:48:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 58DFD6B0208; Tue, 12 Mar 2024 21:48:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 406DB6B01FE; Tue, 12 Mar 2024 21:48:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 317BC6B01FB for ; Tue, 12 Mar 2024 21:48:32 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id F165E1606AA for ; Wed, 13 Mar 2024 01:48:30 +0000 (UTC) X-FDA: 81890331180.13.EC51028 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf15.hostedemail.com (Postfix) with ESMTP id DC5A4A0005 for ; Wed, 13 Mar 2024 01:48:24 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=YOBNuMQW; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf15.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=1710294507; 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-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=lvDevJgXzZHK+XAuqd2R8EtdQOr26ZP2QO5Xtddz0KA=; b=HlTVhAMKmvY3eUbzDd/gNFVD1UxuMHvlxwFCVAnymvIRCWWqdeDtWBg9bRytDrZz0eGE7V 4BOmxYVcxs54uxK8TxA7gSyrFslMV9H/Fmc8nduoUpJf2yS7BCLuMHOX3L22Up3EwBsQ1v tlQ76Eejs+3ty0btUUtVBtdFUsSf1uc= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=YOBNuMQW; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf15.hostedemail.com: domain of iii@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=iii@linux.ibm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1710294507; a=rsa-sha256; cv=none; b=KSaFPaOVLflZdmseC4U7HJO5A0T0deK35EHJOEUur2lOhIssNnqO7serrqNkd6tT3+n4Cc Fb/KU4zETa2nYxU7d4uDFSYM+F8wIyXZ3RqgTtW5Qmd4M6pWtb9pRftq6e4aKyKU2Akv/8 MUjTX6jCOJSHitCAhJo84njsrG+n+HI= Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42D16FLe009969; Wed, 13 Mar 2024 01:48:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : content-type : in-reply-to : mime-version; s=pp1; bh=lvDevJgXzZHK+XAuqd2R8EtdQOr26ZP2QO5Xtddz0KA=; b=YOBNuMQWKm6Sl7lJnNjiNrPMHnb6nGkjpHEY58UajnzpJZS6uarS8BOk4Ir3FTWV303s ACoQ2zj93BnrjLkn0bu9C22nin+fDWSvbYxLxEs8R8g0GwCBurATPdhJjh0Z+LzMKLLr ZtVGB7BlXZV4NCrN2eV0N4KjOUojadOOpoy0alV6z3NMXwkDnfxTrjyYrTDLT+L3rjCt f31U5prTAdwOe3BpGI2E3d333dha4UnGAfsJaSzjsHI72fPD8dhqNoVDs2s0kd0oKTWB p7fdaGIRii0cu2JL6NgFnojs2CnQ5s3vfnIpcsK33WGzK429wKHGI74weofyaZ11naS5 3A== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3wu1au127q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Mar 2024 01:48:11 +0000 Received: from m0360072.ppops.net (m0360072.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 42D1j7Tw030279; Wed, 13 Mar 2024 01:48:11 GMT Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3wu1au1267-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Mar 2024 01:48:10 +0000 Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 42CN67Yx018134; Wed, 13 Mar 2024 01:41:27 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3ws23tb3uj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Mar 2024 01:41:27 +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 42D1fN1O30867824 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Mar 2024 01:41:25 GMT Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7395520043; Wed, 13 Mar 2024 01:41:23 +0000 (GMT) Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E069920040; Wed, 13 Mar 2024 01:41:22 +0000 (GMT) Received: from heavy (unknown [9.171.20.188]) by smtpav01.fra02v.mail.ibm.com (Postfix) with ESMTPS; Wed, 13 Mar 2024 01:41:22 +0000 (GMT) Date: Wed, 13 Mar 2024 02:41:21 +0100 From: Ilya Leoshkevich To: Changbin Du , elver@google.com Cc: Alexander Potapenko , Andrew Morton , kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [BUG] kmsan: instrumentation recursion problems Message-ID: References: <20240308043448.masllzeqwht45d4j@M910t> <20240311093036.44txy57hvhevybsu@M910t> <20240311110223.nzsplk6a6lzxmzqi@M910t> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: Rn6Ph5G0Y3Tx4t5XLA2Vl-9bR-jX3YyW X-Proofpoint-GUID: iF5gmBX_HbtGdM5hh3iUteh4JaUI99NA X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-12_14,2024-03-12_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 lowpriorityscore=0 malwarescore=0 adultscore=0 clxscore=1015 bulkscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2403130012 X-Rspamd-Queue-Id: DC5A4A0005 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: txgq93twmiqxwtkyd76e81rri9b9bjin X-HE-Tag: 1710294504-631361 X-HE-Meta: U2FsdGVkX19TqNTgO1C3Jk1Yz1R2w3g6nNZyifStPwl38qm1mP//OopmbS2Yr5eeeP8XBGL5h67CkC3PiAbrF5HdUCUhbLgUk3Hw2kaOmXU8D+xElB4q2h+A6dWZWEw2q/gqxtE+jeRA7qM6XLYO0OXSQfN2BfhT5HflJ3AJJSHdsi5uJzx9MP0MsDeLvh6Ghq38HXTPiT9ZHzIbv9k+sNlfqglkP7d2uWnwj7AzykY19wNkxhllZkZBlTadEqHzF2rCb8oHMlTANa2xv5PBWRZnJkrBavXdtWmvXMdPW+nB971zNsWpSkyvupt6V0Ba8FOs2emI+dz4l0pnbfCNAIdIi+5bl9k2WQGdyNOeJ5IqcK6rb3cTfXwc5eV+WxP/choCzZVQhpaZCwKRMPwoKMmtXUNFIij1fRGNZzcZqq7D1j5ytAfI05ndkT6fYF+t4eqJllUVMnF2pF+OG2w3nwFVkAq3o01KxcbXftDmh+rsdMll8lyi9OVMo8XGfK7uMX2vKvbDkKJ5bOlisoo9NrxGeWQUFAnuB/KhHA/g8tp1C+zqRwarQ1TaEhW9Am2e2MrpIX3NWzWa1ubCrWI0rYkzQa8ywxX6Eu+SdD+nhMZ5hgwJmCjww3Z6xoiW5JMXNH+Ey3ix/dF2DSCSXYRY1/5Bw5ZUPjq1eRQCXE54fCFzN4YBUaUwvrMwkFnXwgIzSxqLZTVJ8XTInpUN2wpUbQcwc8E7Yj3F9YM5z/5Zxi6V1wpjlop8zc9AuNxsgMmEmcCRhOGWZyt3fjU49+ctpBdFNG3Ud/NJTa9fXYV4Pz7LSOyTNrt7Osa8NnKQ1uPfEQuel8CsktDLGJMQIl6aqZ3M9XS1Lutjufe8nkVTX9TqU35ETb0VtINLEclhSd/OavLbzFHqxORsF7U8J5Q2fQ0viN6L5Pt+xZxzNPM8Ef/38kLiWatPclIB4/njozutQHiDQnoVFSFSIfa+sVv iZ3+3R74 uVHii9+hpVoubab0ljUkg8KNA+ZkBUi7PUBhXqsS9kAymq73X5DPjb/MUBGUeXlgHklL4XWcSLq7N4OScZanW0D/umW80kOcuy2EQ5W+Nxxpk0qeWJETKVF9fY0To57D5HhgLJiZGNWCVmeUfbY2OY6qCGV8KRykxDdUV8O1cBSGgZduibnA/xnaYzjVWUYq4mDBLbj4/yrnUzrTK0DjRfl1WTpG1ardykaHfhi0cA5WGyenWV4mK9uOrScTA3W1SJcEcNr8L+c3IAPzbxzEb7/Ha6kSZzs4HTP9Jrg2yKhQbpQ2v1s947B4IkwsD9YCEc/Ap5bng+hTbBMIqb13tKg+p6wQXIQbigIC0ipvQZ+iRIym0JwrfldqIqv2PRrumVkRd 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: On Wed, Mar 13, 2024 at 12:52:33AM +0100, Ilya Leoshkevich wrote: > On Mon, Mar 11, 2024 at 07:02:23PM +0800, Changbin Du wrote: > > On Mon, Mar 11, 2024 at 05:30:36PM +0800, Changbin Du wrote: > > > On Fri, Mar 08, 2024 at 10:39:15AM +0100, Marco Elver wrote: > > > > On Fri, 8 Mar 2024 at 05:36, 'Changbin Du' via kasan-dev > > > > wrote: > > > > > > > > > > Hey, folks, > > > > > I found two instrumentation recursion issues on mainline kernel. > > > > > > > > > > 1. recur on preempt count. > > > > > __msan_metadata_ptr_for_load_4() -> kmsan_virt_addr_valid() -> preempt_disable() -> __msan_metadata_ptr_for_load_4() > > > > > > > > > > 2. recur in lockdep and rcu > > > > > __msan_metadata_ptr_for_load_4() -> kmsan_virt_addr_valid() -> pfn_valid() -> rcu_read_lock_sched() -> lock_acquire() -> rcu_is_watching() -> __msan_metadata_ptr_for_load_8() > > > > > > > > > > > > > > > Here is an unofficial fix, I don't know if it will generate false reports. > > > > > > > > > > $ git show > > > > > commit 7f0120b621c1cbb667822b0f7eb89f3c25868509 (HEAD -> master) > > > > > Author: Changbin Du > > > > > Date: Fri Mar 8 20:21:48 2024 +0800 > > > > > > > > > > kmsan: fix instrumentation recursions > > > > > > > > > > Signed-off-by: Changbin Du > > > > > > > > > > diff --git a/kernel/locking/Makefile b/kernel/locking/Makefile > > > > > index 0db4093d17b8..ea925731fa40 100644 > > > > > --- a/kernel/locking/Makefile > > > > > +++ b/kernel/locking/Makefile > > > > > @@ -7,6 +7,7 @@ obj-y += mutex.o semaphore.o rwsem.o percpu-rwsem.o > > > > > > > > > > # Avoid recursion lockdep -> sanitizer -> ... -> lockdep. > > > > > KCSAN_SANITIZE_lockdep.o := n > > > > > +KMSAN_SANITIZE_lockdep.o := n > > > > > > > > This does not result in false positives? > > > > > > This does result lots of false positives. > > > > > I saw a lot of reports but seems not related to this. > > > > > > [ 2.742743][ T0] BUG: KMSAN: uninit-value in unwind_next_frame+0x3729/0x48a0 > > > [ 2.744404][ T0] unwind_next_frame+0x3729/0x48a0 > > > [ 2.745623][ T0] arch_stack_walk+0x1d9/0x2a0 > > > [ 2.746838][ T0] stack_trace_save+0xb8/0x100 > > > [ 2.747928][ T0] set_track_prepare+0x88/0x120 > > > [ 2.749095][ T0] __alloc_object+0x602/0xbe0 > > > [ 2.750200][ T0] __create_object+0x3f/0x4e0 > > > [ 2.751332][ T0] pcpu_alloc+0x1e18/0x2b00 > > > [ 2.752401][ T0] mm_init+0x688/0xb20 > > > [ 2.753436][ T0] mm_alloc+0xf4/0x180 > > > [ 2.754510][ T0] poking_init+0x50/0x500 > > > [ 2.755594][ T0] start_kernel+0x3b0/0xbf0 > > > [ 2.756724][ T0] __pfx_reserve_bios_regions+0x0/0x10 > > > [ 2.758073][ T0] x86_64_start_kernel+0x92/0xa0 > > > [ 2.759320][ T0] secondary_startup_64_no_verify+0x176/0x17b > > > > > Above reports are triggered by KMEMLEAK and KFENCE. > > > > Now with below fix, I was able to run kmsan kernel with: > > CONFIG_DEBUG_KMEMLEAK=n > > CONFIG_KFENCE=n > > CONFIG_LOCKDEP=n > > > > KMEMLEAK and KFENCE generate too many false positives in unwinding code. > > LOCKDEP still introduces instrumenting recursions. > > FWIW I see the same issue on s390, and the best I could come up with so > far was also disabling lockdep. > > For KFENCE I have the following [1] though, maybe this will be helpful > to you as well? > > [1] https://patchwork.kernel.org/project/linux-mm/patch/20231213233605.661251-17-iii@linux.ibm.com/ > > [...] So, I tried to brute force the issue and came up with the following. The goal was to minimize the usage of __no_sanitize_memory in order to avoid false positives. I don't propose to commit this, I'm posting this to highlight the intermediate problems that need to be solved. >From e3834f4e4ebe2596542a7464f8cc487e2c8e37c9 Mon Sep 17 00:00:00 2001 From: Ilya Leoshkevich Date: Wed, 13 Mar 2024 01:18:22 +0100 Subject: [PATCH] s390/kmsan: Fix lockdep recursion After commit 5ec8e8ea8b77 ("mm/sparsemem: fix race in accessing memory_section->usage"), an infinite mutual recursion between kmsan_get_metadata() and lock_acquire() arose. Teach lockdep recursion detection to handle it. The goal is to make lock_acquire() survive until lockdep_recursion_inc(). This requires solving a number of intermediate problems: 0. Disable KMSAN checks in lock_acquire(). 1. lock_acquire() calls instrumented trace_lock_acquire(). Force inlining. 2. trace_lock_acquire() calls instrumented cpu_online(). Force inlining. 3: trace_lock_acquire() calls instrumented rcu_is_watching(), which in turn calls instrumented __preempt_count_add(). Disable instrumentation in rcu_is_watching(). Disabling checks is not enough, because __preempt_count_add() would call __msan_instrument_asm_store(). Force inlinining of __preempt_count_add(). 4: lock_acquire() inlines lockdep_enabled(), which inlines __preempt_count_add(), which calls __msan_instrument_asm_store(). Don't inline lockdep_enabled() and disable KMSAN instrumentation in it. 5: lock_acquire() calls check_flags(), which calls the instrumented preempt_count(). Always inline preempt_count(). 6: lock_acquire() inlines lockdep_recursion_inc(), which needs to update KMSAN metadata. Do not inline lockdep_recursion_inc(), disable KMSAN instrumentation in it. 7: lock_acquire() calls instrumented lockdep_nmi(). Force inlining. With that, the KMSAN+lockdep kernel boots again, but unfortunately it is very slow. Signed-off-by: Ilya Leoshkevich --- arch/s390/include/asm/preempt.h | 12 ++++++------ include/linux/cpumask.h | 2 +- include/linux/tracepoint.h | 2 +- kernel/locking/lockdep.c | 10 +++++++--- kernel/rcu/tree.c | 1 + 5 files changed, 16 insertions(+), 11 deletions(-) diff --git a/arch/s390/include/asm/preempt.h b/arch/s390/include/asm/preempt.h index bf15da0fedbc..225ce14bb0d6 100644 --- a/arch/s390/include/asm/preempt.h +++ b/arch/s390/include/asm/preempt.h @@ -12,7 +12,7 @@ #define PREEMPT_NEED_RESCHED 0x80000000 #define PREEMPT_ENABLED (0 + PREEMPT_NEED_RESCHED) -static inline int preempt_count(void) +static __always_inline int preempt_count(void) { return READ_ONCE(S390_lowcore.preempt_count) & ~PREEMPT_NEED_RESCHED; } @@ -44,7 +44,7 @@ static inline bool test_preempt_need_resched(void) return !(READ_ONCE(S390_lowcore.preempt_count) & PREEMPT_NEED_RESCHED); } -static inline void __preempt_count_add(int val) +static __always_inline void __preempt_count_add(int val) { /* * With some obscure config options and CONFIG_PROFILE_ALL_BRANCHES @@ -59,7 +59,7 @@ static inline void __preempt_count_add(int val) __atomic_add(val, &S390_lowcore.preempt_count); } -static inline void __preempt_count_sub(int val) +static __always_inline void __preempt_count_sub(int val) { __preempt_count_add(-val); } @@ -79,7 +79,7 @@ static inline bool should_resched(int preempt_offset) #define PREEMPT_ENABLED (0) -static inline int preempt_count(void) +static __always_inline int preempt_count(void) { return READ_ONCE(S390_lowcore.preempt_count); } @@ -102,12 +102,12 @@ static inline bool test_preempt_need_resched(void) return false; } -static inline void __preempt_count_add(int val) +static __always_inline void __preempt_count_add(int val) { S390_lowcore.preempt_count += val; } -static inline void __preempt_count_sub(int val) +static __always_inline void __preempt_count_sub(int val) { S390_lowcore.preempt_count -= val; } diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index cfb545841a2c..af6515e5def8 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h @@ -1099,7 +1099,7 @@ static __always_inline unsigned int num_online_cpus(void) #define num_present_cpus() cpumask_weight(cpu_present_mask) #define num_active_cpus() cpumask_weight(cpu_active_mask) -static inline bool cpu_online(unsigned int cpu) +static __always_inline bool cpu_online(unsigned int cpu) { return cpumask_test_cpu(cpu, cpu_online_mask); } diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index 88c0ba623ee6..34bc35aa2f4b 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h @@ -252,7 +252,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p) extern int __traceiter_##name(data_proto); \ DECLARE_STATIC_CALL(tp_func_##name, __traceiter_##name); \ extern struct tracepoint __tracepoint_##name; \ - static inline void trace_##name(proto) \ + static __always_inline void trace_##name(proto) \ { \ if (static_key_false(&__tracepoint_##name.key)) \ __DO_TRACE(name, \ diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 151bd3de5936..86244a7e8533 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -111,7 +111,8 @@ late_initcall(kernel_lockdep_sysctls_init); DEFINE_PER_CPU(unsigned int, lockdep_recursion); EXPORT_PER_CPU_SYMBOL_GPL(lockdep_recursion); -static __always_inline bool lockdep_enabled(void) +__no_sanitize_memory +static noinline bool lockdep_enabled(void) { if (!debug_locks) return false; @@ -457,7 +458,8 @@ void lockdep_init_task(struct task_struct *task) task->lockdep_recursion = 0; } -static __always_inline void lockdep_recursion_inc(void) +__no_sanitize_memory +static noinline void lockdep_recursion_inc(void) { __this_cpu_inc(lockdep_recursion); } @@ -5687,7 +5689,7 @@ static void verify_lock_unused(struct lockdep_map *lock, struct held_lock *hlock #endif } -static bool lockdep_nmi(void) +static __always_inline bool lockdep_nmi(void) { if (raw_cpu_read(lockdep_recursion)) return false; @@ -5716,6 +5718,7 @@ EXPORT_SYMBOL_GPL(read_lock_is_recursive); * We are not always called with irqs disabled - do that here, * and also avoid lockdep recursion: */ +__no_kmsan_checks void lock_acquire(struct lockdep_map *lock, unsigned int subclass, int trylock, int read, int check, struct lockdep_map *nest_lock, unsigned long ip) @@ -5758,6 +5761,7 @@ void lock_acquire(struct lockdep_map *lock, unsigned int subclass, } EXPORT_SYMBOL_GPL(lock_acquire); +__no_kmsan_checks void lock_release(struct lockdep_map *lock, unsigned long ip) { unsigned long flags; diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index d9642dd06c25..8c587627618e 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -692,6 +692,7 @@ static void rcu_disable_urgency_upon_qs(struct rcu_data *rdp) * Make notrace because it can be called by the internal functions of * ftrace, and making this notrace removes unnecessary recursion calls. */ +__no_sanitize_memory notrace bool rcu_is_watching(void) { bool ret; -- 2.44.0