* Cannot get I/O permissions
[not found] <BANLkTimVusN58K-aUpkYmshHKh3Hy8Bb6g@mail.gmail.com>
@ 2011-04-01 22:32 ` Sengottuvelan S
2011-04-06 3:30 ` Pei Lin
0 siblings, 1 reply; 2+ messages in thread
From: Sengottuvelan S @ 2011-04-01 22:32 UTC (permalink / raw)
To: kernelnewbies
On Fri, Apr 1, 2011 at 3:32 PM, Sengottuvelan S
<sengottuvelan.s@gmail.com>wrote:
> Hi All,
>
> I am trying to access /dev/mem in my user process. I could not access
> because not a privileged access. I tried to use iopl(3) call in linux 2.6,
> but i am getting unresolved symbol for this. Is any other way to get access
> in user process. I am not sure how to solve this. Can you someone throw some
> light on this.
>
> if(iopl(3)){
> fprintf(stderr, "Cannot get I/O permissions (being root helps)");
> return -1;
> }
>
> if ((fd = open("/dev/mem", O_RDWR | O_SYNC)) < 0) {
> fprintf(stderr, "Failed to open /dev/mem");
> return -1;
> }
>
> --
> Regards,
> S. Sengottuvelan.
>
--
Regards,
S. Sengottuvelan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110401/2baba05f/attachment.html
^ permalink raw reply [flat|nested] 2+ messages in thread
* Cannot get I/O permissions
2011-04-01 22:32 ` Cannot get I/O permissions Sengottuvelan S
@ 2011-04-06 3:30 ` Pei Lin
0 siblings, 0 replies; 2+ messages in thread
From: Pei Lin @ 2011-04-06 3:30 UTC (permalink / raw)
To: kernelnewbies
2011/4/2 Sengottuvelan S <sengottuvelan.s@gmail.com>:
>
> On Fri, Apr 1, 2011 at 3:32 PM, Sengottuvelan S <sengottuvelan.s@gmail.com>
> wrote:
>>
>> Hi All,
>>
>> I am trying to access /dev/mem in my user process. I could not access
Check the kernel config CONFIG_STRICT_DEVMEM
>> because not a privileged access. I tried to use iopl(3) call in linux 2.6,
>> but i am getting unresolved symbol for this.? Is any other way to get access
>> in user process. I am not sure how to solve this. Can you someone throw some
>> light on this.
>>
>> ?? if(iopl(3)){
>> ??????? fprintf(stderr, "Cannot get I/O permissions (being root helps)");
>> ??????? return -1;
>> ??? }
>>
>> ? if ((fd = open("/dev/mem", O_RDWR | O_SYNC)) < 0) {
>> ??????? fprintf(stderr, "Failed to open /dev/mem");
>> ??????? return -1;
>> ??? }
>>
>> --
>> Regards,
>> S. Sengottuvelan.
>
>
>
> --
> Regards,
> S. Sengottuvelan.
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
--
Best Regards
Lin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-06 3:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <BANLkTimVusN58K-aUpkYmshHKh3Hy8Bb6g@mail.gmail.com>
2011-04-01 22:32 ` Cannot get I/O permissions Sengottuvelan S
2011-04-06 3:30 ` Pei Lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).