Netdev Archive on lore.kernel.org
 help / color / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: "Alexei Starovoitov" <ast@kernel.org>,
	Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>,
	"Linux Kbuild mailing list" <linux-kbuild@vger.kernel.org>,
	"Michal Kubecek" <mkubecek@suse.cz>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Andrii Nakryiko" <andriin@fb.com>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	"David S. Miller" <davem@davemloft.net>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"John Fastabend" <john.fastabend@gmail.com>,
	"KP Singh" <kpsingh@chromium.org>,
	"Martin KaFai Lau" <kafai@fb.com>,
	"Sam Ravnborg" <sam@ravnborg.org>,
	"Song Liu" <songliubraving@fb.com>,
	"Valdis Kl ē tnieks" <valdis.kletnieks@vt.edu>,
	"Yonghong Song" <yhs@fb.com>
Subject: Re: [PATCH] bpfilter: allow to build bpfilter_umh as a module without static library
Date: Tue, 14 Jul 2020 12:39:55 -0700
Message-ID: <CAADnVQLE+3=k6r3RXR8=n8RUd6uJLN9H80g2i74J9e4QR5LHgA@mail.gmail.com> (raw)
In-Reply-To: <CAK7LNARTMt8kgRJqgRonaSHROT80yDNAG0wDiLGL=RSEz3CDig@mail.gmail.com>

On Wed, Jul 1, 2020 at 10:50 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Thu, Jul 2, 2020 at 2:46 AM Alexei Starovoitov
> <alexei.starovoitov@gmail.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@suse.cz>
> > > Signed-off-by: Masahiro Yamada <masahiroy@kernel.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

      reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-01  9:26 Masahiro Yamada
2020-07-01 12:57 ` Michal Kubecek
2020-07-01 17:46 ` Alexei Starovoitov
2020-07-01 17:50   ` Masahiro Yamada
2020-07-14 19:39     ` Alexei Starovoitov [this message]

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='CAADnVQLE+3=k6r3RXR8=n8RUd6uJLN9H80g2i74J9e4QR5LHgA@mail.gmail.com' \
    --to=alexei.starovoitov@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@chromium.org \
    --cc=kuba@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    --cc=sam@ravnborg.org \
    --cc=songliubraving@fb.com \
    --cc=valdis.kletnieks@vt.edu \
    --cc=yhs@fb.com \
    /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

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git