Article View: muc.lists.freebsd.emulation
Article #28[Bug 299835] linux_mremap() returns ENOMEM for unmapped ranges, causing an infinite kernel syscall loop in musl's pthread_getatt...
From: bugzilla-noreply
Date: Sat, 24 Oct 2026 02:32
Date: Sat, 24 Oct 2026 02:32
38 lines
3403 bytes
3403 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=299835
--- Comment #2 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:
URL:
https://cgit.FreeBSD.org/src/commit/?id=9a8d5af1ba0174ec5fcc3eedba545aec9a627987
commit 9a8d5af1ba0174ec5fcc3eedba545aec9a627987
Author: Joy <amutu@amutu.com>
AuthorDate: 2026-10-24 02:22:29 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-10-24 02:24:19 +0000
linux: correct errors from mremap(2)
Linux returns EFAULT when the range to be remapped is not mapped at all,
and ENOMEM only when it is mapped but cannot be grown in place. Callers
depend on that distinction: musl's pthread_getattr_np() measures the
main thread stack by growing a one page mapping and retries while errno
is ENOMEM. Returning ENOMEM for every growth request makes that loop
spin forever.
PR: 299835
MFC after: 1 week
sys/compat/linux/linux_misc.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--
You are receiving this mail because:
You are the assignee for the bug.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID:
<bug-299835-4077-veib13kRvU@https.bugs.freebsd.org/bugzilla/>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.szaf.org!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mailReferences:
<bug-299835-4077@https.bugs.freebsd.org/bugzilla/>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.szaf.org!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail From: bugzilla-noreply@freebsd.org Newsgroups: muc.lists.freebsd.emulation Subject: [Bug 299835] linux_mremap() returns ENOMEM for unmapped ranges, causing an infinite kernel syscall loop in musl's pthread_getattr_np() Date: Sat, 24 Oct 2026 02:32:09 +0000 Organization: Newsgate at muc.de e.V. Sender: owner-freebsd-emulation@FreeBSD.org Approved: news-admin@muc.de Distribution: world Message-ID: <bug-299835-4077-veib13kRvU@https.bugs.freebsd.org/bugzilla/> References: <bug-299835-4077@https.bugs.freebsd.org/bugzilla/> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2"; logging-data="22046"; mail-complaints-to="news-admin@muc.de" X-Original-To: emulation@mlmmj.nyi.freebsd.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1792809128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NU8K+qjygiKBznjJB4JrTewZoOzGB4kJBzzVWzRMP1k=; b=MQbWuVopU+RAJMuMd4cfzjNpfBIWpN/eQb10D4Zu8krYc5UlgMcq+lMwEaJPySkJscLgB1 MfRApgtYWmLhlHvAORiedOPz6GRbWKk1h83yr4AISWhVh6s64SNxWdFPH74r3qmxKPpfKV lp4e5YH37bfzhib2kI6PIbWTM6Zxlqlp01oVzwHXOam79/OjcbGTpukdjnsie2Z1L0z/x9 YpeSfcW7ANGJlWTwg2HHWrN28sGCoXCPLnJlPVwIzl6E7vWePS3N9PdMTmkYXRECccS5dx +hCTVBsMPyDPWbeEYVqZdvU8kg6jiESvIh+wqfvl9KlP2aOnizEf7/pw10DgBw== X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f In-Reply-To: <bug-299835-4077@https.bugs.freebsd.org/bugzilla/> Auto-Submitted: auto-generated Precedence: list X-Newsgate-Id: f02c70b8849f+ X-No-Archive: Yes