Date: Fri, 13 Jul 2018 11:32:27 +0000 (UTC) From: Brooks Davis <brooks@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336238 - head/sys/kern Message-ID: <201807131132.w6DBWRZI029638@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: brooks Date: Fri Jul 13 11:32:27 2018 New Revision: 336238 URL: https://svnweb.freebsd.org/changeset/base/336238 Log: Round down the location of execpathp to slightly improve copyout speed. In practice, this moves the padding from below the canary to above execpathp has no impact on stack consumption. Submitted by: Wuyang-Chung (via github pull request #159) MFC after: 1 week Modified: head/sys/kern/kern_exec.c Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Fri Jul 13 07:08:06 2018 (r336237) +++ head/sys/kern/kern_exec.c Fri Jul 13 11:32:27 2018 (r336238) @@ -1512,6 +1512,7 @@ exec_copyout_strings(struct image_params *imgp) */ if (execpath_len != 0) { destp -= execpath_len; + destp = rounddown2(destp, sizeof(void *)); imgp->execpathp = destp; copyout(imgp->execpath, (void *)destp, execpath_len); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807131132.w6DBWRZI029638>