All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
To: Josh Boyer <jwboyer@gmail.com>
Cc: Jinkai Gao <mickeygjk@gmail.com>,
	Jan Engelhardt <jengelh@medozas.de>,
	linux-kernel@vger.kernel.org
Subject: Re: Suggestion: LKM should be able to add system call for itself
Date: Mon, 7 Jul 2008 19:33:09 +0300	[thread overview]
Message-ID: <20080707193309.18180945@linux360.ro> (raw)
In-Reply-To: <1215440211.20774.48.camel@weaponx>

On Mon, 07 Jul 2008 10:16:51 -0400
Josh Boyer <jwboyer@gmail.com> wrote:

> > You are right. So we can use ascii name instead of number to
> > identify the system call. Kernel will match the function with the
> > name.To have backward compatibility, number should still be
> > supported. Yes, it is not as easy as I thought, but as long as it
> > is valuable and doable, we should have a try, right?
> 
> So you have to search a list of strings using strcmp to determine what
> syscall is being called?  That would be horrible for performance.
> 
> josh
> 

Actually it isn't that bad if you do it like dlsym()/dlopen() do it in
userspace. That is, have the system linker fill in dynamic syscalls,
possibly in a separate ELF section. This way you could version syscalls.

Furthermore, it may make sense to implement all syscalls through glibc,
so that the burden of maintaining obsolete/modified syscalls does not
fall onto the kernel. This already happens for most syscalls, but the
rest (mostly those Linux-specific) still rely on syscall numbers
defined as macros.

But that still will _not_ solve the problem, because:
- there are users which will only use older libc versions
- there are statically linked executables
- the modified/new syscall might not provide the same behavior, even
when used through a compatibility (glibc) wrapper

IOW, this problem can be reduced to any other instance where protocols
or APIs get changed. This usually isn't a problem, but the kernel can't
afford bloat to maintain compatibility.

I hope this makes the issue more clear.


	Cheers,
	Eduard

      reply	other threads:[~2008-07-07 16:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-07  5:09 Suggestion: LKM should be able to add system call for itself Jinkai Gao
2008-07-07  7:01 ` Arjan van de Ven
2008-07-07 12:12   ` Jinkai Gao
2008-07-07 14:29     ` Arjan van de Ven
2008-07-07  8:40 ` Bart Van Assche
2008-07-07 12:36   ` Jinkai Gao
2008-07-07 14:16     ` Bart Van Assche
2008-07-07 14:42     ` Jan Engelhardt
2008-07-07  9:35 ` Jan Engelhardt
2008-07-07 14:00   ` Jinkai Gao
2008-07-07 14:16     ` Josh Boyer
2008-07-07 16:33       ` Eduard - Gabriel Munteanu [this message]

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=20080707193309.18180945@linux360.ro \
    --to=eduard.munteanu@linux360.ro \
    --cc=jengelh@medozas.de \
    --cc=jwboyer@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mickeygjk@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.