From patchwork Sun Mar 6 06:20:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 63628 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp861721lbc; Sat, 5 Mar 2016 22:20:25 -0800 (PST) X-Received: by 10.98.70.156 with SMTP id o28mr7442673pfi.124.1457245225349; Sat, 05 Mar 2016 22:20:25 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wk6si3541693pac.91.2016.03.05.22.20.24; Sat, 05 Mar 2016 22:20:25 -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; 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; dkim=pass header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751295AbcCFGUS (ORCPT + 30 others); Sun, 6 Mar 2016 01:20:18 -0500 Received: from mail-qg0-f49.google.com ([209.85.192.49]:36387 "EHLO mail-qg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751151AbcCFGUR (ORCPT ); Sun, 6 Mar 2016 01:20:17 -0500 Received: by mail-qg0-f49.google.com with SMTP id u110so74716427qge.3 for ; Sat, 05 Mar 2016 22:20:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=fqO+o1MJxFDX/SkqLPv9Jd53DSeHrh+TstG7JVmP77E=; b=N+Y0uecmD1fPyd2hqsJ1twvD34yO1tAjNqQsZbMMZsdSPHdQMgN/88p0xggqmtF/8d Up/ZJPA+nxNEwwqA79tSYHjZYt8683drSvso+zILMqBUax0gyw/mTFkPgpGWqIyiL+Gj cRYAQka+P72H9YADShhxsSq0lzlAzZAypTueM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=fqO+o1MJxFDX/SkqLPv9Jd53DSeHrh+TstG7JVmP77E=; b=Afkm2CYFQ4YtaodSBU9l0K3nthVW8cUDLZCkR3+Ix0kLfaock+W5D0WEYgIi2ytWGD l8QolLU83Uq1Xp1Z6RF7ZV/KC9e7h0Fzt92245YbsdURhoUcFql2kH4m1PsFxfbybHlt 73x2X3cNAsLetIIXY41Gf9DOr0Z44hVJHzifYyJ1PH/NQVVXUMM68sFmwb4N5NwlZvLo 0HNyfRvUizajgg3I9mcPi5T+bUHYu9tOFtyG06bypZslnkUxrwjxJzvnpAoybROOp4c1 ChZkfcMbONiEbR1FgV7rgCeILFabQOHmfl8GTGD+3m2mBrpsFrDdrdr+X0hE8D/sHBej /iMw== X-Gm-Message-State: AD7BkJJoKJL04icg67Whdujh3Sk85GXBozIwjOcP+q2Zt1iNOsBjjFnzJw4WgImdEaoWkiOz X-Received: by 10.141.1.87 with SMTP id c84mr21972272qhd.1.1457245216285; Sat, 05 Mar 2016 22:20:16 -0800 (PST) Received: from xanadu.home ([2607:fa48:6e39:d410:feaa:14ff:fea7:ed77]) by smtp.gmail.com with ESMTPSA id 85sm5468034qkw.19.2016.03.05.22.20.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Mar 2016 22:20:14 -0800 (PST) Date: Sun, 6 Mar 2016 13:20:13 +0700 (ICT) From: Nicolas Pitre To: Michal Marek cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 5/8] kbuild: add fine grained build dependencies for exported symbols In-Reply-To: Message-ID: References: <1457070050-1564-1-git-send-email-nicolas.pitre@linaro.org> <1457070050-1564-6-git-send-email-nicolas.pitre@linaro.org> <56DA118E.20106@suse.com> <56DA1201.9010605@suse.cz> <20160305071208.GA25757@pobox.suse.cz> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 5 Mar 2016, Nicolas Pitre wrote: > On Sat, 5 Mar 2016, Michal Marek wrote: > > > I reproduced the SIGBUS after a few iterations, and it crashes in > > parse_dep_file(). I'm now testing this > > > > diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include > > index 0be7e09ba381..4fdd8348acf6 100644 > > --- a/scripts/Kbuild.include > > +++ b/scripts/Kbuild.include > > @@ -270,10 +270,12 @@ else > > > > # Filter out exported kernel symbol names from the preprocessor output. > > # See also __KSYM_DEPS__ in include/linux/export.h. > > +# We disable the depfile generation here, so as not to overwrite the existing > > +# depfile while fixdep is parsing it > > ksym_dep_filter = \ > > case "$(1)" in \ > > - cc_*_c) $(CPP) $(c_flags) -D__KSYM_DEPS__ $< ;; \ > > - as_*_S) $(CPP) $(a_flags) -D__KSYM_DEPS__ $< ;; \ > > + cc_*_c) $(CPP) $(filter-out -Wp$(comma)-M%, $(c_flags)) -D__KSYM_DEPS__ $< ;; \ > > + as_*_S) $(CPP) $(filter-out -Wp$(comma)-M%, $(a_flags)) -D__KSYM_DEPS__ $< ;; \ > > cpp_lds_S) : ;; \ > > *) echo "Don't know how to preprocess $(1)"; false ;; \ > > esac | sed -rn 's/^.*=== __KSYM_(.*) ===.*$$/KSYM_\1/p' > > This makes perfect sense even if I can't reproduce on my side. I folded the following patch into my tree and pushed it out. Nicolas diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 0be7e09ba3..2c14a27e39 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -270,14 +270,17 @@ else # Filter out exported kernel symbol names from the preprocessor output. # See also __KSYM_DEPS__ in include/linux/export.h. +# We disable the depfile generation here, so as not to overwrite the existing +# depfile while fixdep is parsing it +flags_nodeps = $(filter-out -Wp$(comma)-M%, $($(1))) ksym_dep_filter = \ case "$(1)" in \ - cc_*_c) $(CPP) $(c_flags) -D__KSYM_DEPS__ $< ;; \ - as_*_S) $(CPP) $(a_flags) -D__KSYM_DEPS__ $< ;; \ + cc_*_c) $(CPP) $(call flags_nodeps,c_flags) -D__KSYM_DEPS__ $< ;; \ + as_*_S) $(CPP) $(call flags_nodeps,a_flags) -D__KSYM_DEPS__ $< ;; \ cpp_lds_S) : ;; \ - *) echo "Don't know how to preprocess $(1)"; false ;; \ + *) echo "Don't know how to preprocess $(1)" >&2; false ;; \ esac | sed -rn 's/^.*=== __KSYM_(.*) ===.*$$/KSYM_\1/p' - + cmd_and_fixdep = \ $(echo-cmd) $(cmd_$(1)); \ $(ksym_dep_filter) | \