[buug] mapped io

johnd john at jjdev.com
Wed Dec 19 11:54:19 PST 2001


> 
> man 4 port
> 
> -- 
> Ian Zimmerman, Oakland, California, U.S.A.


I've come up with this:
--------------------
.
#include <stdio.h> 
#include <asm/io.h>

int main(void)
{
	ioperm(0x300, 5, 1);
	printf("inv: %d\n", inb(301));
}
-------------------------------
This program will only run as root...(It must be compiled with the -O flag or
it wont work)

In linux, can a program access port memory directly with out being run as root?







More information about the buug mailing list