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-next>] [day] [month] [year] [list]
Message-Id: <1428524992-5979-1-git-send-email-linux@roeck-us.net>
Date:	Wed,  8 Apr 2015 13:29:52 -0700
From:	Guenter Roeck <linux@...ck-us.net>
To:	Ralf Baechle <ralf@...ux-mips.org>
Cc:	linux-mips@...ux-mips.org, linux-kernel@...r.kernel.org,
	Guenter Roeck <linux@...ck-us.net>,
	Andy Lutomirski <luto@...capital.net>,
	David Daney <david.daney@...ium.com>
Subject: [PATCH] mips: Fix build if PERF_EVENTS is configured

mips builds fail in -next as follows if PERF_EVENTS is configured.

kernel/built-in.o: In function `perf_sample_regs_user':
kernel/events/core.c:4828: undefined reference to `perf_get_regs_user'

The problem is caused by commit 3478e32c1545 ("MIPS: Add user stack and
registers to perf.") in combination with commit 88a7c26af8da ("perf:
Move task_pt_regs sampling into arch code"), which introduces
perf_get_regs_user().

Cc: Andy Lutomirski <luto@...capital.net>
Cc: David Daney <david.daney@...ium.com>
Signed-off-by: Guenter Roeck <linux@...ck-us.net>
---
Compile tested only.

 arch/mips/kernel/perf_regs.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/mips/kernel/perf_regs.c b/arch/mips/kernel/perf_regs.c
index 0451c4b..5b04454 100644
--- a/arch/mips/kernel/perf_regs.c
+++ b/arch/mips/kernel/perf_regs.c
@@ -58,3 +58,11 @@ u64 perf_reg_value(struct pt_regs *regs, int idx)
 
 	return (s64)v; /* Sign extend if 32-bit. */
 }
+
+void perf_get_regs_user(struct perf_regs *regs_user,
+			struct pt_regs *regs,
+			struct pt_regs *regs_user_copy)
+{
+	regs_user->regs = task_pt_regs(current);
+	regs_user->abi = perf_reg_abi(current);
+}
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ