Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <SY8P300MB0860636BA00BD5F291549D9AFCD42@SY8P300MB0860.AUSP300.PROD.OUTLOOK.COM>
Date: Sat, 8 Mar 2025 14:18:04 +0000
From: Mouri Kenji <Mouri_Naruto@...look.com>
To: "musl@...ts.openwall.com" <musl@...ts.openwall.com>
Subject: Calling pthread_getattr_np won't return in the mremap loop when using
 musl in FreeBSD's Linux compatibility layer

Hello all,

When I tried to use musl-based userspace in FreeBSD's Linux compatibility layer, I found some app will hung.

I do some debugging with lldb. I have found app hang in mremap loop in the musl's pthread_getattr_np implementation.

I read the FreeBSD's Linux compatibility layer source code, it seems mremap in FreeBSD's Linux compatibility layer in won't support expand the size.

Here is the source code for FreeBSD's Linux compatibility layer mremap implementation: https://github.com/freebsd/freebsd-src/blob/780a4667bbde0daa90db900bb0f93f6337d6208b/sys/compat/linux/linux_misc.c#L302

I only can send a report e-mail to this mail list instead of making a patch because I'm the newbie of Linux's libc internals, and I feel sorry for that.

I have already talked that in musl's IRC but I think I should send a mail to mail list as archive. I know "Some already implemented syscalls are also suboptimal, for example mremap and others." in https://docs.freebsd.org/en/articles/linux-emulation/#future-work, but I hope musl will have the workaround for that. And it can make people can use musl happily in FreeBSD's linuxemu.

Kenji Mouri (https://github.com/MouriNaruto)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.