From: bugzilla-daemon@kernel.org
To: linux-man@vger.kernel.org
Subject: [Bug 218336] New: mount(2) doesn't document ENOSPC when /proc/sys/fs/mount-max is exceeded
Date: Wed, 03 Jan 2024 15:32:05 +0000 [thread overview]
Message-ID: <bug-218336-11311@https.bugzilla.kernel.org/> (raw)
https://bugzilla.kernel.org/show_bug.cgi?id=218336
Bug ID: 218336
Summary: mount(2) doesn't document ENOSPC when
/proc/sys/fs/mount-max is exceeded
Product: Documentation
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P3
Component: man-pages
Assignee: documentation_man-pages@kernel-bugs.osdl.org
Reporter: smcv@collabora.com
Regression: No
When setting up mount points in a new mount namespace, if
/proc/sys/fs/mount-max is exceeded, mount(2) will fail with ENOSPC. This isn't
documented in mount(2) as a possible error result.
In this situation, the error message "No space left on device" from strerror()
is misleading: usually all of the user's filesystem devices will have plenty of
space. The actual problem is that an essentially arbitrary
anti-denial-of-service limit, orthogonal to how much space exists on any
particular device, has been exceeded.
For example, this could easily happen when running Flatpak, which creates new
user and mount namespaces using the bubblewrap tool:
$ echo 50 | sudo tee /proc/sys/fs/mount-max
$ flatpak run org.gnome.Platform//45
bwrap: Failed to mount tmpfs: No space left on device
error: ldconfig failed, exit status 256
I'm going to send a PR to bubblewrap to make it special-case ENOSPC and display
a clearer error message in this case. It would be helpful if mount(2) indicated
ENOSPC as a possible error here, so that maintainers of projects like
bubblewrap could make sure to allow for it.
https://github.com/ValveSoftware/steam-runtime/issues/637 is a real-world
report of this happening in Steam's Steam Linux Runtime container framework,
which is very similar to Flatpak.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
next reply other threads:[~2024-01-03 15:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-03 15:32 bugzilla-daemon [this message]
2024-01-03 16:04 ` [Bug 218336] mount(2) doesn't document ENOSPC when /proc/sys/fs/mount-max is exceeded bugzilla-daemon
2024-01-03 16:29 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-218336-11311@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@kernel.org \
--cc=linux-man@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox