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
@ -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