From: David Laight <david.laight.linux@gmail•com>
To: Venkat Rao Bagalkote <venkat88@linux•ibm.com>
Cc: linuxppc-dev <linuxppc-dev@lists•ozlabs.org>,
Madhavan Srinivasan <maddy@linux•ibm.com>,
selinux@vger•kernel.org, rppt@kernel•org, paul@paul-moore•com,
LKML <linux-kernel@vger•kernel.org>,
Ritesh Harjani <riteshh@linux•ibm.com>,
"Christophe Leroy (CS GROUP)" <chleroy@kernel•org>
Subject: Re: PowerPC: Random memory corruption causing kernel oops on Power11
Date: Fri, 29 May 2026 17:18:55 +0100 [thread overview]
Message-ID: <20260529171855.7966b752@pumpkin> (raw)
In-Reply-To: <8f0c86f7-eab4-4e82-97c1-5d190c390770@linux.ibm.com>
On Fri, 29 May 2026 19:07:22 +0530
Venkat Rao Bagalkote <venkat88@linux•ibm.com> wrote:
> On 29/05/26 12:20 pm, Venkat Rao Bagalkote wrote:
> > Greetings!!!
> >
> > Kernel 7.1.0-rc5-next-20260528 crashes randomly on IBM Power11
> > hardware. Attached is the config file.
> >
.
>
> Git bisect is pointing to 54067bacb49c selinux: hooks: use __getname()
> to allocate path buffer as the first bad commit.
>
>
> # git bisect good
> 54067bacb49caeada82b20b6bd706dca0cb99ffc is the first bad commit
> commit 54067bacb49caeada82b20b6bd706dca0cb99ffc
> Author: Mike Rapoport (Microsoft) <rppt@kernel•org>
> Date: Wed May 20 11:18:56 2026 +0300
>
> selinux: hooks: use __getname() to allocate path buffer
>
> selinux_genfs_get_sid() allocates memory for a path with
> __get_free_page()
> although there is a dedicated helper for allocation of file paths:
> __getname().
>
> Replace __get_free_page() for allocation of a path buffer with
> __getname().
>
> Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel•org>
> Signed-off-by: Paul Moore <paul@paul-moore•com>
>
> security/selinux/hooks.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
__getname() is kmalloc(PATH_MAX) aka kmalloc(4096).
The old code was:
buffer = (char *)__get_free_page(GFP_KERNEL);
if (!buffer)
return -ENOMEM;
path = dentry_path_raw(dentry, buffer, PAGE_SIZE);
only the allocate was changed.
PAGE_SIZE is not the length of the buffer.
Should be PATH_MAX.
-- David
next prev parent reply other threads:[~2026-05-29 16:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-29 6:50 PowerPC: Random memory corruption causing kernel oops on Power11 Venkat Rao Bagalkote
2026-05-29 13:37 ` Venkat Rao Bagalkote
2026-05-29 15:02 ` Stephen Smalley
2026-05-29 15:19 ` Stephen Smalley
2026-05-29 15:39 ` Paul Moore
2026-05-29 16:11 ` Stephen Smalley
2026-05-29 18:24 ` Paul Moore
2026-05-29 16:18 ` David Laight [this message]
2026-05-29 18:23 ` Paul Moore
2026-05-30 11:03 ` David Laight
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=20260529171855.7966b752@pumpkin \
--to=david.laight.linux@gmail$(echo .)com \
--cc=chleroy@kernel$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=maddy@linux$(echo .)ibm.com \
--cc=paul@paul-moore$(echo .)com \
--cc=riteshh@linux$(echo .)ibm.com \
--cc=rppt@kernel$(echo .)org \
--cc=selinux@vger$(echo .)kernel.org \
--cc=venkat88@linux$(echo .)ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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