Thread (19 messages) 19 messages, 5 authors, 2016-06-16

[PATCH v2] arm64: allow building with kcov coverage on ARM64

From: mark.rutland@arm.com (Mark Rutland)
Date: 2016-06-15 11:45:06
Also in: lkml

On Wed, Jun 15, 2016 at 10:25:10AM +0100, Mark Rutland wrote:
On Tue, Jun 14, 2016 at 08:16:08PM +0200, Alexander Potapenko wrote:
quoted
On Tue, Jun 14, 2016 at 7:55 PM, Mark Rutland [off-list ref] wrote:
quoted
I built and booted (via EFI) a kernel with this feature enabled (also
with the boot/Makefile change removed). I haven't tested the feature
itself as such, as I'm not sure how to do that.
You can test it by running the test program from Documentation/kcov.txt.
Ah, I hadn't spotted that. If I get the chance I'll try to give that a
go.
I just had a go (with this applied atop of v4.7-rc3), and I get:

root at ribbensteg:/home/nanook# ./kcov 
mmap: No such device

The device exists (it was able to open the fd, evidently):

root at ribbensteg:/home/nanook# ls -al /sys/kernel/debug/kcov 
-rw------- 1 root root 0 Jan  1  1970 /sys/kernel/debug/kcov

Strace show me:

openat(AT_FDCWD, "/sys/kernel/debug/kcov", O_RDWR) = 3
ioctl(3, CHIOMOVE or CM_IOCGATR, 0x10000) = 0
mmap(NULL, 524288, PROT_READ|PROT_WRITE, MAP_SHARED, 3, 0) = -1 ENODEV (No such device)

It doesn't look like the error paths in kcov_mmap are hitting.

Any ideas?

Thanks,
Mark.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help