lkml.org 
[lkml]   [2009]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC -tip 0/4] x86: reduce fixup of uaccess
H. Peter Anvin wrote:
> 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,

Hello Peter,

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

Thanks for comments.

>
> This introduces a new blocking construct, and it's not immediately
> obvious in the source code. I think introducing a technically redundant

Yeah, I think it's not friendly about readability now.

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

OK, I'll update like that.

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

I'm not sure which is better plain "err" or 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.

OK. Will drop underscores.

I'll repost update patches.

Thanks,
Hiroshi



\
 
 \ /
  Last update: 2009-01-08 02:47    [W:0.291 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site