🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #18233

Re: [PATCH bpf-next v2 1/9] bpf: Add log support for tracing link_create

#18233
From: Leon Hwang
Date: Wed, 18 Nov 2026 01:55
39 lines
10143 bytes
On 17/11/26 13:22, Alexei Starovoitov wrote:
> On Sat, Nov 14, 2026 at 07:06 AM Leon Hwang <leon.hwang@linux.dev> wrote:
> 
> tldr: pls use uapi names where possible:
> 
>> +		bpf_log(log, "tgt_prog_fd and btf_id must be both set or both unset.\n");
> 
> The uapi fields are target_fd and target_btf_id.
> tgt_prog_fd and btf_id are arguments of this function.
> Patches 2, 3 and 4 say target_fd for the same field.
> 
>> +			bpf_log(log, "Only allow re-attach for tracing and lsm progs.\n");
> 
> I think this one misleads. A freplace prog can re-attach.
> It has to pass target_fd and target_btf_id.
> The comment above the check says so.
> 
>> +			bpf_log(log, "Invalid attach_btf.\n");
> 
> attach_btf is a field of bpf_prog_aux. The user never set it.
> NULL means that the prog was loaded with attach_prog_fd.
> Such a prog can't re-attach at all.
> 
>> +		bpf_log(log, "Invalid kprobe_write_ctx.\n");
> 
> Another bit of bpf_prog_aux.
> The rule is that both progs write to pt_regs, or none.
> 
>> +			bpf_log(log, "Invalid tracing attach_type.\n");
> 
> LSM progs get here too.

Ack. Will update the log messages.

Thanks,
Leon

> [...]
Technical Details
Message-ID: <8922213b-d734-4f43-9648-97b3fce1cfc6@linux.dev>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feeder4.usenet.farm!feeder2.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365786-linux-kernel-netdev=dewy.ru
References: <20261114150610.84507-1-leon.hwang@linux.dev> <20261114150610.84507-2-leon.hwang@linux.dev> <DMX8G01GB597.2KEEFI12YK9V0@gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feeder4.usenet.farm!feeder2.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365786-linux-kernel-netdev=dewy.ru
From: leon.hwang@linux.dev (Leon Hwang)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH bpf-next v2 1/9] bpf: Add log support for tracing link_create
Date: Wed, 18 Nov 2026 09:55:17 +0800
Organization: Usenet Network
Message-ID: <8922213b-d734-4f43-9648-97b3fce1cfc6@linux.dev>
References: <20261114150610.84507-1-leon.hwang@linux.dev> <20261114150610.84507-2-leon.hwang@linux.dev> <DMX8G01GB597.2KEEFI12YK9V0@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network; logging-data="2477481"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:MELrWR9nc4g/n+0swlzcgb19lhw= sha256:7Ng5nfPrpORg3iaB1PSXauScvk44ONq4osp/QDluUsg= sha1:gVwtn0bKnEmpuU+iHQJltGZaf3A= sha256:BYO3L3i9vTmQ2xzGjq4splHb96VnqX8jir5eWXCT5K8=
Content-Language: en-US
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 09CCC11513F; Wed, 18 Nov 2026 04:56:56 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=linux.dev
X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SKWnHJpQe53e; Wed, 18 Nov 2026 04:56:47 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-365786-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.dev
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 6BC591150DA; Wed, 18 Nov 2026 04:56:39 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 088E946889; Wed, 18 Nov 2026 01:55:58 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794966942; b=dHae/3WOWpLjjGrzJh1ysfVY/AWP5nKN0w39wQ6IDuerFi8B9xCtJsFIIcC+qFoXnurW clzSPTHyMM5Xf9YAuFHZMi+BsFh6rMDTNLsNQY2BauGpyKUc4ysF8mpwJEZ72u/bmJJ6i iWzxWbNBOLTCDmG/aaDeumOoa5f9Ol7BF6YMMk+M3rNajlLT5WiEsUmnAcqeSox6jJQIf IvmS0lG5CVy8XiPqNkwuLotKMVZf9gWo1CyKGoIJokQdmglrYkaT4SQgH7QwktyhKkUv4 DMqs4hLggtxH+PQhsmu7PfIBeF9pKi19H4z9JNM1f/ucO5TNQOLW5lBXz4P+0z4dyeQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794966942; h=X-Original-To:Received:DMARC-Filter:X-Envelope-To:DKIM-Signature: X-Envelope-To:Received:X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:User-Agent: Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=n6+eDFFvL/Wsk0eeysYpdGNLwTPv8Y7kp0pCYvn78f0=; b=ufrqZdeMfxyX1ija26DH3pJF+pwm0hU+JW/R3oNrIj5XELjNEfI5BW7olQuiipSWiA1h LLUKUsGhw0ItcwuBbS7z74nAsLlTSUyNaCpPcfKYdPJz3HnV82aYcUIFoU4pp22ZWx+Qc QrmdLc+BcVRXCaNEzUosWBfYY12ezSjAoDLcG97szkRIrC6LyvLGTrmS4h3C5tYtoe2tE Q8pL0wnvnAZadiOHMk3MrIx1I6msJNOmpMiIvtPBY/s2hPmpvUDCo5sAK1daGkrHvB0L1 S1tNL5wsTXO1/r0jAv1IUSHgfpyHjqPSMFVbQy9aqy2WXgBa3dI43A8XIIIVtuqc8NA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=GgIYDdkN; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 39BAA606A88C; Wed, 18 Nov 2026 01:55:42 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=GgIYDdkN
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.120
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794966941; b=n0mq7qhmaKMPE32+EhPrZCUYAjq3C0T7hYMs+x77njz+8jwzcXwKag4UWdxSZhh3j6ZL QlC4VLT/QQ2hC4qYsb2g0OFbNIiJIo4YsC0TeJifqHbfVaegn9vKmRyXpyf7CKOfw4+TE HPYt73bE92nk4gGJOpI/hVdqpd+9GaH6nq2zd9qQ3+2RscKUXLD/v2jAP64ITxSnkWYCf b04zAnJaHVH52PZMyUdcgDqcolpcxNeMUxU1rKGoG2GrjwIKSfBqVn39KoWXMjnr09afQ 6fCH+jgQGBAF37e0PRrwO3UGk/QYqRPRO7X6GVfnBKlDniyTdFQ4IjgI87l4BsNNVfQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794966941; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=n6+eDFFvL/Wsk0eeysYpdGNLwTPv8Y7kp0pCYvn78f0=; b=tYStTd3jzSunORvORtduiq4x3KKZCYuiWuAue29RasT3790USWQjPFe+UfzblBi6SmDD rFjZP7+6tpk3bkzHKBot2At/E9LcT4oA/cwM+dgN7NBdEQTMVb1QMcxDnFMduncSyOIxf 4zD08NBBLFt2qEVthg2Y+KpQhMnDov3fo8pqE3aJ+jUSzR5ecEuxrSGV0D7wU7IqX3Cjk zDZ9ZCFDrc7d8krMhlqfqzVWhaf7Oh0Itci44zoajH710N2TOSzqw5Yqqq8Ls17Ek6Mev 8MrwsSg09cJuzqDci1LINn2ULYM1QcwhZxN96Ui696kFrkEJHCozwgXKMzJnOahEQSg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=GgIYDdkN; arc=none smtp.remote-ip=95.215.58.120
X-Received: from mta1.migadu.com (out-120.mta1.migadu.com [95.215.58.120]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC20B60A2629 for <netdev@vger.kernel.org>; Wed, 18 Nov 2026 01:55:40 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BC20B60A2629
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev
X-Envelope-To: netdev@vger.kernel.org
X-DKIM-Signature: a=rsa-sha256; bh=inCj9hgFOM+3wUeyAcIWcO42wDOsOp5Vk/7hHTYE1G8=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1794966938; v=1; x=1795571738; b=GgIYDdkN89LjuVdl5y8CJdY0zGpkAa8UTyK6HGJFRvf99H8IWLM7mkVZsmfh+Eg3cgfUDG9x WdZR1txON9onqNfbhIEmx6STjl2UXJUGQfWkoNvDfNWDs13QGX6I+IVmeLLTTvKndio+lzR+4Yo pAYRcctm4kqK/9yL9LXBJqMs=
X-Envelope-To: netdev@vger.kernel.org
X-Received: by smtp.migadu.com with ESMTPS id 0ae421e0b46adfb2; Wed, 18 Nov 2026 01:55:23 +0000
X-Mizu-Trace-ID: 0ae421e0b46adfb2
X-Migadu-Flow: FLOW_OUT
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-User-Agent: Mozilla Thunderbird
X-Cc: Daniel Borkmann <daniel@iogearbox.net>, John Fastabend <john.fastabend@gmail.com>, Andrii Nakryiko <andrii@kernel.org>, Eduard Zingerman <eddyz87@gmail.com>, Kumar Kartikeya Dwivedi <memxor@gmail.com>, Martin KaFai Lau <martin.lau@linux.dev>, Song Liu <song@kernel.org>, Yonghong Song <yonghong.song@linux.dev>, Jiri Olsa <jolsa@kernel.org>, Emil Tsalapatis <emil@etsalapatis.com>, Ihor Solodrai <ihor.solodrai@linux.dev>, Steven Rostedt <rostedt@goodmis.org>, Masami Hiramatsu <mhiramat@kernel.org>, Mathieu Desnoyers <mathieu.desnoyers@efficios.com>, KP Singh <kpsingh@kernel.org>, Matt Bobrowski <matt@bobrowski.net>, Shuah Khan <shuah@kernel.org>, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, netdev@vger.kernel.org
X-In-Reply-To: <DMX8G01GB597.2KEEFI12YK9V0@gmail.com>