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 19F68346FD2 for ; Tue, 14 Apr 2026 20:44:29 +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=1776199474; cv=none; b=crcNT0TF7aPHDIgjWV1kEoHETl65t6KGNiABUI3iQpch8R0GVFT6o4VyQSwXN4xL+s8QQ5inDGHHxSJWsK3K5YjLwPSH49q/ujulaiLgfJnSDQc3bGgPIfsFH5oA49SrZr7jnFVOj4CTSvSeyf1s4hJ7e93sQZjWwGcmx8x4Ql0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776199474; c=relaxed/simple; bh=L8bWJr7FXUdlTXBxL69DdsJ20JowQnELYHkBWQ0j71o=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:From:To:Subject: References:In-Reply-To; b=ZmWG5uszWwbTG1lnUg84uX4Yyr6i3SRSfCm0DY7HTbbb+xRkzOXfHhK2lR32+a4IYrui09SFtr/Z53ZGkYJeRX3qn2kLM/ZB+SVPOkCaoiqbf/a26b8XML4fev8wzAAbAeL7C0UbtMdP74D8cLQTdDHIkAiL/Ubk25KgeAUU+eY= 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=tp0oFwTf; 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="tp0oFwTf" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 1A19A4E429A4; Tue, 14 Apr 2026 20:44:28 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id CCCED60410; Tue, 14 Apr 2026 20:44:27 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 4D13710450F98; Tue, 14 Apr 2026 22:44:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1776199466; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=L8bWJr7FXUdlTXBxL69DdsJ20JowQnELYHkBWQ0j71o=; b=tp0oFwTf5VHzsnEQcoI6YFXubpXr48s6UWlXK4aDR8EDMSSF+/OjNf6hUwJE2BAbHAdgPz v2f4A8tTxVtK7dqJZfFAdjP+hWDl0Fam9eGGy91tNDrdqr1jGCVU5mlUKQsx7dKkw5Fj/o 8xB9Inm9XOYYzG+OqKhmNW03MF+ALRZMBSynxDWIF5QBxopuN97KxRbIxhOyfKSB9o6wkS 91454gD3J6J7wN/TaEOT0JgO64Dp+ztksnjtLIOwoMGIkVJ9RQPJZYo6iGmJA9iAtEHlyl YSu689PmkWekOvBlF+bpB2iuXK1nNSBHe1tFVeClAIGo4vy+Vjuo6lCfP898kw== Precedence: bulk X-Mailing-List: linux-kernel@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 22:44:13 +0200 Message-Id: Cc: "Andrey Konovalov" , "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" , "X86 ML" , "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" , "bpf" , "LKML" , "Network Development" , "open list:KERNEL SELFTEST FRAMEWORK" , , "linux-arm-kernel" , "kasan-dev" , "linux-mm" From: =?utf-8?q?Alexis_Lothor=C3=A9?= To: "Alexei Starovoitov" , =?utf-8?q?Alexis_Lothor=C3=A9?= Subject: Re: [PATCH RFC bpf-next 1/8] kasan: expose generic kasan helpers 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 On Tue Apr 14, 2026 at 9:16 PM CEST, Alexei Starovoitov wrote: > On Tue, Apr 14, 2026 at 11:41=E2=80=AFAM Alexis Lothor=C3=A9 > wrote: >> >> On Tue Apr 14, 2026 at 4:36 PM CEST, Alexei Starovoitov wrote: >> > On Tue, Apr 14, 2026 at 6:13=E2=80=AFAM Alexis Lothor=C3=A9 >> > wrote: >> >> >> >> Hi Andrey, thanks for the prompt review ! [...] >> > No. The performance penalty will be too high. >> >> Since we are mentioning it, I did not consider yet any performance >> comparision/benchmarking (and I am not really familiar with usual bpf >> performance validation practices for new bpf features). Is there any >> existing test I should take a look at for this ? Maybe some specific >> benches in tools/testing/selftests/bpf/bench ? > > So far everything in bpf/bench/ measures bpf infra like > maps, kprobes, tracepoints, etc. > We don't have benchmarks for bpf programs. > So we don't know how well JITs are generating code > and how much inlining done by the verifier, JITs actually helps. > > Puranjay is working on creating a SPECint like set of benchmarks. > > For this kasan work we should make the best decisions from > performance point of view, like not wasting unnecessary call > and not saving unnecessary registers. btw in the other patch > I think you can skip saving of r10 and r11. Noted, I'll do some checks and tests without those two. > But we cannot quantify yet that avoiding extra call gives us N%. > > You can micro-benchmark, of course, but gotta be careful > interpreting the results. It might be too easy to get into > thinking that JIT must inline __asan_load() for the sake of performance. Ok, interesting, thanks for those details Alexis --=20 Alexis Lothor=C3=A9, Bootlin Embedded Linux and Kernel engineering https://bootlin.com