Received: by 2002:ab2:7988:0:b0:1f4:b336:87c4 with SMTP id g8csp86695lqj; Thu, 11 Apr 2024 10:30:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXD5KKWZxxqB9GuMi83n8qkJFLW/TlQ0BizzLoymVkiEVTXcSDexxJO7kx3AYwFCp0Vz2GZiu83DUIyDzPHLIG6vSoNZYAI9YoxlTFKqQ== X-Google-Smtp-Source: AGHT+IFjZexaLeKe3GLJNLLQw+aBHgnY4OBZ7GXmL05x/zfdThAfWz6Twb9oVR7AxHQY4kMyRcVk X-Received: by 2002:a05:6a00:1390:b0:6ea:bb00:dbb6 with SMTP id t16-20020a056a00139000b006eabb00dbb6mr397172pfg.8.1712856627703; Thu, 11 Apr 2024 10:30:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712856627; cv=pass; d=google.com; s=arc-20160816; b=kc6ldWCC6ktfkro86mkzws00iUaCEfdp1uCXJflfct43FsPuYIrOo3IMjOYwqiNte1 HiVp9ynf0mOGLoj07A94fhsu/IDBYM9azlMkqtThJ8glBslC5HtPnUSNPelY+QBH//9a 4/BVW/4n+F4ojbCnj+RupdAfbkK9u7qJsiRRyV9z0ZwCwWMPiAULv0TFOD3Rge16VQOU Xw1P+CnrD4xyncLilN4oHnOsH3A9wzwrHlZ1kdLBLz35SPZqd8zmxOKhOlmcRwhVklHJ DQf8gpka1Hpz368Xmuys+WiMZhXzspELjDem86pufl7JrgBdXbCi5Qm9av5UkDfN3dej 05yQ== 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=SgAimfoqqdos20VWKa/NZoWkGX6dsss6oX4o+VgWJ6E=; b=rSg1EXRUgzXyKjVchcozTvmMqWWTdUFcTQXygu2+7pQOBavHs+441LslABAdxgAQJF QpCgYbZ0riOobdaDRyMCEthLN5wUYGcEO0vzNJrDn7lpCV5VgPrw3gduyttTgHgQ3Rtn F/E1vXVGVwSFhg01ryPfbMW5X4DBuyEZSJUfy+xfICaaG9W3lVGc5MuZRvBMvMqCd0QO ifrEuqhir/dFachNLIx3cMjQ6de1nPFEWRnq0NqRze95sNA72GqDQ4Ui/gXZylG/QwUD hupP3dMnLN5U9nWYh/g8crUHH4G7MWWkLmHHju42G4rwrvqRKv4ocVJKd26qN7EktKKP UsQg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=e959rFf0; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-141251-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141251-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 m11-20020a62f20b000000b006e6499d9bddsi1705264pfh.373.2024.04.11.10.30.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 10:30:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-141251-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=e959rFf0; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-141251-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141251-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 07819281290 for ; Thu, 11 Apr 2024 17:29:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BB05884052; Thu, 11 Apr 2024 16:01:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="e959rFf0" 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 B25F18405C; Thu, 11 Apr 2024 16:01:56 +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=1712851316; cv=none; b=FLI1+clwW+VhgFPniL0ZerlwZ6psxMM3WE0Wc4y+7FBQ0jRKkqPNO/Kx6U1ZVNyKj7W8VFLyTsMl3A+2xrv5Pb9gPhuSD6U9PlnDLEZWoT6nyfumdutcRmeLFNNJLCXDP354UeGKWVpvEDYKRr86wnreaHqkblMSUPEDqjKD/ZY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712851316; c=relaxed/simple; bh=M6QQiy27Yx7cZTOC0617KB9Ln6pKKwikPWIcgenY/bM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ryjcktRfj44SB90kOJ4FjXX6Cf8EyW5PFTr1mffkuA38y1fxyq+nz7YBWFxUcY5rlNZE05FHnKBi2DxoCEaXn40moTDy7Z8znzjed5oUKPdOy6eGSlYo3JSvgcr17CGP3MZfR3onTE/Pfb2OKA0l/rlFj1O6UTQRlMvLNsvvi5Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=e959rFf0; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65599C113CE; Thu, 11 Apr 2024 16:01:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712851316; bh=M6QQiy27Yx7cZTOC0617KB9Ln6pKKwikPWIcgenY/bM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e959rFf0FGI0PoEgIv3+2nGDkq9xVmqePeW9IUKhRR9fm/xePvfpioqz61uckMSmr bsKvhh8aiqb+1hbru4aZPJCKo3jfLBuXlFCvNMYWcCgxYX5gHAOiQiyrO2GFAU6bPm rDiEfTEbCXzSyUx6JjDJlgEPJsiVKld/UdGf8sfF1V548AL4O0qlf9lAbIDbEw/+nt b/UibzbyDfbVVY6IbEz1hMUj1Jp7rSovkVB467ogMQygsPwGkBwQLq2O4ziU/K02Hw iRGfOdEyV997OCcDBNKC0/iXYnnLp7WhCIWOyAIy3ufNrgtCZhStQZZ10xIfbu+t2p EOYI7IX8ofV0w== 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 , Michael Ellerman , Mike Rapoport , Nadav Amit , Palmer Dabbelt , Puranjay Mohan , Rick Edgecombe , Russell King , 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 v4 01/15] arm64: module: remove uneeded call to kasan_alloc_module_shadow() Date: Thu, 11 Apr 2024 19:00:37 +0300 Message-ID: <20240411160051.2093261-2-rppt@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240411160051.2093261-1-rppt@kernel.org> References: <20240411160051.2093261-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