From: Peter Chubb <peter@chubb.wattle.id.au>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] Re: gettimeofday patch
Date: Wed, 18 Jun 2003 03:33:23 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590709805947@msgid-missing> (raw)
>>>>> "David" = David Mosberger <davidm@napali.hpl.hp.com> writes:
David> So, the moral of the story (which we already knew): it's _hard_
David> to write correct light-weight syscall handlers. Clearly,
David> anytime a new handler is written, some careful testing is
David> advised (in particular with respect to passing NaT arguments,
David> invalid pointers, etc.). It would be great to have a
David> Stanford-checker that can statically analyze the validity of a
David> light-weight system call handler. It should be very difficult
David> to do and it would clearly be easier to code-up the dozen or so
David> rules once than to have to remember them every time. Perhaps
David> somebody's summer project some day?
Yes, the rules are such that:
-- it's easy to violate them without noticing, especially if one's
not that good at assembly programming in the first place
-- you can't use C
and writing optimised assembly language for IA64 is hard anyway.
Louis started with no knowledge of IA64 architecture, and almost no
internals knowledge of the Linux kernel. In four weeks he got to the
point where he could write the optimised gettimeofday(), and determine
that an optimised epoll() was more trouble than it was worth.
It'd be nice if the rules could be relaxed a bit, to allow (a
restricted subset of) ordinary kernel C code to be invoked from a
lightweight syscall handler. The main issue is IMO the RSE, and info
leakage into its backing store. Page and translation faults can be
dealt with, with a bit of care and some extra code.
In the meantime, I worry a bit about the assembler code, and the
possibility of it getting out-of-sync with the rest of the kernel,
given that it is so hard to code it correctly. It's probably only
worth writing fast syscall routines for stuff where the system call
duration really matters (e.g., gettimeofday()).
Peter C
next reply other threads:[~2003-06-18 3:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-18 3:33 Peter Chubb [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-03-01 6:14 [Linux-ia64] Re: gettimeofday patch David Mosberger
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=marc-linux-ia64-105590709805947@msgid-missing \
--to=peter@chubb.wattle.id.au \
--cc=linux-ia64@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