From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="rdPuCKlp" Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AA2C9C; Thu, 16 Nov 2023 01:17:51 -0800 (PST) Received: from pps.filterd (m0353729.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AG8ufRF022742; Thu, 16 Nov 2023 09:17:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : subject : from : to : cc : date : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=pp1; bh=4cXgi5VLXXOtLpoCPr1dWCi1lxs5btqANVR2MmquTPI=; b=rdPuCKlpYMGWIfCGci5iQlDKqnHDj4WqIJroDuCnt/9RNOuJisZAgEerL0JTPCsSAYgU 6dp6M/UJBSNM3v1qJ9V6LbyrQTcIAEfLD+KsX7sGGmcS8gmYYq9huXRfxLS/eK4DweTW oDs3opIRB6AdMYHjzHl4xM5CC11s9WQ7mOnR1+NKsmuLXd3gIJ4uTLQ1BF0VXlpmlKe5 AyS4qUq5Q6R8qYcu2nXPXYWR3jJyUPPExk3ciGGXfNHEFEFVtdsjqT33IUM4i/unL88f kKCBDIBapsO4U8Ea9VX4vRZPrAWwug4SDwQ4I9GmAx/LD/nKZxgClYuW6LF1Wrl4DwP7 nQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3udebbkfuf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Nov 2023 09:17:27 +0000 Received: from m0353729.ppops.net (m0353729.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3AG8xPbq031471; Thu, 16 Nov 2023 09:17:26 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 3udebbkftj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Nov 2023 09:17:26 +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 3AG8XrrI026751; Thu, 16 Nov 2023 09:17:24 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3uakxt60at-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Nov 2023 09:17:24 +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 3AG9HLfP18154126 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Nov 2023 09:17:22 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DE39720040; Thu, 16 Nov 2023 09:17:21 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 97C8F20049; Thu, 16 Nov 2023 09:17:20 +0000 (GMT) Received: from [9.179.9.51] (unknown [9.179.9.51]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 16 Nov 2023 09:17:20 +0000 (GMT) Message-ID: <8fb810e5000dd66334a4a686407c0caeacb79f55.camel@linux.ibm.com> Subject: Re: [PATCH 12/32] kmsan: Allow disabling KMSAN checks for the current task From: Ilya Leoshkevich To: Alexander Potapenko Cc: Alexander Gordeev , Andrew Morton , Christoph Lameter , David Rientjes , Joonsoo Kim , Marco Elver , Masami Hiramatsu , Pekka Enberg , Steven Rostedt , Vasily Gorbik , Vlastimil Babka , 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 Date: Thu, 16 Nov 2023 10:17:20 +0100 In-Reply-To: References: <20231115203401.2495875-1-iii@linux.ibm.com> <20231115203401.2495875-13-iii@linux.ibm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: vSTD9xF44d83VprYex3tMD-37iq0_k9g X-Proofpoint-GUID: oH4OOC-OhoTloo5LiN9lT2emIfEOQ-qd 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-16_07,2023-11-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 mlxlogscore=999 malwarescore=0 suspectscore=0 adultscore=0 priorityscore=1501 mlxscore=0 bulkscore=0 phishscore=0 impostorscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311160074 On Thu, 2023-11-16 at 09:56 +0100, Alexander Potapenko wrote: > On Wed, Nov 15, 2023 at 9:34=E2=80=AFPM Ilya Leoshkevich > wrote: > >=20 > > Like for KASAN, it's useful to temporarily disable KMSAN checks > > around, > > e.g., redzone accesses. >=20 > This example is incorrect, because KMSAN does not have redzones. > You are calling these functions from "mm: slub: Let KMSAN access > metadata", which mentiones redzones in kfree(), but the description > is > still somewhat unclear. > Can you provide more insight about what is going on? Maybe we can fix > those accesses instead of disabling KMSAN? It's about SLUB redzones, which appear when compiling with CONFIG_DEBUG_SLAB. I think that from KMSAN's point of view they should be considered poisoned, but then the question is what to do with functions that check them. I noticed that there was special handling for KASAN there already, so I figured that the best solution would be to do the same thing for KMSAN.