tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

GSOC - Emulating Missing Linux Syscalls in NetBSD



Greetings,

I hope you are doing well. My name is Sai Kasyap Jannabhatla, and I am currently pursuing my Master’s in Computer Science at UIC. 
I’m also working on a project with Professor Xiaoguang Wang on profiling and improving scheduling for virtual machines as part of my Advanced Linux Kernel Programming course. 

I’m interested in the NetBSD compat_linux project on emulating missing Linux syscalls, and I wanted to take a moment to share my understanding and get your insights before diving in.

>From what I’ve gathered, NetBSD's compat_linux layer allows Linux binaries to run by mapping system calls to NetBSD equivalents. However, some Linux syscalls are missing, causing compatibility issues. The goal is to identify these missing syscalls, understand their behavior, and implement them in the kernel while ensuring correctness and compatibility.
Some initial questions I had when thinking about this:
  • Why do certain Linux binaries fail to run on NetBSD?
  • What’s involved in translating a Linux binary to work on NetBSD?
  • How do we find and implement the missing syscalls?
To answer these, I plan to start by running failing Linux binaries under ktrace, ktruss, or strace to pinpoint missing syscalls. From there, I'll check if NetBSD has equivalents or if a new implementation is needed. If no direct mapping exists, I'll work on adding the syscall to compat_linux, handling ABI differences, and writing test cases to validate the changes.
I’d love to hear your thoughts on this approach. Are there specific syscalls or test binaries you recommend starting with? Also, any advice on debugging tools, tracing mechanisms, or relevant documentation would be greatly appreciated.
Looking forward to your insights!
Best,
Sai Kasyap Jannabhatla



Home | Main Index | Thread Index | Old Index