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: <97fde69716ea4742b6cb4aca1a3ecc8788693cd3.camel@sipsolutions.net>
Date: Wed, 24 Sep 2025 09:55:47 +0200
From: Benjamin Berg <benjamin@...solutions.net>
To: Willy Tarreau <w@....eu>, Hajime Tazaki <thehajime@...il.com>
Cc: johannes@...solutions.net, hch@...radead.org,
 linux-um@...ts.infradead.org, 	linux@...ssschuh.net,
 linux-kselftest@...r.kernel.org, acme@...hat.com, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 00/11] Start porting UML to nolibc

On Wed, 2025-09-24 at 05:32 +0200, Willy Tarreau wrote:
> On Wed, Sep 24, 2025 at 08:58:47AM +0900, Hajime Tazaki wrote:
> > 
> > Hello Benjamin, Johannes,
> > 
> > On Mon, 22 Sep 2025 16:41:36 +0900,
> > Johannes Berg wrote:
> > > 
> > > On Fri, 2025-09-19 at 08:40 -0700, Christoph Hellwig wrote:
> > > > On Fri, Sep 19, 2025 at 05:34:09PM +0200, Benjamin Berg wrote:
> > > > > From: Benjamin Berg <benjamin.berg@...el.com>
> > > > > 
> > > > > This patchset is an attempt to start a nolibc port of UML.
> > > > 
> > > > It would be useful to explain why that is desirable.
> > > 
> > > Agree, it should be here, but FWIW it's been discussed elsewhere on the
> > > linux-um list in the past and basically there are various issues around
> > > it. Off the top of my head:
> > >  - glibc enabling new features such as rseq that interact badly with how
> > >    UML manages memory (there were fixes for this, it worked sometimes
> > >    and sometimes not)
> > >  - allocation placement for TLS is problematic (see the SMP series)
> > >  - it's (too) easy to accidentally call glibc functions that require
> > >    huge amounts of stack space
> > > 
> > > There are probably other reasons, but the mixed nature of UML being both
> > > kernel and "hypervisor" code in a single place doesn't mix well with
> > > glibc.
> > 
> > just curious
> > 
> > - are those issues not happening in other libc implementation ? (e.g.,
> >   musl-libc)
> > - same question to nolibc: is there any possibility that nolibc will
> >   evolve as glibc does, and this evolution introduces the UML issues ?
> 
> Nolibc focuses on early boot programs. That does not mean it will never
> evolve towrards more generic usage but this remains unlikely, and in any
> case there's the goal will remain not to degrade the experience on the
> original target (early boot). That doesn't mean there will never be any
> breakage but we're doing our best to keep things in a clean and workable
> state. Regarding threads, it seems unlikely that they'll arrive any time
> soon. But if they did, assuming UML would by then be a long established
> user, we'd certainly find a solution together (even via build-time
> defines if needed).

Also, with nolibc it is really simple to override any functions as
needed. We will likely want to do this for malloc/free so that nothing
bad can happen there.

Actually, UML already tries to do that for glibc. However, it
effectively fails (for dynamically linked builds) because the
dynamically linked glibc still uses its internal version for these
symbols.

Benjamin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ