lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d585d000-17c2-8641-2a6c-664dbea69ce9@gmail.com>
Date:   Tue, 28 Sep 2021 09:30:31 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Christoph Hellwig <hch@...radead.org>,
        Florian Fainelli <f.fainelli@...il.com>
Cc:     linux-kernel@...r.kernel.org, Russell King <linux@...linux.org.uk>,
        Ray Jui <rjui@...adcom.com>,
        Scott Branden <sbranden@...adcom.com>,
        "maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE..." 
        <bcm-kernel-feedback-list@...adcom.com>,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will@...nel.org>,
        Yoshinori Sato <ysato@...rs.sourceforge.jp>,
        Rich Felker <dalias@...c.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Marc Zyngier <maz@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Frank Rowand <frowand.list@...il.com>,
        Ard Biesheuvel <ardb@...nel.org>,
        Mike Rapoport <rppt@...nel.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        Arnd Bergmann <arnd@...db.de>,
        Guenter Roeck <linux@...ck-us.net>,
        Kefeng Wang <wangkefeng.wang@...wei.com>,
        Mark Rutland <mark.rutland@....com>,
        Andrey Konovalov <andreyknvl@...il.com>,
        Anshuman Khandual <anshuman.khandual@....com>,
        Valentin Schneider <valentin.schneider@....com>,
        Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        "moderated list:ARM PORT" <linux-arm-kernel@...ts.infradead.org>,
        "open list:SUPERH" <linux-sh@...r.kernel.org>,
        "open list:BROADCOM BMIPS MIPS ARCHITECTURE" 
        <linux-mips@...r.kernel.org>,
        "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE" 
        <devicetree@...r.kernel.org>
Subject: Re: [PATCH v2 01/12] arch: Export cpu_logical_map to modules

On 9/27/21 10:08 PM, Christoph Hellwig wrote:
> On Mon, Sep 27, 2021 at 07:27:04PM -0700, Florian Fainelli wrote:
>> In order to allow drivers/irqchip/irq-bcm7038-l1.c to be built as a
>> module and usable in GKI, export cpu_logical_map or __cpu_logical_map
>> towards the modules. This follows what MIPS has been doing since
>> 2dc2ae344e0e ("MIPS: Export __cpu_number_map and __cpu_logical_map.")
> 
> This seems like a pretty bad idea.  For one you should export an
> accessor instead of the data structure.  And this probably should be an
> EXPORT_SYMBOL_GPL.

In hindsight, we should not need that change, and the use of
cpu_logical_map[] within drivers/irqchip/irq-bcm7038-l1.c should be
restricted to a MIPS build where the driver is a level 1 interrupt
controller and there are multiple per-cpu register copies.

In an ARM/ARM64 configuration that driver is always used as a second
level interrupt controller whereby it is hanging off the ARM GIC
interrupt controller, and the intc->cpus[] array will only be 1 element.
Fortunately since you cannot re-parent a L2 interrupt controller's
interrupt handler to a different CPU, "it just happens to work".

Thanks!
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ