[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fefdd59acae4d7430992b390b6f9bdfc@paul-moore.com>
Date: Tue, 11 Nov 2025 19:47:22 -0500
From: Paul Moore <paul@...l-moore.com>
To: Thorsten Blum <thorsten.blum@...ux.dev>, David Laight <david.laight.linux@...il.com>, James Morris <jmorris@...ei.org>, "Serge E. Hallyn" <serge@...lyn.com>
Cc: Thorsten Blum <thorsten.blum@...ux.dev>, linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] device_cgroup: Refactor devcgroup_seq_show to use seq_put* helpers
On Oct 31, 2025 Thorsten Blum <thorsten.blum@...ux.dev> wrote:
>
> Replace set_access(), set_majmin(), and type_to_char() with new helpers
> seq_putaccess(), seq_puttype(), and seq_putversion() that write directly
> to 'seq_file'.
>
> Simplify devcgroup_seq_show() by hard-coding "a *:* rwm", and use the
> new seq_put* helper functions to list the exceptions otherwise.
>
> This allows us to remove the intermediate string buffers while
> maintaining the same functionality, including wildcard handling.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@...ux.dev>
> Acked-by: Serge Hallyn <serge@...lyn.com>
> ---
> Changes in v2:
> - Add setq_put* helpers to modify seq_file directly (David)
> - Update patch subject and description
> - Link to v1: https://lore.kernel.org/lkml/20251031110647.102728-2-thorsten.blum@linux.dev/
> ---
> security/device_cgroup.c | 56 ++++++++++++++++++----------------------
> 1 file changed, 25 insertions(+), 31 deletions(-)
Looks good to me, merged into lsm/dev, thanks!
--
paul-moore.com
Powered by blists - more mailing lists