On 12/9/19 12:01 PM, Joerg Sonnenberger wrote: > On Mon, Dec 09, 2019 at 07:18:06PM +0000, John Baldwin wrote: >> Author: jhb >> Date: Mon Dec 9 19:18:05 2019 >> New Revision: 355569 >> URL: https://svnweb.freebsd.org/changeset/base/355569 >> >> Log: >> Use 4 byte stack alignment instead of 8 byte. >> >> This was an old bug prior to r355373 and mostly harmless as it would >> waste at most a handful of bytes on the stack. > > Doesn't Linux assume 128bit alignment for i386 nowadays?
If it does, that is separate. This is about individual things we copy out onto the stack such as the path to the executable name, and random bytes for AT_RANDOM, etc. being aligned on a 4 byte boundary. It used 'rounddown()' with 'sizeof(void *)' before r355373 because that was copy and pasted from sys/i386/linux/linux_sysvec.c. But void * is 8 bytes on amd64, not 4 bytes as on i386. If Linux/i386 needs 16 byte alignment for the initial stack pointer, then it needs something like the change to align vectp in sys/amd64/linux/linux_sysent.c:linux_copyout_strings both in this file and in sys/i386/linux/linux_sysent.c before writing out the argv array. -- John Baldwin _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"