Page MenuHomeFreeBSD

linux(4): Preserve %rcx (return address) like a Linux do
ClosedPublic

Authored by dchagin on May 18 2023, 7:30 PM.
Referenced Files
Unknown Object (File)
Sun, May 17, 3:46 PM
Unknown Object (File)
Sun, May 17, 1:59 AM
Unknown Object (File)
Sat, May 16, 7:42 PM
Unknown Object (File)
Sat, May 16, 7:42 PM
Unknown Object (File)
Sat, May 16, 7:41 PM
Unknown Object (File)
Sat, May 16, 4:10 PM
Unknown Object (File)
Thu, May 14, 11:42 AM
Unknown Object (File)
Sun, May 10, 6:05 AM
Subscribers

Details

Summary

Perhaps, this does not makes much sense as destroyng %rcx declared by
the x86_64 Linux syscall ABI. However,:
a) if we get a signal while we are in the kernel, we should restore

tf_rcx when preparing machine context for signal handlers.

b) the Linux world is strange, someone can depend on %rcx value

after syscall, something like go.

MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable