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]
Date:   Mon, 3 Jan 2022 17:29:02 +0100
From:   Ingo Molnar <mingo@...nel.org>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        "David S. Miller" <davem@...emloft.net>,
        Ard Biesheuvel <ardb@...nel.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Jonathan Corbet <corbet@....net>,
        Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [PATCH 0000/2297] [ANNOUNCE, RFC] "Fast Kernel Headers" Tree
 -v1: Eliminate the Linux kernel's "Dependency Hell"


* Greg Kroah-Hartman <gregkh@...uxfoundation.org> wrote:

> > The overall policy to extend task_struct, going forward, would be to:
> > 
> >  - Either make simple-type or struct-pointer additions to task_struct, that 
> >    don't couple <linux/sched.h> to other subsystems.
> > 
> >  - Or, if you absolutely must - and we don't want to forbid this - use the 
> >    per_task() machinery to create a simple accessor to a complex embedded 
> >    type.
> 
> I'll leave all of this up to the scheduler developers, but it still looks 
> odd to me.  The mess we create trying to work around issues in C :)

Yeah, so I *did* find this somewhat suboptimal too, and developed an 
earlier version that used linker section tricks to gain the field offsets 
more automatically.

It was an unmitigated disaster: was fragile on x86 already (which has a zoo 
of linking quirks with no precedent of doing this before bounds.c 
processing), but on ARM64 and probably on most of the other RISC-ish 
architectures there was also a real runtime code generation cost of using 
linker tricks: 2-3 extra instructions per per_task() use - clearly 
unacceptable.

Found this out the hard way after making it boot & work on ARM64 and 
looking at the assembly output, trying to figure out why the generated code 
size increased. :-/

Anyway, the current method has the big advantage of being obviously 
invariant wrt. code generation compared to the previous code, on every 
architecture.

> > Do these plans sound good to you?
> 
> Yes, taking the majority through the maintainer trees and then doing the 
> remaining bits in a single tree seems sane, that one tree will be easier 
> to review as well.

Ok. Will definitely offer it up piecemail-wise, in reviewable chunks, via 
existing processes & flows.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ