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: <ZSg0D0bRlzXdqZRS@gmail.com>
Date:   Thu, 12 Oct 2023 19:59:43 +0200
From:   Ingo Molnar <mingo@...nel.org>
To:     Josh Poimboeuf <jpoimboe@...nel.org>
Cc:     "H. Peter Anvin" <hpa@...or.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        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()


* Josh Poimboeuf <jpoimboe@...nel.org> wrote:

> On Thu, Oct 12, 2023 at 08:19:14AM +0200, Ingo Molnar wrote:
> > 
> > * Josh Poimboeuf <jpoimboe@...nel.org> wrote:
> > 
> > > Though, another problem is that .text has a crazy amount of padding
> > > which makes it always the same size, due to the SRSO alias mitigation
> > > alignment linker magic.  We should fix that somehow.
> > 
> > We could emit a non-aligned end-of-text symbol (we might have it already),
> > and have a script or small .c program in scripts/ or tools/ that looks
> > at vmlinux and displays a user-friendly and accurate list of text and
> > data sizes in the kernel?
> > 
> > And since objtool is technically an 'object files tool', and it already
> > looks at sections & symbols, it could also grow a:
> > 
> > 	objtool size <objfile>
> > 
> > command that does the sane thing ... I'd definitely start using that, instead of 'size'.
> > 
> > /me runs :-)
> 
> Yeah, that's actually not a bad idea.
> 
> I had been thinking a "simple" script would be fine, but I'm realizing
> the scope of this thing could grow over time.  In which case a script is
> less than ideal.  And objtool already has the ability to do this pretty
> easily.

Yeah, and speed actually matters here: I have scripts that generate object 
comparisons between commits, and every second of runtime counts - and a 
script would be slower and more fragile for something like allmodconfig 
builds or larger disto configs.

BTW., maybe the right objtool subcommand would be 'objtool sections', with 
an 'objtool sections size' sub-sub-command. Because I think this discussion 
shows that it would be good to have a bit of visibility into the sanity of 
our sections setup, with 'objtool sections check' for example doing a 
sanity check on whether there's anything extra in the text section that 
shouldn't be there? Or so ...

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ