From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.206 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792424206; b=uPx1qi89QiKr4/Bf6nQnyr1ajd3ca2VBKC/GZMkKySpAuNy+9KREdmqTBDiGbdcc7Shq lUuPvSMi/l+epuDJUVH3b0mBAqRKfQjuOLA4+66yW9eYVE3KOuQnKVWNq43UKjeOLWEOj wIdzLTdPPkU8r56AZLxjT5N2OevWKFj7RdfZjB/ApT3drduudRAG91ruYYS3yNysm9nqP k1PBV2ceS9eDkFQQtDg85TqncqSPd8pPdixAc6uFpGiXtqhGwvl3StGbuhjhdfWvt1crt JhKZO6WJTiuNvzeY4GrF06oUnYe3YfJdZwZVsqE+886nS4xsLDjkV3zAKta/ec8t/DQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792424206; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:From:To:Cc:Subject:Date:Message-ID: X-Mailer:MIME-Version:Content-Transfer-Encoding; bh=UOj9knh0frr379rHSoli0b/qodvVS2OqPC7MrjigU40=; b=M/OqE/XvyvrDxwiX4pxYrE4/aup1FWLcdC9kA26QNfWmGH1EtH356EQo3tN18B8tDD55 e6G/PRhadVCkthprfoafzy4ouBGXR7ciBZ5YwjjYzuTEVHZEhymU9avozZK0LbnuW4oZ+ D4PH9g3ZnO6e0D6jxyY7WG3UqEFdZB5MLHPEHEW8WFsy4n/TTzko2EmW8k2IFCG6U1FTF GfHW+4iJBoa3Ca3oqyYv6Jz1eQZoQC/Q08ItnemUDKCP319m+GThcM8cKVe+cJQdhBId7 WkILCbdcj4vgYWQQd91iEB1AiEFyJkQQKAS3m0PeSHCCKd1TXcPxXNY1D0ohFnploWA== 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=QAv97V8g; arc=none smtp.remote-ip=91.218.175.206 Received: from mta0.migadu.com (out-206.mta0.migadu.com [91.218.175.206]) (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 29CCD606C174 for ; Mon, 19 Oct 2026 15:36:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 29CCD606C174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev 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=QAv97V8g X-Envelope-To: bpf@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=XDVY+hJBQ7Ezg2H1SpsrCrnN81f0MMx4M8tEPctpFHU=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1792424203; v=1; x=1793029003; b=QAv97V8gISE9gLS9YDSGh9BqdBlGkcqlufsQgDuEVuRZbstseQ0/OtUJNNOtmWLybKDBiRd6 LOdRf4XOpPqsIQTa35rB6gAX7vuDSQH7ra4JOV5DwH3Iq4gVfFhPuH0U5XyuG3B2f0AnjiP0i/S cDcX6iDXucQeHhz7dn6nPbLY= X-Envelope-To: bpf@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 503e4b6d01360189; Mon, 19 Oct 2026 15:36:43 +0000 X-Mizu-Trace-ID: 503e4b6d01360189 X-Migadu-Flow: FLOW_OUT From: Leon Hwang To: bpf@vger.kernel.org Cc: Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Eduard Zingerman , Kumar Kartikeya Dwivedi , Martin KaFai Lau , Song Liu , Yonghong Song , Jiri Olsa , Emil Tsalapatis , Ihor Solodrai , Jesper Dangaard Brouer , John Fastabend , Stanislav Fomichev , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Shuah Khan , Kuniyuki Iwashima , Hangbin Liu , Martin Karsten , Masashi Honma , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Leon Hwang Subject: [PATCH bpf-next v2 0/6] bpf: Add syscall common attrs support for xdp link_create Date: Mon, 19 Oct 2026 23:36:22 +0800 Message-ID: <20261019153628.15912-1-leon.hwang@linux.dev> X-Mailer: git-send-email 2.55.0 X-Mailing-List: bpf@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit I'm planning to add syscall common attrs support for LINK_CREATE cmd. This is the first series for the plan, that adds syscall common attrs support for xdp LINK_CREATE. Thereafter, retire the tracepoint bpf_xdp_link_attach_failed, because the underlying driver's error can be back-propagated to user space via the syscall common attrs. Changes: v1 -> v2: * Add log for invalid prog type in link_create(). * Reject log_opts for fallback bpf_raw_tracepoint_open() in libbpf. * Report log_true_size as 0 before creating concrete link, and report the actual log_true_size when fail to create the concrete link. (Sashiko) * Add stub bpf_log() when CONFIG_BPF_SYSCALL is not set. (bots) * Check 'extack._msg' before adding 'extack._msg' to log buffer. (Sashiko, bot+bpf-ci) * Change __bpf_sys_fd to __sys_bpf_fd in the subject and body of patch 4. (bot+bpf-ci) * Move OPTS_VALID(opts, bpf_link_create_opts) to __sys_bpf_fd(). (Sashiko) * Move bpf_link_create_log to the LIBBPF_1.9.0 section. (Sashiko) * Update patch msg with a concrete case in patch 5. (bot+bpf-ci) * Factor out helpers to simplify the tests code. (bot+bpf-ci) * v1: https://lore.kernel.org/bpf/20261017142649.51047-1-leon.hwang@linux.dev/ Leon Hwang (6): bpf: Add syscall common attrs support for link_create bpf: Add syscall common attrs support for xdp link_create bpf: Retire tracepoint bpf_xdp_link_attach_failed libbpf: Factor out __sys_bpf_fd helper libbpf: Add bpf_link_create_log API selftests/bpf: Add tests to verify link_create logs include/linux/bpf_verifier.h | 6 ++ include/linux/netdevice.h | 3 +- include/trace/events/xdp.h | 17 --- kernel/bpf/log.c | 19 ++-- kernel/bpf/syscall.c | 41 +++++-- net/core/dev.c | 8 +- tools/lib/bpf/bpf.c | 69 ++++++++---- tools/lib/bpf/bpf.h | 5 + tools/lib/bpf/libbpf.map | 2 + .../selftests/bpf/prog_tests/xdp_attach.c | 65 ----------- .../selftests/bpf/prog_tests/xdp_link.c | 101 ++++++++++++++++++ .../bpf/progs/test_xdp_attach_fail.c | 54 ---------- 12 files changed, 217 insertions(+), 173 deletions(-) delete mode 100644 tools/testing/selftests/bpf/progs/test_xdp_attach_fail.c -- 2.55.0