pagemap icon indicating copy to clipboard operation
pagemap copied to clipboard

on ARM error

Open Zibri opened this issue 7 years ago • 7 comments

/mnt/shared/pm2 591 === Maps for pid 591 pread: Invalid argument pread: Invalid argument pread: Invalid argument pread: Invalid argument pread: Invalid argument pread: Invalid argument pread: Invalid argument pread: Invalid argument

Zibri avatar Mar 19 '18 10:03 Zibri

Thanks to the rowhammer attack, it looks like Linux now requires root privileges to access /proc/pid/pagemap (even if you ran the process yourself):

To make life harder for attackers attempting to exploit the rowhammer vulnerability, a simple patch was merged for the 4.0-rc5 release in March. The patch turned the pagemap file into a privileged interface; attempts to open it will now fail unless the process in question has the CAP_SYS_ADMIN capability. The 4.0 release came out with that restriction in place, and everybody who was paying attention slept a little easier.

From https://lwn.net/Articles/642069/. Try using sudo or logging in as root.

dwks avatar Mar 19 '18 23:03 dwks

nope.. is not that.. I have full access to pagemap! (older kernel on a test machine)

Zibri avatar Mar 20 '18 08:03 Zibri

Hi You can change "unsigned long data;" to "unsigned long long data;" in arm32.

wayling avatar Mar 20 '18 09:03 wayling

@Zibri, can you confirm exactly which architecture you are using? arm32 vs arm64. Thanks.

dwks avatar Mar 21 '18 20:03 dwks

ARM 32 cortex a9

Zibri avatar Mar 25 '18 06:03 Zibri

Hi,

I'm facing the same issue on ARM. $ ./pagemap2 711 === Maps for pid 711 pread: Invalid argument pread: Invalid argument pread: Invalid argument pread: Invalid argument

arunjmit avatar Jul 30 '18 07:07 arunjmit

I changed "unsigned long" to the portable "uint64_t" in this PR, might fix this issue https://github.com/dwks/pagemap/pull/3

amdn avatar Jul 08 '19 21:07 amdn