From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B5E13E5ED1; Tue, 14 Apr 2026 13:13:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776172385; cv=none; b=kkXRgZD7pNSPnfRbRsWkO7Hm2tCYzuldfqre3W0HESc8DkcrSGcFiWl6OATJ2ZO9zULRnfuVPG05f19eq3MLB67w26NO+V8kQWUjHipsmHTZDnCSsbzoT72pJXt/lvpdbG9tEqVCb9Krw9SnsJw9DFB/F+KQmppqYaJI2x/9qZo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776172385; c=relaxed/simple; bh=ljtr9WPSUnaAjZD/FtGwji3II/sbFJuzXTsBaHKsQSU=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:From:To: References:In-Reply-To; b=og6u0pqNO3pm/LfgF0jip1mEHdmoHeD0x3SmwerLr/d5yS1Dk7eUIwS6OMt8mrEK4tr3ePxdOZeb0tMlH/xBmyofrfrvKq7cEF6Rre5cUrfpG3bYlovVPBASaIuXqnjKkyogwNdVVJeRPHvzPhQLKuBDxIA0aijKpqOA5/qVmNs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=lhDeNvog; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="lhDeNvog" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 932294E429EC; Tue, 14 Apr 2026 13:13:01 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 46E3160410; Tue, 14 Apr 2026 13:13:01 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 569A6104500A2; Tue, 14 Apr 2026 15:12:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1776172379; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=ljtr9WPSUnaAjZD/FtGwji3II/sbFJuzXTsBaHKsQSU=; b=lhDeNvog7+cXfwfKejAzO+yVIre7KeKOh4nxhyYR84tw7Qhs4CDNLFYshF/sNo/ddcHeul OAXDnRRPYFfdKmNFr6FNXLWBgkwR5bSerHfi1jG3QAuxmeyq9DKVn4ADpvD+k/LktKcxCV Qo+C51KQYvBPk2tQWgzerrUX38wX8fl9mns5nowg6aBHUe0QUCDETlFcTsN3Vd+g6AhDW1 t0+PPdVn0VXoKLO/NdWsu8xr8pa5SfFsPWlNHjagwF2HUg4Jwz/bTTtoEDbu5jNS5UXcqe /1a7m2ycQR5Rypiiam1nxF1Kid65dAD8mzMdsDqIpVAnb6rsDVnu+pzT2qXnlw== Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 14 Apr 2026 15:12:47 +0200 Message-Id: Subject: Re: [PATCH RFC bpf-next 1/8] kasan: expose generic kasan helpers Cc: "Alexei Starovoitov" , "Daniel Borkmann" , "Andrii Nakryiko" , "Martin KaFai Lau" , "Eduard Zingerman" , "Kumar Kartikeya Dwivedi" , "Song Liu" , "Yonghong Song" , "Jiri Olsa" , "John Fastabend" , "David S. Miller" , "David Ahern" , "Thomas Gleixner" , "Ingo Molnar" , "Borislav Petkov" , "Dave Hansen" , , "H. Peter Anvin" , "Shuah Khan" , "Maxime Coquelin" , "Alexandre Torgue" , "Andrey Ryabinin" , "Alexander Potapenko" , "Dmitry Vyukov" , "Vincenzo Frascino" , "Andrew Morton" , , "Bastien Curutchet" , "Thomas Petazzoni" , "Xu Kuohai" , , , , , , , , From: =?utf-8?q?Alexis_Lothor=C3=A9?= To: "Andrey Konovalov" , =?utf-8?b?QWxleGlzIExvdGhvcsOpIChlQlBGIEZvdW5kYXRpb24p?= X-Mailer: aerc 0.21.0-0-g5549850facc2 References: <20260413-kasan-v1-0-1a5831230821@bootlin.com> <20260413-kasan-v1-1-1a5831230821@bootlin.com> In-Reply-To: X-Last-TLS-Session-Version: TLSv1.3 Hi Andrey, thanks for the prompt review ! On Tue Apr 14, 2026 at 12:19 AM CEST, Andrey Konovalov wrote: > On Mon, Apr 13, 2026 at 8:29=E2=80=AFPM Alexis Lothor=C3=A9 (eBPF Foundat= ion) > wrote: >> [...] >> +#ifdef CONFIG_KASAN_GENERIC >> +void __asan_load1(void *p); >> +void __asan_store1(void *p); >> +void __asan_load2(void *p); >> +void __asan_store2(void *p); >> +void __asan_load4(void *p); >> +void __asan_store4(void *p); >> +void __asan_load8(void *p); >> +void __asan_store8(void *p); >> +void __asan_load16(void *p); >> +void __asan_store16(void *p); >> +#endif /* CONFIG_KASAN_GENERIC */ > > This looks ugly, let's not do this unless it's really required. > > You can just use kasan_check_read/write() instead - these are public > wrappers around the same shadow memory checking functions. And they > also work with the SW_TAGS mode, in case the BPF would want to use > that mode at some point. (For HW_TAGS, we only have kasan_check_byte() > that checks a single byte, but it can be extended in the future if > required to be used by BPF.) ACK, I'll try to use those kasan_check_read and kasan_check_write rather than __asan_{load,store}X. Alexis --=20 Alexis Lothor=C3=A9, Bootlin Embedded Linux and Kernel engineering https://bootlin.com