System Call trashing registers

From: Joshua Hudson
Date: Thu Aug 24 2023 - 12:16:04 EST


1) A lot of my old 32-bit programs don't work on x64 linux anymore
because int 80h now trashes ecx and edx. This hasn't been a serious
problem for me.

2) syscall is documented to trash rcx and r11.

What I don't understand is why this hasn't ever led to a security
issue due to leaking values from kernel space (in the trashed
registers) back to userspace.