* [PATCH bpf-next v2] bpf: fix bpf_trampoline_{,un}link_cgroup_shim ifdef guards
@ 2022-07-20 15:52 Stanislav Fomichev
2022-07-20 18:17 ` Martin KaFai Lau
2022-07-20 18:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Stanislav Fomichev @ 2022-07-20 15:52 UTC (permalink / raw)
To: bpf
Cc: ast, daniel, andrii, martin.lau, song, yhs, john.fastabend,
kpsingh, sdf, haoluo, jolsa, Stephen Rothwell
They were updated in kernel/bpf/trampoline.c to fix another build
issue. We should to do the same for include/linux/bpf.h header.
v2:
- Martin: bpf_trampoline_link_cgroup_shim should be fixed as well
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Fixes: 3908fcddc65d ("bpf: fix lsm_cgroup build errors on esoteric configs")
Signed-off-by: Stanislav Fomichev <sdf@google.com>
---
include/linux/bpf.h | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index a5bf00649995..11950029284f 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -1254,9 +1254,6 @@ struct bpf_dummy_ops {
int bpf_struct_ops_test_run(struct bpf_prog *prog, const union bpf_attr *kattr,
union bpf_attr __user *uattr);
#endif
-int bpf_trampoline_link_cgroup_shim(struct bpf_prog *prog,
- int cgroup_atype);
-void bpf_trampoline_unlink_cgroup_shim(struct bpf_prog *prog);
#else
static inline const struct bpf_struct_ops *bpf_struct_ops_find(u32 type_id)
{
@@ -1280,6 +1277,13 @@ static inline int bpf_struct_ops_map_sys_lookup_elem(struct bpf_map *map,
{
return -EINVAL;
}
+#endif
+
+#if defined(CONFIG_CGROUP_BPF) && defined(CONFIG_BPF_LSM)
+int bpf_trampoline_link_cgroup_shim(struct bpf_prog *prog,
+ int cgroup_atype);
+void bpf_trampoline_unlink_cgroup_shim(struct bpf_prog *prog);
+#else
static inline int bpf_trampoline_link_cgroup_shim(struct bpf_prog *prog,
int cgroup_atype)
{
--
2.37.0.170.g444d1eabd0-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH bpf-next v2] bpf: fix bpf_trampoline_{,un}link_cgroup_shim ifdef guards
2022-07-20 15:52 [PATCH bpf-next v2] bpf: fix bpf_trampoline_{,un}link_cgroup_shim ifdef guards Stanislav Fomichev
@ 2022-07-20 18:17 ` Martin KaFai Lau
2022-07-20 18:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Martin KaFai Lau @ 2022-07-20 18:17 UTC (permalink / raw)
To: Stanislav Fomichev
Cc: bpf, ast, daniel, andrii, martin.lau, song, yhs, john.fastabend,
kpsingh, haoluo, jolsa, Stephen Rothwell
On Wed, Jul 20, 2022 at 08:52:20AM -0700, Stanislav Fomichev wrote:
> They were updated in kernel/bpf/trampoline.c to fix another build
> issue. We should to do the same for include/linux/bpf.h header.
>
> v2:
> - Martin: bpf_trampoline_link_cgroup_shim should be fixed as well
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Fixes: 3908fcddc65d ("bpf: fix lsm_cgroup build errors on esoteric configs")
Acked-by: Martin KaFai Lau <kafai@fb.com>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH bpf-next v2] bpf: fix bpf_trampoline_{,un}link_cgroup_shim ifdef guards
2022-07-20 15:52 [PATCH bpf-next v2] bpf: fix bpf_trampoline_{,un}link_cgroup_shim ifdef guards Stanislav Fomichev
2022-07-20 18:17 ` Martin KaFai Lau
@ 2022-07-20 18:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-07-20 18:40 UTC (permalink / raw)
To: Stanislav Fomichev
Cc: bpf, ast, daniel, andrii, martin.lau, song, yhs, john.fastabend,
kpsingh, haoluo, jolsa, sfr
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:
On Wed, 20 Jul 2022 08:52:20 -0700 you wrote:
> They were updated in kernel/bpf/trampoline.c to fix another build
> issue. We should to do the same for include/linux/bpf.h header.
>
> v2:
> - Martin: bpf_trampoline_link_cgroup_shim should be fixed as well
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Fixes: 3908fcddc65d ("bpf: fix lsm_cgroup build errors on esoteric configs")
> Signed-off-by: Stanislav Fomichev <sdf@google.com>
>
> [...]
Here is the summary with links:
- [bpf-next,v2] bpf: fix bpf_trampoline_{,un}link_cgroup_shim ifdef guards
https://git.kernel.org/bpf/bpf-next/c/9cb61fda8c71
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-07-20 18:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-20 15:52 [PATCH bpf-next v2] bpf: fix bpf_trampoline_{,un}link_cgroup_shim ifdef guards Stanislav Fomichev
2022-07-20 18:17 ` Martin KaFai Lau
2022-07-20 18:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox