Received: by 2002:ab2:3c46:0:b0:1f5:f2ab:c469 with SMTP id x6csp127484lqf; Fri, 26 Apr 2024 01:31:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW2kdB5FeZRcECcsy0IOPWJBxABWzFWXMZQy53LLc0879GS5DOq6DroefNLrfTRIU/ftJ4YUYDGzaIVqxYkKzA71nEfIcFT1CbCKtKafw== X-Google-Smtp-Source: AGHT+IE2FxaVBQ5HWQ7w8ezgAkDydGOJ9lrDYqMz+5E+BTyO/lCBqJORcIyHdfGPtbHcGym8rjfS X-Received: by 2002:a17:902:ce8b:b0:1e4:12e1:8887 with SMTP id f11-20020a170902ce8b00b001e412e18887mr1870238plg.26.1714120261232; Fri, 26 Apr 2024 01:31:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714120261; cv=pass; d=google.com; s=arc-20160816; b=MA9zAhh45zYktypUhzVaDz0KR6yQH8baiu8g0I4IdbxrkQy7MIw8t62s6gdMFzCfVu uUoEXfqd0FxE9Brfc5dhExESs0/d12/+kVmJDkdNhkLP5J1xt0R3Vdg0w925Sz5mamUM JucZw7Lib3DIXrVdOAbboX6rcHR0ACQeYgDxbzAEW8g1ErI4tGD5izKiA8u6tSZH3feK t3BDdZpdD9Di6tFX3JLuZlLiQeLrjGape1psAGamWj80JwR8ibgpxpupqA+6JQAZURAd gKAnC1wx4k1w+Ig4hBrZghHLOuL6+zzXHy14Ohwgvlmf41ZKfxuMCnBT9+FaUWLqsf1t cKAQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=xy/onuXdQ30KVEaYuNUZWEt3SxlLWflAgQY6tAjVj70=; fh=CzSJNj8w8iUnmlgWvNYhDvD5pl9OAXL/ljrL7Y6PMxw=; b=sIcsfNPsuyNkVqWrtMlSGoKpLK+mXAOT+LB2MNmcqvv+uviCOQVDB3/1IzZHfkmYEw jFbsDGHPWb1BK4Vq0F6M+RpnPK69M7NlNyP5V/MtoxUQtqLyf9u4xXutFlSpq+ZGrGQv wXIAysBTCc8okvZw6Yxs3bNr+jKprwYOP22cwZCxm+WXYkKNMOUpcqlqYh2NhtRlIMz2 7+3JCzl0LfRqxWlpFgAXqzZdWaiyDBZrnr1GCfBoryJSnysOs8qXYEgBvaHyeTGBNYHa FZVaDO1Z5gd7E/gALunccLQobamxlzPDwjuULLRapmcDylNt4G/H4KuQh28Es5yW4G/m coEA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c24bKCQ5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-159696-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159696-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id e10-20020a170902784a00b001e506539e21si14186598pln.313.2024.04.26.01.31.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 01:31:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159696-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c24bKCQ5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-159696-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159696-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C230FB23CB5 for ; Fri, 26 Apr 2024 08:30:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F27713D27B; Fri, 26 Apr 2024 08:29:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="c24bKCQ5" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 020EE14293; Fri, 26 Apr 2024 08:29:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714120166; cv=none; b=urDBDW24ma5ag9azdQeH1JsVSlVrtxBPCpKnCUm1W4EXWpHl3HCylIcPzpPcPu1laubY9mT3sCG8cc6v7PIJxZmp/DkKl572gul0OWnCTgXGrnJEDh9NyMSmRzeokdSEHtx0auefbETpwg8rMfqmK9OuLXKYPuIBZUuxd0coNHw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714120166; c=relaxed/simple; bh=M6QQiy27Yx7cZTOC0617KB9Ln6pKKwikPWIcgenY/bM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LNd2hGx15Pls9BiBJoR4oZGtlVOpQBnXYsgN98nz3na5z1Sa+cDciK01ahk5Jrhn+dmgzbNn8sKNEtzDlHW+uBxYfklyn8qEHmrrNHF8AvkxYkzCrAWu/Wd2CEClHoPWxBz/2CAxpAo61cZxkQyANCCox47NZVVzhKZ2dcXSXaU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=c24bKCQ5; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10782C2BD10; Fri, 26 Apr 2024 08:29:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714120165; bh=M6QQiy27Yx7cZTOC0617KB9Ln6pKKwikPWIcgenY/bM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c24bKCQ5nLfUTxCLWqOfgQrHZ66rXyNyy3K6/+7sZXY22/FWn10Lrl4zlYIe0pOUL lMnQgr2DBeTE7Bdkj6zwaYAFThxItyYHuSMxTkR0gqtLqINDT0PqizlT6gcZfC4sUN cieclkW2Qd72tX8Cj3W9rhCEbYpq2tQ2fcTxNT68cuSCVGGQF9jBPxBPfgkA9Q/udF LO2K80uaKqbrLmZ/ItY6/g8LKcrRxJOXkN4u2sbfQDiJFWKzUulbs75isiDuLjTGaY uzUNXOQZI0lkj3aD0OIRott2pxFL3MoWNBgluhl33vYY3U3o4rppM5pe3CB1zIuwEx 1m5Xuoq/+vTHA== From: Mike Rapoport To: linux-kernel@vger.kernel.org Cc: Alexandre Ghiti , Andrew Morton , =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= , Catalin Marinas , Christophe Leroy , "David S. Miller" , Dinh Nguyen , Donald Dutile , Eric Chanudet , Heiko Carstens , Helge Deller , Huacai Chen , Kent Overstreet , Luis Chamberlain , Mark Rutland , Masami Hiramatsu , Michael Ellerman , Mike Rapoport , Nadav Amit , Palmer Dabbelt , Peter Zijlstra , Rick Edgecombe , Russell King , Sam Ravnborg , Song Liu , Steven Rostedt , Thomas Bogendoerfer , Thomas Gleixner , Will Deacon , bpf@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, linux-parisc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, netdev@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org Subject: [PATCH v6 01/16] arm64: module: remove unneeded call to kasan_alloc_module_shadow() Date: Fri, 26 Apr 2024 11:28:39 +0300 Message-ID: <20240426082854.7355-2-rppt@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240426082854.7355-1-rppt@kernel.org> References: <20240426082854.7355-1-rppt@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Mike Rapoport (IBM)" Since commit f6f37d9320a1 ("arm64: select KASAN_VMALLOC for SW/HW_TAGS modes") KASAN_VMALLOC is always enabled when KASAN is on. This means that allocations in module_alloc() will be tracked by KASAN protection for vmalloc() and that kasan_alloc_module_shadow() will be always an empty inline and there is no point in calling it. Drop meaningless call to kasan_alloc_module_shadow() from module_alloc(). Signed-off-by: Mike Rapoport (IBM) --- arch/arm64/kernel/module.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/arch/arm64/kernel/module.c b/arch/arm64/kernel/module.c index 47e0be610bb6..e92da4da1b2a 100644 --- a/arch/arm64/kernel/module.c +++ b/arch/arm64/kernel/module.c @@ -141,11 +141,6 @@ void *module_alloc(unsigned long size) __func__); } - if (p && (kasan_alloc_module_shadow(p, size, GFP_KERNEL) < 0)) { - vfree(p); - return NULL; - } - /* Memory is intended to be executable, reset the pointer tag. */ return kasan_reset_tag(p); } -- 2.43.0