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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251117093137.572132-2-jolsa@kernel.org>
Date: Mon, 17 Nov 2025 10:31:33 +0100
From: Jiri Olsa <jolsa@...nel.org>
To: Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <peterz@...radead.org>
Cc: linux-kernel@...r.kernel.org,
	x86@...nel.org,
	Ingo Molnar <mingo@...nel.org>,
	Borislav Petkov <bp@...en8.de>,
	Dave Hansen <dave.hansen@...ux.intel.com>
Subject: [PATCH 1/5] x86/insn-eval: Remove regs arg from pt_regs_offset

It's not used, pt_regs_offset returns only offset to struct pt_regs,
not the actual register values.

Signed-off-by: Jiri Olsa <jolsa@...nel.org>
---
 arch/x86/include/asm/insn-eval.h | 2 +-
 arch/x86/lib/insn-eval.c         | 4 ++--
 arch/x86/mm/extable.c            | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/include/asm/insn-eval.h b/arch/x86/include/asm/insn-eval.h
index 4733e9064ee5..6b592040bda4 100644
--- a/arch/x86/include/asm/insn-eval.h
+++ b/arch/x86/include/asm/insn-eval.h
@@ -15,7 +15,7 @@
 #define INSN_CODE_SEG_OPND_SZ(params) (params & 0xf)
 #define INSN_CODE_SEG_PARAMS(oper_sz, addr_sz) (oper_sz | (addr_sz << 4))
 
-int pt_regs_offset(struct pt_regs *regs, int regno);
+int pt_regs_offset(int regno);
 
 bool insn_has_rep_prefix(struct insn *insn);
 void __user *insn_get_addr_ref(struct insn *insn, struct pt_regs *regs);
diff --git a/arch/x86/lib/insn-eval.c b/arch/x86/lib/insn-eval.c
index e03eeec55cfe..7b46eb717066 100644
--- a/arch/x86/lib/insn-eval.c
+++ b/arch/x86/lib/insn-eval.c
@@ -437,7 +437,7 @@ static const int pt_regoff[] = {
 #endif
 };
 
-int pt_regs_offset(struct pt_regs *regs, int regno)
+int pt_regs_offset(int regno)
 {
 	if ((unsigned)regno < ARRAY_SIZE(pt_regoff))
 		return pt_regoff[regno];
@@ -527,7 +527,7 @@ static int get_reg_offset(struct insn *insn, struct pt_regs *regs,
 	if (regno < 0)
 		return regno;
 
-	return pt_regs_offset(regs, regno);
+	return pt_regs_offset(regno);
 }
 
 /**
diff --git a/arch/x86/mm/extable.c b/arch/x86/mm/extable.c
index 2fdc1f1f5adb..b9a34de9181d 100644
--- a/arch/x86/mm/extable.c
+++ b/arch/x86/mm/extable.c
@@ -15,7 +15,7 @@
 
 static inline unsigned long *pt_regs_nr(struct pt_regs *regs, int nr)
 {
-	int reg_offset = pt_regs_offset(regs, nr);
+	int reg_offset = pt_regs_offset(nr);
 	static unsigned long __dummy;
 
 	if (WARN_ON_ONCE(reg_offset < 0))
-- 
2.51.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ