Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3691257ybl; Fri, 20 Dec 2019 13:54:31 -0800 (PST) X-Google-Smtp-Source: APXvYqyNDfLepAyJo/MN8II3+hHBn45ZJL+5C6vW/DSTS9EVGjoCTeWAohDiDprwFVQBU7x82OVA X-Received: by 2002:aca:cc57:: with SMTP id c84mr4899150oig.58.1576878870949; Fri, 20 Dec 2019 13:54:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576878870; cv=none; d=google.com; s=arc-20160816; b=hdZ7uk1l2uSBeQQOGPkiFUawuIRrkmjlQicvFIh3WSSJtAuVqC9QpXrixwdoHn2u5J Fvn7c4Ygqu/NlwjOkQLdHJ7s/COdsABqrl1SXmYxCI5dpy5iGj98fVsWWScpWaYtuHhN lXhKlLyoxUhbGnDIiCCIaCXySCcaNUb6l0z4GmPdBhPrqHPv1nFc9qcgLXoDccXfcIg3 4abE8PNS+qhGinGkCsmuyZlU7SHlH6CDMP8Oq6dNVAF447Bx27dRV0cPBPJ4xv/zqCdm h2jy5ard0TO2RzBUSk+8Zvpdvn4k39muANjZb5uu97+oyWP3XwZDy/aMU/HiitKliN/f vg0A== 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:date:from :dkim-signature; bh=34n9dhKF2BKeM8ejCw1ltZGnOmOAja8Xu9rgOz3lRzQ=; b=TJtrJ382h6WQOsaH0kGurL8xWhjGczJhauCGmC+u3eGxp3JrV9cKlIf/F+WGsI35ck EwQPIkdtBrkh1goCdoo3RzcnV1g8UABJPzG5n1DfxZnhcikm+CRUHx7VaZQH3upy6nOd O44exOvgXdRhPA+DI/IkWDLm4HAJkJLGHCgWP71BkVcc3CJg6dU6FNyom2kXmxN009yV LRS1FOPDYIRevShQQwKiD90c+Q1PI4so/ALV0H7NSOFY5w1vXhVyUvc8KUwfvpKy7d9F FIk4+pI5GWq22fF9dT2RZHFj9q9VHHxeSHc4x712wyKZB95bhmEhJEUvxI3Lh/avwDUG UP9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=m3pxAg9o; 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=QUARANTINE 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 i20si943050oie.119.2019.12.20.13.54.18; Fri, 20 Dec 2019 13:54:30 -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=m3pxAg9o; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727513AbfLTVxd (ORCPT + 99 others); Fri, 20 Dec 2019 16:53:33 -0500 Received: from mail-pj1-f67.google.com ([209.85.216.67]:53245 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727413AbfLTVxc (ORCPT ); Fri, 20 Dec 2019 16:53:32 -0500 Received: by mail-pj1-f67.google.com with SMTP id w23so4684757pjd.2; Fri, 20 Dec 2019 13:53:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=34n9dhKF2BKeM8ejCw1ltZGnOmOAja8Xu9rgOz3lRzQ=; b=m3pxAg9oLLP7uJZGCaLQRp5sKISrC4DFipGhfubjmi+vJW9Xzuwl47IwvxGEg5Fzof atE4v4tfyTOgn2pNktXmURqiyKZMkI4Q7pF5PkCi1vDEBVz8LvQwPzhDmA0i3EYovlpo Q4Oja6z1e27KOO2QSnB0PjjK9OjawQPhZn6oPJ2GJ5G0Lbl0SeoRLVIsM262FUtDvGGs 4dFlwJ2f9UUMvy3SJSz9loVJ/U3y2t9FalitiJhcmjktH9rm1UtycoBkAFWjXO+dlSjP 6cSgt1owzPcMtZPmeDhf49tqljaBq/dVAWipml0p+rWLZzGJXYxCTe4/aM2iIlXKHqbt 0pTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=34n9dhKF2BKeM8ejCw1ltZGnOmOAja8Xu9rgOz3lRzQ=; b=VoVNBlqFEqGPVNzgwR9prMhruIo7pffrW/MgWDX4SjNnrwnwl0q7K1gWZ7eiWCJ4qY WIC7SUCYRf9xivLvOtioDPiBexYYR3yUrCE+PLwj9wRmXk1cTf4l04RSNi5ipDnD53Ks KthVBIGfah+TrPf+dFxDIF0gWvGn+cVtSaon2lCKPi5+3i++yQaWtsBLWDsOu7FlcrYl QE1YQ77gW9QavgHz5knQMwyFP7GKKTqGfX+pI9tFdtfx744vbzkZC0T6YXdIfY96lID1 ZUtoSajVC/d2MqUtpxZ8aotBKfYKuTTbmhmWoINhGnsiqFmq/X8g1M8gEJ+HfyEEPZZc RVDg== X-Gm-Message-State: APjAAAU1+/f8NOH1MI59bvSgkBgQo/4KUSUWDQZ2yynC6MNSs1N2IBOP 65q21eNo/E7u7ePx+of0n0cYVvDp X-Received: by 2002:a17:90b:309:: with SMTP id ay9mr9304060pjb.22.1576878812009; Fri, 20 Dec 2019 13:53:32 -0800 (PST) Received: from quaco.ghostprotocols.net ([179.97.35.50]) by smtp.gmail.com with ESMTPSA id 199sm14941485pfv.81.2019.12.20.13.53.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 13:53:31 -0800 (PST) From: Arnaldo Carvalho de Melo X-Google-Original-From: Arnaldo Carvalho de Melo Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id B6AD940CB9; Fri, 20 Dec 2019 18:53:28 -0300 (-03) Date: Fri, 20 Dec 2019 18:53:28 -0300 To: Andrii Nakryiko Cc: Arnaldo Carvalho de Melo , Namhyung Kim , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , bpf , Jiri Olsa , LKML Subject: Re: [PATCH] libbpf: Fix build on read-only filesystems Message-ID: <20191220215328.GB9076@kernel.org> References: <20191220032558.3259098-1-namhyung@kernel.org> <20191220204748.GA9076@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, Dec 20, 2019 at 01:45:52PM -0800, Andrii Nakryiko escreveu: > On Fri, Dec 20, 2019 at 12:47 PM Arnaldo Carvalho de Melo wrote: > > Em Fri, Dec 20, 2019 at 12:29:36PM -0800, Andrii Nakryiko escreveu: > > > On Thu, Dec 19, 2019 at 7:26 PM Namhyung Kim wrote: > > > > I got the following error when I tried to build perf on a read-only > > > > filesystem with O=dir option. > > > > $ cd /some/where/ro/linux/tools/perf > > > > $ make O=$HOME/build/perf > > > > ... > > > > CC /home/namhyung/build/perf/lib.o > > > > /bin/sh: bpf_helper_defs.h: Read-only file system > > > > make[3]: *** [Makefile:184: bpf_helper_defs.h] Error 1 > > > > make[2]: *** [Makefile.perf:778: /home/namhyung/build/perf/libbpf.a] Error 2 > > > > make[2]: *** Waiting for unfinished jobs.... > > > > LD /home/namhyung/build/perf/libperf-in.o > > > > AR /home/namhyung/build/perf/libperf.a > > > > PERF_VERSION = 5.4.0 > > > > make[1]: *** [Makefile.perf:225: sub-make] Error 2 > > > > make: *** [Makefile:70: all] Error 2 > > > > It was becaused bpf_helper_defs.h was generated in current directory. > > > > Move it to OUTPUT directory. > > > > Signed-off-by: Namhyung Kim > > > > --- > > > Overall nothing is obviously broken, except you need to fix up > > > selftests/bpf's Makefile as well. > > > BTW, this patch doesn't apply cleanly to latest bpf-next, so please rebase. > > > Also subject prefix should look like [PATCH bpf-next] if it's meant to > > > be applied against bpf-next. > > Shouldn't this be applied to the current merge window since a behaviour > > that people relied, i.e. using O= to generate the build in a separate > > directory, since its not possible to use the source dir tree as it is > > read-only is now broken, i.e. isn't this a regression? > Sure, it can be applied against bpf as well, but selftests still need > to be fixed first. I guess this can be done on a separate patch? I.e. if the user doesn't use selftests the only regression it will see is when trying to build tools/perf using O=. I think two patches is best, better granularity, do you see a strict need for both to be in the same patch? - Arnaldo