From patchwork Mon Jan 20 08:30:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hyesoo Yu X-Patchwork-Id: 13944840 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BB26C02185 for ; Mon, 20 Jan 2025 08:31:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B4B026B0085; Mon, 20 Jan 2025 03:31:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B22626B0088; Mon, 20 Jan 2025 03:31:53 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9C34C280001; Mon, 20 Jan 2025 03:31:53 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 7B54E6B0085 for ; Mon, 20 Jan 2025 03:31:53 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 95C10B2915 for ; Mon, 20 Jan 2025 08:31:52 +0000 (UTC) X-FDA: 83027162064.05.934F444 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by imf23.hostedemail.com (Postfix) with ESMTP id 6379E140016 for ; Mon, 20 Jan 2025 08:31:48 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=samsung.com header.s=mail20170921 header.b=f9mFOGmA; spf=pass (imf23.hostedemail.com: domain of hyesoo.yu@samsung.com designates 203.254.224.33 as permitted sender) smtp.mailfrom=hyesoo.yu@samsung.com; dmarc=pass (policy=none) header.from=samsung.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1737361910; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:references:dkim-signature; bh=PFtg831O7vXcEYWfi+aXWoG6moV9NaIl5fziBougHAc=; b=KstDKdlOEcNuP7eztZMQzGy+GeC6W8chus4IuwUyqHdSXsYKp0I/xsd1Ojb2vn9zMwA4Fx dqeDI0tTNS8TVGOf9cRc2IJB7Zj2o7FnLT7Z3xhadlSpt3sXy3u7h25wj1YRfkpqkBAdSd fbsUlmlR93bDS3tvBrNHDFJ8mhhf+o4= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=samsung.com header.s=mail20170921 header.b=f9mFOGmA; spf=pass (imf23.hostedemail.com: domain of hyesoo.yu@samsung.com designates 203.254.224.33 as permitted sender) smtp.mailfrom=hyesoo.yu@samsung.com; dmarc=pass (policy=none) header.from=samsung.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1737361910; a=rsa-sha256; cv=none; b=y7fsyCRSJwQN1W+b4jz/9pjjA6k6gAaIULiOkRUXjQK1tq4HYkTtBWupZYC1dZVGnlz+Kb Z7fwvH+vibl/74Mr4inf8Rd2oLjk8Pq1YdD5MQ6wtReoCtTAU/faFvUjQWTGxYD+EEX2M/ Zb50gHbuOincHjAKkPo58ij9Ip3Q7BM= Received: from epcas2p3.samsung.com (unknown [182.195.41.55]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20250120083145epoutp0396c1c07f3324e2f283076e3ed5308f2a~cWXLNgK741620316203epoutp03J for ; Mon, 20 Jan 2025 08:31:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20250120083145epoutp0396c1c07f3324e2f283076e3ed5308f2a~cWXLNgK741620316203epoutp03J DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1737361905; bh=PFtg831O7vXcEYWfi+aXWoG6moV9NaIl5fziBougHAc=; h=From:To:Cc:Subject:Date:References:From; b=f9mFOGmA1nxz42TUorsniVBgnsAc+tO8Oc2PPhwoClj2exIM7L+pQN1zuCiX1AAWy F936dr3oRhBEPa7iSljuYf99mXY/8jf0n096qH8KFoDJAr/bfdweYVYrVgOrWpFZJu ND6rQf65QIZlY78kBMuOA/9yam0Zjdox+ya43L4s= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20250120083145epcas2p36218ee70b5aca7842c6bd91969e64794~cWXK11iFq2158221582epcas2p3r; Mon, 20 Jan 2025 08:31:45 +0000 (GMT) Received: from epsmges2p2.samsung.com (unknown [182.195.36.88]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4Yc3Tr6bGQz4x9QJ; Mon, 20 Jan 2025 08:31:44 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id A9.32.22094.0F90E876; Mon, 20 Jan 2025 17:31:44 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p3.samsung.com (KnoxPortal) with ESMTPA id 20250120083144epcas2p369584af764b617c3d2cb2a0568a45d6c~cWXJ55rpR2157021570epcas2p3j; Mon, 20 Jan 2025 08:31:44 +0000 (GMT) Received: from epsmgms1p2new.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20250120083144epsmtrp1e3007458702c6e51180a2dd370ea4c02~cWXJ5EqI82137421374epsmtrp1K; Mon, 20 Jan 2025 08:31:44 +0000 (GMT) X-AuditID: b6c32a46-48c3a7000000564e-8d-678e09f0ae98 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 57.38.18949.0F90E876; Mon, 20 Jan 2025 17:31:44 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.95.142]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20250120083144epsmtip2c6c62e91c9931fc9935f7718dfade1b9~cWXJmMgyF0879408794epsmtip21; Mon, 20 Jan 2025 08:31:44 +0000 (GMT) From: Hyesoo Yu To: Cc: janghyuck.kim@samsung.com, Hyesoo Yu , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm: slub: Print the broken data before restoring slub. Date: Mon, 20 Jan 2025 17:30:21 +0900 Message-ID: <20250120083023.4162932-1-hyesoo.yu@samsung.com> X-Mailer: git-send-email 2.48.0 MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrMJsWRmVeSWpSXmKPExsWy7bCmme4Hzr50g+MNJhYTewws5qxfw2Zx /dsbRou/nRdYLVZ2N7NZbJ5TbHF51xw2i3tr/rNatH3+BySWbGSymLhG1GJ2Yx+jA4/Hzll3 2T0WbCr12LSqk81j06dJ7B5db68weZyY8ZvF48mV6UweCxumMnv0bVnF6HFmwRF2j8+b5AK4 o7JtMlITU1KLFFLzkvNTMvPSbZW8g+Od403NDAx1DS0tzJUU8hJzU22VXHwCdN0yc4AuV1Io S8wpBQoFJBYXK+nb2RTll5akKmTkF5fYKqUWpOQUmBfoFSfmFpfmpevlpZZYGRoYGJkCFSZk Z0y7cY65YDtHxZNd51kaGH+ydTFyckgImEh8/32BvYuRi0NIYAejxIKH8xkhnE+MEtMPH4bK fGOUWL35GDNMy/rLH6ESexklLjXPYoJwPjNKXJh9CKyKTUBd4sSWZYwgtogAi8TK799ZQGxm gVXMEr0vzEFsYQF3iS8t78HqWQRUJZY+6gar4RWwkZj24gU7xDZ5idtrTkLFBSVOznwCNUde onnrbGaQxRICUzkkvt++CNXgIrF84RVWCFtY4tXxLVBxKYmX/W1QdrHEtsWHmSCaGxglNnfc h/rNWGL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sFxOYVsJGY9uIFO8QCeYnba05CxQUlTs58AmYz A8Wbt85mnsDINwtJahaS1AJGplWMkqkFxbnpucWGBUZ5qeV6xYm5xaV56XrJ+bmbGMHRoKW1 g3HPqg96hxiZOBgPMUpwMCuJ8Ip+6EkX4k1JrKxKLcqPLyrNSS0+xCjNwaIkzvvtdW+KkEB6 YklqdmpqQWoRTJaJg1OqgSn80Pw6X9F1KkohNakGJs///nvkXDgri//rrTCt69al6sfYrhyr 9Dgg3nnDqvj7XzX/yItc3GbWix4u3h7lZZ6ZvGjZ3IJ0wSM8zWz/b7gnrAmOyTz/xGPKh6/G F/d/2PNWT3cbqwPPfKNEu7fiEgrp+g9iA/ocHz4tEY9M2PrfwtHR+cCklz1f1Q/0Vsl9cHWc bZq659K3udYTTc9tVF2cr6jdc8I/SPTNeyb5K5ouTT+vSitLz3zHdzGt1bpA67dI0y79iy0T q3hXGptI8GRfFFIUc7K1O3BS9oCfRNWMlS7CBQob418LXbo9pSCFqZt9nsAMd/PJLpvqnTue iK0+GL7o5aao7ymHe8I3KbEUZyQaajEXFScCAEoxo1D1AgAA X-CMS-MailID: 20250120083144epcas2p369584af764b617c3d2cb2a0568a45d6c X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20250120083144epcas2p369584af764b617c3d2cb2a0568a45d6c References: X-Rspam-User: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 6379E140016 X-Stat-Signature: j8u3jw8y8rdj3ug9wgstjryqh9qdukqx X-HE-Tag: 1737361908-203647 X-HE-Meta: U2FsdGVkX1/MMdcpTC8oD3RkJOZR55FkdqOcOk95ix2g3QYLQ/4ifWjS0YGqN+5Ubpuv2ncGk04viI/eMYMHyRADsbK+y6kv/nogM/Jfk/ADK5mplP4OsWAkky14pYlF5REQDVNtAjaETNRaIv36jtVZdp4/E9/JazwYu6tOYu83j+GHNhYudcZYnQmK1NabZtXe1ME/O/f1QqoMCcDvACU8bEhEc620KtybrPXHoNbn/OQixPu9+N5mIuj5qwtvp+ftoJ2lxw/22EqKEG16WjUC0Vg08hvZepbhNArmSqfGvqErAA4bL8/wqaBUyPC9XZSDfmb0IjYjLftsaYH8Eo3KsD6C3g2agWedfMqGmaAXTe14m6AZN6RdbbAsAkFX4//PUB6Mcs42ERiGaIoGdhHcMapOjaHMxSdns6Hyk0rv5zBz47bRMXZ/vWFBuOLxLhPdAMzp74RFLG8yIShynWgbKlXhdHKvUoParuJimOv0hsFH+CJkC/iJm4Gp70mxaUfDrNZ9+eWL+fuSuEICOBF80Ujt3SrJmjF2l4A/795PR2m573eFEkpPRQF8+deH2EbfSewrUdlICFgPhESwu/gXllKRRtShHNXj/P+JcCqHD+8D+fTHd/K4O4u3koloUgKT86WHC0i+9wFShnfPv5zPpaN0sNRZOLlnAfQQkg7GskhzJnGMr86oX+6HiAbii90NqiK/uiLkNbvLSgaezIrKOirgJUdRWzVZc3ZzGPVetNoCj5eNtyS1L96SrWwT/867OIJG2BKgG0gWf4k+W93zMUUsJqIyV6mh50+0P+F0kpkIYDZWEyG0NEEldG7wfBlDl7wYmRocted5wpy9WQ9iNvY66sQFft4sgCFtbeX8QYbOaJR+ji7JQAKy6qilJjPB2LLzQlkBzkqoGcEnNJeCxdD4+ds5B5VTMG8S+PHF5NVWnquDyv9DIrSRkKOLCpniPYrQWxs8A0BvwIK udShlr/e oxMP2jKBW+CrLV4FRlp5aREiRnd7OW4p+Smy9nw6SjuCXRAivF3YN6Bp7kr96k5ykx3b0CH0gRUwHhEMwrzMtHoukdTXqLh2Vd3RjKJqS3N7crlQxqQ/KYVgudS0vFUsN3AWeb5T8g7R+uuZZz4J3ldah5agevV1J13Go X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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 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; }