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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A5EBC433EF for ; Thu, 30 Sep 2021 03:50:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D0463615E2 for ; Thu, 30 Sep 2021 03:50:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D0463615E2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.dev Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 5ECB594007F; Wed, 29 Sep 2021 23:50:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 59CA094003A; Wed, 29 Sep 2021 23:50:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 48B4694007F; Wed, 29 Sep 2021 23:50:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0122.hostedemail.com [216.40.44.122]) by kanga.kvack.org (Postfix) with ESMTP id 3A33B94003A for ; Wed, 29 Sep 2021 23:50:31 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 558D5183C7659 for ; Thu, 30 Sep 2021 03:50:29 +0000 (UTC) X-FDA: 78642862578.13.E4CF8F6 Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by imf01.hostedemail.com (Postfix) with ESMTP id A1C4F50697F5 for ; Thu, 30 Sep 2021 03:50:28 +0000 (UTC) MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1632973826; h=from:from: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:in-reply-to:references:references; bh=cLt1QOP0nG0RwyKQN81qWRsnvEYhlKdhKe+ZjaSzveE=; b=USXVkRlcIq/mpGycslW7/Cikdf0Xcxnrm+HJRPfrmDl70FYz/JpJs9nlxgm1pZ/qB4Rj7/ ONKJ/q45HOppzmb3CICunZZZWwGbWcmvwinQiZcvqnoRIvEz+c9mhLup5ndOMOtahjpGJv jgVNp4dq8pxTNWtNgrDXDNjNXrYEx7M= Date: Thu, 30 Sep 2021 03:50:25 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: yanjun.zhu@linux.dev Message-ID: <606c859b9df4c8a1019a7fbc3c13afcb@linux.dev> Subject: Re: [PATCH 1/1] mm/kasan: avoid export __kasan_kmalloc To: "Marco Elver" Cc: ryabinin.a.a@gmail.com, akpm@linux-foundation.org, kasan-dev@googlegroups.com, linux-mm@kvack.org In-Reply-To: References: <20210929234929.857611-1-yanjun.zhu@linux.dev> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: yanjun.zhu@linux.dev X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: A1C4F50697F5 X-Stat-Signature: 7mbp9qesbw99c9si6u89c5pz4by3uqgs Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=USXVkRlc; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf01.hostedemail.com: domain of yanjun.zhu@linux.dev designates 188.165.223.204 as permitted sender) smtp.mailfrom=yanjun.zhu@linux.dev X-HE-Tag: 1632973828-582346 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: September 29, 2021 8:45 PM, "Marco Elver" wrote:=0A=0A= > On Wed, 29 Sept 2021 at 14:42, Marco Elver wrote:=0A= > =0A>> On Wed, Sep 29, 2021 at 07:49PM -0400, yanjun.zhu@linux.dev wrote= :=0A>> From: Zhu Yanjun =0A>> =0A>> Since the funct= ion __kasan_kmalloc is only used in kasan module,=0A>> remove EXPORT_SYMB= OL to this function.=0A>> =0A>> This is incorrect, see below.=0A>> =0A>> = @@ -521,7 +521,6 @@ void * __must_check __kasan_kmalloc(struct kmem_cache= *cache, const void=0A>> *object=0A>> {=0A>> return ____kasan_kmalloc(cac= he, object, size, flags);=0A>> }=0A>> -EXPORT_SYMBOL(__kasan_kmalloc);=0A= >> =0A>> Sorry, but this will break all users of kmalloc() with KASAN on = if=0A>> !TRACING:=0A> =0A> *module users.=0A> =0A> An allmodconfig but wi= th CONFIG_TRACING=3Dn will probably show you the problem.=0A=0AFollow you= r advice, I changed CONFIG_TRACING=3Dn in .config. Then I run "make -jxx = modules".=0ABut CONFIG_TRACING is changed to y. =0ASo what you mentioned = does not appear.=0A=0AZhu Yanjun=0A=0A> =0A>> __always_inline kmalloc() i= nclude/linux/slab.h=0A>> -> __always_inline kmem_cache_alloc_trace() incl= ude/linux/slab.h=0A>> -> __always_inline kasan_kmalloc() include/linux/ka= san.h=0A>> -> __kasan_kmalloc() mm/kasan/common.c