| Date | Tue, 5 May 2020 13:51:09 -0700 | From | Kees Cook <> | Subject | Re: [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
|