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: <20150128121833.GE4633@osiris>
Date:	Wed, 28 Jan 2015 13:18:33 +0100
From:	Heiko Carstens <heiko.carstens@...ibm.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Dominik Vogt <vogt@...ux.vnet.ibm.com>,
	Masami Hiramatsu <maasami.hiramatsu.pt@...achi.com>,
	Vojtech Pavlik <vojtech@...e.cz>,
	Jiri Kosina <jkosina@...e.cz>, Jiri Slaby <jslaby@...e.cz>,
	Andreas Krebbel <krebbel@...ux.vnet.ibm.com>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH/RFC 2/3] ftrace: introduce nohotpatch function attribute

On Wed, Jan 28, 2015 at 06:57:54AM -0500, Steven Rostedt wrote:
> On Wed, 28 Jan 2015 06:36:45 +0100
> Heiko Carstens <heiko.carstens@...ibm.com> wrote:
> 
> > On Tue, Jan 27, 2015 at 09:42:28AM -0500, Steven Rostedt wrote:
> > > On Tue, 27 Jan 2015 07:19:42 +0100
> > > Dominik Vogt <vogt@...ux.vnet.ibm.com> wrote:
> > >  
> > > > While the kernel may use only profiling or hotpatch at the same
> > > > time, Gcc is able to generate both for the same function.
> > > 
> > > Understood, but would that be useful for the kernel?
> > 
> > Right now not. We may change that anyway in the future if needed.
> > 
> > Steven, how do we proceed with this small series?
> > 
> > Since there don't seem to be any objections, I'll repost with the
> > changed notrace define. However I think the whole stuff should go
> > upstream via the ftrace tree. Is that ok with you?
> 
> I can take it or you can, I'm fine either way. If you want to take it,
> just add my Acked-by. If you prefer me to take it, just let me know.

Ok, then we'll put that on the s390 tree for the next merge window, so
we can fix any potential fallout easier.
I'll add your Acked-by to all three patches. The notrace patch is the
only one that I changed (see below).

Thanks!

>From a24aba18536b64f5395d4901499152191cbc4fae Mon Sep 17 00:00:00 2001
From: Heiko Carstens <heiko.carstens@...ibm.com>
Date: Sun, 18 Jan 2015 16:45:42 +0100
Subject: [PATCH 1/3] ftrace: let notrace function attribute disable
 hotpatching if necessary

gcc supports an s390 specific function attribute called "hotpatch".
It can be used to specify the number of halfwords that shall be added before
and after a function and which shall be filled with nops for runtime patching.

s390 will use the hotpatch attribute for function tracing, therefore make
sure that the notrace function attribute either disables the mcount call
or in case of hotpatch nop generation.

Acked-by: Steven Rostedt <rostedt@...dmis.org>
Signed-off-by: Heiko Carstens <heiko.carstens@...ibm.com>
---
 include/linux/compiler.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 33063f872ee3..1a31ab4fbdca 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -54,7 +54,11 @@ extern void __chk_io_ptr(const volatile void __iomem *);
 #include <linux/compiler-gcc.h>
 #endif
 
+#ifdef CC_USING_HOTPATCH
+#define notrace __attribute__((hotpatch(0,0)))
+#else
 #define notrace __attribute__((no_instrument_function))
+#endif
 
 /* Intel compiler defines __GNUC__. So we will overwrite implementations
  * coming from above header files here
-- 
2.1.4

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