lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <174014502999.10177.11219583662056425412.tip-bot2@tip-bot2>
Date: Fri, 21 Feb 2025 13:37:09 -0000
From: "tip-bot2 for Dan Carpenter" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Dan Carpenter <dan.carpenter@...aro.org>, Ingo Molnar <mingo@...nel.org>,
 Song Liu <song@...nel.org>, x86@...nel.org, linux-kernel@...r.kernel.org
Subject:
 [tip: x86/core] x86/module: Remove unnecessary check in module_finalize()

The following commit has been merged into the x86/core branch of tip:

Commit-ID:     06dd759b68eea200e488cafbcfd382208a940777
Gitweb:        https://git.kernel.org/tip/06dd759b68eea200e488cafbcfd382208a940777
Author:        Dan Carpenter <dan.carpenter@...aro.org>
AuthorDate:    Wed, 19 Feb 2025 16:48:49 +03:00
Committer:     Ingo Molnar <mingo@...nel.org>
CommitterDate: Fri, 21 Feb 2025 14:27:42 +01:00

x86/module: Remove unnecessary check in module_finalize()

The "calls" pointer can no longer be NULL after the following
commit:

   ab9fea59487d ("x86/alternative: Simplify callthunk patching")

Delete this unnecessary check.

Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Acked-by: Song Liu <song@...nel.org>
Link: https://lore.kernel.org/r/fcbb2f57-0714-4139-b441-8817365c16a1@stanley.mountain
---
 arch/x86/kernel/module.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c
index cb9d295..615f74c 100644
--- a/arch/x86/kernel/module.c
+++ b/arch/x86/kernel/module.c
@@ -278,10 +278,8 @@ int module_finalize(const Elf_Ehdr *hdr,
 	if (calls) {
 		struct callthunk_sites cs = {};
 
-		if (calls) {
-			cs.call_start = (void *)calls->sh_addr;
-			cs.call_end = (void *)calls->sh_addr + calls->sh_size;
-		}
+		cs.call_start = (void *)calls->sh_addr;
+		cs.call_end = (void *)calls->sh_addr + calls->sh_size;
 
 		callthunks_patch_module_calls(&cs, me);
 	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ