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: <20240327040047.478695-2-alexs@kernel.org>
Date: Wed, 27 Mar 2024 12:00:47 +0800
From: alexs@...nel.org
To: Josh Poimboeuf <jpoimboe@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	linux-kernel@...r.kernel.org (open list)
Cc: linux-kernel@...r.kernel.org,
	"Alex Shi (tencent)" <alexs@...nel.org>
Subject: [PATCH v2 2/2] objtool: remove unused parameter for has_modified_stack_frame

From: "Alex Shi (tencent)" <alexs@...nel.org>

Remove unused 'truct instruction *insn' to save a bit code text.

Signed-off-by: Alex Shi <alexs@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Josh Poimboeuf <jpoimboe@...nel.org>
---
 tools/objtool/check.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 88ac3e2be2bd..ecc56a5ad174 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -2680,7 +2680,7 @@ static bool is_special_call(struct instruction *insn)
 	return false;
 }
 
-static bool has_modified_stack_frame(struct instruction *insn, struct insn_state *state)
+static bool has_modified_stack_frame(struct insn_state *state)
 {
 	struct cfi_state *cfi = &state->cfi;
 	int i;
@@ -3473,7 +3473,7 @@ static int validate_sibling_call(struct objtool_file *file,
 				 struct instruction *insn,
 				 struct insn_state *state)
 {
-	if (insn_func(insn) && has_modified_stack_frame(insn, state)) {
+	if (insn_func(insn) && has_modified_stack_frame(state)) {
 		WARN_INSN(insn, "sibling call from callable instruction with modified stack frame");
 		return 1;
 	}
@@ -3503,7 +3503,7 @@ static int validate_return(struct symbol *func, struct instruction *insn, struct
 		return 1;
 	}
 
-	if (func && has_modified_stack_frame(insn, state)) {
+	if (func && has_modified_stack_frame(state)) {
 		WARN_INSN(insn, "return with modified stack frame");
 		return 1;
 	}
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ