Received: by 10.223.176.46 with SMTP id f43csp101448wra; Thu, 25 Jan 2018 18:17:19 -0800 (PST) X-Google-Smtp-Source: AH8x224QSjJuk1IqHEZkdXYvlHLEMzcHG5U5uluGgr2fOPGcPsHUXZYGEjcHLIUKJ9XSN9uFoIcx X-Received: by 2002:a17:902:6a81:: with SMTP id n1-v6mr13231704plk.11.1516933039079; Thu, 25 Jan 2018 18:17:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516933039; cv=none; d=google.com; s=arc-20160816; b=t634hzuwhckFZWSuc9Q+YDRvtwRzoqGNh6pxhSTymwOwCebu5Lmk5yeChCmr0qQcr1 oosVclRuKUmT/rcJQVig7hPCuXoaIiVHZrRMkNMR0hP6J+NX41jwxRH7Kiheb8SqNNmD MGJ8QQ1e4nrku0yM9sHvC3K14gZh6ip+T63Ayq4oxfao8YIbrgNX+FAvedeoEQHHACXU TfNODgx1IoSuaKQRznI3FL9tOgBv6MDuDc5dUeYy/rxryMHCFXWgfVTlIqoaLgWj2Vg2 3OvcfUhuZsqwuW3AEbsf9Dq8IhLjXxv0/tlrJ/uz3iPYaKMz5o4X0GuotCug8juofT22 K90A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=UdmphXC43L52Qet8TzbGaW/h9QqvtD8oEodSs6OFk3w=; b=NJ//STSYosYS55KUvFSx3RyersaJabj9YI7lEUZnlcLD3lssEGHPsua4EqMsFRofWD GaXccBhsQh96mR91SX3NFlxlhRcEI44/4E/ws+QE5nmv2Tw2nz0fgOTOzGhZsJaNtFQ3 Cvnjj5ZA9fAFsyAUjsvss7krDyRLNjPsZZ3CDLXOvFcI5k3lTrdHdQoi6nGtmeVHfKur giy3Q459v/uMsfFZa/78PaC14PF5n+VH75EnEKVZ/tUtB4HCAGGHU4XitNKfmbkEi0+U bX0Lrfze0Br6k9/mMny1PMWYXPH1vDPsEozv4pYY0yd4QGC6Uiq3rzBeJyDDnFqGMGyx 3/sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ssp8857Q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w22-v6si1782038pll.424.2018.01.25.18.17.04; Thu, 25 Jan 2018 18:17:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ssp8857Q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751552AbeAZCQm (ORCPT + 99 others); Thu, 25 Jan 2018 21:16:42 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:45066 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751426AbeAZCQk (ORCPT ); Thu, 25 Jan 2018 21:16:40 -0500 Received: by mail-pg0-f67.google.com with SMTP id m136so6301835pga.12; Thu, 25 Jan 2018 18:16:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=UdmphXC43L52Qet8TzbGaW/h9QqvtD8oEodSs6OFk3w=; b=ssp8857QbKxIWy2P1vDEgdkD4rjah71XD5uHkLCXs0ksfdKJA4IahKu5C/pGJQwdij 9oZaRvGr5db9ZtOzK3jXSrsDhG0iVfQCbzvK1AFcbxV9o5fwi5ZPjahzSfzzlJaLi4Pk V/nqh6nbohmw06HdQHu7MMjyr6IuvPdYJpcqXEuYTxvuZevOMA9iZ33W5mXnWEeVHW4C 5dLhW06Pw9JCM+H4ksk9FIq+EqUsJAL5TTpiPaMpZ/rUAwefzFeLOatMxQ7880pX2UUK SjC2Prnm02Ss+MPkDzytXeCJn9IL5wwMUrE2kM+Ul2ggSS2xzmifQAhZMRW0Bav33T9P MHPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=UdmphXC43L52Qet8TzbGaW/h9QqvtD8oEodSs6OFk3w=; b=a8wk/V8Cm3yrAl94abqTGvTic2Lc8Mn5amc/xSVBO887DVZ7RnguzZlZIh8F0AkxNQ w7l/OjnKtvLBYHhwchug7HfKB6E3MzmLEJOsTAiplVxWyjIyy3ZBF2Z/gyOpDdmULAow 72+9LyF2rilAwYIFHdTpYrdZ60hfsppk3jCzmoXqpbz9SK6LOOpQ5pYtRt0nqPyGRv/s 94f+1ZeVDCrjMCvC6fguzFyGmVkMSRkYCkWEz5nVIi7sOzsGMf9+mMtQJ5lOl7pHnDUO j9Wz0BfoFt8qHbV01xRxys3Cyq28q/iHThor4P+x508idt6MtJpivXv2sEL0R6q+MSXl Jl2A== X-Gm-Message-State: AKwxytcckwuneCr6F4vudlexKGThyCnMrMIEMWOVtqsNdySlWYpdvJU2 14JtY/LlMOj2cDJ4jMQnuR0= X-Received: by 10.98.66.152 with SMTP id h24mr17689104pfd.13.1516932999898; Thu, 25 Jan 2018 18:16:39 -0800 (PST) Received: from ast-mbp ([2620:10d:c090:180::acb7]) by smtp.gmail.com with ESMTPSA id 65sm17816909pfm.152.2018.01.25.18.16.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jan 2018 18:16:39 -0800 (PST) Date: Thu, 25 Jan 2018 18:16:37 -0800 From: Alexei Starovoitov To: =?iso-8859-1?Q?Micka=EBl_Sala=FCn?= Cc: linux-kernel@vger.kernel.org, Alexei Starovoitov , Daniel Borkmann , "David S . Miller" , netdev@vger.kernel.org Subject: Re: [PATCH net-next v1] samples/bpf: Partially fixes the bpf.o build Message-ID: <20180126021636.ghu7p7ds7yvkqato@ast-mbp> References: <20180126003930.10573-1-mic@digikod.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180126003930.10573-1-mic@digikod.net> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 26, 2018 at 01:39:30AM +0100, Micka?l Sala?n wrote: > Do not build lib/bpf/bpf.o with this Makefile but use the one from the > library directory. This avoid making a buggy bpf.o file (e.g. missing > symbols). could you provide an example? What symbols will be missing? I don't think there is an issue with existing Makefile. > This patch is useful if some code (e.g. Landlock tests) needs both the > bpf.o (from tools/lib/bpf) and the bpf_load.o (from samples/bpf). is that some future patches? we're trying to move everything form samples/bpf/ into selftests/bpf/ and convert to use libbpf.a instead of obsolete bpf_load.c Please use this approach for landlock as well. > Signed-off-by: Micka?l Sala?n > Cc: Alexei Starovoitov > Cc: Daniel Borkmann > --- > > This is not a complet fix because the call to multi_depend with > $(host-cmulti) from scripts/Makefile.host force the build of bpf.o > anyway. I'm not sure how to completely avoid this automatic build > though. > --- > samples/bpf/Makefile | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile > index 7f61a3d57fa7..64335bb94f9f 100644 > --- a/samples/bpf/Makefile > +++ b/samples/bpf/Makefile > @@ -201,13 +201,16 @@ CLANG_ARCH_ARGS = -target $(ARCH) > endif > > # Trick to allow make to be run from this directory > -all: > +all: $(LIBBPF) > $(MAKE) -C ../../ $(CURDIR)/ > > clean: > $(MAKE) -C ../../ M=$(CURDIR) clean > @rm -f *~ > > +$(LIBBPF): FORCE > + $(MAKE) -C $(dir $@) $(notdir $@) > + > $(obj)/syscall_nrs.s: $(src)/syscall_nrs.c > $(call if_changed_dep,cc_s_c) > > -- > 2.15.1 >