landlock_restrict_self.2: Fix max number of nested sandboxes
PATCH 1/1 landlock_restrict_self.2: Fix max number of nested sandboxes
This limit was updated and backported with commit 75c542d6c6cc ("landlock: Reduce the maximum number of layers to 16") to all supported Linux versions.
--- man2/landlock_restrict_self.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man2/landlock_restrict_self.2 +1 -1
@@ -102,7 +102,7 @@ in its user namespace. .TP .B E2BIG The maximum number of composed rulesets is reached for the calling thread. -This limit is currently 64. +This limit is currently 16. .SH STANDARDS Linux. .SH HISTORY
Signature · 1 line
2.44.0
Quoted 27 lines · Mickaël Salaün
This limit was updated and backported with commit
75c542d6c6cc("landlock: Reduce the maximum number of layers to 16") to all supported Linux versions.Cc Alejandro Colomar <[email protected]>Cc Günther Noack <[email protected]>Signed-off-by Mickaël Salaün <[email protected]>--- man2/landlock_restrict_self.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)man2/landlock_restrict_self.2 +1
-1@@ -102,7 +102,7 @@ in its user namespace. .TP .B E2BIG The maximum number of composed rulesets is reached for the calling thread. -This limit is currently 64. +This limit is currently 16. .SH STANDARDS Linux. .SH HISTORYSignature · 1 line
2.44.0
Quoted 27 lines · Mickaël Salaün
This limit was updated and backported with commit
75c542d6c6cc("landlock: Reduce the maximum number of layers to 16") to all supported Linux versions.Cc Alejandro Colomar <[email protected]>Cc Günther Noack <[email protected]>Signed-off-by Mickaël Salaün <[email protected]>--- man2/landlock_restrict_self.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)man2/landlock_restrict_self.2 +1
-1@@ -102,7 +102,7 @@ in its user namespace. .TP .B E2BIG The maximum number of composed rulesets is reached for the calling thread. -This limit is currently 64. +This limit is currently 16. .SH STANDARDS Linux. .SH HISTORYSignature · 1 line
2.44.0
Of course, I meant to write:
(I need a coffee)
Alejandro Colomar
maintainerHi Mickaël and Günther!
Quoted 31 lines · Günther Noack
Quoted 27 lines · Mickaël Salaün
This limit was updated and backported with commit
75c542d6c6cc("landlock: Reduce the maximum number of layers to 16") to all supported Linux versions.Cc Alejandro Colomar <[email protected]>Cc Günther Noack <[email protected]>Signed-off-by Mickaël Salaün <[email protected]>--- man2/landlock_restrict_self.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)man2/landlock_restrict_self.2 +1
-1@@ -102,7 +102,7 @@ in its user namespace. .TP .B E2BIG The maximum number of composed rulesets is reached for the calling thread. -This limit is currently 64. +This limit is currently 16. .SH STANDARDS Linux. .SH HISTORYSignature · 1 line
2.44.0Of course, I meant to write:
Quoted 1 line
Reviewed-by Günther Noack <[email protected]>
Patch and tag applied. Thank you both!
Quoted 2 lines
(I need a coffee)
Have a lovely day! (and a coffe :)
Alex
Signature · 1 line
<https://www.alejandro-colomar.es/>
Alejandro Colomar
maintainerHi Günther, Mickaël,
Quoted 5 lines · Alejandro Colomar
Quoted 5 lines
man2/landlock_restrict_self.2 in its user namespace. · line 105
Quoted 5 lines
.TP
.B E2BIG
The maximum number of composed rulesets is reached for the calling thread.man2/landlock_restrict_self.2 +1
-1-This limit is currently 64. +This limit is currently 16.
BTW, do you think this limit change is something relevant for HISTORY? Or should we maybe not document the limit? Or maybe should the kernel provide a macro to name that limit (and thus let a user grep it in their headers to learn their specific value)? Or maybe a combination?
Cheers,
Alex
Signature · 1 line
<https://www.alejandro-colomar.es/>
Quoted 13 lines · Alejandro Colomar
Hi Günther, Mickaël,
Quoted 5 lines · Alejandro Colomar
Quoted 5 lines
man2/landlock_restrict_self.2 in its user namespace. · line 105
Quoted 5 lines
.TP
.B E2BIG
The maximum number of composed rulesets is reached for the calling thread.man2/landlock_restrict_self.2 +1
-1-This limit is currently 64. +This limit is currently 16.BTW, do you think this limit change is something relevant for HISTORY? Or should we maybe not document the limit? Or maybe should the kernel provide a macro to name that limit (and thus let a user grep it in their headers to learn their specific value)? Or maybe a combination?
I doubt that anyone has run into that limit in real life yet (but I'd be happy to learn about it if they did).
I think the most important reason why this limit is mentionworthy is because landlock_restrict_self() can fail when a process is trying to stack the N+1th Landlock policy on top. For programs that don't know all of their parent processes in detail, they anyway can't make assumptions about how many policies can still be stacked. So whether the limit is 64 or 16, it does not make much of a difference for the code that people have to write.
—Günther
Alejandro Colomar
maintainerQuoted 18 lines · Günther Noack
Quoted 13 lines · Alejandro Colomar
Hi Günther, Mickaël,
Quoted 5 lines · Alejandro Colomar
Quoted 5 lines
man2/landlock_restrict_self.2 in its user namespace. · line 105
Quoted 5 lines
.TP
.B E2BIG
The maximum number of composed rulesets is reached for the calling thread.man2/landlock_restrict_self.2 +1
-1-This limit is currently 64. +This limit is currently 16.BTW, do you think this limit change is something relevant for HISTORY? Or should we maybe not document the limit? Or maybe should the kernel provide a macro to name that limit (and thus let a user grep it in their headers to learn their specific value)? Or maybe a combination?
I doubt that anyone has run into that limit in real life yet (but I'd be happy to learn about it if they did).
Quoted 6 lines
I think the most important reason why this limit is mentionworthy is because
landlock_restrict_self()can fail when a process is trying to stack the N+1th Landlock policy on top. For programs that don't know all of their parent processes in detail, they anyway can't make assumptions about how many policies can still be stacked. So whether the limit is 64 or 16, it does not make much of a difference for the code that people have to write.
Hmmm, thanks!
Cheers,
Alex
Quoted 1 line
—Günther
Signature · 1 line
<https://www.alejandro-colomar.es/>