lkml.org 
[lkml]   [2003]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Printing IDT on Linux 2.4.20
On Tue, 27 May 2003, Slack Ware wrote:

> Hi everybody!
> I've a problem with the checkidt utility provided by
> Phrack Issue #59, I think.
> The checkidt utility is for 2.4.x kernels, supposedly,
> but I compiled it under 2.4.20 and it couldn't read
> /dev/kmem.
> Anyway, I would like to print the IDT on kernel 2.4.20
> with checkidt or not.
> Any suggestions are welcome.
> Regards,

*shrug* I don't know why they would want to check /dev/kmem just for the
IDT.

#include <stdio.h>

struct dt {
unsigned short limit;
unsigned long address __attribute__((packed));
unsigned short padding;
} __attribute__((packed));

int main()
{
struct dt foo;

__asm__ __volatile__ ("sidt %0":"=m"(foo));
printf("limit=%d address=%lx\n", foo.limit, foo.address);
return 0;
}

Zwane
--
function.linuxpower.ca
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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