Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2500960ybp; Thu, 10 Oct 2019 08:16:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqykgxZ4UOHDM2ub9waVtLMH9TSjRhvO1Y9wm67KUx+rS39Kq/pY5UwGmocGToVlxDsvRcvr X-Received: by 2002:a17:906:d29a:: with SMTP id ay26mr8667039ejb.21.1570720603844; Thu, 10 Oct 2019 08:16:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570720603; cv=none; d=google.com; s=arc-20160816; b=Oiw6QmVaVXJR5dsQjav1dDxVKpEEQfuUwSmpq8rdAl/NbEA1pDrW+E/ZSf2UVy/43Q gOS2ZMeRyzWPLZ/eAQAJyJuM2t8AViGKMLIz5MXNCOTpEDHv0JJ4d5QNjegcae1csmIL W5wM5Piu26bGVtjDvsEuxYHEwdnx4f8CBOlVjchvvyEB81BkZm3jTJukDCHo6AsH+bqz +io+WfYTpQL/9mWT1EYvWERJODyMQyuUBHMDE/w9meFCRxLgjNSpVB7by/KzXiJ2rXZU VEoJmUao0gL6Q3ZzvOp+stEpO2hLY21qfTEfjfcQc0OBr7nIaADwMDXVJHfU9r1n/eyT Bv8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:mime-version :message-id:date:dkim-signature; bh=JnBEaa7F8Z1V9KqywKFqf8fBJ0Vr9PkxAfCT13jnqaQ=; b=S70aF8zjBdad9VV+uMV1xmC/ipUSA+hpIGkNjutf9IHGOJNpHYrO9XyjmLM4WsyUVP QmH7/Kt23SpLyynp2gXQCIATo6Lt4k65Y/cZo4FT77v5D85gzzB9F83VWSqJCwFMzqb1 dnoqtImv3IzlwfKqxd6aPZSszmSJjmXqoNS9TPmXvW2TdfHsOJRFPdd/oAmcMJnplYKw xlScdn3uKCMiUo8zUK56jaU/c7qOghJpbtQTFhIkly7T8wadfV4y7D5V2ruIGK3/6G5S kM394tPp6QTci8yJa4syVZ69uAL5G52H0cMvlhBJGIRqq5lw7MVB5GLhvA0lyJ8fjD+g c5Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=kA+xAflP; 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 b56si3522636edb.418.2019.10.10.08.16.17; Thu, 10 Oct 2019 08:16:43 -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=kA+xAflP; 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 S1726476AbfJJPQE (ORCPT + 99 others); Thu, 10 Oct 2019 11:16:04 -0400 Received: from mail-wr1-f74.google.com ([209.85.221.74]:34523 "EHLO mail-wr1-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726038AbfJJPQD (ORCPT ); Thu, 10 Oct 2019 11:16:03 -0400 Received: by mail-wr1-f74.google.com with SMTP id k4so2907702wru.1 for ; Thu, 10 Oct 2019 08:16:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=JnBEaa7F8Z1V9KqywKFqf8fBJ0Vr9PkxAfCT13jnqaQ=; b=kA+xAflPHKMcLMO5k9wA/HehdrDX5OsKjvfma+dSuS5w5OCjt7m5C+NemNQE92jyGX M/CfDXDNzsHeOgCVJcnVy/1k0/jX2uELIQXIeMpNmEVujtMFX3eupGCcm6dhitH1hex3 ecrGxAA5LqqPYGkfdm8/eRjdLcBgiZVmUY2CSjp6JXAT5HDCxpddQRXy9VEFOa0wbPdl IshkWWXJTh6D9tzHW463e0x7Nk70qZKfyFgQP6XMx9NPv9r9eY78pfEEqohIWBK2XNEm 71a+eWSitDIhUBPCc6iHAIz7cGPDozth7RjZM9Xy+SMcVHpOdYScSdfrw16lsRIiDCHC e4Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=JnBEaa7F8Z1V9KqywKFqf8fBJ0Vr9PkxAfCT13jnqaQ=; b=PK4UVTMG+Ms98QVCUWqm5LIKfQ1Jb2NGL9z4Wd5clfTQwgKZffEmgtWNjBz21C1ehB 3tsCUrxqi2+zvJ8WkRHPvY8e4c6O/r9MTeY6t2bByGh10tK90Isu4Ekshd2Y6lgIZiRw apTqkuEdLvDUrYbYYpzUotyJZx98rmeYO3FQtW7GNT4J5VgWXGosm72Nf8bJ80zWm5Go 3MG1//kf9Csk0igb2n+56PjQ6P4KTj1sX9XJbuH3JD/fBmBpmQmYe5MP9IU+DyKcSrnx Nk5yWN+AngnXXjFppObKIdEXsM16k/MAyxLfO5wC+JuH15m93RbQIqKzYWfaK0W0SrtE qSPA== X-Gm-Message-State: APjAAAVQEv1Ip6DyrIWGuE3ZuCbZ2D0ooP8F5VtmhqhNzLhKycrvAkIZ A/Pu4a5A6HrmLwN8sA64T/+LtBGkrlqVy67ivRP8fm64dREplnH8xdgYwasqp8KkRJMzKhvLOwy /4vCA0az2+2f9dw/hsj0gNfC7ntKvsXXAeo6vdRrMaE+xhRJ/422d3zMpHlLYZQS7g1owXW/R3O M= X-Received: by 2002:a05:6000:1cb:: with SMTP id t11mr8717075wrx.144.1570720560652; Thu, 10 Oct 2019 08:16:00 -0700 (PDT) Date: Thu, 10 Oct 2019 16:14:39 +0100 Message-Id: <20191010151443.7399-1-maennich@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.23.0.581.g78d2f28ef7-goog Subject: [PATCH 0/4] export/modpost: avoid renaming __ksymtab entries for symbol namespaces From: Matthias Maennich To: linux-kernel@vger.kernel.org Cc: kernel-team@android.com, maennich@google.com, Jessica Yu , Masahiro Yamada , Martijn Coenen , Lucas De Marchi , Shaun Ruffell , Greg Kroah-Hartman , Will Deacon , linux-kbuild@vger.kernel.org, linux-modules@vger.kernel.org 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 The introduction of the symbol namespace patches changed the way symbols are named in the ksymtab entries. That caused userland tools to fail (such as kmod's depmod). As depmod is used as part of the kernel build it was worth having another look whether this name change can be avoided. The main purpose of this series is to restore the original ksymtab entry names. For that to happen and to remove some rough edges around that, the relevant parts in modpost got a small refactoring as to when and how namespaces are evaluated and set in the symbol struct. Eventually, the namespace values can be read from __kstrtabns_ entries and their corresponding __ksymtab_strings values. That removes the need to carry the namespace names within the (anyway unique) symbol name entries. The last patch of this series is adopted from Masahiro [1]. By allowing 'no namespace' to be represented as empty string, large chunks of include/linux/export.h could be consolidated. Technically, this last patch is not absolutely necessary to fix functionality. It addresses concerns about maintainability and readability. While I strongly suggest sending all of the patches for 5.4, the last one could possible deferred to the next merge window. This patch applies to the modules-linus [2] branch. [1] https://lore.kernel.org/lkml/20190927093603.9140-5-yamada.masahiro@socionext.com/ [2] https://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux.git/log/?h=modules-linus Cc: Jessica Yu Cc: Masahiro Yamada Cc: Martijn Coenen Cc: Lucas De Marchi Cc: Shaun Ruffell Cc: Greg Kroah-Hartman Cc: Will Deacon Cc: linux-kbuild@vger.kernel.org Cc: linux-modules@vger.kernel.org Matthias Maennich (4): modpost: delegate updating namespaces to separate function modpost: make updating the symbol namespace explict symbol namespaces: revert to previous __ksymtab name scheme export: avoid code duplication in include/linux/export.h include/linux/export.h | 97 +++++++++++++----------------------------- kernel/module.c | 2 +- scripts/mod/modpost.c | 58 ++++++++++++++++--------- scripts/mod/modpost.h | 1 + 4 files changed, 69 insertions(+), 89 deletions(-) -- 2.23.0.581.g78d2f28ef7-goog