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: 8512331 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9FEA4C0553 for ; Sun, 6 Mar 2016 06:20:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A786220154 for ; Sun, 6 Mar 2016 06:20:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9762D2014A for ; Sun, 6 Mar 2016 06:20:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751193AbcCFGUS (ORCPT ); Sun, 6 Mar 2016 01:20:18 -0500 Received: from mail-qg0-f54.google.com ([209.85.192.54]:35582 "EHLO mail-qg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751132AbcCFGUR (ORCPT ); Sun, 6 Mar 2016 01:20:17 -0500 Received: by mail-qg0-f54.google.com with SMTP id y89so74698338qge.2 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=f7tA+VnYLYMUF/Qjw7+91/x44WQojql9IoVR1oWFzRQjzGdIzNAHJyXIszRwZLfvT/ hhEOe3ILr0kVkPL8tPYXjLV6eKBhySYb5fxiXEOTTWir/kGJ9GR0aTdlW1yvc96N+DyH xVN0PSJ+m3MJK5ttFySMENn3zhO7b96oCKRb3xOBulPS231qgpW9TqXOA6J4HzuDl1ta iKYH3VYyGlejPyy/GEs+OZrqTWsiBkByKFfCFhr0jJIF2HxjzYFx9LO5OB+MNErb2ric Xo9kaCgROH4ftoJpq9FoodatLwc91nO0B4/bGTLqRQaYvN8XKu3X15xfk8akdewxVz+Z IrhA== X-Gm-Message-State: AD7BkJLF9KWCeV5gmEA3IfcwqvLaxc31gkcAP2VITX4L1aVfgNFxtVtFYvc3lEvLokHzIVt0 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-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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) | \