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]
Date:	Tue, 12 Nov 2013 11:44:32 +0100
From:	Petr Mladek <pmladek@...e.cz>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Jiri Kosina <jkosina@...e.cz>, linux-kernel@...r.kernel.org,
	x86@...nel.org
Subject: Re: [PATCH v2 1/8] x86: speed up int3-based patching using less
 paranoid write

Steven Rostedt píše v Pá 08. 11. 2013 v 07:43 -0500:
> On Fri, 08 Nov 2013 21:04:26 +0900
> Masami Hiramatsu <masami.hiramatsu.pt@...achi.com> wrote:
> 
> > (2013/11/08 18:12), Petr Mladek wrote:
> > > This change is inspired by the int3-based patching code used in
> > > ftrace. See the commit fd4363fff3d9 (x86: Introduce int3
> > > (breakpoint)-based instruction patching).
> > > 
> > > When trying to use text_poke_bp in ftrace, the result was slower than
> > > the original implementation.
> > > 
> > > It turned out that one difference was in text_poke vs. ftrace_write.
> > > text_poke did many extra operations to make sure that the change
> > > was atomic.
> > 
> > AFAIK, the main reason why text_poke is used is avoiding
> > RODATA protection (by alias mapping).
> 
> That is correct, and the reason ftrace didn't do that is because it
> would be quite expensive to map 22,000 addresses for each change.

I see. I am going to prepare v3 with the following changes:

	+ use text_poke in text_poke_bp back again because it is not
          effective to make the pages rw only for a single address;
          the alias mapping is faster here

	+ use the faster text_poke_part only in text_poke_bp_iter;
          the caller of this function will be responsible for
          making the code rw

	+ I will rework the error handling as suggested in the other
          mails; I will try to add some also for text_poke.

Thanks a lot for hints.

Best Regards,
Petr

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