Skip to content
Commit 7d503feb authored by Eric W. Biederman's avatar Eric W. Biederman
Browse files

exec: In setup_new_exec cache current in the local variable me



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.

Reviewed-by: default avatarKees Cook <keescook@chromium.org>
Reviewed-by: default avatarGreg Ungerer <gerg@linux-m68k.org>
Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
parent 96ecee29
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment