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: <ZScjptMn3fDmMFdg@gmail.com>
Date:   Thu, 12 Oct 2023 00:37:26 +0200
From:   Ingo Molnar <mingo@...nel.org>
To:     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>,
        "H . Peter Anvin" <hpa@...or.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()


* 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. 

Will check all this.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ