Thread (10 messages) 10 messages, 4 authors, 25d ago

Re: PowerPC: Random memory corruption causing kernel oops on Power11

From: David Laight <hidden>
Date: 2026-05-29 16:19:09
Also in: lkml, selinux

On Fri, 29 May 2026 19:07:22 +0530
Venkat Rao Bagalkote [off-list ref] wrote:
On 29/05/26 12:20 pm, Venkat Rao Bagalkote wrote:
quoted
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) [off-list ref]
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) [off-list ref]
     Signed-off-by: Paul Moore [off-list ref]

  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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help