All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
Cc: selinux@vger.kernel.org
Subject: Re: [PATCH v2] selinux: hooks: use kmalloc() to allocate path buffer
Date: Tue, 30 Jun 2026 10:28:59 +0000	[thread overview]
Message-ID: <20260630102900.587C61F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260630-security-v2-1-560d33c13ee6@kernel.org>

> selinux_genfs_get_sid() allocates memory for a path with __get_free_page().
> 
> Such usage does not require a "page" and the size of the buffer should
> actually be PATH_MAX which may be less than PAGE_SIZE on some
> architectures.
> 
> Replace __get_free_page() for allocation of a path buffer with kmalloc()
> and make it explicit that the buffer size is PATH_MAX.
> 
> Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com>
> Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260630-security-v2-1-560d33c13ee6@kernel.org?part=1


  parent reply	other threads:[~2026-06-30 10:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-30 10:15 [PATCH v2] selinux: hooks: use kmalloc() to allocate path buffer Mike Rapoport (Microsoft)
2026-06-30 10:23 ` Mike Rapoport
2026-07-01  1:01   ` Paul Moore
2026-07-01  6:28     ` Mike Rapoport
2026-06-30 10:28 ` sashiko-bot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-05-31 15:15 Mike Rapoport
2026-05-31 16:18 ` David Laight
2026-05-31 16:55   ` Mike Rapoport

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=20260630102900.587C61F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=selinux@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.