Hello_world ESYS mmap failure

Discussion about Parallella (and Epiphany) Software Development

Moderators: amylaar, jeremybennett, simoncook

Hello_world ESYS mmap failure

Postby wilsonk » Thu May 23, 2013 10:22 pm

Just letting you know that some users running the hello_world example may run into this error with some server/secure distros of linux.

I am running Scientific Linux 6.2 here and the kernel has been compiled with the CONFIG_STRICT_DEVMEM option set to 'y'. This option will not allow me to write to a shared mmaped area (as root or user). I managed to get the example to run (with incorrect blank output from each eCore) by also making the calls to mmap in epiphany-hal.c use the MAP_ANON flag or'ed with the MAP_SHARED flag. Not really a solution...just a workaround to make sure things compiled ok and can sort of run.

I am not aware of a solution to this besides rebuilding the kernel without this protection (which I don't want to do). Perhaps using shm_map can get around this issue? Not sure as I haven't looked at this much.

If someone else can shed some light on this it would be great...maybe I am just doing something wrong and there is a simple solution or workaround.

Thanks,
Kelly
wilsonk
 
Posts: 1
Joined: Mon Dec 17, 2012 3:21 am

Re: Hello_world ESYS mmap failure

Postby 9600 » Fri May 24, 2013 8:17 am

Hi Kelly,

Thanks for alerting us to this problem!

Open + mmap on /dev/mem is clearly not ideal and an alternative method that would allow users to access the Epiphany accelerator without being root is on the to-do list, and it looks as though .

Cheers,

Andrew
Andrew Back
User avatar
9600
 
Posts: 997
Joined: Mon Dec 17, 2012 3:25 am


Return to Programming Q & A

Who is online

Users browsing this forum: No registered users and 12 guests