public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: bugghy <bugghy@SAFe-mail.net>
To: linux-kernel@vger.kernel.org, bugghy@SAFe-mail.net
Subject: address of int80 idt
Date: Thu, 15 Jul 2004 18:27:38 +0000	[thread overview]
Message-ID: <1089916056.15617.14.camel@illusion.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1301 bytes --]


	Hy, I'm working on an improved rk detector and I've got some problems.
I use this code to get the address of int80's idt (interrupt description
table)

struct idtr
{
  unsigned short limit;
  unsigned int base;
} __attribute__ ((packed));


void find_int80()
{
  struct idtr idtr;
  memset(&idtr, 0, sizeof(struct idtr));
  asm ("sidt %0" : "=m" (idtr));
  printf("idtr.base=0x%08x\n", idtr.base);
  kmem_read(fd, &idt, sizeof(idt), idtr.base + 0x80 * sizeof(struct
idt));
  ...
}

The problem is that on some kernels 2.4.22 (and I think on 2.6.7, 2.2.26
and 2.4.26 too) on vmware sidt returns a bogus address for idtr.base:
idtr.base=0xffc6a370 (2.4.22) 


If I try to read from /dev/kmem from this address it doesn't work.

I printed the contents of struct idtr after the sidt call, here it is:
ff 07 70 a3 c6 ff

What could be the problem? Is there any solution for this? Most of the
time works but not on my (2.4.22) vmware. And if this is not a bug, what
would be another method of doing this ?

PS: Please cc me the answer as I'm not on this mailling list.

	Thanks in advance,
		Bugghy


-- 
------------------------
- Software is like sex -
-     it's better when -
-          it's free   -
-     Linus Torvalds   -
------------------------

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 187 bytes --]

             reply	other threads:[~2004-07-15 15:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-15 18:27 bugghy [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-07-15 15:38 address of int80 idt Petr Vandrovec

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=1089916056.15617.14.camel@illusion.com \
    --to=bugghy@safe-mail.net \
    --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