From mboxrd@z Thu Jan 1 00:00:00 1970 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 3CEBEC433F5 for ; Thu, 7 Apr 2022 09:58:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B6E306B0071; Thu, 7 Apr 2022 05:57:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AF6F16B0073; Thu, 7 Apr 2022 05:57:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 997726B0074; Thu, 7 Apr 2022 05:57:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id 83CB86B0071 for ; Thu, 7 Apr 2022 05:57:54 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 499FF211FA for ; Thu, 7 Apr 2022 09:57:44 +0000 (UTC) X-FDA: 79329631248.19.98F0192 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf05.hostedemail.com (Postfix) with ESMTP id C11F2100002 for ; Thu, 7 Apr 2022 09:57:43 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id C32D121118; Thu, 7 Apr 2022 09:57:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1649325462; h=from:from:reply-to: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:in-reply-to:references:references; bh=5nI9oyUvHFM5eGetZ+O4IuNGMmysnPBQecOrPZDio/k=; b=CNJ7geQJSlcG/RhHpa1tjottVeZqYpQT0Mw42RTwmO1M5FPxDSdiO8SnH+xXhB1p8Q0BdK aovdAVkYlUvQ/Uze/MDUfWR2fJAGM+2oBLs/Mm9axNiNGztzwLkho45nhuFRcuiWvbvDRb bdnMPSjLgagVrzhmy9e8Za9gxf4pgA4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1649325462; h=from:from:reply-to: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:in-reply-to:references:references; bh=5nI9oyUvHFM5eGetZ+O4IuNGMmysnPBQecOrPZDio/k=; b=/V2x1NPw0ZVL6unKqEvrg10FqFRoxtfHvMrNkYMYnJc9ovOs4ozktsQub9dj0WecH/QxMI eElJvePzfLtUNGBg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 8EB3513485; Thu, 7 Apr 2022 09:57:42 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 0741Ipa1TmLtOwAAMHmgww (envelope-from ); Thu, 07 Apr 2022 09:57:42 +0000 Message-ID: Date: Thu, 7 Apr 2022 11:57:42 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH] mm, kfence: support kmem_dump_obj() for KFENCE objects Content-Language: en-US To: Marco Elver Cc: Andrew Morton , Alexander Potapenko , Dmitry Vyukov , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Roman Gushchin , kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, kernel test robot , Hyeonggon Yoo <42.hyeyoo@gmail.com> References: <20220406131558.3558585-1-elver@google.com> <4b592848-ef06-ea8a-180a-3efc22b1bb0e@suse.cz> From: Vlastimil Babka In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam09 X-Rspam-User: X-Stat-Signature: 95xooys5m6yqucxbec9x3c4wsmaksja5 Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=CNJ7geQJ; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b="/V2x1NPw"; dmarc=none; spf=pass (imf05.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.28 as permitted sender) smtp.mailfrom=vbabka@suse.cz X-Rspamd-Queue-Id: C11F2100002 X-HE-Tag: 1649325463-52956 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: On 4/7/22 11:48, Marco Elver wrote: > On Thu, 7 Apr 2022 at 11:43, Vlastimil Babka wrote: >> >> On 4/6/22 15:15, Marco Elver wrote: >> > Calling kmem_obj_info() via kmem_dump_obj() on KFENCE objects has been >> > producing garbage data due to the object not actually being maintained >> > by SLAB or SLUB. >> > >> > Fix this by implementing __kfence_obj_info() that copies relevant >> > information to struct kmem_obj_info when the object was allocated by >> > KFENCE; this is called by a common kmem_obj_info(), which also calls the >> > slab/slub/slob specific variant now called __kmem_obj_info(). >> > >> > For completeness, kmem_dump_obj() now displays if the object was >> > allocated by KFENCE. >> > >> > Link: https://lore.kernel.org/all/20220323090520.GG16885@xsang-OptiPlex-9020/ >> > Fixes: b89fb5ef0ce6 ("mm, kfence: insert KFENCE hooks for SLUB") >> > Fixes: d3fb45f370d9 ("mm, kfence: insert KFENCE hooks for SLAB") >> > Reported-by: kernel test robot >> > Signed-off-by: Marco Elver >> > Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> >> >> Thanks. >> Given the impact on slab, and my series exposing the bug, I will add this to >> slab tree. > > It's already in Andrew's tree: > https://lore.kernel.org/all/20220406192351.2E115C385A5@smtp.kernel.org/T/#u Ah, missed that. > Does your series and this patch merge cleanly? Yeah the dependency is not on the code level. > If so, maybe leaving in > -mm is fine. Of course I don't mind either way and it's up to you and > Andrew. Yeah should be fine as linux-next will be safe with both trees merged. Thanks. > Thanks, > -- Marco