From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f174.google.com (mail-oi1-f174.google.com [209.85.167.174]) (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 515DD3E6394 for ; Mon, 8 Jun 2026 19:58:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780948688; cv=none; b=sTZxnCYZRFaTTeLo/PE6d8fDKwR9AOZogfgp2THOukHBBIU5ECGKKf73L+dt3ngsLoCGNs3zQiD90fFEMEOeu3eqOTSv7frmSpZGroAJBq7o0CPzIUyR3tyb5co65pUMYAZg5LaMfbLQwjj1ngy3w88/yAtX+qGn3rHySz87YR0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780948688; c=relaxed/simple; bh=6r9vbyCh4ODQGh6cykBW9zlBP7LN1nCYV/Ax1BNV05U=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=C7X8WNANHYJjcuHROTcNQK5EGfaxET+oWrjWRMZL4WiWcDzopOOJxhXQp6NTE+8YdKTzCidrNqt5mJPG6D06e+Mxm/npZ4fnA79VTDqR9e38mpIHvPAVrdtz5f1GZdtfZFYm1eRIxjTkLw9vKLJHygFiVbEXg4Lig2wvHI1bEO4= 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=QcxkyJyo; arc=none smtp.client-ip=209.85.167.174 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="QcxkyJyo" Received: by mail-oi1-f174.google.com with SMTP id 5614622812f47-485ecc0f2dfso3688283b6e.3 for ; Mon, 08 Jun 2026 12:58:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780948686; x=1781553486; darn=vger.kernel.org; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=8Tq3KQGC3tU2yK+mYapte3MwesmVqS3nwz+ecMDb+Ng=; b=QcxkyJyoEAospXZqyI0YINj+5t5IOOMW1a1/jLjG0a0L8KAqJpO5fvCf/fuOkXsfB+ +j7GFEc+n7baijoj/fjJ5+6upOTYGmmRYKn7wINMWqWZKzF0DPb/ZciWEe19NSnfNXI7 XMZcsOm6/isJWTyP32U730ACyqbOug6yD4noNADmiUdZhusaWQF6OdQslRnq2GKD6IwS pZ8UtoPT+7TdGFzCYDbvrhTxSQz14Nx6V/ZNXRqZGTmWD31PqEpN0VcLeo2PQ7wu1h9Z NlbvNDVxjBQJIu2H+9qA7fHS4W9bNoHco/7InZN35Ocq3G1M8k8T7+gqwm02+JW8w6/w FERg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780948686; x=1781553486; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=8Tq3KQGC3tU2yK+mYapte3MwesmVqS3nwz+ecMDb+Ng=; b=be6Vx5K9XNyCsBo6L2Mr6F2w6rEd5Mg3QftgowB1YmI3JSR6/sLbaSQixyaFzEP4lZ LHwenbl+Kg7uU+cpYnoUxo0Si6YmKSNuHrB1EhUdUMUWjbOCcYAfUWSHMIEhbmUiphXw UUzCEbZB0zjO5MB0plFzzjpkPVazvQvvy3GvIoAwmJoRVYhqo5+Phtr8oWyFDBS6DmF6 /eV9hjhI1fS+O8W9k/0e4USNnKiagqRPjG2sMqGNbuO/8E0R/U4oQPQJBR+vYt6LMDPO n+bbJlxCAC+ghwnGwfNH5W17+I/aPpT8BhDISgZ6kkJSzypsJauc8DyZxPkAQBdxHPH1 62WQ== X-Forwarded-Encrypted: i=1; AFNElJ8+iGqFE1jdMNai8nS6N8s8+93nhJOPwyrUTlh/ud+44e3TDjswsfk5hUNo1NGTM8GNgVkBk6IhXySieLo=@vger.kernel.org X-Gm-Message-State: AOJu0YwyiZWpIv9RiRBhBOUfiluTDLkOx760KmHwlySQFPYnbDwzeBBt X+UCo8qvyiL7a9pJ+/Pyi5J/uAcfhHHSSb5lGkQTCEsrho5/WRGXc9YB X-Gm-Gg: Acq92OHoIrY02N3vRF0IOkTgXB5o28z+2PcUP0J8OSvfnc8N0S7Dnn3s3I6W+d6ml+0 BrwIkWcvL7RSWZXe59AU19Eqow+ewAyxMGXcvCCp9QwVJu+5/SykcC+05Wjrio75biJn22EcccT 0/uqlnyM0Xpf70F1Dq4GYvtRJNKTf4VS429gBy8EVO9AzfK5tP/Py8zg45cSC21nciaAea8tznT q8JAf6Xuxdjh4/I+PQJJdcSz3e2aqa/yTckn1OA00FWJE47QugQ5TlX7NH2pWWlayhUVzl1Qg5E QninlLrmW10HZnZTneW8oNW/CzAF3KVDrxkMMDyQ5OapG2C96QmhZ8eSG0ZXHxum62cOWUYtDk1 8diWcAa7+oEcoi7IGvjfjVcGV1aULStzwz3pYUrtyD5A89Ll/6ZfLAsxfJHZA3qNWc3a7P5tzr3 YxYZ7hjbG6zHjZ0JQDU1zsKuV8x7MigP948vcfuDD01NspBzdktNOh9lQexbzhK8D6zpSM62/nQ wF+d6nAKHZoe3cBkJFITs6dFnM= X-Received: by 2002:a05:6808:c227:b0:485:4443:dbed with SMTP id 5614622812f47-4868dbf7a46mr10511768b6e.8.1780948686022; Mon, 08 Jun 2026 12:58:06 -0700 (PDT) Received: from localhost ([2a03:2880:10ff:9::]) by smtp.gmail.com with ESMTPSA id 5614622812f47-4865b7ad946sm14131286b6e.8.2026.06.08.12.58.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Jun 2026 12:58:05 -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: Mon, 08 Jun 2026 12:58:04 -0700 Message-Id: Cc: , , , , , , , , , , , , , , , Subject: Re: [PATCH bpf v5 0/2] bpf: Fix kfunc implicit arg injection and add selftest From: "Alexei Starovoitov" To: X-Mailer: aerc References: <20260602093836.2632714-1-chenyuan_fl@163.com> <20260608142618.3064380-1-chenyuan_fl@163.com> In-Reply-To: <20260608142618.3064380-1-chenyuan_fl@163.com> On Mon Jun 8, 2026 at 7:26 AM PDT, chenyuan_fl wrote: > From: Yuan Chen > > v4: https://lore.kernel.org/bpf/20260602093836.2632714-1-chenyuan_fl@163.= com/ > > v1 made btf_types_are_same() cross-BTF aware by comparing kind, size > and name. Alan Maguire pointed out that this would be too permissive > since two different structs can share the same name and size. > > v2 used a name-based classifier (get_kfunc_arg_inject_type). > > v3 splits the combined is_kfunc_arg_ignore || is_kfunc_arg_implicit > check in check_kfunc_args(), so that an implicit argument reaching > is_kfunc_arg_implicit() without any prior handler is rejected with > -EFAULT instead of silently skipped (Eduard Zingerman). This prevents > the silent fallthrough that occurred when module BTF was inconsistent > with vmlinux (e.g. pahole 1.30 breaking distilled base dedup). > > v4: fix a build error in the selftest. > > v5 changes: > - Patch 1: extend the kfunc allow-list in check_kfunc_args() to cover > all kfuncs with implicit args handled in bpf_fixup_kfunc_call(): > obj_new, percpu_obj_new, obj_drop, percpu_obj_drop, > refcount_acquire, list_push, rbtree_add (Eduard Zingerman). > - Patch 2: simplify the selftest by verifying aux->name in > bpf_kfunc_implicit_arg() instead of adding a separate struct_ops > test program with inline assembly (Eduard Zingerman). This is > a single-file change exercised by the existing kfunc_implicit_args > selftest. Pls address feedback from Eduard and respin with [PATCH bpf-next v6] subjec= t. pw-bot: cr