Message ID | 20241210041515.765569-1-hao.ge@linux.dev (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 5C814E7717F for <linux-mm@archiver.kernel.org>; Tue, 10 Dec 2024 04:15:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DF5FD8D0008; Mon, 9 Dec 2024 23:15:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DA57A8D0007; Mon, 9 Dec 2024 23:15:28 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C6CE38D0008; Mon, 9 Dec 2024 23:15:28 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id A49AB8D0007 for <linux-mm@kvack.org>; Mon, 9 Dec 2024 23:15:28 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 1D84F1402C9 for <linux-mm@kvack.org>; Tue, 10 Dec 2024 04:15:28 +0000 (UTC) X-FDA: 82877734422.21.CC71380 Received: from out-173.mta1.migadu.com (out-173.mta1.migadu.com [95.215.58.173]) by imf18.hostedemail.com (Postfix) with ESMTP id 8836D1C0004 for <linux-mm@kvack.org>; Tue, 10 Dec 2024 04:15:16 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=F0mTF8kV; spf=pass (imf18.hostedemail.com: domain of hao.ge@linux.dev designates 95.215.58.173 as permitted sender) smtp.mailfrom=hao.ge@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733804110; 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-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=jvB6EzRbD16SkG58oiYpRiJHJAIgPKUq3a5VWnlP/Zw=; b=Dw1g4q4be8YiKSAMv+wu1JuWyHRzjUA43QIVDpBGTxJcpuhVeKJJD+okp/AtpPLLA+4SLJ njqbuwrnMjZVefQbT3YOEgzEd7LjXbzY4xXINAyIecucsfF1FkKmzs7sMsmjE82OAUxEWf X1m0WwD/MUdNgiZtCVXnlYZNBQ/wsi4= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=F0mTF8kV; spf=pass (imf18.hostedemail.com: domain of hao.ge@linux.dev designates 95.215.58.173 as permitted sender) smtp.mailfrom=hao.ge@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733804110; a=rsa-sha256; cv=none; b=bW7zW7iCrJf8fvYUsL4+txqJZuGSFKW+ziwIYKhUHm2JUVugi9wiM+VEu6qLRELv4rb5KQ rsgVR7/sGlSnVtMLeThMJKdx0KldXuUvhgdSFDbRBgL3jFYZYv6lcwiY7rL9o2grJrGzRS E025EUhiJFGtgJWaBDaDq0EXJ5Mw4Ao= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1733804124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=jvB6EzRbD16SkG58oiYpRiJHJAIgPKUq3a5VWnlP/Zw=; b=F0mTF8kV0SH73PaVUbuhfhvdwQXCv/rb0RTtK54YqGRPilqq/P+TBGPBh7g4OIfrZWQYxn Qn1ZIKvHicftZy3Y4qKYy/FH0Be4JjKPTFJzlNJiIC2WCPV7Wvi2tsC/d+Kms0+HJawUfb JZdJO6NMVIUAQLEn35BJEOHqWT4rD/8= From: Hao Ge <hao.ge@linux.dev> To: surenb@google.com, kent.overstreet@linux.dev, akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, hao.ge@linux.dev, Hao Ge <gehao@kylinos.cn>, Ben Greear <greearb@candelatech.com> Subject: [PATCH] mm/alloc_tag: Add kasan_alloc_module_shadow when CONFIS_KASAN_VMALLOC disabled Date: Tue, 10 Dec 2024 12:15:15 +0800 Message-Id: <20241210041515.765569-1-hao.ge@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Rspamd-Queue-Id: 8836D1C0004 X-Rspamd-Server: rspam12 X-Stat-Signature: awnpr3ktwijt3at7gkuhqqaqbwipxa1u X-Rspam-User: X-HE-Tag: 1733804116-827667 X-HE-Meta: U2FsdGVkX19aJvbMcWk3eHKUmcUiWscsYFPnSAlYEYI+QIIch4uL2OySOGksiZO8aOswu4TrZN2yv7ib7dwuDZSnCkRrWBnHr84iS0rEdtQwCPP3v1ctgrIteu69IW8xwCP6iA1O9ZUkt8+jBGb3pZt4MoM6EZ295958reP/uCTAl/GUV2IocOl2OUyjGz5g5x9ZfAEbtid3cLSyAniam1icRrb8VTz+gMEKMGuIcS9mb5kTfymBTy+FxToi8CqJLFQRTOo0RPcH13XFsiNpPM4tcxeK5VX7/kVvqwJ65RvH4uuObyqgWFsQ5a0p6Ud+/14lueY7+P2ivcSPhxodHqENKmxirrGHseD/CODjjbkg5xQ15PtWGwpaQqZPWm4IF1++zF3CdMMZMYkb4wJhfRGQ8VgT0qvzo4qYINGYkNLVdTyL9J5Xty6vNMyu3OuqUSCajcN3hq0tvcHYBafXQKnp3QbifBnBte9AsaHhcvuw8iqPUAWwZou7xqY0ze+/gXjhBYmbuHn9gYdroM004ZAsz1vewgOqpyPWrCX8hHf4R50td7er6qn267rVPwQsKvMH8AkOhFswT4jTwm74EbJtvlA/2D8y2CCpHEI1Xdv2437sxhh6lssHQ8sYfdXVwDgNaiI1w2iltW5NN9kp8wZqYK7fnsHthSTwpTl5gnhjfxZkJC1TR93lIA2UQajzFH/BRZ40n8fECxgHXd3F6AKpMKHTuBGHAupo2cqNw7cWOY7F74LgYqJEhuzyXrPAeNX93V3gnTuHebH4so0A2po4Mni9JXBXpRIEY4bmTj/Py0K3eAa0dJCfE3l4k1jaD2MT1pBqxtonPOSHaI2IZw/02SzaMPPJPOEzqSPwf4z6voPhgKdkKkINvz6gIWz+iJUXZbEQUl1BkJR2UDzVkZdP0OTZ5vwDrYo9iQslF7/uysCqdEyDFk/w2MDsPMgEYNpx0r0DSEcP268OGCS 0LgLTecm 9NMXuDbtuZCe54CdOmfU5wb4Rz5WIrqU16+JWYJzq2qcMZKXb4YNi4uGoZ+l3t5Y36F6QRNDrjKawPw8kZdr1HhXeo30/2oPaQUGyeXSmbuv7bMAdnr8SW+lvuCXaNzPtCuecSSjh67OhUWIpLXQPkdz7Qci+zWoLq5Z5fp7LQyCIgC2FxBwMQNFhI7WlTsYAafuW7y3Ebr2ZMADspTTRKxlyQC+K7yB5v5hIFX2U32SY+xMpwff1lTPk2yU0HoxnIUesWRLMDWj22T5ZK0w/+GguxKFLqR5LN3kxo+mp8fVSrCgi7h83F6/YS+FaV5wk7nPuUnveXabqI40= 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
mm/alloc_tag: Add kasan_alloc_module_shadow when CONFIS_KASAN_VMALLOC disabled
|
expand
|
diff --git a/lib/alloc_tag.c b/lib/alloc_tag.c index f942408b53ef..88c1fc512ae0 100644 --- a/lib/alloc_tag.c +++ b/lib/alloc_tag.c @@ -422,6 +422,9 @@ static int vm_module_tags_populate(void) return -ENOMEM; } vm_module_tags->nr_pages += nr; + + if ((phys_end & (MODULE_ALIGN - 1)) == 0) + kasan_alloc_module_shadow((void *)phys_end, nr << PAGE_SHIFT, GFP_KERNEL); } /*