From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: X-Archive-Original-Message-ID: <199610171100.LAA00900@linux.reo.dec.com> Date: Thu, 17 Oct 1996 12:52:35 +0100 (MET) From: Ingo Molnar Subject: Re: Linux-2.1.4 In-Reply-To: On Thu, 17 Oct 1996, Linus Torvalds wrote: > > the exception handler could maintain a cross-table that identifies EIPs > > and abort points. It would do something like this: > > > > jmp UGLY_AS_HELL_BUT_FAST_AS_LIGHTNING_CROSSJUMP_TABLE[exception_eip] > > Yes, we could actually do something like this. It needs compiler support, but > that is possible, and g++ exceptions are actually kind of moving in this > direction. another option is to trick gcc into producing the proper symbol entries around the exception-prone code. We have to generate two symbols: symbol_1: mov src, target_that_might_fault symbol_2: exception_handling_logic Thus the exception handler only has to read the EIP value of symbol_2 out of a table indexed by symbol_1 [=exception EIP]. One bigger problem remains, we have to name these symbols uniquely. Could we use __FILE__ and __LINE__? [dont do Ctrl-D yet :)] And then we have to write a (smallish) custom program that analyses the kernel symbol table, cuts out these symbol EIPs and produces the cross-table. [and links these table to the kernel image ...] for the first time we could use a very conservative implementation: kernel panic if the exception handler doesnt find the >exact< EIP in the cross-table. So i think we have got enough compiler support already, it's just a bit tricky to get it out of gcc. If the above is true, then we have still one problem: modules ... I dont know wether this all is worth the hassle. Probably not :( Ingo ps. argh ... __FILE__ and __LINE__ breaks if we use inline functions? :( -- To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null