From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (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 46CE2233928 for ; Mon, 13 Jul 2026 17:01:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783962087; cv=none; b=OxKGMqdVQ1lQxGchhgH5MeoNjysS8Mnnc019S8A2cuDiqp7iTwpp2Dn3PVClry23OcM7W+75xgX3PfMkySzgEb/Wl7EZYkSWQSssghzkK/C4Xd4N+L/vFEEV+k0hVh8IOlvcLC+ufZpMkJqw37ob8yvu6KwBR9F0LpGViq0ukVI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783962087; c=relaxed/simple; bh=PzU/1ZRvAOcMh49STDHy1Ec/tLqVc/NQrZbebKocuus=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=FeeE99aqpgWnvVxZsOoUwWxCqyl8Rc5UOAm3pH+guUYIsNJUNWveK2Zv7mD8C2y6mq5knhle6wWAzHMejRi40mQYPq8IR8MLi9DceUItI2hxykFUcn5k6mnhCQlnXaHnxLYb2sxj+ZEOi6XRQ63TPACi/h4U4mZ7NoKg9UdxS3o= 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=c/0aOaq+; arc=none smtp.client-ip=209.85.214.182 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="c/0aOaq+" Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-2cedda2ce6fso6236435ad.1 for ; Mon, 13 Jul 2026 10:01:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783962086; x=1784566886; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:content-type :references:in-reply-to:date:cc:to:from:subject:message-id:from:to :cc:subject:date:message-id:reply-to:content-type; bh=PzU/1ZRvAOcMh49STDHy1Ec/tLqVc/NQrZbebKocuus=; b=c/0aOaq+MzB2LA1FCRZTrIUW0y/OB8kjtdbFdd376fZ2ph9I6ks/v+2AwhvrvUtXPb TdSGAHgN0DiSlNajDprd6rGJ/6fzhx6Po7nXW/lPvhhEvFsB2v3d0rEw+VWq2cs1inGZ 0R1YpGsVju2qZIxwh/lFmWwQh0hHa1avxKxhPZAG5yrQu5eGrLOFPYyrFMRbXZnSYsAl ywfCAtn9JepmmgUUAjroI3B4xFgwU+JeQwcsDQ+fRll/UNVRKeI3EUIDDLZoedR2H4vr JUgemUpAmJ1tQQHd1KH9ayVgesAt6qD7R4CQyIb9Kr16/VCRt7pTmhqeF5Gz12o0fyfv 4Mkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783962086; x=1784566886; h=mime-version:user-agent:content-transfer-encoding:content-type :references:in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=PzU/1ZRvAOcMh49STDHy1Ec/tLqVc/NQrZbebKocuus=; b=FLboHEhg7v/BxACFuwl1Dru8y6l0MUl3D/CiIOVVspoaYFiJANJm1oojXsRx9+1i3H dQ5Ou++1xEAPg8JgfkH/CpIjoAXNlKqPsf7l7nD9wwmUCudypmK4I/PRx4mY0cbsK4tM nFQT6W3vbW3VA4TIApfu9EpmGQsDmNeJzKpdR1p6qZKFjbp0MWZVl56JaJhUHUW5A4PD 1w8XB7eoHBtdNQevWKlaHQl1N4mPFDdzGn9jDDV4GRBfh3ckvzsJaaY7ruTU8r6Z10zK eP9cl+/eHrWBjgwMJCbjy8GCbiuNDkSUxJNB5FfG9bNEmqIbjnoG62pitRXlh0KAPDno 24mA== X-Forwarded-Encrypted: i=1; AHgh+Rqv++sK528rf+oPq4r5kkOZNI0lA2lbdX6LHbbxtIrF50q8mV0XYdqyxGe34BRSMivZ6oOqImCvUauoSHk=@vger.kernel.org X-Gm-Message-State: AOJu0YyBTrTncA6rify5fwdOkT2evi+H7kYyMr5tcrJeBgm3n6g1s2OA gxLk27FM9wBNym/O/61L1gTkelVRx8/qw37YbGVufIag8mZjjNpsB+T8 X-Gm-Gg: AfdE7cmPTNintgyk3fMq+cZ02DgU+QusBhtbC2ZPYwHaRN0VdcFHVmep0hAMQ50Dv0z r52rUtHrzP019uAYr3B765QgGGb8ZXtxBmmAa6JofEiIRS3QpEIcxQey4Q+Jw+UBwm8R6RkcaL2 n2oFPoPrKcvZuVuz/3q49FXeLvLpeLDUTH/KUuliFq8CODRZMuCmaqAKeEHse95KZxTtiPN0ZTP CnybzGwgBQ7M+lnB5re9wMFjgg+yxqQHl3wxVjP4arisgcr+wZIKD8IQPhN9iZmXqN9iTU5pk8s 9RSHvuuUN8QjAG0Fkwbg/KfPNIj9PsFjcCECY5RgkHyaro5P4A50Q5U/Ii4/zCKMC/VtgULYYho Et2Y5rSFLGa804fYWbn76PG+J83HpVndfPbY49sgCQh2VLc+PVKt7/t5uROrqDthigE8rJ7XwWK 7MeT+YSglRyj6AlouDUGHSZvVMQKNmhF9A4DHmF/mubbknamKstbE= X-Received: by 2002:a05:6a20:a107:b0:3bf:b885:2fad with SMTP id adf61e73a8af0-3c110e33100mr8766939637.53.1783962085550; Mon, 13 Jul 2026 10:01:25 -0700 (PDT) Received: from [192.168.0.13] ([38.34.87.7]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-ca5b3162f65sm8618011a12.21.2026.07.13.10.01.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 10:01:25 -0700 (PDT) Message-ID: <07dd30294e3a15aefb88e5be250a85d330eb2ddc.camel@gmail.com> Subject: Re: [PATCH bpf v2 1/2] bpf: Fix tracing of kfuncs with implicit args From: Eduard Zingerman To: Ihor Solodrai , Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , Kumar Kartikeya Dwivedi Cc: Tejun Heo , bpf@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@meta.com Date: Mon, 13 Jul 2026 10:01:21 -0700 In-Reply-To: <9b2196dd-443b-4632-ae11-030cdbdc59b4@linux.dev> References: <20260710192940.3020280-1-ihor.solodrai@linux.dev> <20260710192940.3020280-2-ihor.solodrai@linux.dev> <3b272469-9563-4843-8126-5c6698a84d98@linux.dev> <55f4d7bba39f0fd1e85f436423a4b9a967470701.camel@gmail.com> <9b2196dd-443b-4632-ae11-030cdbdc59b4@linux.dev> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2-10 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Mon, 2026-07-13 at 09:48 -0700, Ihor Solodrai wrote: [...] > It was silly of me to mention the analysis as an obstacle (which I'm > not excited to do, sure). We are at -rc3, so there is a couple of > weeks still if we are targeting 7.2 >=20 > But resolve_btfids series is certainly a merge-window thing, so the > fix shouldn't depend on it. And even carving out build-time KF_ flag > consistentcy enforcement from there is too potentially disruptive for > a "fix" IMO. >=20 > How about the following plan. >=20 > In the fix: > =C2=A0=C2=A0 * delete btf_kfunc_accumulated_flags() > =C2=A0=C2=A0 * expose (back) btf_kfunc_id_set_contains() from btf.c > =C2=A0=C2=A0 * in btf_attach_func_proto() walk the hooks and specifically= check > =C2=A0=C2=A0=C2=A0=C2=A0 for *consistent* KF_IMPLICIT_ARGS > =C2=A0=C2=A0 * -EINVAL on inconsistency >=20 > In the v2 of resolve_btfids series (targeting 7.3): > =C2=A0=C2=A0 * implement kbuild/module-time enforcement of consistency > =C2=A0=C2=A0=C2=A0=C2=A0 for *all* KF_ flags > =C2=A0=C2=A0 * fix in-tree cases where that's not true > =C2=A0=C2=A0 * if there is a valid use-case, it should show up as a block= er, but > =C2=A0=C2=A0=C2=A0=C2=A0 I'll also eyeball all the kfunc set declarations >=20 > Does this make sense? You can do it like that, but tbh I that think doing it in two phases complicates the process unnecessarily.