diff options
author | Mark Johnston <markj@FreeBSD.org> | 2020-09-04 00:12:28 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2020-09-04 00:12:28 +0000 |
commit | 46888dedc9ad5c73a7e9861364581720be3bb2af (patch) | |
tree | 7e9c63303aa0c3242e41164c7984e7fac2e0cc0f /sys/compat/linsysfs/linsysfs.c | |
parent | 67dc6bed1fc62b740351713e7aa42fe1eae896b6 (diff) | |
download | src-46888dedc9ad5c73a7e9861364581720be3bb2af.tar.gz src-46888dedc9ad5c73a7e9861364581720be3bb2af.zip |
Add emulation support for the Linux kcov(4) ioctl API.
This makes it possible to run an unmodified Linux syzkaller executor
against the Linuxulator, and have it gather code coverage information.
Sponsored by: The FreeBSD Foundation
Notes
Notes:
svn path=/head/; revision=365319
Diffstat (limited to 'sys/compat/linsysfs/linsysfs.c')
-rw-r--r-- | sys/compat/linsysfs/linsysfs.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/compat/linsysfs/linsysfs.c b/sys/compat/linsysfs/linsysfs.c index c00c15691fab..66cb36db9868 100644 --- a/sys/compat/linsysfs/linsysfs.c +++ b/sys/compat/linsysfs/linsysfs.c @@ -624,6 +624,8 @@ linsysfs_init(PFS_INIT_ARGS) struct pfs_node *net; struct pfs_node *power_supply; struct pfs_node *devdir, *chardev; + struct pfs_node *kernel; + struct pfs_node *debug; devclass_t devclass; device_t dev; @@ -672,6 +674,11 @@ linsysfs_init(PFS_INIT_ARGS) linsysfs_listcpus(cpu); linsysfs_listnics(net); + /* /sys/kernel */ + kernel = pfs_create_dir(root, "kernel", NULL, NULL, NULL, 0); + /* /sys/kernel/debug, mountpoint for lindebugfs. */ + debug = pfs_create_dir(kernel, "debug", NULL, NULL, NULL, 0); + return (0); } |