Re: [PATCH bpf-next] bpf: fix bpf_shim_tramp_link_release ifdef guards

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 19, 2022 at 10:40 PM Martin KaFai Lau <kafai@xxxxxx> wrote:
>
> On Tue, Jul 19, 2022 at 08:49:54PM -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.
> >
> > Reported-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
> > Fixes: 3908fcddc65d ("bpf: fix lsm_cgroup build errors on esoteric configs")
> > Signed-off-by: Stanislav Fomichev <sdf@xxxxxxxxxx>
> > ---
> >  include/linux/bpf.h | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/include/linux/bpf.h b/include/linux/bpf.h
> > index a5bf00649995..0ff033afe0ad 100644
> > --- a/include/linux/bpf.h
> > +++ b/include/linux/bpf.h
> > @@ -1256,7 +1256,6 @@ int bpf_struct_ops_test_run(struct bpf_prog *prog, const union bpf_attr *kattr,
> >  #endif
> >  int bpf_trampoline_link_cgroup_shim(struct bpf_prog *prog,
> >                                   int cgroup_atype);
> This link_cgroup_shim also needs to move ?

Doh, definitely! Thanks for catching this.

> > -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)
> >  {
> > @@ -1285,6 +1284,11 @@ static inline int bpf_trampoline_link_cgroup_shim(struct bpf_prog *prog,
> >  {
> >       return -EOPNOTSUPP;
> >  }
> > +#endif
> > +
> > +#if defined(CONFIG_CGROUP_BPF) && defined(CONFIG_BPF_LSM)
> > +void bpf_trampoline_unlink_cgroup_shim(struct bpf_prog *prog);
> > +#else
> >  static inline void bpf_trampoline_unlink_cgroup_shim(struct bpf_prog *prog)
> >  {
> >  }
> > --
> > 2.37.0.170.g444d1eabd0-goog
> >



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux