Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp6696776imm; Tue, 24 Jul 2018 01:11:00 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfQOC9tPrsm5ef90LPjt7NTryoOkxiJfUChxBr1nFMu7+OXO60PpciiQwQ/qUwncGevGYha X-Received: by 2002:a62:d693:: with SMTP id a19-v6mr16498465pfl.248.1532419860589; Tue, 24 Jul 2018 01:11:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532419860; cv=none; d=google.com; s=arc-20160816; b=i6/8n9fCsRprsL7EmaITggJtM/ffP+OhLNwtmka3TgbsHh/rYQ6lb7Ku2opQozQrdz A1ZB2+nVqhmbVwl7rKUSCCuBcbad8nv3byn9QCuMsIKajPPsqNByX/bg8ljlqflI5xYk kWGjOSOlRkZhju3B2PxzKPs9cbzKjLm+WbiOQHdlM3TONsrSTlRYI4NOOxYiyxPTxskH Ox9rOYgVO+fLY/aHHp+f8+RqbfdQayvfO+JnCUAtSWZ0Bm/9YET9rCeHdgFBQhBUitHg CnVRpwsxyvjkT205mB/e5ipp8kGwQVwIVnxxEHAuoSYGXT+PXu0fYFCsSgJMI13Ww5+/ UvWQ== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=9gGdEF1zB6Pdw8DPASw4wytgbd93/MBTrKbGDhz42NQ=; b=r3iH4R1Qq+5Rydz3k8XByCB4EMggV4Qcn9SXjwgrCkX1IjwbtLnKNKRHbwI6Brpmat nokVPnf0GlafcF4+bImDpoTsdhuwwnIj0VawommFFX8jVmWIWwiKIcfo4/G/cVrgoXyg Qho6ECFaJMD7eBKBtAy0o9vyDdR9hIwtfyiVv8hjDWjo+hg7CW9paFq9vqURhuPY+sJt k2OC3GHAkBF+JtvGXWT08KZpBVtAeTnPwiknI/b4DH58cMMsJkmeuNA5+EtAchFPE3In aCi8h786HxGh0W8poNDf6AwlPP/73dJutzDjeSiFKllrA3iwYc8foIE40BnbxRsGmKyZ Eeyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@android.com header.s=20161025 header.b=ADzBQG4a; 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=NONE sp=NONE dis=NONE) header.from=android.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i3-v6si10116894pld.189.2018.07.24.01.10.45; Tue, 24 Jul 2018 01:11:00 -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=@android.com header.s=20161025 header.b=ADzBQG4a; 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=NONE sp=NONE dis=NONE) header.from=android.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388628AbeGXJPI (ORCPT + 99 others); Tue, 24 Jul 2018 05:15:08 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:52154 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388487AbeGXJPH (ORCPT ); Tue, 24 Jul 2018 05:15:07 -0400 Received: by mail-it0-f65.google.com with SMTP id g14-v6so2612836iti.1 for ; Tue, 24 Jul 2018 01:09:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=android.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=9gGdEF1zB6Pdw8DPASw4wytgbd93/MBTrKbGDhz42NQ=; b=ADzBQG4ajUoQdEOtbKPiT3oFffDUeFLlIrgnuM91pyVCjlHrsghXRLLQQE1tJW1z3I eLkayClGTYDgU4MIH6hz2dpmaAXKyODHZZHyTwdTTm8UrldeMxu6kgeN3lKp9K3avxhR Zqw41t+pGAiW38lRlDJupH/neGWsef/EJtRVbB4eZoH3fcPGqzg7XShDYC9t3duR8KjL uoSul4ns7SvrxJDQm1T2GK5zw5gYSuUPOZrv8PKtR5CNI2wKXxo73g1zc8Lk1Llwtkgk zpwI6gyS27hcPd6UuUB9yo4OC0Aqc9EVoZ0qy/jxL4tlYrFUSaNzGihJRtwJJOCtFhqY YmPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=9gGdEF1zB6Pdw8DPASw4wytgbd93/MBTrKbGDhz42NQ=; b=Ln39YfBZhvvW+l+Q+oX3mS7UOAyDwFseu3vupIekPhvrU8w1efIbvevI3JnPA8hdBy XgaDBoC0yuLGw5EwzUc2qyW5MX9RByjf0pTtgFqZBMOgElKGGjuZhJBMohTfcksDkGAS l+4LcidlbppGaigpbVZN+GpRo9h6QSwM61qIPVe8SRIpvmhfhm/nICQh2j+679Bk+oEH EEwVS7A6fKm5o0dcRUfcqEyP/PPXt2vGG2oyNOsOsBzDBy+ChCUDwj3PlB2dT6QJHsQr j7V7qkWTpiFujA7lkOb7UMKWwX4RBgvlb6aeeJEOetqSPAjHmS4zBW702LLnNCA4eBvB KJlg== X-Gm-Message-State: AOUpUlEae4k5c5XmgQZWP29ovjSscR76omG3dCsRRbxEQ5VhGQzzJZSH IG5wIW5loo3z7tEObJ6J0Kqm8LkLEZ++0eiyE2QfdQ== X-Received: by 2002:a24:d0cd:: with SMTP id m196-v6mr1971471itg.9.1532419792278; Tue, 24 Jul 2018 01:09:52 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4f:bb58:0:0:0:0:0 with HTTP; Tue, 24 Jul 2018 01:09:51 -0700 (PDT) In-Reply-To: References: <20180716122125.175792-1-maco@android.com> From: Martijn Coenen Date: Tue, 24 Jul 2018 10:09:51 +0200 Message-ID: Subject: Re: [PATCH 0/6] Symbol namespaces To: Arnd Bergmann Cc: Linux Kernel Mailing List , Masahiro Yamada , Michal Marek , Geert Uytterhoeven , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "the arch/x86 maintainers" , Alan Stern , Greg Kroah-Hartman , Oliver Neukum , Jessica Yu , Stephen Boyd , Philippe Ombredanne , Kate Stewart , Sam Ravnborg , Linux Kbuild mailing list , linux-m68k , USB list , USB Storage list , linux-scsi , linux-arch , Martijn Coenen , Sandeep Patil , Iliyan Malchev , Joel Fernandes 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 Hi Arnd, On Mon, Jul 23, 2018 at 4:28 PM, Arnd Bergmann wrote: > This looks nice. I don't want to overload you with additional > requests, but it might be good to think about how this can > be taken further, if we want to actually convert large > parts of the kernel to it. No worries about overloading, I'm happy with all feedback to make this better. > I have two ideas: > > - It would be nice to have a simple mechanism in Kconfig > to put all symbols in a module into a namespace that is > derived from KBUILD_MODNAME, to avoid having to > annotate every symbol separately. This could be similar > to how we ended up dealing with EXPORT_NO_SYMBOLS > in the linux-2.4 days, with the goal of eventually having > a namespace for each symbol. Similarly, we could pass > a number of default namespaces through the Makefile, > e.g. if we have a directory that has lots of drivers that all > import the symbols from a common subsystem module. I'm hinging on two thoughts here; I really like it because it obviously reduces work and makes this easier to use. On the other hand, you now have to look in multiple places to see if a symbol is exported to a namespace/imported from a module. Perhaps it depends on how coarse-grained the namespaces end up being. Either way, I think it would be pretty easy to cook up patches for this. > > - If this is possible to implement, it would be great to have > a way to limit the globally visible symbols in a module > to the ones that are explicitly exported even when a that > module is built-in rather than loadable. Not sure how this > is best done though. A couple of things can be done with > objcopy, or possibly by reintroducing partial linking (which > was removed not too long ago). If I understand you correctly, this is orthogonal to symbol namespaces, right? Though I think there is value in doing the same thing for symbol namespaces: right now, the only way to find out if all modules correctly import a symbol exported to a namespace is to run an 'allmodconfig'; not having to do that would be a win. Being able to do the same thing for the exported symbols in the global namespace is very similar. So yeah, I think this is a good idea and will look into this more. Do you think these things should be a part of these series, or can it be a follow-up? Thanks, Martijn > > Arnd