tech-kern archive

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

Re: Tentative Proposal for Gsoc : Emulating missing linux syscalls (350h)



On Sat, Mar 12, 2022 at 12:01:25AM +0200, Ahmed bahloul wrote:
> Hello,
> I have made my Tentative Proposal for : Emulating missing linux syscalls
> project.

Hello Ahmed,

great that you are interested in this project and enhancing NetBSD!

After reading your proposal it seems to me you may have misunderstood
something about the project itself (and that is likely because it's
description is very vague).

The point of emulated Linux syscalls is:

 - they implement the exact same ABI that the original Linux system call has
 - they typically reuse as much of the existing kernel internal infrastructure
   available, so typically end up being a very tiny wrapper that just 
   translates the ABI to structures the/a similar NetBSD native syscall
   implementation understands.

So points 2 and 3 of your proposal make no sense.

For point 1 the typical apporach would be very adhoc and empirical: try 
to run some Linux applications on you NetBSD machine and see which ones
work and which fail. You mentors might suggest special interest apps
here.

For the ones that fail to run: find out which syscalls fail or are missing.

The other (more systematical but tedious) aproach would be to compare the
syscall tables, find out which of the missing ones are actually used in
current Linux libc, and check if any "serious" applications or libs do use
them.

The implementation often is trivial and sometimes very much not - it totally
depends on the syscall (and if some important syscall would be identified
where implementation is far from trivial or need general kernel changes
we likely would push them outside the scope of this project and make them
a dedicated project for later).

Testing is also simple if you do it adhoc during this project: just create
a Linux binary to exercise the system call and run it under emulation.

The more general "testing all our Linux syscall emulations" project is a
separate project suggestion and a bit more involved, as it expects fully
automatic test runs as the net result (like we do for native syscalls
and netbsd 32 bit emulated syscalls on 64bit machines).

Martin


Home | Main Index | Thread Index | Old Index