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: <CAK8P3a1tkeyLN1qg1yFMXbBgRvsT3xELrdbFbMd1EmOW5tGmQg@mail.gmail.com>
Date:   Thu, 22 Feb 2018 17:49:14 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     Jason Cooper <jason@...edaemon.net>,
        Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
        Gregory Clement <gregory.clement@...e-electrons.com>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        "# 3.4.x" <stable@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ARM: orion: fix orion_ge00_switch_board_info initialization

On Thu, Feb 22, 2018 at 2:30 PM, Andrew Lunn <andrew@...n.ch> wrote:
> On Wed, Feb 21, 2018 at 01:18:49PM +0100, Arnd Bergmann wrote:
>> A section type mismatch warning shows up when building with LTO,
>> since orion_ge00_mvmdio_bus_name was put in __initconst but not marked
>> const itself:
>>
>> include/linux/of.h: In function 'spear_setup_of_timer':
>> arch/arm/mach-spear/time.c:207:34: error: 'timer_of_match' causes a section type conflict with 'orion_ge00_mvmdio_bus_name'
>>  static const struct of_device_id timer_of_match[] __initconst = {
>>                                   ^
>> arch/arm/plat-orion/common.c:475:32: note: 'orion_ge00_mvmdio_bus_name' was declared here
>>  static __initconst const char *orion_ge00_mvmdio_bus_name = "orion-mii";
>>                                 ^
>>
>> As pointed out by Andrew Lunn, it should in fact be 'const' but not
>> '__initconst' because the string is never copied but may be accessed
>> after the init sections are freed. To fix that, I get rid of the
>> extra symbol and rewrite the initialization in a simpler way that
>> assigns both the bus_id and modalias statically.
>>
>> I spotted another theoretical bug in the same place, where d->netdev[i]
>> may be an out of bounds access, this can be fixed by moving the device
>> assignment into the loop.
>>
>> Cc: stable@...r.kernel.org
>> Signed-off-by: Arnd Bergmann <arnd@...db.de>
>
> Reviewed-by: Andrew Lunn <andrew@...n.ch>

Thanks, applied into fixes branch with your Reviewed-by tag now.

        Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ