public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC][2/11][MANUX] Kernel compatibility : uname(2)
@ 2014-04-15 13:42 Emmanuel Colbus
  2014-04-15 14:55 ` One Thousand Gnomes
  0 siblings, 1 reply; 2+ messages in thread
From: Emmanuel Colbus @ 2014-04-15 13:42 UTC (permalink / raw)
  To: linux-kernel

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,

Emmanuel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [RFC][2/11][MANUX] Kernel compatibility : uname(2)
  2014-04-15 13:42 [RFC][2/11][MANUX] Kernel compatibility : uname(2) Emmanuel Colbus
@ 2014-04-15 14:55 ` One Thousand Gnomes
  0 siblings, 0 replies; 2+ messages in thread
From: One Thousand Gnomes @ 2014-04-15 14:55 UTC (permalink / raw)
  To: Emmanuel Colbus; +Cc: linux-kernel

> 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?

If you are trying to be ABI compatible then replying with a "Linux"
version that it is compatible with might actually be extraordinarily
sensible.

Alan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-15 14:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-15 13:42 [RFC][2/11][MANUX] Kernel compatibility : uname(2) Emmanuel Colbus
2014-04-15 14:55 ` One Thousand Gnomes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox