[lkml]   [2000]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectissuing SIDT _crashes_ the system?!

I tried getting the interrupt descriptor table register (IDTR) using
sidt but... the system crashed? it first told me about a null pointer
dereference (sorry, haven't got the oops any more) and then all processes
died away. on the console i repeatedly got the message "no vm86 information:

What's up there? It's probably my mistake due to bad code, but I still
don't understand and I can't find a bug in the module (sorry, it's late :) ).

I passed SIDT a pointer to a structure which contains the 2 byte limit and
the 4 byte base. To ensure that it is actually modified, I put in the two
values 0xDEAD and 0xBABEFACE.

After issuing SIDT, limit and base were 0. It's clear that that isn't the
correct value for the IDTR...

here's my getidt function (NASM):


GLOBAL getidt

getidt: push ebp
mov ebp, esp
sidt [ebp - 4]
pop ebp

and here's the C part of the module:

#define MODULE
#define __KERNEL__

#include <linux/kernel.h>
#include <linux/module.h>

struct idtr {
unsigned short limit;
unsigned char * base;

extern void getidt (struct idtr *);

int init_module (void) {
struct idtr aidtr = {

printk ("1 limit: %hu, base: %p\n", aidtr.limit, aidtr.base);
getidt (&aidtr);
printk ("2 limit: %hu, base: %p\n", aidtr.limit, aidtr.base);

return -1;

void cleanup_module (void) {

any ideas?


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:38    [W:0.024 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site