https://bugzilla.mindrot.org/show_bug.cgi?id=3511
Damien Miller <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from Damien Miller <[email protected]> --- I don't know if Go is ideal for interfacing with a C ABI running in another process - the golang runtime makes many assumptions about the system that may not be true when loaded into another process' address space. In the case of sshd, some of these assumptions likely relate to threads (OpenSSH isn't, Golang is), fork/exec (which is tricky around threads) and sshd clobbering file descriptors using closefrom(). The way I have seen other people attempt similar things is to use a small C shim that compiles to the loadable module that talks via a socket to the application logic that is written in Go. This keeps most of the code in Go but provides a clean and minimal ABI that isn't likely to make assumptions that cause problems. The other approach is to write the whole thing in C, C++ or Rust, each of which are more explicit about doing things that could cause problems elsewhere. -- You are receiving this mail because: You are watching someone on the CC list of the bug. You are watching the assignee of the bug. _______________________________________________ openssh-bugs mailing list [email protected] https://lists.mindrot.org/mailman/listinfo/openssh-bugs
