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>] [day] [month] [year] [list]
Date:	Fri, 25 Jan 2013 13:04:16 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	LKML <linux-kernel@...r.kernel.org>,
	linux-mips <linux-mips@...ux-mips.org>
Cc:	Al Cooper <alcooperx@...il.com>,
	David Daney <ddaney.cavm@...il.com>,
	Ralf Baechle <ralf@...ux-mips.org>
Subject: [PATCH] mips/ftrace: Fix kernel compile error

While compiling for my yeeloong2 laptop, I hit this compile error.

As warnings are set for errors, if we define ftrace_modify_code_2(), we
must use it. As MIPS 64 does not use this function, it requires being
commented out via an #ifndef CONFIG_64bit. Otherwise you get this error:

  CC      arch/mips/kernel/ftrace.o
cc1: warnings being treated as errors
/work/autotest/nobackup/mips-test.git/arch/mips/kernel/ftrace.c:98:12:
error: 'ftrace_modify_code_2' defined but not used
make[3]: *** [arch/mips/kernel/ftrace.o] Error 1
make[2]: *** [arch/mips/kernel] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [arch/mips] Error 2
make[1]: *** Waiting for unfinished jobs....


Cc: Al Cooper <alcooperx@...il.com>
Cc: David Daney <ddaney.cvm@...il.com>
Signed-off-by: Steven Rostedt <rostedt@...dmis.org>

diff --git a/arch/mips/kernel/ftrace.c b/arch/mips/kernel/ftrace.c
index 6bcb678..83fa146 100644
--- a/arch/mips/kernel/ftrace.c
+++ b/arch/mips/kernel/ftrace.c
@@ -95,6 +95,7 @@ static int ftrace_modify_code(unsigned long ip, unsigned int new_code)
 	return 0;
 }
 
+#ifndef CONFIG_64BIT
 static int ftrace_modify_code_2(unsigned long ip, unsigned int new_code1,
 				unsigned int new_code2)
 {
@@ -110,6 +111,7 @@ static int ftrace_modify_code_2(unsigned long ip, unsigned int new_code1,
 	flush_icache_range(ip, ip + 8); /* original ip + 12 */
 	return 0;
 }
+#endif
 
 /*
  * The details about the calling site of mcount on MIPS


--
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