Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp3170936ybh; Mon, 16 Mar 2020 17:29:31 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuQwi0vHDSqjE7fwGHSCeWB44QIc6nqjKt/J7lceTjrv7u90Yoexfw6z3KoM02quTMm8RPl X-Received: by 2002:a9d:23e4:: with SMTP id t91mr1530961otb.125.1584404971184; Mon, 16 Mar 2020 17:29:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584404971; cv=none; d=google.com; s=arc-20160816; b=YHvDNF76LT8s9ObCr2PE+Olr7+HkhBdDan56BF9INi/aB/MIXc7rYqAyFamFLHkoXo Nb6dA2bdJGQWfjd+8f6scpxS6RImPopeHI4OAkTKLcWhLAn0lmOiQrgu7lSmaiJk1zYG jT/6ZUypwaecsOcH8NWNdC09hiaezhU4rVS4AsDHi4/VUCKK3VwqPLoWjjC1kc4QGLKy l7tDPi70VlPEyDt7zh+zNlheWOqFd6/+xfsN4OsWCsRc27AgDYmWzcQOsQJjOQrLoEqm SDgGjxKFYOvO9pkRx90FlDMV3GC+SKucCOlvGs1assELE2U/ntVwF4twbDq6muSzd6Zd mQ2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature:dkim-filter; bh=lYmS7nvHUEJukM5osVioG3Y1rBqHPxYugmPf5H/y+jw=; b=L1nCgIthBEv5N5XsCf2eAwoiahudUTujwtZXwFvy6lxhEwGik9gvJIFtSmkcSuyjfB 9F/E4Ec6vXrKm72Ry/nVU1lv6mDgl1qMbu1RGwQ7RwiQ6mAe9HS2tWSLpxJMzLfRXPWx 9mZ+aLt+4p9f9j+nw31q+TrLwhvmpHCTC7RHvvvgZMU3VACTOYhjiyZNd9tayT6iL3id pu6e/zeK+YKpj2oYaCssXiF2UmqwpItiUzWGsqepybkKtPhhiG42+KzDuZBYky4aJ5Uc waMeswraSXwVHayYJZoCpFGMsQUV0+l+7czVCf/HXn5N3zaOO3gC3LVz5IMj6REodJHg VrnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=KRfyZlQ4; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o18si794089otk.80.2020.03.16.17.29.19; Mon, 16 Mar 2020 17:29:31 -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=KRfyZlQ4; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733132AbgCQAY6 (ORCPT + 99 others); Mon, 16 Mar 2020 20:24:58 -0400 Received: from conssluserg-05.nifty.com ([210.131.2.90]:48711 "EHLO conssluserg-05.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733127AbgCQAY6 (ORCPT ); Mon, 16 Mar 2020 20:24:58 -0400 Received: from mail-vs1-f46.google.com (mail-vs1-f46.google.com [209.85.217.46]) (authenticated) by conssluserg-05.nifty.com with ESMTP id 02H0OpO6017424; Tue, 17 Mar 2020 09:24:52 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com 02H0OpO6017424 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1584404692; bh=lYmS7nvHUEJukM5osVioG3Y1rBqHPxYugmPf5H/y+jw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=KRfyZlQ4pRnk1FM+CsGrVy+TsNd9MdkEVA4mZXceJKrbqbNUEPZy89JEnknX3pd2P IomQTcuwNjz9geeKpzshLYsR+tWbmdZx8r+MGcxEoz2p8pR60ZKv+9lXr45jhKtLs2 Q/hUdq6UmCiUYBaX5mM8RaJOeK6tzI3ExtP2KvMWtDbkYL6H7GR5WB3riqnbsIcnYF LDsUV7rRg9ajKmPJjr8l+GkkNClabz5mus0XYAjlFQ51PLqcRutDpbRoGyMhqE1/ZZ qsXo9cDYNoxLeaSawC/W3FlOuNgj+3nCrz69MQ7Vn4yMP8U2M/6RBOb9zAVMuootqp R2BWr4gqMzbmw== X-Nifty-SrcIP: [209.85.217.46] Received: by mail-vs1-f46.google.com with SMTP id p7so10475770vso.6; Mon, 16 Mar 2020 17:24:51 -0700 (PDT) X-Gm-Message-State: ANhLgQ2Ql2cKK6PdQkYJwN+mVAlGHseF5++xCDhiTyTW+WQAqV/z5juX VcfUqny4iTKL1hnU8uwfTVjjY6qQu348UzMjGw0= X-Received: by 2002:a67:2d55:: with SMTP id t82mr1925939vst.215.1584404690356; Mon, 16 Mar 2020 17:24:50 -0700 (PDT) MIME-Version: 1.0 References: <20200311170120.12641-1-jeyu@kernel.org> In-Reply-To: From: Masahiro Yamada Date: Tue, 17 Mar 2020 09:24:14 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] modpost: move the namespace field in Module.symvers last To: Jessica Yu Cc: Matthias Maennich , Lucas De Marchi , stable , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 14, 2020 at 11:11 AM Masahiro Yamada wrote: > > On Thu, Mar 12, 2020 at 2:02 AM Jessica Yu wrote: > > > > In order to preserve backwards compatability with kmod tools, we have to > > move the namespace field in Module.symvers last, as the depmod -e -E > > option looks at the first three fields in Module.symvers to check symbol > > versions (and it's expected they stay in the original order of crc, > > symbol, module). > > > > In addition, update an ancient comment above read_dump() in modpost that > > suggested that the export type field in Module.symvers was optional. I > > suspect that there were historical reasons behind that comment that are > > no longer accurate. We have been unconditionally printing the export > > type since 2.6.18 (commit bd5cbcedf44), which is over a decade ago now. > > > > Fix up read_dump() to treat each field as non-optional. I suspect the > > original read_dump() code treated the export field as optional in order > > to support pre <= 2.6.18 Module.symvers (which did not have the export > > type field). Note that although symbol namespaces are optional, the > > field will not be omitted from Module.symvers if a symbol does not have > > a namespace. In this case, the field will simply be empty and the next > > delimiter or end of line will follow. > > > > Cc: stable@vger.kernel.org > > Fixes: cb9b55d21fe0 ("modpost: add support for symbol namespaces") > > Tested-by: Matthias Maennich > > Reviewed-by: Matthias Maennich > > Reviewed-by: Lucas De Marchi > > Signed-off-by: Jessica Yu > > > While I am not opposed to this fix, > I did not even notice Module.symvers was official interface. > > Kbuild invokes scripts/depmod.sh to finalize > the 'make modules_install', but I do not see the -E > option being used there. > > I do not see Module.symvers installed in > /lib/modules/$(uname -r)/. > > > Applied to linux-kbuild/fixes. -- Best Regards Masahiro Yamada