Re: Adding set_system_gate fails in arch/i386/kernel/traps.

From: Malcolm Beattie (mbeattie@sable.ox.ac.uk)
Date: Tue Sep 12 2000 - 06:53:53 EST


Petr Vandrovec writes:
> On 12 Sep 00 at 21:25, Keith Owens wrote:
> > >0x85) vanish after the system has booted further. printk shows that
> > >idt_table is correctly updated immediately after the set_system_gate
> > >but once the system has booted the entries for my new traps have
> > >reverted. (printk telemetry available on request). However, once the
> > >system has booted, a little module which simply updates
> > >idt_table[MY_NEW_VECTOR] directly works fine and "sticks". Help?
> > >(Or, more accurately "Aaarrrgh?").
> >
> > I can confirm that this sometimes occurs in 2.4.0-testx, AFAIK I have
> > only seen the problem in SMP kernels.
>
> What about arch/i386/kernel/io_apic.c:assign_irq_vector() ?

I'm not using SMP but you both put me on the right track.
init/main.c:start_kernel does:
        setup_arch(&command_line);
        trap_init();
        init_IRQ();

trap_init does the set_system_gate(FOO_VECTOR, &handler) lines I
extended but then init_IRQ() does

        for (i = 0; i < NR_IRQS; i++) {
                int vector = FIRST_EXTERNAL_VECTOR + i;
                if (vector != SYSCALL_VECTOR)
                        set_intr_gate(vector, interrupt[i]);
        }

and promptly zaps everything except SYSCALL_VECTOR.
(FIRST_EXTERNAL_VECTOR is 0x20). Many thanks.

--Malcolm

-- 
Malcolm Beattie <mbeattie@sable.ox.ac.uk>
Unix Systems Programmer
Oxford University Computing Services
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Sep 15 2000 - 21:00:17 EST