[lkml]   [2014]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[RFC][2/11][MANUX] Kernel compatibility : uname(2)
Now, I would like to discuss syscalls.

As my kernel is binarily compatible with Linux, it implements the same
syscalls on the same vector (0x80, I've not yet implemented
sysenter-like things, and as mentionned earlier, it currently only
runs on x86/32). Of course, not all of them have been reimplemented
(keyctl(8), for example, proudly returns -ENOSYS), but the implemented
ones are faithfully following the Linux specification.

Well, nearly. That is, besides potential bugs (and unimplemented
features), I have done one notable modification, to the uname(2) syscall.

When I initially wrote my kernel, I ran into some trouble with the glibc
: it kept telling me that my kernel was too old. That's because, in its
Linux version, it checks that the kernel version number is at least
2.2.5 - without checking that the OS's *name* is actually "Linux". Thus,
when I answered "Manux, version 0.0.0", I never got anything working.

Of course, I could have proposed a patch to the glibc, but :
- This would have done nothing for statically-linked programs;
- In addition, it's highly likely other programs are doing similar
checks, and would have failed for a similar reason.

Thus, I decided to fake a Linux-like answer on this syscall, and
implement another syscall where I could put what I wanted. In practice,
I currently identify myself as "Linux 2.6.35" through uname(2), but
"Manux 0.0.5" through my uname_vect(2) syscall.

Is it okay to do this? Do you have any objections or remarks?

Thank you,


 \ /
  Last update: 2014-04-15 16:41    [W:0.032 / U:3.680 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site