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:	Wed, 17 Jun 2009 18:27:34 -0400
From:	Masami Hiramatsu <mhiramat@...hat.com>
To:	Tim Abbott <tabbott@...lice.com>
CC:	Ingo Molnar <mingo@...e.hu>,
	Ananth N Mavinakayanahalli <ananth@...ibm.com>,
	lkml <linux-kernel@...r.kernel.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Jim Keniston <jkenisto@...ibm.com>,
	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
	Christoph Hellwig <hch@...radead.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Anders Kaseorg <andersk@...lice.com>,
	systemtap <systemtap@...rces.redhat.com>,
	DLE <dle-develop@...ts.sourceforge.net>
Subject: Re: [RFC][ PATCH -tip 0/6] kprobes: Kprobes jump optimization support

Masami Hiramatsu wrote:
>> (1) The compiler is allowed to do cross-function optimization within a 
>> compilation unit where code in one function jumps into the middle of 
>> another function.
> 
> Hmm, right. This is a real problem. I think I have 2 options for this
> issue. I counted the cross-function jumps on my kernel roughly, and
> I found there were about 856 jumps jump into 158 functions (it might be
> incorrect, I just used 'objdump -d', and it also disassembles data
> section...)

Hmm, almost all of these functions are jumped from .fixup section.
Obviously, these should be mentioned.

> - Making a blacklist of target functions or addresses which cross-function
>   jumps jump into. This will be done by disassembling kernel when starting up
>   kernel and loading modules.(or, at build-time)

If we can make this blacklist, it will include above .fixup section.

> 
> - Just disables cross-function optimization by adding --param
>   min-crossjump-insns=XXXX where XXXX is enough big number, when
>   CONFIG_OPTPROBES=y

BTW, I've tried to compile with min-crossjump-insns=32768. It actually
increased vmlinux size (about 1%),

   text    data     bss     dec     hex filename
5767574 2022487 1521264 9311325  8e145d vmlinux-crossjump
5809551 2022487 1521264 9353302  8eb856 vmlinux-noncrossjump

However, with crossjumps opt, it seems not to add any jumps which
jump into the middle of other functions...

Thanks,

-- 
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division

e-mail: mhiramat@...hat.com

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