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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 07 Jan 2009 01:33:04 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Hiroshi Shimamoto <h-shimamoto@...jp.nec.com>
CC:	Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC -tip 0/4] x86: reduce fixup of uaccess

Hiroshi Shimamoto wrote:
> This is my second try to reduce fixup code size for exceptions of uaccess.
> 
> This patch series reduces fixup code for exceptions of uaccess in signal.
> 
> I gave up to make direct jump to end of function when an exception occurs.
> However, I thought fixup code could be reduced. The concept is that to add
> uaccess_err in thread_info and set it to -EFAULT on exception, finally check
> this value on the last of function.
> 
> Is this good to reduce code size?
> 

Hello Hiroshi,

The patches look technically really nice.  I have a couple of stylistic
comments, though, which I'd like yours and others' comments on.

This introduces a new blocking construct, and it's not immediately
obvious in the source code.  I think introducing a technically redundant
set of braces and dropping the parens from the try construct and the
redundant pointer might look better:

	get_user_try {
		/* do stuff */
	} get_user_catch(err);

This makes it, in my opinion, much clearer that it is a new bracing
construct, and it also eliminates the need to form a pointer to "err"
(even though the compiler doesn't actually do so, it looks like it does
to the programmer.)

Also, I don't think we need double underscores for the wrapping
construct, since the get_user/__get_user (check/nocheck) etc.
distinction doesn't directly apply there.

What do you think?

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

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