linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] landlock_restrict_self.2: Fix max number of nested sandboxes
@ 2024-03-12 15:15 Mickaël Salaün
  2024-03-13  9:07 ` Günther Noack
  2024-03-13  9:12 ` Günther Noack
  0 siblings, 2 replies; 7+ messages in thread
From: Mickaël Salaün @ 2024-03-12 15:15 UTC (permalink / raw)
  To: linux-man; +Cc: Mickaël Salaün, Alejandro Colomar, Günther Noack

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 <alx@kernel.org>
Cc: Günther Noack <gnoack@google.com>
Signed-off-by: Mickaël Salaün <mic@digikod.net>
---
 man2/landlock_restrict_self.2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man2/landlock_restrict_self.2 b/man2/landlock_restrict_self.2
index 43f15c932a83..fb7e48234098 100644
--- a/man2/landlock_restrict_self.2
+++ b/man2/landlock_restrict_self.2
@@ -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
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] landlock_restrict_self.2: Fix max number of nested sandboxes
  2024-03-12 15:15 [PATCH] landlock_restrict_self.2: Fix max number of nested sandboxes Mickaël Salaün
@ 2024-03-13  9:07 ` Günther Noack
  2024-03-13  9:12 ` Günther Noack
  1 sibling, 0 replies; 7+ messages in thread
From: Günther Noack @ 2024-03-13  9:07 UTC (permalink / raw)
  To: Mickaël Salaün; +Cc: linux-man, Alejandro Colomar

On Tue, Mar 12, 2024 at 04:15:13PM +0100, Mickaël Salaün wrote:
> 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 <alx@kernel.org>
> Cc: Günther Noack <gnoack@google.com>
> Signed-off-by: Mickaël Salaün <mic@digikod.net>
> ---
>  man2/landlock_restrict_self.2 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/man2/landlock_restrict_self.2 b/man2/landlock_restrict_self.2
> index 43f15c932a83..fb7e48234098 100644
> --- a/man2/landlock_restrict_self.2
> +++ b/man2/landlock_restrict_self.2
> @@ -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
> -- 
> 2.44.0
> 

Signed-off-by: Günther Noack <gnoack@google.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] landlock_restrict_self.2: Fix max number of nested sandboxes
  2024-03-12 15:15 [PATCH] landlock_restrict_self.2: Fix max number of nested sandboxes Mickaël Salaün
  2024-03-13  9:07 ` Günther Noack
@ 2024-03-13  9:12 ` Günther Noack
  2024-03-14 16:08   ` Alejandro Colomar
  1 sibling, 1 reply; 7+ messages in thread
From: Günther Noack @ 2024-03-13  9:12 UTC (permalink / raw)
  To: Mickaël Salaün; +Cc: linux-man, Alejandro Colomar

On Tue, Mar 12, 2024 at 04:15:13PM +0100, Mickaël Salaün wrote:
> 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 <alx@kernel.org>
> Cc: Günther Noack <gnoack@google.com>
> Signed-off-by: Mickaël Salaün <mic@digikod.net>
> ---
>  man2/landlock_restrict_self.2 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/man2/landlock_restrict_self.2 b/man2/landlock_restrict_self.2
> index 43f15c932a83..fb7e48234098 100644
> --- a/man2/landlock_restrict_self.2
> +++ b/man2/landlock_restrict_self.2
> @@ -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
> -- 
> 2.44.0
> 

Of course, I meant to write:

Reviewed-by: Günther Noack <gnoack@google.com>

(I need a coffee)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] landlock_restrict_self.2: Fix max number of nested sandboxes
  2024-03-13  9:12 ` Günther Noack
@ 2024-03-14 16:08   ` Alejandro Colomar
  2024-03-14 16:11     ` Alejandro Colomar
  0 siblings, 1 reply; 7+ messages in thread
From: Alejandro Colomar @ 2024-03-14 16:08 UTC (permalink / raw)
  To: Günther Noack; +Cc: Mickaël Salaün, linux-man

[-- Attachment #1: Type: text/plain, Size: 1348 bytes --]

Hi Mickaël and Günther!

On Wed, Mar 13, 2024 at 10:12:13AM +0100, Günther Noack wrote:
> On Tue, Mar 12, 2024 at 04:15:13PM +0100, Mickaël Salaün wrote:
> > 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 <alx@kernel.org>
> > Cc: Günther Noack <gnoack@google.com>
> > Signed-off-by: Mickaël Salaün <mic@digikod.net>
> > ---
> >  man2/landlock_restrict_self.2 | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/man2/landlock_restrict_self.2 b/man2/landlock_restrict_self.2
> > index 43f15c932a83..fb7e48234098 100644
> > --- a/man2/landlock_restrict_self.2
> > +++ b/man2/landlock_restrict_self.2
> > @@ -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
> > -- 
> > 2.44.0
> > 
> 
> Of course, I meant to write:
> 
> Reviewed-by: Günther Noack <gnoack@google.com>

Patch and tag applied.  Thank you both!

> 
> (I need a coffee)

Have a lovely day!  (and a coffe :)

Alex

-- 
<https://www.alejandro-colomar.es/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] landlock_restrict_self.2: Fix max number of nested sandboxes
  2024-03-14 16:08   ` Alejandro Colomar
@ 2024-03-14 16:11     ` Alejandro Colomar
  2024-03-14 16:49       ` Günther Noack
  0 siblings, 1 reply; 7+ messages in thread
From: Alejandro Colomar @ 2024-03-14 16:11 UTC (permalink / raw)
  To: Günther Noack; +Cc: Mickaël Salaün, linux-man

[-- Attachment #1: Type: text/plain, Size: 627 bytes --]

Hi Günther, Mickaël,

On Thu, Mar 14, 2024 at 05:08:02PM +0100, Alejandro Colomar wrote:
> > >  .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.

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


-- 
<https://www.alejandro-colomar.es/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] landlock_restrict_self.2: Fix max number of nested sandboxes
  2024-03-14 16:11     ` Alejandro Colomar
@ 2024-03-14 16:49       ` Günther Noack
  2024-03-14 17:12         ` Alejandro Colomar
  0 siblings, 1 reply; 7+ messages in thread
From: Günther Noack @ 2024-03-14 16:49 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: Mickaël Salaün, linux-man

On Thu, Mar 14, 2024 at 05:11:00PM +0100, Alejandro Colomar wrote:
> Hi Günther, Mickaël,
> 
> On Thu, Mar 14, 2024 at 05:08:02PM +0100, Alejandro Colomar wrote:
> > > >  .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.
> 
> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] landlock_restrict_self.2: Fix max number of nested sandboxes
  2024-03-14 16:49       ` Günther Noack
@ 2024-03-14 17:12         ` Alejandro Colomar
  0 siblings, 0 replies; 7+ messages in thread
From: Alejandro Colomar @ 2024-03-14 17:12 UTC (permalink / raw)
  To: Günther Noack; +Cc: Mickaël Salaün, linux-man

[-- Attachment #1: Type: text/plain, Size: 1433 bytes --]

On Thu, Mar 14, 2024 at 05:49:07PM +0100, Günther Noack wrote:
> On Thu, Mar 14, 2024 at 05:11:00PM +0100, Alejandro Colomar wrote:
> > Hi Günther, Mickaël,
> > 
> > On Thu, Mar 14, 2024 at 05:08:02PM +0100, Alejandro Colomar wrote:
> > > > >  .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.
> > 
> > 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.

Hmmm, thanks!

Cheers,
Alex

> —Günther

-- 
<https://www.alejandro-colomar.es/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-03-14 17:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-12 15:15 [PATCH] landlock_restrict_self.2: Fix max number of nested sandboxes Mickaël Salaün
2024-03-13  9:07 ` Günther Noack
2024-03-13  9:12 ` Günther Noack
2024-03-14 16:08   ` Alejandro Colomar
2024-03-14 16:11     ` Alejandro Colomar
2024-03-14 16:49       ` Günther Noack
2024-03-14 17:12         ` Alejandro Colomar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).