From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64EDFC04AAF for ; Mon, 20 May 2019 09:40:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 39C2120856 for ; Mon, 20 May 2019 09:40:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558345225; bh=KlsviQfKrQui86twPZxBf/IfvPh7qAn/XGim2VH7goY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=KOLWbHkN6aFK2Ek0H+rUg/ACfTG1EMfzGnLCtfGEaW6KkZx7enMsBGH4yhDKj2zxa aGGbCXOWJqb9BtMS8y+9kNJAnGm6ccSaBq87NE5WmhfXTetI43iw0Hg5fxiEHQTXHf 8K0iTQxqEhdrFIEhSSSdE1mzn8LP9USca8mcl+Wk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730880AbfETJkY (ORCPT ); Mon, 20 May 2019 05:40:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:46044 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726126AbfETJkX (ORCPT ); Mon, 20 May 2019 05:40:23 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5FA3920675; Mon, 20 May 2019 09:40:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558345222; bh=KlsviQfKrQui86twPZxBf/IfvPh7qAn/XGim2VH7goY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kRUu+TQsj8X8DYHPnUWAnW9UfPuTekrHZCS+FwPGmiXfiNR6UEgfjm6nJ7tM1/Wte ogYjtWT1+MLAYyC4w6gZW+gKMVQinsQhzVwvbjg3FdQlFNxTPFaEMZW+UQHc6bAPCH qM6nm1h++frHWcQYWEFSQPe7HpSMxEwAYA+wLzmo= Date: Mon, 20 May 2019 11:40:20 +0200 From: Greg KH To: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org, Sam Ravnborg , Arnd Bergmann , Jessica Yu , Lucas De Marchi , Stephen Rothwell , Michael Schmitz , Linus Torvalds , Rusty Russell , Kees Cook , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Michael Ellerman , Lucas De Marchi Subject: Re: [PATCH] kbuild: do not check name uniqueness of builtin modules Message-ID: <20190520094020.GC15326@kroah.com> References: <20190520025437.13825-1-yamada.masahiro@socionext.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190520025437.13825-1-yamada.masahiro@socionext.com> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 20, 2019 at 11:54:37AM +0900, Masahiro Yamada wrote: > I just thought it was a good idea to scan builtin.modules in the name > uniqueness checking, but Stephen reported a false positive. > > ppc64_defconfig produces: > > warning: same basename if the following are built as modules: > arch/powerpc/platforms/powermac/nvram.ko > drivers/char/nvram.ko > > ..., which is a false positive because the former is never built as > a module as you see in arch/powerpc/platforms/powermac/Makefile: > > # CONFIG_NVRAM is an arch. independent tristate symbol, for pmac32 we really > # need this to be a bool. Cheat here and pretend CONFIG_NVRAM=m is really > # CONFIG_NVRAM=y > obj-$(CONFIG_NVRAM:m=y) += nvram.o > > Since we cannot predict how tricky Makefiles are written in wild, > builtin.modules may potentially contain false positives. I do not > think it is a big deal as far as kmod is concerned, but false positive > warnings in the kernel build makes people upset. It is better to not > do it. > > Even without checking builtin.modules, we have enough (and more solid) > test coverage with allmodconfig. > > While I touched this part, I replaced the sed code with neater one > provided by Stephen. > > Link: https://lkml.org/lkml/2019/5/19/120 > Link: https://lkml.org/lkml/2019/5/19/123 > Fixes: 3a48a91901c5 ("kbuild: check uniqueness of module names") > Reported-by: Stephen Rothwell > Signed-off-by: Masahiro Yamada > --- Reviewed-by: Greg Kroah-Hartman