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, 23 Dec 2008 11:59:43 -0800
From:	Hiroshi Shimamoto <h-shimamoto@...jp.nec.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	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

Ingo Molnar wrote:
> * 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 :)

thanks for the above explanation.
I felt it's very hard to understand GCC.

Thanks,
Hiroshi
--
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