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
This commit is contained in:
parent
874774c5d4
commit
d92da75941
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=336238
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user