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 12, 6:38 PM
Unknown Object (File)
Fri, May 10, 6:22 PM
Unknown Object (File)
Thu, May 9, 5:04 PM
Unknown Object (File)
Sat, May 4, 4:19 AM
Unknown Object (File)
Mon, Apr 29, 8:29 AM
Unknown Object (File)
Mon, Apr 29, 8:29 AM
Unknown Object (File)
Mon, Apr 29, 8:19 AM
Unknown Object (File)
Sat, Apr 20, 7:08 PM
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