Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1504073yba; Thu, 16 May 2019 23:44:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqydqo1M2VxsgMxkIW9VV5ZOOKGq0c1mWJByybCGdVacHykXS8niJ4nzhAt4611LCrpqKvyK X-Received: by 2002:a17:902:650f:: with SMTP id b15mr31482272plk.11.1558075487159; Thu, 16 May 2019 23:44:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558075487; cv=none; d=google.com; s=arc-20160816; b=gI46MK33sq2MQmLb928EW77Z8UodIDgaA4VFHKb4Y4xpuo09hOJQKN5xzQJybLBrcJ AlDD8CAd6ekU4XbA3/S/FePqkxryAJtiLQ32b1qHMQGBnNVOKlcV/eoVMlzl9VQ/NBQU Sgr5BbT+jdFl2S0qgfLloFzZduiJv9l/naAwwDk5cGavWPUSlGBOEt2iozF9YqArf3EJ +ceXsovyaIf/aDCSiPJJs/2LjQMJsM2rBWpu0uKaacr0TIazy8mqKp5y4uDXZv1eZvdy rRW79ec55NJjrx9DR4xFhzDLl9i3K9J1ca41sDfjL2PivpjIpeXPqadg4V9MtePM1UCX H0TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=JKEJvXpeBk3MD6/NbaklV9ss6sbpPWITZRkGgUcUfZw=; b=Fl5aM8cw5UfJVvEYnowVbhW40kK1PVgh95L+h2/2QZwdjR7+15EJscaHum72CQGHz4 MWlFjARfGnWq8b9hsIjphJXYQvJ62tyvpv0vK+qcRR1fk/ajYphIKNl7/XHbX/qtA2xk 0RN7Mq96KLbnohkfZ2QV5Uq9nKsQ2F9Mc18rMcIoyqtt/75X/lXRuB6eFWbG8kKfVf36 reUPXp+vTTAAFxm1+/4zfMogqBRe+5oQsURHiI/0ypWSiJA5jdFxbZo38hrZOt0r9LTb oxLL0X/UmcHOkpyR1ItJO7OWtetGVZ4LBg4e5XB0aeOpbxWeMB0ECum4ZKhNdbnp5v0M Y5Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Q4c09mtG; 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 v11si7386289pgi.568.2019.05.16.23.44.29; Thu, 16 May 2019 23:44:47 -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=@kernel.org header.s=default header.b=Q4c09mtG; 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 S1727972AbfEQFhC (ORCPT + 99 others); Fri, 17 May 2019 01:37:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:48564 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726772AbfEQFhC (ORCPT ); Fri, 17 May 2019 01:37:02 -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 ACC6120848; Fri, 17 May 2019 05:37:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558071421; bh=saVFeWx4qKBQbevY5CRLfQRXJKjxHWRxrtd/hzjO1D4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Q4c09mtGJTXYnEaFeIDfgP9dA0KKnSrinBudtGnmwB/svoRQsge75boD6bBrIm5ln pgmKM80pkHOLEgbkdyKyUPl80E503sSa4X7yv8JgWN8Bhqpo7RjA96uhq7R1hFG4Cz mPRsyVhA1brGcO2vZm/a8DFMSHfKPrbeRUceJ29g= Date: Fri, 17 May 2019 07:36:58 +0200 From: Greg KH To: Masahiro Yamada Cc: Linux Kbuild mailing list , Sam Ravnborg , Arnd Bergmann , Jessica Yu , Lucas De Marchi , Stephen Rothwell , Michael Schmitz , Linus Torvalds , Rusty Russell , Kees Cook , Michal Marek , Linux Kernel Mailing List Subject: Re: [PATCH v2] kbuild: check uniqueness of module names Message-ID: <20190517053658.GA3464@kroah.com> References: <20190517042753.25857-1-yamada.masahiro@socionext.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Fri, May 17, 2019 at 01:45:11PM +0900, Masahiro Yamada wrote: > On Fri, May 17, 2019 at 1:29 PM Masahiro Yamada > wrote: > > > > In the recent build test of linux-next, Stephen saw a build error > > caused by a broken .tmp_versions/*.mod file: > > > > https://lkml.org/lkml/2019/5/13/991 > > > > drivers/net/phy/asix.ko and drivers/net/usb/asix.ko have the same > > basename, and there is a race in generating .tmp_versions/asix.mod > > > > Kbuild has not checked this before, and it suddenly shows up with > > obscure error message when this kind of race occurs. > > > > Non-unique module names cause various sort of problems, but it is > > not trivial to catch them by eyes. > > > > Hence, this script. > > > > It checks not only real modules, but also built-in modules (i.e. > > controlled by tristate CONFIG option, but currently compiled with =y). > > Non-unique names for built-in modules also cause problems because > > /sys/modules/ would fall over. > > > > I tested allmodconfig on the latest kernel, and it detected the > > following: > > > > warning: same basename if the following are built as modules: > > drivers/regulator/88pm800.ko > > drivers/mfd/88pm800.ko > > warning: same basename if the following are built as modules: > > drivers/gpu/drm/bridge/adv7511/adv7511.ko > > drivers/media/i2c/adv7511.ko > > warning: same basename if the following are built as modules: > > drivers/net/phy/asix.ko > > drivers/net/usb/asix.ko > > warning: same basename if the following are built as modules: > > fs/coda/coda.ko > > drivers/media/platform/coda/coda.ko > > warning: same basename if the following are built as modules: > > drivers/net/phy/realtek.ko > > drivers/net/dsa/realtek.ko > > > > Reported-by: Stephen Rothwell > > Signed-off-by: Masahiro Yamada > > Reviewed-by: Kees Cook > > --- > > > One more question popped up. > > External modules are out of scope of the community, > but it is possible that people create an external module > that happens to have the same name as an upstream driver. That is their bug, nothing we can do about that :) thanks, greg k-h