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: <be66d773-0441-0ccb-54fa-1d8f952b8f59@gmail.com>
Date:   Thu, 2 Dec 2021 09:21:28 +0000
From:   "Colin King (gmail)" <colin.i.king@...il.com>
To:     Hans de Goede <hdegoede@...hat.com>,
        Steve Wahl <steve.wahl@....com>, Joe Perches <joe@...ches.com>
Cc:     Colin Ian King <colin.i.king@...glemail.com>,
        Mike Travis <mike.travis@....com>,
        Dimitri Sivanich <dimitri.sivanich@....com>,
        Russ Anderson <russ.anderson@....com>,
        Darren Hart <dvhart@...radead.org>,
        Andy Shevchenko <andy@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
        "H . Peter Anvin" <hpa@...or.com>,
        platform-driver-x86@...r.kernel.org,
        kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/platform/uv: make const pointer dots a static const
 array

On 02/12/2021 09:10, Hans de Goede wrote:
> Hi,
> 
> On 12/1/21 22:39, Steve Wahl wrote:
>> On Tue, Nov 30, 2021 at 04:26:39PM -0800, Joe Perches wrote:
>>> On Tue, 2021-11-30 at 13:34 -0600, Steve Wahl wrote:
>>>> On Sat, Nov 27, 2021 at 05:03:20PM +0000, Colin Ian King wrote:
>>>>> Don't populate the const array dots on the stack
>>> []
>>>> Examination of the disassembly shows that the compiler actually
>>>> eliminates the creation of the pointer "dots" on the stack and just
>>>> passes the address of the string constant to the printk function.
>>>>
>>>> So this change should not have any actual effect (I don't know where
>>>> you got the "shrinks object code" from), and in my humble opinion
>>>> makes the code less clear.
>>>
>>> Probably shrinks an allmodconfig where the symbols are referenced.
>>> It probably doesn't do anything to a defconfig.
>>
>> OK, I looked. Under allmodconfig, the new code is one byte smaller.
>>
>> Defconfig doesn't include CONFIG_X86_UV and this file doesn't get
>> compiled.
>>
>> Using defconfig plus CONFIG_X86_UV and prerequisites, the new code is
>> 24 bytes larger, probably because of alignment added.
>>
>> allmodconfig:
>>
>>     text	   data	    bss	    dec	    hex	filename
>>    30827	  18358	   1472	  50657	   c5e1	uv_nmi.o
>>    30828	  18358	   1472	  50658	   c5e2	uv_nmi.orig.o
>>
>> default config + CONFIG_X86_UV:
>>
>>     text	   data	    bss	    dec	    hex	filename
>>     9918	    216	    160	  10294	   2836	uv_nmi.o
>>     9894	    216	    160	  10270	   281e	uv_nmi.orig.o
>>
>> So I still don't think this patch makes sense.
> 
> I agree, so I've dropped this patch from the queue.
> 
> Regards,
> 
> Hans
> 

+1.   Apologies for wasting your valuable time. I appreciate the 
detailed review.

Colin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ