public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Emmanuel Colbus <ecolbus@manux.info>
To: linux-kernel@vger.kernel.org
Subject: [RFC][2/11][MANUX] Kernel compatibility : uname(2)
Date: Tue, 15 Apr 2014 15:42:47 +0200	[thread overview]
Message-ID: <534D3757.3040800@manux.info> (raw)

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

             reply	other threads:[~2014-04-15 13:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-15 13:42 Emmanuel Colbus [this message]
2014-04-15 14:55 ` [RFC][2/11][MANUX] Kernel compatibility : uname(2) One Thousand Gnomes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=534D3757.3040800@manux.info \
    --to=ecolbus@manux.info \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox