Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp7469407ybp; Wed, 16 Oct 2019 09:06:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqyRHyC8hMmWKfgM9le6eIx8C3F514NHKrwY/7prdVDRnBzFBgpMAOP509I2vczAnpSPoUNf X-Received: by 2002:a17:906:6a4f:: with SMTP id n15mr40723708ejs.19.1571242010507; Wed, 16 Oct 2019 09:06:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571242010; cv=none; d=google.com; s=arc-20160816; b=vozaogXhsSdeIhKA2VBFtKP83j5w+BomicCIQD687P21T5SenstUYHnGY9fGaFaeg4 L2yYugcUeEM4o/9wTrG9Gb+Gmw02v/N1SYbxXeKWW1njqekAK7VwyE7KsyWUFQa8Aihz 1Qe1W1AwFPKBHinEAmtzLqxjsdZW/mO5lTcnEBRO1j35CtJBZBlLBlQ+rlgIUSXbunN8 0oDnpNpuSgGnJpZLbtT0YweYaKEsHJGq11VGDlNtZRvzLrPW5HEkdkXqBUWFD+35B399 8FUH5NtTInugbwPKGPEOZN4e/oi1EiAQXscfPkahgiEuoSBnEjMhwzi9aryNfgwXGKBY qD9g== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=CMdNj2+acb0B7tDCqXrl91GW8f8XDBPBKRIxHWWs42c=; b=pfzEaBZWMzZpddNucYJ25tBwrvBJGfF+qDqiuLip62b4LbyFbNprYVNsV5D6ePalTb KBFfOM/Qq9aROnkTd9yVh6cydR0kWvagAUziFbDp0GsKAw9/9bDOsINS134xB0OnPxXi chBPLdp6h1fGogXA6yoxfUDFRlbdF6vdej34D0uF8n/Yy28OABnBx8mZf2NM7hvb7NKV YnjRlY7mpizTGTbJVyJboFUXqETbnzQwSM03hUrn3/bdm5pn7Z+4fJGDohaiQXZeAINu qq9kPits+AnBx/7nfNDzgHMnnuxAqYtQW3v6TbJamFtshxK0NWT6J6OWmB1EgbNAbzOX 9b9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="LuQBx/8t"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d17si14968752edv.76.2019.10.16.09.06.27; Wed, 16 Oct 2019 09:06:50 -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=@google.com header.s=20161025 header.b="LuQBx/8t"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391901AbfJPNhP (ORCPT + 99 others); Wed, 16 Oct 2019 09:37:15 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:34075 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733031AbfJPNhO (ORCPT ); Wed, 16 Oct 2019 09:37:14 -0400 Received: by mail-wr1-f67.google.com with SMTP id j11so28126611wrp.1 for ; Wed, 16 Oct 2019 06:37:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=CMdNj2+acb0B7tDCqXrl91GW8f8XDBPBKRIxHWWs42c=; b=LuQBx/8tJ64k2Fp4YEOOrFwjVU627ODDbybjUhS2ifRD0J9i+tD7rY7Win7VAqzbsg saC06fZc5v0/q2MizPah9BJ5KOM2ncpNw3gtWNTuqIcAa3KMlPmywDBx0jKw9SztWdBx kxKctzZdDalr7X9Kl9XtTTYu6RniliFk4YJcZlygcylMg+WNakhRSQsj38nUyGvYIggr 3rDCPZh2JAsyF2G7ufRa5ZlG7k46Td/fUWRp46ey9aoiNv+UT3gxK1Rj77PvFvPMEajn wvAMjUW6D0mvWBCcCCkkMLD5UJbi5l7rIEa63QizI0X6jmgyxlDEUHNgVu6E38YBBHVD x+OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=CMdNj2+acb0B7tDCqXrl91GW8f8XDBPBKRIxHWWs42c=; b=f53XQUEUzZOVam5n7POgD2+AwLL2KedpnML4E3Spws3BI/ad4MsWWVAeugqNkn9ub+ HV7Mgw0mStbvP3uB8lBufkChnroCnB8dwhneV6sOvcNBKg8BRidsdrhXjF1kDBLjgFFX Kt/VCLXFD0vuaLcvdYy3FAWVvuHx+jGRR4tChpgXfvBu95EdP5xjedGyhyUI4kt/S1rI nsB9eq6uaCKhE/M3VV2jvbxPsVsCNtd4Cu0Bf+IinTxVX4fFDTrUO7Bv3v96dDivuScu dNPpmfzBAPgiqrbB6tJIYN85lkXYeSb6i1Y4dW9Y0MDJOmRgahsQpvcGUKlgMkBdSRfG UbxA== X-Gm-Message-State: APjAAAVw9Dj6lK6bSTRnjAkq/fvTBq+S5PlNJqLvjrswbqt7qdeNNG+8 Z2R8kf53u30hgPXkFODK6XyJxA== X-Received: by 2002:a5d:49c9:: with SMTP id t9mr1670541wrs.146.1571233031987; Wed, 16 Oct 2019 06:37:11 -0700 (PDT) Received: from google.com ([2a00:79e0:d:210:e8f7:125b:61e9:733d]) by smtp.gmail.com with ESMTPSA id 207sm3212108wme.17.2019.10.16.06.37.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2019 06:37:11 -0700 (PDT) Date: Wed, 16 Oct 2019 14:37:10 +0100 From: Matthias Maennich To: Luis Chamberlain Cc: Heiner Kallweit , Jessica Yu , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Andrew Lunn , Florian Fainelli Subject: Re: Module loading problem since 5.3 Message-ID: <20191016133710.GB35139@google.com> References: <20191014085235.GW16384@42.do-not-panic.com> <20191014144440.GG35313@google.com> <20191016125030.GH16384@42.do-not-panic.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191016125030.GH16384@42.do-not-panic.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 16, 2019 at 12:50:30PM +0000, Luis Chamberlain wrote: >On Mon, Oct 14, 2019 at 03:44:40PM +0100, Matthias Maennich wrote: >> Hi Luis! >> >> On Mon, Oct 14, 2019 at 08:52:35AM +0000, Luis Chamberlain wrote: >> > On Fri, Oct 11, 2019 at 09:26:05PM +0200, Heiner Kallweit wrote: >> > > On 10.10.2019 19:15, Luis Chamberlain wrote: >> > > > >> > > > >> > > > On Thu, Oct 10, 2019, 6:50 PM Heiner Kallweit > wrote: >> > > > >> > > >    MODULE_SOFTDEP("pre: realtek") >> > > > >> > > > Are you aware of any current issues with module loading >> > > > that could cause this problem? >> > > > >> > > > >> > > > Nope. But then again I was not aware of MODULE_SOFTDEP(). I'd encourage an extension to lib/kmod.c or something similar which stress tests this. One way that comes to mind to test this is to allow a new tests case which loads two drives which co depend on each other using this macro. That'll surely blow things up fast. That is, the current kmod tests uses request_module() or get_fs_type(), you'd want a new test case with this added using then two new dummy test drivers with the macro dependency. >> > > > >> > > > If you want to resolve this using a more tested path, you could have request_module() be used as that is currently tested. Perhaps a test patch for that can rule out if it's the macro magic which is the issue. >> > > > >> > > >   Luis >> > > >> > > Maybe issue is related to a bug in introduction of symbol namespaces, see here: >> > > https://lkml.org/lkml/2019/10/11/659 >> > >> > Can you have your user with issues either revert 8651ec01daed or apply the fixes >> > mentioned by Matthias to see if that was the issue? >> > >> > Matthias what module did you run into which let you run into the issue >> > with depmod? I ask as I think it would be wise for us to add a test case >> > using lib/test_kmod.c and tools/testing/selftests/kmod/kmod.sh for the >> > regression you detected. >> >> The depmod warning can be reproduced when using a symbol that is built >> into vmlinux and used from a module. E.g. with CONFIG_USB_STORAGE=y and >> CONFIG_USB_UAS=m, the symbol `usb_stor_adjust_quirks` is built in with >> namespace USB_STORAGE and depmod stumbles upon this emitting the >> following warning (e.g. during make modules_install). >> >> depmod: WARNING: [...]/uas.ko needs unknown symbol usb_stor_adjust_quirks >> >> As there is another (less intrusive) way of implementing the namespace >> feature, I posted a patch series [1] on last Thursday that should >> mitigate the issue as the ksymtab entries depmod eventually relies on >> are no longer carrying the namespace in their names. >> >> Cheers, >> Matthias >> >> [1] https://lore.kernel.org/lkml/20191010151443.7399-1-maennich@google.com/ > >Yes but kmalloc() is built-in, and used by *all* drivers compiled as >modules, so why was that an issue? I believe you meant, "why was that *not* an issue?". In ksymtab, namespaced symbols had the format __ksymtab_. while symbols without namespace would still use the old format __ksymtab_ These are also the names that are extracted into System.map (using scripts/mksysmap). Depmod is reading the System.map and for symbols used by modules that are in a namespace, it would not find a match as it does not understand the namespace notation. Depmod would still not emit a warning for symbols without namespace as their format did not change. Cheers, Matthias > > Luis