[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220607195718.v3ftibtcujcuzubr@kafai-mbp>
Date: Tue, 7 Jun 2022 12:57:18 -0700
From: Martin KaFai Lau <kafai@...com>
To: Stanislav Fomichev <sdf@...gle.com>
Cc: netdev@...r.kernel.org, bpf@...r.kernel.org, ast@...nel.org,
daniel@...earbox.net, andrii@...nel.org
Subject: Re: [PATCH bpf-next v8 04/11] bpf: minimize number of allocated lsm
slots per program
On Mon, Jun 06, 2022 at 03:46:32PM -0700, Stanislav Fomichev wrote:
> > > diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
> > > index 091ee210842f..224bb4d4fe4e 100644
> > > --- a/kernel/bpf/core.c
> > > +++ b/kernel/bpf/core.c
> > > @@ -107,6 +107,9 @@ struct bpf_prog *bpf_prog_alloc_no_stats(unsigned int size, gfp_t gfp_extra_flag
> > > fp->aux->prog = fp;
> > > fp->jit_requested = ebpf_jit_enabled();
> > > fp->blinding_requested = bpf_jit_blinding_enabled(fp);
> > > +#ifdef CONFIG_BPF_LSM
> > I don't think this is needed.
>
> enum cgroup_bpf_attach_type is under '#ifdef CONFIG_CGROUP_BPF', so it
> fails in some configs without cgroup/bpf. I was trying to move that
> enumo out of ifdef but then decided that it's easier to fix here.
> Should I instead try to move ifdef in bpf-cgroup-defs.h around?
Having ifdef here is ok. Should CONFIG_CGROUP_BPF be checked ?
Powered by blists - more mailing lists