logoalt Hacker News

oguz-ismail11/07/20241 replyview on HN

The last argument would be on the stack instead of in a register which is where the kernel expects to find the arguments. But a proper syscall implementation would handle this just fine (e.g. <https://github.com/bminor/glibc/blob/ba60be873554ecd141b55ea...>), so I don't think there's anything sus about it.


Replies

im3w1l11/07/2024

> movq 8(%rsp),%r9

This is a huge edgecase but is 8(%rsp) guaranteed to be readable memory

show 1 reply