I am doing some embedded programming developing applications in linux. I have to do some low level port i/o in my application.
I am using inb/outb commands for which I am using iopl(3) to get access to these ports.
My question is, I am able to do these i/o operations as root and not as a user. Is there anyway that my program runs when I login as a user. I tried setuid(0). It didnt work. I am getting the same segmentation fault.
Any help is appreciated.