[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAADnVQLE+3=k6r3RXR8=n8RUd6uJLN9H80g2i74J9e4QR5LHgA@mail.gmail.com>
Date: Tue, 14 Jul 2020 12:39:55 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Masahiro Yamada <masahiroy@...nel.org>
Cc: Alexei Starovoitov <ast@...nel.org>,
Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
Michal Kubecek <mkubecek@...e.cz>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrii Nakryiko <andriin@...com>,
Daniel Borkmann <daniel@...earbox.net>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...omium.org>,
Martin KaFai Lau <kafai@...com>,
Sam Ravnborg <sam@...nborg.org>,
Song Liu <songliubraving@...com>,
Valdis Kl ē tnieks <valdis.kletnieks@...edu>,
Yonghong Song <yhs@...com>
Subject: Re: [PATCH] bpfilter: allow to build bpfilter_umh as a module without
static library
On Wed, Jul 1, 2020 at 10:50 AM Masahiro Yamada <masahiroy@...nel.org> wrote:
>
> On Thu, Jul 2, 2020 at 2:46 AM Alexei Starovoitov
> <alexei.starovoitov@...il.com> wrote:
> >
> > On Wed, Jul 01, 2020 at 06:26:44PM +0900, Masahiro Yamada wrote:
> > > Originally, bpfilter_umh was linked with -static only when
> > > CONFIG_BPFILTER_UMH=y.
> > >
> > > Commit 8a2cc0505cc4 ("bpfilter: use 'userprogs' syntax to build
> > > bpfilter_umh") silently, accidentally dropped the CONFIG_BPFILTER_UMH=y
> > > test in the Makefile. Revive it in order to link it dynamically when
> > > CONFIG_BPFILTER_UMH=m.
> > >
> > > Since commit b1183b6dca3e ("bpfilter: check if $(CC) can link static
> > > libc in Kconfig"), the compiler must be capable of static linking to
> > > enable CONFIG_BPFILTER_UMH, but it requires more than needed.
> > >
> > > To loosen the compiler requirement, I changed the dependency as follows:
> > >
> > > depends on CC_CAN_LINK
> > > depends on m || CC_CAN_LINK_STATIC
> > >
> > > If CONFIG_CC_CAN_LINK_STATIC in unset, CONFIG_BPFILTER_UMH is restricted
> > > to 'm' or 'n'.
> > >
> > > In theory, CONFIG_CC_CAN_LINK is not required for CONFIG_BPFILTER_UMH=y,
> > > but I did not come up with a good way to describe it.
> > >
> > > Fixes: 8a2cc0505cc4 ("bpfilter: use 'userprogs' syntax to build bpfilter_umh")
> > > Reported-by: Michal Kubecek <mkubecek@...e.cz>
> > > Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
> >
> > lgtm
> > Do you mind I'll take it into bpf-next tree?
> > Eric is working on a bunch of patches in this area. I'll take his set
> > into bpf-next as well and then can apply this patch.
> > Just to make sure there are no conflicts.
>
> Please go ahead.
I've merged Eric's set and applied yours on top.
Thanks
Powered by blists - more mailing lists