Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp913197lqh; Sun, 5 May 2024 07:27:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWvy/lIhMyfVwoAgtapkzZWwA3YPq82M8M9C2bb4Ubfqm4BdRuQQBVMvJ5fvCMgoy+tvYejs4oDZvLyxjgJT+qVewv36Kyl0IMHuvuHIw== X-Google-Smtp-Source: AGHT+IEg1n3ZO087SRDfF1OjLf2AjoibciaXeEZBv6gI83JajCCkQKIm8hRJsnaUDUcDgwgf28Iy X-Received: by 2002:a05:6214:e84:b0:6a0:b36d:b7ab with SMTP id hf4-20020a0562140e8400b006a0b36db7abmr11013625qvb.7.1714919222194; Sun, 05 May 2024 07:27:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714919222; cv=pass; d=google.com; s=arc-20160816; b=RRkcktlusiardQPU2+TvenRwoTDDZzLnTJ9YeVE1SPUT1I+SxfFj0qaVMUaYvwJHjb +LtKK22v/MqfQPqfqy9zYpylK5R+EySwKBc78/pgkDFhb2fSQMI/u+9QBw2Sq3oGnZeW pt6nF17osmBgNlEQ3RnlRn/VK921P8wIAbGnp5x0OTB9qrlPZprsqzx8ouidva3t+gDp t/VN1F1NhKeYCNxofJNvLMMoiARuovpzuyD5NyuzsPIJkH9Csg1ExH9Z6JGKxDdk5XQx yKrDVv9o9Je8AHqLDiIMJWPjRALNqInrQcU1sMXJSdxfwneTX8j7GlR9YqPjcMhGs0vk BFxA== 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=UA1/t65coKqP/63WIjNW8WKYHxLCgBub//cqk8PZ0kGolT9aYEafVoJqQLaUHZZ8dO QuqU5lYSjczLjASDBT8Q8f15pCDIdmsgJZPa+uHwivpoooc6iVynLxIyvGkLZJtrJAtH kg5uCncVO3ovtOO/8cya8HUZPwX+ZneBSVdzLaDV83jV1dJ38BPewh0V23Q69fxuI91m cgC6XmxXe2/glLRmzxmcSSsK8HnczkPFWwiJNZ0gqvCXS9wBTVmLoCuZhgaerGl1mRzS sa3/IylK4ejVd70JrgThgjqE/V2shIqiGWVvLP+fcQdbFHFDygavHA1oLrxh6cEL/Cer jtmg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NSPh68o6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-169001-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169001-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 10-20020ad45baa000000b006a0c784a87bsi7356183qvq.100.2024.05.05.07.27.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 May 2024 07:27:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169001-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NSPh68o6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-169001-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169001-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D9D7D1C20A96 for ; Sun, 5 May 2024 14:27:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0815136124; Sun, 5 May 2024 14:26:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NSPh68o6" 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 F1E212230C; Sun, 5 May 2024 14:26:33 +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=1714919194; cv=none; b=rLe1sGyNVBSvayAuJPYXwvoxSsFEgjN/lYikYkTiDn/nexctUkWSjdD6Sw6HfbbW9dXLQ3htBqNvqr9kLSnDYI12QkPC5XshFhk1z17luoWL8ghGTos6jFS0FaGWWIoPB7eyzZ0K1lDEHKCKWSr9EYeKWM03faEeuwDFZc/2qms= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714919194; c=relaxed/simple; bh=M6QQiy27Yx7cZTOC0617KB9Ln6pKKwikPWIcgenY/bM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=p/LScXLf6gTJp06p/CRRMq6xGkfEdAQmvl1ga38WyO1OJQte21LD/NjQl0yacNc0LJFoEJ0zvxqrtn6sPFdo47880b9LTtbuDEzsEsQAtoEn2LCqO9Ci95pdzmXyvOp4DtMHw46TM1TjA41sY2JX7Eg4900w9WRh9W+Sr66IIho= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NSPh68o6; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC393C4DDE5; Sun, 5 May 2024 14:26:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714919193; bh=M6QQiy27Yx7cZTOC0617KB9Ln6pKKwikPWIcgenY/bM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NSPh68o6mPYr5fxxFtC2V72LTOuvr3yq8hW9zx6j+MQT2QTIBh9u0UYi6U60wKMQ8 4pUcdPzWIOrk786o1LPMCd95D81lUAiJdKTVxj1ZpL+gyGi8qYDPggeL2hw/UDWEMu H8yR71nI/+PlLDzZBqTfTQ1Cie+RG4x5ncIdrHl8Seo9b772nXYthDV76uYlYsxO3e wQYg6gU14o2i3rAa5QG/0f77H7ZldG9qTZa21eZgJY4qTNmIeZTc79JOB4S8iYpY/l 0cYrL/tkLY7wSmRuDhM/ExnpEYA0X6qhsgfUjZwCYRm6wHSDtLs/Jy026Jn90UZc9J yhiYIU+MAPqGA== 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 v8 01/17] arm64: module: remove unneeded call to kasan_alloc_module_shadow() Date: Sun, 5 May 2024 17:25:44 +0300 Message-ID: <20240505142600.2322517-2-rppt@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240505142600.2322517-1-rppt@kernel.org> References: <20240505142600.2322517-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