Retguard addition in commit 72pYktDvmJhq7OyF was based on the understanding
authorguenther <guenther@openbsd.org>
Thu, 11 May 2023 19:35:50 +0000 (19:35 +0000)
committerguenther <guenther@openbsd.org>
Thu, 11 May 2023 19:35:50 +0000 (19:35 +0000)
commitce38bb7aeaffe4a092993e3c0db0f802ae5d1ee5
tree44c6fa38efd937cdfc05735f1d81e9f92a63d410
parent45b99ba90844baca4175c7ec19aa856307f525a5
Retguard addition in commit 72pYktDvmJhq7OyF was based on the understanding
that the removal of the off_t padding, amd64 syscalls no longer passed a 7th
or later argument.  We overlooked that syscall(2) bumps the arg count by one,
so six argument calls like SYS_sysctl still pass an argument on the stack.

So, repush the 7th argument so it's at the expected stack offset after the
retguard register is pushed.

problem reported and ok bluhm@
lib/libc/arch/amd64/sys/syscall.S