On Tue, Dec 27, 2016 at 10:35 AM, <
ljia...@gmail.com> wrote:
> I alse write a test driver and describe the syscalls as below:
>
> resource fd_memdev[fd]
> syz_open_dev$memdev(dev strconst["/dev/memdev0"], id const[0], flags
> flags[open_flags]) fd_memdev
> #write$memdev(fd fd_memdev, buf ptr[in, string], count len[buf])
> read$memdev(fd fd_memdev, buf buffer[out], count len[buf]) len[buf]
> write$memdev(fd fd_memdev, buf buffer[in], count len[buf])
> #write$memdev(fd fd_memdev, buf ptr[in, int32], count len[buf])
> lseek$memdev(fd fd_memdev, offset fileoff[fd_memdev], whence
> flags[seek_whence])
>
> and
>
> "enable_syscalls": [
> "syz_open_dev$memdev",
> "read$memdev",
> "write$memdev"
> ]
>
> I find the codes of read are covered very fast, but the codes of write
> are never coverd ,even fuzzing all the night
> I have tested the driver in qemu ,the read and write are availble.I also
> test lseek,it also can be covered fast
> Does the syscall of write need some spical handle?
No, it does not. It should be covered as well.
each syscall and also will print syscall return values. If write
returns e.g. EACCES, then it will give some hint as to why you see no