public inbox for linux-security-module@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Moore <paul@paul-moore.com>
To: Dmitry Antipov <dmantipov@yandex.ru>,
	James Morris <jmorris@namei.org>,
	"Serge E. Hallyn" <serge@hallyn.com>
Cc: linux-security-module@vger.kernel.org,
	Dmitry Antipov <dmantipov@yandex.ru>
Subject: Re: [PATCH] securityfs: use kstrdup_const() to manage symlink targets
Date: Tue, 17 Mar 2026 17:13:34 -0400	[thread overview]
Message-ID: <f2b73b8286491e7355e8355bf1f4d4cf@paul-moore.com> (raw)
In-Reply-To: <20260317141135.133339-1-dmantipov@yandex.ru>

On Mar 17, 2026 Dmitry Antipov <dmantipov@yandex.ru> wrote:
> 
> Since 'target' argument of 'securityfs_create_symlink()' is (for
> now at least) a compile-time constant, it may be reasonable to
> use 'kstrdup_const()' / 'kree_const()' to manage 'i_link' member
> of the corresponding inode in attempt to reuse .rodata instance
> rather than making a copy.
> 
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
> ---
>  security/inode.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

Seems reasonable, we can easily back this out if we ever need to support
non-const link target strings.  Merged into lsm/dev, thanks.

--
paul-moore.com

      reply	other threads:[~2026-03-17 21:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-17 14:11 [PATCH] securityfs: use kstrdup_const() to manage symlink targets Dmitry Antipov
2026-03-17 21:13 ` Paul Moore [this message]

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=f2b73b8286491e7355e8355bf1f4d4cf@paul-moore.com \
    --to=paul@paul-moore.com \
    --cc=dmantipov@yandex.ru \
    --cc=jmorris@namei.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=serge@hallyn.com \
    /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