Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp4316741ybg; Mon, 8 Jun 2020 04:59:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzb2rVszyMeeCVM8bVB6DjGW3OQ1SSsLR58TLWenaaK88H+EZSXmxL4OCtsjVQgjxY1Hvs3 X-Received: by 2002:a17:907:7294:: with SMTP id dt20mr20032335ejc.355.1591617554878; Mon, 08 Jun 2020 04:59:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591617554; cv=none; d=google.com; s=arc-20160816; b=kGwChNEpoivN8KpCoB/xWEs44evDu0+RGuqZRrccJwTDi+i5QBoRkGmda6JbM1T4gk TWdnC4lwbbVH2z1eXivWZ8sjtArStd/PngGvt+92rnXwtJkHd11i9v7LStLQz7QVDczG shoIiXA0SO061hXkAXtQX4Z5xQfFeyySQjbjuH+uF/e5MUlJgtIQvUnq53+ragU9Txgy QxNMaHxGTEB0Zv6u/0jK3KTivuKpn/l76PNnOvceR/dhLL5ZgvPikaUXqbsZ4Hte7+Ud wgLz+4XIny1L7zmTjMOA/FBsa20d4OUxkGktgut/L5L/QhDzxZMDkxwN8c4I9IPgz8Gs fKCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=7M5NnUZtOBPTtcHK/t25Et46jJA8Y8ZWrIWhlI3kTrM=; b=gbI8FZh6MOtZsjsZwaE5vawLrhhGfB+mo61DhB34OmHMPyoj9mvBzGjSr92DbV7nvd UzJD2P3TfwfxzMSJ0e3Tg+i0XWMZ6uRPEE7L9gc/axkUb8+lJ9NPlNzCFVuJLhdhn0gq xqqK8PrbBec2vmMVqAwoW0CcOwNuOxi4rQ5FO3KZWX5R9mH1iOVdOM2NTHxvkQcysI8x phNi3YTdIULxnu6f8CVj6cA+hKTxqA4vMTD16sa8mV20RFk1Brx0J6UmtO9pfYU3BOf2 LjNRJDb8zjPaIjOACPxdWRWcvfKMtHlmcIIlJvY40oufjIGQ6WfFDCxhOIgUM+xfpaJk uHQg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c5si8075172edk.226.2020.06.08.04.58.52; Mon, 08 Jun 2020 04:59:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729737AbgFHL4d (ORCPT + 99 others); Mon, 8 Jun 2020 07:56:33 -0400 Received: from mx2.suse.de ([195.135.220.15]:51664 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726597AbgFHL4c (ORCPT ); Mon, 8 Jun 2020 07:56:32 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 9CACCAB8F; Mon, 8 Jun 2020 11:56:33 +0000 (UTC) Received: by lion.mk-sys.cz (Postfix, from userid 1000) id EF84260490; Mon, 8 Jun 2020 13:56:28 +0200 (CEST) Date: Mon, 8 Jun 2020 13:56:28 +0200 From: Michal Kubecek To: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org, bpf@vger.kernel.org, Sam Ravnborg , Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , "David S. Miller" , Jakub Kicinski , John Fastabend , KP Singh , Martin KaFai Lau , Song Liu , Yonghong Song , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH 04/16] net: bpfilter: use 'userprogs' syntax to build bpfilter_umh Message-ID: <20200608115628.osizkpo76cgn2ci7@lion.mk-sys.cz> References: <20200423073929.127521-1-masahiroy@kernel.org> <20200423073929.127521-5-masahiroy@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200423073929.127521-5-masahiroy@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 23, 2020 at 04:39:17PM +0900, Masahiro Yamada wrote: > The user mode helper should be compiled for the same architecture as > the kernel. > > This Makefile reuses the 'hostprogs' syntax by overriding HOSTCC with CC. > > Now that Kbuild provides the syntax 'userprogs', use it to fix the > Makefile mess. > > Signed-off-by: Masahiro Yamada > Reported-by: kbuild test robot > --- > > net/bpfilter/Makefile | 11 ++++------- > 1 file changed, 4 insertions(+), 7 deletions(-) > > diff --git a/net/bpfilter/Makefile b/net/bpfilter/Makefile > index 36580301da70..6ee650c6badb 100644 > --- a/net/bpfilter/Makefile > +++ b/net/bpfilter/Makefile > @@ -3,17 +3,14 @@ > # Makefile for the Linux BPFILTER layer. > # > > -hostprogs := bpfilter_umh > +userprogs := bpfilter_umh > bpfilter_umh-objs := main.o > -KBUILD_HOSTCFLAGS += -I $(srctree)/tools/include/ -I $(srctree)/tools/include/uapi > -HOSTCC := $(CC) > +user-ccflags += -I $(srctree)/tools/include/ -I $(srctree)/tools/include/uapi > > -ifeq ($(CONFIG_BPFILTER_UMH), y) > -# builtin bpfilter_umh should be compiled with -static > +# builtin bpfilter_umh should be linked with -static > # since rootfs isn't mounted at the time of __init > # function is called and do_execv won't find elf interpreter > -KBUILD_HOSTLDFLAGS += -static > -endif > +bpfilter_umh-ldflags += -static > > $(obj)/bpfilter_umh_blob.o: $(obj)/bpfilter_umh Hello, I just noticed that this patch (now in mainline as commit 8a2cc0505cc4) drops the test if CONFIG_BPFILTER_UMH is "y" so that -static is now passed to the linker even if bpfilter_umh is built as a module which wasn't the case in v5.7. This is not mentioned in the commit message and the comment still says "*builtin* bpfilter_umh should be linked with -static" so this change doesn't seem to be intentional. Did I miss something? Michal Kubecek