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]
Date:	Wed, 10 Jun 2015 08:52:03 -0500
From:	Josh Poimboeuf <jpoimboe@...hat.com>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, Michal Marek <mmarek@...e.cz>,
	Peter Zijlstra <peterz@...radead.org>,
	Andy Lutomirski <luto@...nel.org>,
	Borislav Petkov <bp@...en8.de>,
	Linus Torvalds <torvalds@...ux-foundation.org>, x86@...nel.org,
	live-patching@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 00/10] x86/asm: Compile-time asm code validation

On Wed, Jun 10, 2015 at 03:08:14PM +0200, Andi Kleen wrote:
> 
> > 2. Each callable function must never leave its own bounds (i.e. with a
> >    jump to outside the function) except when returning.
> 
> That prevents a lot of optimizations with out of line code.

In most cases there are ways to keep the optimizations.  For example:

- grow the function bounds to keep the jump internal
- duplicate the destination code inside the function
- convert the jump to a call

Also note that these rules only affect _callable_ functions, so the
entry code and other non-function asm code can still be a pile of
spaghetti (though I think Andy is working on improving that).

> In fact even gcc with the right options can generate code that violates
> this. Standard Linux constructions, such as exception handling,
> also violate this.
>
> If your tool needs that your tool is broken.

This tool only validates asm code, so I don't see how whatever gcc does
is relevant.

> BTW any other frame pointer requirement should be also optional,
> as it slows down a number of CPUs, such as Atoms.

Yes.  This patch set is a first step towards being able to disable frame
pointers.  Once all callable functions are reasonably structured, we can
start generating and validating DWARF CFI data.  Then we can make a
reliable DWARF unwinder and get rid of frame pointers.

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