Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp955063lqh; Sun, 5 May 2024 09:07:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWDpUIf764m8FxjBPVzzR2WrdfCbV9rKjJmib2sieu5Xv/GHzppXBGGVibdKTHApfV/jLHJN5fNbB4wzsxyB76AKb+Sy5R3g/axFsrtjg== X-Google-Smtp-Source: AGHT+IFrsOHFysVNYatKq6U8E1rLzo3N9kY7FcM3awZRFRaM4bl353SSqoBGdfPL1qWMB/rGxOa9 X-Received: by 2002:a17:90a:b802:b0:2ac:fd66:52f9 with SMTP id n2-20020a17090ab80200b002acfd6652f9mr6818257pjr.27.1714925247073; Sun, 05 May 2024 09:07:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714925247; cv=pass; d=google.com; s=arc-20160816; b=X19OscKees13PvY0KZ1FYpYTHNGNFrhOJiebBIas7GfyRew8NJpGM9u4j53w2pI4il 7UB2rNmIBW30I50BlYDyYOCLeq4XOmguRXZjuQnD8x6ZI+bjcIShXPZ8NJxajbCViPTU yg0VOjG1AVD2/1rVF1jED6JS9l8DSTAp4HQCN1KVFQqvMXOeh5UHNVPAc7qECoCxdFb3 fSfEuEgnxVUQnEIW3OkV2wpxSl0v5pUf22L4pgEslApnEMyCVRBDAKORINz3VPzsGnYo z3cibq1e05QQqCD3o5XiKPtPHotFOs8vKPY742yvzChEuzChgfdhvavtuLw9ny+pBBKb QW8A== 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=Hur1Ox4UVY8CJ+UkFvS1tjjuIJbfjIxUd04pOdDk42c=; b=TNVxKtCreY2WM3EGgpL2wIdmUZeXtDmNVeSKxWk8gjIDneE+K1429eWQN4rgpDGVol 36NZDGeei2zNjXAkIFEtjJ7IXjeEyRY4P0wHVzANaE47LyCyUEAzhneKU83JzfdCsgPd hV9dJD6T3wuI6CaNjW0LYw1d136sxo/yRl/JNnR9dpkzjz7+wGtfzMSJ9+7YcS6caZhh In4H/dBvD2JfLNHLAVvICfK3ac5ig61OhC0GbQYAduXqCtYkOLdhUqYg/u0S3S5lRMqr g6NjFlPQ3MLLjIw4Gqd7qBmZIGAK224I1sqOcy2SRC6bZYhxzU7ZcK5QbRzLqOlABvts k4gw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qq9xkaB6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-169037-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169037-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id cm3-20020a17090afa0300b002b328adc3d0si6660699pjb.41.2024.05.05.09.07.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 May 2024 09:07:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169037-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qq9xkaB6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-169037-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169037-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id A13B1281A00 for ; Sun, 5 May 2024 16:07:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9C02A3C08D; Sun, 5 May 2024 16:07:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qq9xkaB6" 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 91F9C37707; Sun, 5 May 2024 16:07:00 +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=1714925220; cv=none; b=gr7dg9xR2QnYbKCHNu0ABI84OTyz0M9fKwEVCD3tt1qMEwcBitbz6xnHhqgEwA+z0K+OxbKH2siaisGr385i0VtN1cbyCoWXdVp8muZLjAhBPkfSryiswXgenTyK9Q1enL50sfeino/4q8GDwA5ueh8s92v5IIM/gr99F7NRe8U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714925220; c=relaxed/simple; bh=M6QQiy27Yx7cZTOC0617KB9Ln6pKKwikPWIcgenY/bM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aE4ylf3ALZho69UjXZrZ9FXYEvXjk5GQzZTzWuidZzcBL7koHNnPx/QN4qbY3SfXaXV92Hbae7aaXbqKqrZ0gw0SOo2ERg6dXK52Oo1Gxkefujp/CSYlu0dOKtz57d/P8f7OmwnyTgDknfF1763U1GA+i7RfrwlFLa4vQo7JiK0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qq9xkaB6; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F4F3C4DDE3; Sun, 5 May 2024 16:06:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714925220; bh=M6QQiy27Yx7cZTOC0617KB9Ln6pKKwikPWIcgenY/bM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qq9xkaB6DJwbvT6OTP2sGk7b6G6bmDN5GyK5sBXSm32BVbedH8jHvu58xQEar8ba4 uKzUigAgbBAtsz8r5l3mt2L2za5eSKU/+BjQNHwkb8bkk1dSzjGw0MuhLVplgL5ZP8 9+4Xjjkzq/fb5aRZ15hEIYgAO+SLQ3ZdibwPKIo+aOqxO1Wde5HY2qBWwQ/K0irIeT ivaaNIlis9trjR8Xspz86sAH3Biv9Y1hr0lxZc08RADzGXQ7JtgHd1tAb126rA5WHB b8dLhnVtioffkmnpyWBCyjSpVlTprGY0DDKi7/kPoX4BYqxHmygNlAT6hSyOu4Q7Tl 8KyBh8i4EO9TA== 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 , Liviu Dudau , Luis Chamberlain , Mark Rutland , Masami Hiramatsu , Michael Ellerman , Mike Rapoport , Nadav Amit , Palmer Dabbelt , Peter Zijlstra , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , 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 RESEND v8 01/16] arm64: module: remove unneeded call to kasan_alloc_module_shadow() Date: Sun, 5 May 2024 19:06:13 +0300 Message-ID: <20240505160628.2323363-2-rppt@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240505160628.2323363-1-rppt@kernel.org> References: <20240505160628.2323363-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