lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250120083023.4162932-1-hyesoo.yu@samsung.com>
Date: Mon, 20 Jan 2025 17:30:21 +0900
From: Hyesoo Yu <hyesoo.yu@...sung.com>
To: 
Cc: janghyuck.kim@...sung.com, Hyesoo Yu <hyesoo.yu@...sung.com>, Christoph
	Lameter <cl@...ux.com>, Pekka Enberg <penberg@...nel.org>, David Rientjes
	<rientjes@...gle.com>, Joonsoo Kim <iamjoonsoo.kim@....com>, Andrew Morton
	<akpm@...ux-foundation.org>, Vlastimil Babka <vbabka@...e.cz>, Roman
	Gushchin <roman.gushchin@...ux.dev>, Hyeonggon Yoo <42.hyeyoo@...il.com>,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: [PATCH] mm: slub: Print the broken data before restoring slub.

Previously, the restore occured after printing the object in slub.
After commit 47d911b ("slab: make check_object() more consistent"),
the bytes are printed after the restore. This information about the bytes
before the restore is highly valuable for debugging purpose.
For instance, in a event of cache issue, it displays byte patterns
by breaking them down into 64-bytes units. Without this information,
we can only speculate on how it was broken. Hence the corrupted regions
are printed prior to the restoration process.

Signed-off-by: Hyesoo Yu <hyesoo.yu@...sung.com>
Change-Id: Iac1df0526808edc2318f9988c757cdc3e40ae4b2
---
 mm/slub.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/slub.c b/mm/slub.c
index c2151c9fee22..48cefc969480 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1207,6 +1207,7 @@ check_bytes_and_report(struct kmem_cache *s, struct slab *slab,
 					fault[0], value);
 
 skip_bug_print:
+	print_section(KERN_ERR, "Corrupt  ", fault, end - fault);
 	restore_bytes(s, what, value, fault, end);
 	return 0;
 }
-- 
2.48.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ