From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f42.google.com (mail-ot1-f42.google.com [209.85.210.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E70629AB02 for ; Sun, 13 Sep 2026 01:26:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789262820; cv=none; b=Ph5iUi2fTMxXgCsjJ50f6skoQfnM/f6yTm4B0X3xYtDB0fAO7Isd0t7JAuO2iMiajvqSoAiI0dC8I9FYoXABmKL66n5GyMxL+VXq0xIZMcfygBsULkKk1/evZuPivDgFGpgTzLW7N90QWInfdh1cRRypqXphkl1y0C0AnDx+uMI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789262820; c=relaxed/simple; bh=TSHs88GMB6DHBXH5X+N97OQWghhZeYcRWgEaIBLM84o=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=lO5UGnD+VPk1Pa40nYJ2ZaJD1IWJ1c++e7oMqzHaMXgULNfWVDzbL0w3lJNnZ5vHiEWyunbs0EktvQf2sMZ9DfNEbKuYfsNH17Cm6ABpJmU0pdLIb3BUicpCLOlxEl2TOSSnsslG4GBkC3JZDPJLi91G9SJzoqixtFzTBtRQu/I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=b1A0Tq4q; arc=none smtp.client-ip=209.85.210.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="b1A0Tq4q" Received: by mail-ot1-f42.google.com with SMTP id 46e09a7af769-7f57db8b5a4so1959698a34.2 for ; Sat, 12 Sep 2026 18:26:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1789262817; x=1789867617; darn=vger.kernel.org; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-type:content-transfer-encoding:mime-version:from:to:cc :subject:date:message-id:reply-to:content-type; bh=TSHs88GMB6DHBXH5X+N97OQWghhZeYcRWgEaIBLM84o=; b=b1A0Tq4qeTahp1fZe74KI3PV5/kpr0BjIYOKlgrhpVIgvZctHXmrIKiDoUKMzgvfoy Ezv6LVhfXyQhFawgeYB73T5QQNtRgwDL7gpMca09Qfw686QJTGcJycl19HWP+Yc3UNhW uiAFXPkrGGCH3WgZvgWHmeo/faag6bKTZ3BcjBWgAw8/acS/KRyqBcaiG4rwRvupY8WK tXnPt/N52F4NJ8fqZqmuPCidrGFx76zT9RUWECuvUtV/Fuy7sKBlk28uAwCX/vGiewNi B0qWM2VPo0OjQdFlhPd7a3aVgG/sGU7iNXViVH9cRmPmyo13gtpxNc8fEwzVe5UcSiCV Qsyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789262817; x=1789867617; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-type:content-transfer-encoding:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=TSHs88GMB6DHBXH5X+N97OQWghhZeYcRWgEaIBLM84o=; b=AN/10lM60ffwd5BJfhmZadd5QRdjju/VeG7T+clTd5u+hTIuDfoFWH0seNwOW2vdcn 1anJ+eBJrWSjVycFKOiyo4ynUEEEaziMdwVaoUJ7Tqdb7wKbj39pTS0RX5/EvwQvkz+F fF7gDXulfgFlW6ppIGrh9Ze/AfJ0EDF49gn3A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491bc7-6c23bff5dfdmr3227980eaf.29.1789262817080; Sat, 12 Sep 2026 18:26:57 -0700 (PDT) Received: from localhost ([2a03:2880:10ff:17::]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-47df90faa62sm5431368fac.12.2026.09.12.18.26.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 12 Sep 2026 18:26:56 -0700 (PDT) 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: Sat, 12 Sep 2026 18:26:55 -0700 Message-Id: Cc: "Nam Cao" , "LKML" , "linux-trace-kernel" , "bpf" , "Wen Yang" , "Tobias Schaffner" , "Viktor Malik" , "Linus Torvalds" Subject: Re: [RFC PATCH 00/20] rv: Add support for BPF monitors From: "Alexei Starovoitov" To: "Gabriele Monaco" , "Steven Rostedt" X-Mailer: aerc References: <20260831090524.106845-1-gmonaco@redhat.com> <87se3sakgi.fsf@yellow.woof> <20260903090211.50d15220@gandalf.local.home> <20260904074317.01b2c0e1@robin> <20260904123108.1fa1d815@gandalf.local.home> <20260904132421.111c0279@gandalf.local.home> <20260904194620.0c7a8363@gandalf.local.home> <20260904201741.2986efca@gandalf.local.home> <228FE969-EBFF-4B60-B0E7-C1E4FD82FB8B@redhat.com> In-Reply-To: <228FE969-EBFF-4B60-B0E7-C1E4FD82FB8B@redhat.com> On Fri Sep 4, 2026 at 9:53 PM PDT, Gabriele Monaco wrote: > Sorry for the delay. > Alexei, what I read from your opinion is: if you really want to do this R= V thing, then you should just implement it all in BPF. yes. > like the panic() one. Something BPF just shouldn't do, as I get it. There is a disconnect here. we have one KF_DESTRUCTIVE kfunc already. bpf_panic() can be another one. It will require CAP_SYS_BOOT. > I'd rather discuss on what is the best approach /today/. And that's preci= sely why I submitted the talk for LPC. Excellent. We can start this discussion over email and continue at LPC. My understanding of RV is primitive, but from reading kernel/trace/rv/*.c it seems to me that it's a thin glue between tracepoints and monitors, a bit of boiler plate code via tracefs to enable monitors and seq file for = visibility. What you're proposing is "yet another monitor" that is reusing this glue co= de, and that's my main objection. I don't see the value in kernel/trace/rv/*.c. (kernel/trace/rv/monitors/* are useful, of course) What stops you from attaching tracing bpf progs to all tracepoints that you= need, pinning few "bpf iterator" progs in bpffs that will provide text or binary output via seq files, run a state machine inside the prog, and do whatever "verification" logic inside them ? You don't need the rv/*.c glue. I see no need to introduce new bpf struct-o= ps api just to look-like-a-monitor from RV glue perspective. "runtime verification" as a concept makes sense, so focus on that.