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: <20081223143046.GD29151@elte.hu>
Date:	Tue, 23 Dec 2008 15:30:46 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Hiroshi Shimamoto <h-shimamoto@...jp.nec.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [RFC -tip 2/4] x86: uaccess: introduce __{get|put}_user
	exception handling framework


* Hiroshi Shimamoto <h-shimamoto@...jp.nec.com> wrote:

> From: Hiroshi Shimamoto <h-shimamoto@...jp.nec.com>
> 
> Impact: introduce new framework
> 
> Introduce exception handling framework.
> __{get|put}_user_ex_try() begins exception block and
> __{get|put}_user_ex_catch() ends block and if an exception occurred in this
> block using __{get|put}_user_ex, direct jump to __{get|put}_user_ex_catch()
> and err is set to specified value.

ha, this tickled ~12 year old memories: back then Linus came up with a 
very, very similar scheme, for user-copy exception handling.

Such a scheme would be elegant, creates more compact code (we can use 
conditional results directly in branch instructions instead of having to 
export them into registers), and it makes sense syntactically, but it 
doesnt work: GCC is free to reorder (or eliminate) basic blocks and these 
labels can lose their relationship.

So this cannot be done via inline assembly right now, it needs some 
compiler help. Sniff :)

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