lkml.org 
[lkml]   [2020]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/7] exec: In setup_new_exec cache current in the local variable me
On Tue, May 05, 2020 at 02:44:28PM -0500, Eric W. Biederman wrote:
>
> At least gcc 8.3 when generating code for x86_64 has a hard time
> consolidating multiple calls to current aka get_current(), and winds
> up unnecessarily rereading %gs:current_task several times in
> setup_new_exec.
>
> Caching the value of current in the local variable of me generates
> slightly better and shorter assembly.
>
> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>

Reviewed-by: Kees Cook <keescook@chromium.org>

--
Kees Cook

\
 
 \ /
  Last update: 2020-05-05 22:51    [W:0.460 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site