Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6376273yba; Thu, 11 Apr 2019 18:56:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzgyIdZHqSaBGySWvdiwkCvQMXAyIDGtfOx+UhCVIHbGBXpJh+x5Y4eJfMFnmQiXndPNozV X-Received: by 2002:a17:902:2862:: with SMTP id e89mr35340387plb.203.1555034167323; Thu, 11 Apr 2019 18:56:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555034167; cv=none; d=google.com; s=arc-20160816; b=IOj9xQKwYokntknzOyTNUHU2l4YIc3hxH9Wy+5wdpfAYEeYNcdQOzxNOkxqb6JoFRd suVZxPT0j5H+qzCZ2KIGwhDTEPsY1bBr6gVA2C8uHdNpyLN5uglKIsUpZn9Wn7VX4evz QI90UqLyqUj/JNm+TrKyNuaqhcXsbmQzNNQcbOKSrPQB7fh4h2voy4M4PzxQfDhBrYSk 4MrN14GMuKT9/MjjkNzy+RSfWmMc688S0FwZWpJFZG9MKvXrfpyp9Y2GuX9Eg440csKU ArduRW6dHcDeeDb/G24rNYBqyGhdIsGc5lSPQwECfg6TOl/Gxr7oa+d8G3vd/PropSR5 bjkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature:dkim-filter; bh=YW//+yHX89A+r7yyY4s1ei3ztZPoCqp2cO7RWcnpiRM=; b=EF8ON4rzYhDm+Oq9W/E9vcsX/11jmHqzIuk0yBL8E6yKS1GTrtEM8zpRV4qiA2f7n+ XFTQEZBJ+dLTI+rzSQRwwMUJiH0mcZPqzkA9qxcOoA78S75TPw5pdoOV9G5VjhkFVaRQ m6oCSrYxU+ee1ffeAX1WM4088pLZ6/4WzOHfSsaN+Z/k/DS/cLXHNDc6QXgNV2PWWfcH s39cwye9w1nAhPCSB3J3QYE94PM/QinFRGd+GN+UFm8wBhsYGR6Yi5FncUJdXIPRZkry X+QVexy3oa5S0msXmaT2595rt8RpMSNKvc8vTA8OwRJ3awqftz3AmjaDG4m3y3M3PSE7 vffg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=y1RxwfWA; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q13si35832141pff.3.2019.04.11.18.55.51; Thu, 11 Apr 2019 18:56:07 -0700 (PDT) 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=@nifty.com header.s=dec2015msa header.b=y1RxwfWA; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727002AbfDLBxJ (ORCPT + 99 others); Thu, 11 Apr 2019 21:53:09 -0400 Received: from conssluserg-04.nifty.com ([210.131.2.83]:34269 "EHLO conssluserg-04.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726678AbfDLBxI (ORCPT ); Thu, 11 Apr 2019 21:53:08 -0400 Received: from mail-ua1-f54.google.com (mail-ua1-f54.google.com [209.85.222.54]) (authenticated) by conssluserg-04.nifty.com with ESMTP id x3C1qvgj006549; Fri, 12 Apr 2019 10:52:58 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com x3C1qvgj006549 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1555033979; bh=YW//+yHX89A+r7yyY4s1ei3ztZPoCqp2cO7RWcnpiRM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=y1RxwfWA6I3PwD6Ik3F1fZKyk93rnmW4/YKL/bGNeqDrk6WQl+nEy8/H1TriWXYNX l//GHoNWn8DkFsBWgTOtXsnhzld5UaAe0tXUWcfj9qvnXXWQeV8IYTALkLCOyskvAY RgZSvh7gP1rH2h4UmieKWC5noUKOX/psHJ5dhk7oOF2C7JZIv6YcLbJeCHt4X6VRUg //voQSYp7+TRtY1Ic4h/er9lvxdv+Lgccv5ywfjhdPDytMxDr+otG01eRrl+Lwf2sb Z/PsQhSz87pj+zbJLp/DxnXoD+7pEAd7nyUYUjBjkyBmhPtFBuMi0milSK/jg9kAYk KPyLhU3hc5D6Q== X-Nifty-SrcIP: [209.85.222.54] Received: by mail-ua1-f54.google.com with SMTP id l17so2726226uar.4; Thu, 11 Apr 2019 18:52:58 -0700 (PDT) X-Gm-Message-State: APjAAAUTpizHrFykiiymWfY8uDt3VETF2SR60nDF77EpW+qox8HEDcRf VZtUsULfTXfKeRdYHjHdTF774nx7mSkMoi/mFvM= X-Received: by 2002:ab0:348a:: with SMTP id c10mr23454449uar.79.1555033977268; Thu, 11 Apr 2019 18:52:57 -0700 (PDT) MIME-Version: 1.0 References: <77e11884-f520-d983-3d33-ccc3043ba604@nokia.com> In-Reply-To: From: Masahiro Yamada Date: Fri, 12 Apr 2019 10:52:20 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] modpost: make KBUILD_MODPOST_WARN also configurable for external modules To: Jonas Gorski Cc: "Wiebe, Wladislav (Nokia - DE/Ulm)" , "michal.lkml@markovi.net" , "linux-kbuild@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 9, 2019 at 7:31 PM Jonas Gorski wrote: > > Hi, > > =E6=9C=AC=E5=BD=93=E3=81=AB=E7=94=B3=E3=81=97=E8=A8=B3=E3=81=82=E3=82=8A= =E3=81=BE=E3=81=9B=E3=82=93, I got sidetracked and completely forgot about = it. I > actually still have my old tree with the suggested changes for v2. > > On Tue, 9 Apr 2019 at 11:01, Masahiro Yamada > wrote: > > > > Hi. > > > > On Mon, Apr 8, 2019 at 5:03 PM Wiebe, Wladislav (Nokia - DE/Ulm) > > wrote: > > > > > > Hi! > > > > > > On 07.04.2019 11:04, Masahiro Yamada wrote: > > > > (+CC Jonas Gorski) > > > > > > > > > > > > On Tue, Mar 26, 2019 at 6:58 PM Wiebe, Wladislav (Nokia - DE/Ulm) > > > > wrote: > > > >> > > > >> Commit ea837f1c0503 ("kbuild: make modpost processing configurable= ") > > > >> was intended to give KBUILD_MODPOST_WARN flexibility to be configu= rable. > > > >> Right now KBUILD_MODPOST_WARN gets just ignored when KBUILD_EXTMOD= is > > > >> set which happens per default when building modules out of the tre= e. > > > >> > > > >> This change gives the opportunity to define module build behaving = also > > > >> in case of out of tree builds and default will become exit on erro= r. > > > >> Errors which can be detected by the build should be trapped out of= the box > > > >> there, unless somebody wants to notice broken stuff later at runti= me. > > > > > > > > If an external module refers to a symbol > > > > provided by another external module, > > > > this patch will turn the warning into the error by default, > > > > which is probably a bad idea. > > > > > > Indeed, exactly this should happen. You should fix your external modu= le > > > dependencies by providing their symbols. Please use e.g. > > > KBUILD_EXTRA_SYMBOLS instead of converting errors to warning and hopi= ng > > > that things will work. > > > > I know this option. > > What I want to say is, this patch changes the behavior, and > > may annoy some people. > > > > > Or how do you want to make sure module A still > > > delivers all symbols needed by module B after an update/changes? > > > Manually comparing the logs after an update or waiting until it turns > > > out broken during run-time? I wouldn't say this is a good idea :-) > > > > OK, so the commit log should record both the behavior change > > and workarounds. > > > > - If an external module being built refers to symbols > > in another external module, Kbuild previously showed a warning, > > but going forward it will turn it into an error. > > > > - To work around this, you should pass a symbol table via KBUILD_EXTRA_= SYMBOLS, > > or KBUILD_EXTRA_SYMBOLS=3D1 to turn the error into a warning. > > This sounds like a good middle ground. When you do the effort of > setting KBUILD_EXTRA_SYMBOLS, you are likely interested in proper > dependency resolution and being notified if it fails. > > I would probably still use KBUILD_MODPOST_WARN=3D0 to force the warnings > as errors, to have it as the central switch for the behaviour. So the > behaviour would then become > > - If KBUILD_MODPOST_WARN is set to any value, set -w accordingly > - else, set -w only when building for an external module and > KBUILD_EXTRA_SYMBOLS is empty > > or > > ifdef KBUILD_MODPOST_WARN > KBUILD_MODPOST_WARN:=3D$(filter-out 0,$(KBUILD_MODPOST_WARN)) > else > KBUILD_MODPOST_WARN:=3D$(if $(KBUILD_EXTMOD),$(if $(KBUILD_EXTRA_SYMB= OLS),,1)) > endif Sorry, I think this is too complicated. I applied this since it is simple. https://patchwork.kernel.org/patch/10895465/ --=20 Best Regards Masahiro Yamada