From: "H. Peter Anvin" <hpa@zytor.com>
To: linux-kernel@vger.kernel.org
Subject: Re: ioperm() / iopl() irritation
Date: 28 Feb 2002 15:53:27 -0800 [thread overview]
Message-ID: <a5mftn$jim$1@cesium.transmeta.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0202282128170.25655-100000@biker.pdb.fsc.net>
Followup to: <Pine.LNX.4.33.0202282128170.25655-100000@biker.pdb.fsc.net>
By author: Martin Wilck <Martin.Wilck@fujitsu-siemens.com>
In newsgroup: linux.dev.kernel
>
> A short question that may be dumb:
>
> In the docs on i386 IO protection that I know, it is said that
> the processor ANDs the two protection mechanisms offered by the
> IOPL flag and the io permission bitmap. That is, if IO permissions
> are granted through iopl(), but ports are masked in the IO permission
> bitmap, a segmentation fault should arise.
>
Wrong.
> Such a situation should be generated by code like this:
>
> iopl(3);
> ioperm (0,0x1f,1); /* 0x20-0x3ff remain masked */
> c = inb (0x20);
>
> However on my machine this codse is successful! How is that possible?
Because you have misunderstood how IOPL works.
-hpa
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt <amsp@zytor.com>
next prev parent reply other threads:[~2002-02-28 23:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-28 20:34 ioperm() / iopl() irritation Martin Wilck
2002-02-28 23:53 ` H. Peter Anvin [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-03-01 10:45 Martin Wilck
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='a5mftn$jim$1@cesium.transmeta.com' \
--to=hpa@zytor.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.