Skip to contentSkip to conversation

man/man5/tmpfs.5: Specify that noswap may not be used within unprivileged user namespaces

PATCH In review Grayson Tinker 2 participants 2 messages Oct 20 – Oct 23 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 man/man5/tmpfs.5: Specify that noswap may not be used within unprivileged user namespaces

Since the tmpfs noswap option was added, the kernel has disallowed its use while within an unprivileged user namespace for security reasons. Document this restriction so users do not believe noswap to be available in every situation.

ref. linux.git 01106e140835ff94fdef79d66f166b87b0c89824 ("shmem: restrict noswap option to initial user namespace")

---
 man/man5/tmpfs.5 | 4 ++++
 1 file changed, 4 insertions(+)
man/man5/tmpfs.5 +4 -0
index 10acbdcfa..a904db2c8 100644
@@ -109,6 +109,10 @@ but not a % suffix.
 Disables swap.
 Remounts must respect the original settings.
 By default swap is enabled.
+.IP
+.\" commit 01106e140835ff94fdef79d66f166b87b0c89824
+.B noswap
+is not available while within an unprivileged user namespace.
 .TP
 .BR mode =\f[I]mode\f[]
 Set initial permissions of the root directory.

Range-diff:
-: --------- > 1: b3b2becca man/man5/tmpfs.5: Specify that noswap may not be used within unprivileged user namespaces

Signature · 1 line
2.55.0
#1 lore raw

Hi Grayson,

Quoted 10 lines

Date: 2026-10-19 19:51:12-0600
From: Grayson Tinker <[email protected]>

Since the tmpfs noswap option was added, the kernel has disallowed its use while within an unprivileged user namespace for security reasons. Document this restriction so users do not believe noswap to be available in every situation.

ref. linux.git 01106e140835ff94fdef79d66f166b87b0c89824 ("shmem: restrict noswap option to initial user namespace")

Thanks! I've applied the patch.

Have a lovely night!
Alex

Quoted 25 lines
---
 man/man5/tmpfs.5 | 4 ++++
 1 file changed, 4 insertions(+)
man/man5/tmpfs.5 +4 -0
index 10acbdcfa..a904db2c8 100644
@@ -109,6 +109,10 @@ but not a % suffix.
 Disables swap.
 Remounts must respect the original settings.
 By default swap is enabled.
+.IP
+.\" commit 01106e140835ff94fdef79d66f166b87b0c89824
+.B noswap
+is not available while within an unprivileged user namespace.
 .TP
 .BR mode =\f[I]mode\f[]
 Set initial permissions of the root directory.

Range-diff:
-: --------- > 1: b3b2becca man/man5/tmpfs.5: Specify that noswap may not be used within unprivileged user namespaces

Signature · 1 line
2.55.0
Signature · 1 line
<https://www.alejandro-colomar.es>