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] [thread-next>] [day] [month] [year] [list]
Message-ID: <9b71932a-d410-4b92-b605-d6acc5d35069@zytor.com>
Date:   Wed, 11 Oct 2023 16:15:15 -0700
From:   "H. Peter Anvin" <hpa@...or.com>
To:     Ingo Molnar <mingo@...nel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Uros Bizjak <ubizjak@...il.com>, x86@...nel.org,
        linux-kernel@...r.kernel.org, Nadav Amit <namit@...are.com>,
        Andy Lutomirski <luto@...nel.org>,
        Brian Gerst <brgerst@...il.com>,
        Denys Vlasenko <dvlasenk@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Josh Poimboeuf <jpoimboe@...hat.com>
Subject: Re: [PATCH v2 -tip] x86/percpu: Use C for arch_raw_cpu_ptr()

On 10/11/23 15:37, Ingo Molnar wrote:
> 
> * Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> 
>>> The only drawback is a larger binary size:
>>>
>>>    text    data     bss     dec     hex filename
>>> 25546594        4387686  808452 30742732        1d518cc vmlinux-new.o
>>> 25515256        4387814  808452 30711522        1d49ee2 vmlinux-old.o
>>>
>>> that increases by 31k (0.123%), probably due to 1578 rdgsbase alternatives.
>>
>> I'm actually surprised that it increases the text size. The 'rdgsbase'
>> instruction should be smaller than a 'mov %gs', so I would have
>> expected the *data* size to increase due to the alternatives tables,
>> but not the text size.
>>
>> [ Looks around ]
>>
>> Oh. It's because we put the altinstructions into the text section.
>> That's kind of silly, but whatever.
> 
> Yeah, we should probably move .altinstructions from init-text to .init.data
> or so? Contains a bunch of other sections too that don't get executed
> directly ... and in fact has some non-code data structures too, such as ...
> ".apicdrivers". :-/
> 
> I suspect people put all that into .text because it was the easiest place
> to modify in the x86 linker script, and linker scripts are arguably scary.
> 

Well, it's more than that; "size" considers all non-writable sections to 
be "text".

	-hpa

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ