From: kernel test robot <lkp@intel.com>
To: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [kkdwivedi:arena-args 14/14] kernel/bpf/trampoline.c:957:undefined reference to `bpf_prog_has_arena_ctx_arg'
Date: Fri, 07 Aug 2026 11:25:10 +0800 [thread overview]
Message-ID: <202608071101.khLFpmUL-lkp@intel.com> (raw)
tree: https://github.com/kkdwivedi/linux arena-args
head: 15ae81f222268f3e796b1a2ab478fa12eda2354d
commit: 15ae81f222268f3e796b1a2ab478fa12eda2354d [14/14] bpf: Reject tracing progs for struct_ops with arena args
config: x86_64-randconfig-075-20260807 (https://download.01.org/0day-ci/archive/20260807/202608071101.khLFpmUL-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260807/202608071101.khLFpmUL-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608071101.khLFpmUL-lkp@intel.com/
All errors (new ones prefixed by >>):
ld: kernel/bpf/trampoline.o: in function `__bpf_trampoline_link_prog':
>> kernel/bpf/trampoline.c:957:(.text+0x65a9): undefined reference to `bpf_prog_has_arena_ctx_arg'
vim +957 kernel/bpf/trampoline.c
e6cc9ed677e6222 Jiri Olsa 2026-06-06 941
65499074efaf574 Jiri Olsa 2026-06-06 942 static int __bpf_trampoline_link_prog(struct bpf_tramp_node *node,
e6cc9ed677e6222 Jiri Olsa 2026-06-06 943 struct bpf_trampoline *tr,
e6cc9ed677e6222 Jiri Olsa 2026-06-06 944 struct bpf_prog *tgt_prog,
e6cc9ed677e6222 Jiri Olsa 2026-06-06 945 const struct bpf_trampoline_ops *ops,
e6cc9ed677e6222 Jiri Olsa 2026-06-06 946 void *data)
e6cc9ed677e6222 Jiri Olsa 2026-06-06 947 {
e6cc9ed677e6222 Jiri Olsa 2026-06-06 948 enum bpf_tramp_prog_type kind;
e6cc9ed677e6222 Jiri Olsa 2026-06-06 949 int err = 0;
e6cc9ed677e6222 Jiri Olsa 2026-06-06 950 int cnt = 0, i;
e6cc9ed677e6222 Jiri Olsa 2026-06-06 951
65499074efaf574 Jiri Olsa 2026-06-06 952 kind = bpf_attach_type_to_tramp(node->link->prog);
772e00a29fe12f6 Tejun Heo 2026-08-03 953 /*
772e00a29fe12f6 Tejun Heo 2026-08-03 954 * Arena ctx args are converted only by struct_ops indirect
772e00a29fe12f6 Tejun Heo 2026-08-03 955 * trampolines. They must never be attached to a generic trampoline.
772e00a29fe12f6 Tejun Heo 2026-08-03 956 */
772e00a29fe12f6 Tejun Heo 2026-08-03 @957 if (WARN_ON_ONCE(bpf_prog_has_arena_ctx_arg(node->link->prog)))
772e00a29fe12f6 Tejun Heo 2026-08-03 958 return -ENOTSUPP;
772e00a29fe12f6 Tejun Heo 2026-08-03 959
e6cc9ed677e6222 Jiri Olsa 2026-06-06 960 if (tr->extension_prog)
e6cc9ed677e6222 Jiri Olsa 2026-06-06 961 /* cannot attach fentry/fexit if extension prog is attached.
e6cc9ed677e6222 Jiri Olsa 2026-06-06 962 * cannot overwrite extension prog either.
e6cc9ed677e6222 Jiri Olsa 2026-06-06 963 */
e6cc9ed677e6222 Jiri Olsa 2026-06-06 964 return -EBUSY;
e6cc9ed677e6222 Jiri Olsa 2026-06-06 965
e6cc9ed677e6222 Jiri Olsa 2026-06-06 966 for (i = 0; i < BPF_TRAMP_MAX; i++)
e6cc9ed677e6222 Jiri Olsa 2026-06-06 967 cnt += tr->progs_cnt[i];
e6cc9ed677e6222 Jiri Olsa 2026-06-06 968
e6cc9ed677e6222 Jiri Olsa 2026-06-06 969 if (kind == BPF_TRAMP_REPLACE) {
e6cc9ed677e6222 Jiri Olsa 2026-06-06 970 /* Cannot attach extension if fentry/fexit are in use. */
e6cc9ed677e6222 Jiri Olsa 2026-06-06 971 if (cnt)
e6cc9ed677e6222 Jiri Olsa 2026-06-06 972 return -EBUSY;
e6cc9ed677e6222 Jiri Olsa 2026-06-06 973 err = bpf_freplace_check_tgt_prog(tgt_prog);
e6cc9ed677e6222 Jiri Olsa 2026-06-06 974 if (err)
e6cc9ed677e6222 Jiri Olsa 2026-06-06 975 return err;
65499074efaf574 Jiri Olsa 2026-06-06 976 tr->extension_prog = node->link->prog;
e6cc9ed677e6222 Jiri Olsa 2026-06-06 977 return bpf_arch_text_poke(tr->func.addr, BPF_MOD_NOP,
e6cc9ed677e6222 Jiri Olsa 2026-06-06 978 BPF_MOD_JUMP, NULL,
65499074efaf574 Jiri Olsa 2026-06-06 979 node->link->prog->bpf_func);
2d419c44658f75e Menglong Dong 2026-01-24 980 }
65499074efaf574 Jiri Olsa 2026-06-06 981 err = bpf_trampoline_add_prog(tr, node, cnt);
e6cc9ed677e6222 Jiri Olsa 2026-06-06 982 if (err)
e6cc9ed677e6222 Jiri Olsa 2026-06-06 983 return err;
e6cc9ed677e6222 Jiri Olsa 2026-06-06 984 err = bpf_trampoline_update(tr, true /* lock_direct_mutex */, ops, data);
e6cc9ed677e6222 Jiri Olsa 2026-06-06 985 if (err)
65499074efaf574 Jiri Olsa 2026-06-06 986 bpf_trampoline_remove_prog(tr, node);
af3f4134006bf3b Stanislav Fomichev 2022-06-28 987 return err;
af3f4134006bf3b Stanislav Fomichev 2022-06-28 988 }
af3f4134006bf3b Stanislav Fomichev 2022-06-28 989
:::::: The code at line 957 was first introduced by commit
:::::: 772e00a29fe12f6af7d0d341c0ac0a26eb5e6be1 bpf: Support __arena and __arena_nullable on struct_ops arguments
:::::: TO: Tejun Heo <tj@kernel.org>
:::::: CC: Kumar Kartikeya Dwivedi <memxor@gmail.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-08-07 3:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202608071101.khLFpmUL-lkp@intel.com \
--to=lkp@intel.com \
--cc=memxor@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.