Alright, so they're ALL the wrong forum for this, but I'm hoping y'all can give me some help.
I wrote some programs to do some semi-hacky things against some proprietary hardware under 14.04 by running as root and mmap'ing the resource0 file under /sys/devices/... . Ugly, but it worked, and it saved having to actually write a kernel driver when all I wanted to do was read a couple sporadic registers.
strace verifies that under 14.04 I call
Code:
open("resource0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0600, st_size=16384, ...}) = 0
mmap(NULL, 16384, PROT_READ, MAP_SHARED, 3, 0) = 0x7fa78bce5000
Code:
open("resource0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0600, st_size=16384, ...}) = 0
mmap(NULL, 16384, PROT_READ, MAP_SHARED, 3, 0) = -1 EPERM (Operation not permitted)
Userspace PCIe access broken in 16.04
Aucun commentaire:
Enregistrer un commentaire