From: Keith Owens <kaos@ocs.com.au>
To: linux-kernel@vger.kernel.org
Subject: Re: [RFC] [PATCH] C exceptions in kernel
Date: Sun, 24 Feb 2002 10:40:55 +1100 [thread overview]
Message-ID: <927.1014507655@ocs3.intra.ocs.com.au> (raw)
In-Reply-To: Your message of "24 Feb 2002 00:07:13 BST." <d3n0xzre5a.fsf@lxplus049.cern.ch>
On 24 Feb 2002 00:07:13 +0100,
Jes Sorensen <jes@sunsite.dk> wrote:
>Pete Zaitcev <zaitcev@redhat.com> writes:
>
>> Personally, I have no problem handling current practices.
>> But I may see the point of the guy with the try/catch patch.
>> Do not make me to defend him though. I am trying to learn
>> is those exceptions are actually helpful. BTW, we all know
>> where they come from (all of Cutler's NT is written that way),
>> but let it not cloud our judgement.
>
>The problem here is that when using exceptions, you stop thinking
>about what is going on underneath at the low level which is really not
>what one wants in the kernel.
>
>After all, C is just and advanced assembly interface, which is exactly
>why it's such a great language ;-)
What is worse is that the exceptions patch has to use assembler to walk
the stack frames. Exceptions are being touted as a replacement for
goto in new driver code but the sample patch only works for i386. No
arch independent code can use exceptions until you have arch specific
code that does the equivalent of longjmp for _all_ architectures.
Doing longjmp in the kernel is _hard_, I know because I had to do it
for kdb on i386 and ia64. The kernel does things differently from user
space and sometimes the arch maintainers decide to change the internal
register usage. They are allowed to do this because it only affects
the kernel, but any change to kernel register usage will probably
require a corresponding change to setjmp/longjmp.
So you have arch dependent code which has to be done for all
architectures before any driver can use it and the code has to be kept
up to date by each arch maintainer. Tell me again why the existing
mechanisms are not working and why we need exceptions? IOW, what
existing problem justifies all the extra arch work and maintenance?
next prev parent reply other threads:[~2002-02-23 23:41 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1014437101.26721.linux-kernel2news@redhat.com>
2002-02-22 21:12 ` Dan Aloni
2002-02-22 21:28 ` Davide Libenzi
2002-02-22 22:10 ` Richard B. Johnson
2002-02-22 22:34 ` David B. Stevens
2002-02-22 22:48 ` Davide Libenzi
2002-02-23 3:37 ` Edgar Toernig
2002-02-23 10:11 ` Pete Zaitcev
2002-02-23 12:26 ` Keith Owens
2002-02-23 12:50 ` Pete Zaitcev
2002-02-23 23:07 ` Jes Sorensen
2002-02-23 23:40 ` Keith Owens [this message]
2002-02-24 1:02 ` Jes Sorensen
2002-02-24 23:45 ` Richard Gooch
2002-02-23 23:50 ` Bill Huey
2002-02-24 1:31 ` Davide Libenzi
2002-02-24 2:55 ` Bill Huey
2002-02-23 15:13 ` Felix von Leitner
2002-02-23 15:21 ` bert hubert
2002-02-23 17:47 ` Alexander Viro
2002-02-23 18:21 ` bert hubert
2002-02-23 18:31 ` Larry McVoy
2002-02-23 18:38 ` bert hubert
2002-02-23 19:12 ` Kurt Ferreira
2002-02-23 23:05 ` Jes Sorensen
2002-02-23 16:05 ` Dan Aloni
2002-02-23 16:22 ` Larry McVoy
2002-02-23 17:07 ` bert hubert
2002-02-23 17:00 ` Dan Aloni
2002-02-23 17:52 ` Francois Romieu
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=927.1014507655@ocs3.intra.ocs.com.au \
--to=kaos@ocs.com.au \
--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
all inboxes | Powered by JetHome®