Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2233333pxm; Fri, 4 Mar 2022 11:59:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJw+kt5c164olaAO3MMjlmFShzMWrq65qQL9bRaaB8js6gk0402fLhfFuxPTK8jjNbMdfjDF X-Received: by 2002:a17:90b:224d:b0:1bd:28ac:b9d8 with SMTP id hk13-20020a17090b224d00b001bd28acb9d8mr296884pjb.1.1646423941102; Fri, 04 Mar 2022 11:59:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646423941; cv=none; d=google.com; s=arc-20160816; b=rYzqOv406vV3cxkLnbErkKEv2uszAvXzfrtZOcA9atJ9JHvT8HUhlilMRi4pIwLRfL yg6oVlGM3/6FT2LwgbGpheF0Sh1PqOEHKuMedk2N1gF4Vy51P75t9lgFppKpOQoXiuZj AB8BBNGJJ0OpJtyxTfgWvSW6JGO49yu0lvJ9Y/wYj/5fHr5sHVKOiDxrLx3BTBLIb0t1 XBloTUJa4vSThJ5Vw2WrVTUZ8boWTp67Yipxe1+hapd1M3Wr6AkvvNg82ezWpT/iCPoG 0UTro0o2TjKwcXppjb4Gdtqf0EYFSicdeyVz9GOuJTOdTqUkXfZQxLJo+jTI/Z67jwGr XBlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=pN3nycF2X6fHWfqQuX6WHc3ZTvBGGIZogfQbyTU9TQY=; b=04p4BHUVh+VSmLT1OAoz5YWSCtUeh4QGGVxiZDp5uKQ15jrAzB+RKoSR5ZNyhYqSFJ XllGzAjCAiABo/sovFyUEaZHjg1tpXmySqFHK0NrbYCESXUoUV8js2NqbHAnJ6hbBm5y aH0guKBfmy7+AapACCYxlmLZvL4hyh7qHBDVKSY5qA1qGOJhZOx3ghljad6lzKD4MoeC DsFKNNWz8lTOnMqxhYv0CXj6TXtSUPyEUR9MBttU4ipFcMFbHui++6hUbQVdlXe8ZMDi C11TttqO5MfFhc5cmb8vS6HXjXcbb6ZOh05r0k4ZgL/ChvN/J9Pqaks8JqDDL2tB4ytd hQkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=JS8mNsZl; dkim=neutral (no key) header.i=@suse.cz; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id b11-20020a170902650b00b0015008ce963dsi5861738plk.112.2022.03.04.11.59.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Mar 2022 11:59:01 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=JS8mNsZl; dkim=neutral (no key) header.i=@suse.cz; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0CB9B2DC944; Fri, 4 Mar 2022 11:23:24 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231528AbiCDSaQ (ORCPT + 99 others); Fri, 4 Mar 2022 13:30:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241692AbiCDSaL (ORCPT ); Fri, 4 Mar 2022 13:30:11 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A08221470C7 for ; Fri, 4 Mar 2022 10:29:23 -0800 (PST) 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 DF1AA21124; Fri, 4 Mar 2022 18:29:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1646418561; 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=pN3nycF2X6fHWfqQuX6WHc3ZTvBGGIZogfQbyTU9TQY=; b=JS8mNsZlZzebTZBrKrjP2ORPoEh4qRDNGWEXsJms7ABTQoo9OSPWXSFXVpqJ40ll438Bfm mMM3m7BQAd+lEBzo/IWV3dqyucr3ypAp9dlrR2tS+Wz/dvYPB5lQf0ykyRVxVQECcmiqPm BG9gP8wb+mJkphZGA3D+Xlykso64yb0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1646418561; 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=pN3nycF2X6fHWfqQuX6WHc3ZTvBGGIZogfQbyTU9TQY=; b=+XnwmCPfRIxYQks5Mt/fAUOkUf/w3L2B2pqtJM4o90jAYpm4rbPFQxLb9y3hjEO2xQ9fN5 JaIBpv1FlR/Z9FDw== 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 B21B713B70; Fri, 4 Mar 2022 18:29:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id PjvHKoFaImJjAwAAMHmgww (envelope-from ); Fri, 04 Mar 2022 18:29:21 +0000 Message-ID: Date: Fri, 4 Mar 2022 19:29:21 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v2 3/5] mm/sl[auo]b: move definition of __ksize() to mm/slab.h Content-Language: en-US To: Hyeonggon Yoo <42.hyeyoo@gmail.com>, linux-mm@kvack.org Cc: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Marco Elver , Matthew WilCox , Roman Gushchin , linux-kernel@vger.kernel.org References: <20220304063427.372145-1-42.hyeyoo@gmail.com> <20220304063427.372145-4-42.hyeyoo@gmail.com> From: Vlastimil Babka In-Reply-To: <20220304063427.372145-4-42.hyeyoo@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/4/22 07:34, Hyeonggon Yoo wrote: > __ksize() is only called by KASAN. Remove export symbol and move > definition to mm/slab.h as we don't want to grow its callers. > > [ willy@infradead.org: Move definition to mm/slab.h and reduce comments ] > > Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Reviewed-by: Vlastimil Babka > --- a/mm/slab.h > +++ b/mm/slab.h > @@ -685,6 +685,8 @@ static inline void free_large_kmalloc(struct folio *folio, void *object) > } > #endif /* CONFIG_SLOB */ > > +size_t __ksize(const void *objp); > + > static inline size_t slab_ksize(const struct kmem_cache *s) > { > #ifndef CONFIG_SLUB > diff --git a/mm/slab_common.c b/mm/slab_common.c > index 1d2f92e871d2..b126fc7247b9 100644 > --- a/mm/slab_common.c > +++ b/mm/slab_common.c > @@ -1247,13 +1247,7 @@ EXPORT_SYMBOL(kfree_sensitive); > > #ifndef CONFIG_SLOB > /** Maybe just /* so it's not even parsed as a kernel-doc anymore? > - * __ksize -- Uninstrumented ksize. > - * @objp: pointer to the object > - * > - * Unlike ksize(), __ksize() is uninstrumented, and does not provide the same > - * safety checks as ksize() with KASAN instrumentation enabled. > - * > - * Return: size of the actual memory used by @objp in bytes > + * __ksize -- Uninstrumented ksize. Only called by KASAN. > */ > size_t __ksize(const void *object) > { > @@ -1269,7 +1263,6 @@ size_t __ksize(const void *object) > > return slab_ksize(folio_slab(folio)->slab_cache); > } > -EXPORT_SYMBOL(__ksize); > #endif >