Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754327AbcCHQaP (ORCPT ); Tue, 8 Mar 2016 11:30:15 -0500 Received: from mail-wm0-f44.google.com ([74.125.82.44]:38132 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752697AbcCHQaL (ORCPT ); Tue, 8 Mar 2016 11:30:11 -0500 MIME-Version: 1.0 In-Reply-To: <20160308162703.GB30211@gmail.com> References: <1457322619-170254-1-git-send-email-wangnan0@huawei.com> <20160308134454.GY6344@twins.programming.kicks-ass.net> <20160308134901.GC19756@gmail.com> <20160308135759.GH6356@twins.programming.kicks-ass.net> <20160308152924.GB9147@gmail.com> <20160308155423.GA16587@gmail.com> <20160308162703.GB30211@gmail.com> From: Dmitry Vyukov Date: Tue, 8 Mar 2016 17:29:50 +0100 Message-ID: Subject: Re: [RESEND PATCH 0/5] perf core: Support overwrite ring buffer To: Ingo Molnar Cc: Peter Zijlstra , Wang Nan , Ingo Molnar , LKML , He Kuang , Alexei Starovoitov , Arnaldo Carvalho de Melo , Brendan Gregg , Jiri Olsa , Masami Hiramatsu , Namhyung Kim , Zefan Li , pi3orama@163.com Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6527 Lines: 142 On Tue, Mar 8, 2016 at 5:27 PM, Ingo Molnar wrote: > > * Dmitry Vyukov wrote: > >> On Tue, Mar 8, 2016 at 4:54 PM, Ingo Molnar wrote: >> > >> > * Dmitry Vyukov wrote: >> > >> >> > so, according to the error message it wants a writable directory. Lets try it that >> >> > way: >> >> > >> >> > triton:~> mkdir go >> >> > triton:~> >> >> > triton:~> export GOPATH=/home/mingo/go/ >> >> > triton:~> go get github.com/google/syzkaller >> >> > can't load package: package github.com/google/syzkaller: no buildable Go source files in /home/mingo/go/src/github.com/google/syzkaller >> >> >> >> Yes, GOPATH needs to be set a writable dir. >> >> You can ignore "can't load package" error. The goal of that step is >> >> checkout syzkaller with all dependencies into correct dirs under >> >> GOPATH. That's already done by now. >> >> Or you can do (/... at the end): >> >> $ go get github.com/google/syzkaller/... >> >> That will checkout and build. >> >> Either way you can continue with the make step. >> > >> > Cool, the '/...' trick works. >> > >> > >> >> > looks like someone wants 'Go' to be used as little as possible! ;-) >> >> >> >> You probably did not observe recently a noobie trying to build a C >> >> project with sufficiently-complicate-build-system and a bunch of >> >> dependencies that needs to be on specific, unknown revisions, and that >> >> still does not compile with you compiler and does not link with your >> >> linker, and then of course target machine has a wrong glibc version :) >> > >> > Nah, old Linux tools very much suck, we know that and we suffer from it. >> > >> > But new tools should not suck! :-) >> > >> > So, going from the description at: >> > >> > http://lkml.kernel.org/r/CACT4Y+Ym0TZLkmRrM0ZGgLpu8kqS-YjoWTMrvaLz=tx2tnyO3w@mail.gmail.com >> > >> > I now have it built, and created $GOPATH/src/github.com/google/syzkaller/perf.cfg >> > with: >> > >> > >> > triton:~/go/src/github.com/google/syzkaller> cat perf.cfg >> > { >> > "http": "localhost:50000", >> > "workdir": "/home/mingo/go/src/github.com/google/syzkaller/workdir", >> > "syzkaller": "/home/mingo/go/src/github.com/google/syzkaller", >> > "vmlinux": "-", >> > "type": "local", >> > "count": 1, >> > "procs": 16, >> > "nocover": true, >> > "nodropprivs": true, >> > "enable_syscalls": [ >> > "getpid", >> > "perf_event_open", >> > "ioctl$PERF*", >> > "prctl$void", >> > "bpf$*", >> > "sched_yield" >> > ] >> > } >> > >> > Then I tried to do: >> > >> > $ bin/syz-manager -config perf.cfg >> > >> > in ~/go/src/github.com/google/syzkaller, but that doesn't work because there's no >> > 'bin' directory: >> > >> > triton:~/go/src/github.com/google/syzkaller> bin/syz-manager -config perf.cfg >> > bash: bin/syz-manager: No such file or directory >> > >> > So that should really read something like: >> > >> > cd ~/go >> > bin/syz-manager -config src/github.com/google/syzkaller/perf.cfg >> > >> > next roadblock: >> > >> > fomalhaut:~/go> bin/syz-manager -config src/github.com/google/syzkaller/perf.cfg >> > 2016/03/08 16:53:44 bad config syzkaller param: can't find bin/syz-fuzzer >> > >> > so how do I proceed from here? >> >> >> You need to call make in syzkaller dir, it will create >> syzkaller/bin/syz-manager. I.e. >> >> $ cd /home/mingo/go/src/github.com/google/syzkaller >> $ make > > Ok, cool, this got me further. > >> $ bin/syz-manager -config perf.cfg > > I now get periodic output of: > > fomalhaut:~/go/src/github.com/google/syzkaller> bin/syz-manager -config src/github.com/google/syzkaller/perf.cfg > 2016/03/08 17:24:07 failed to read config file: open src/github.com/google/syzkaller/perf.cfg: no such file or directory > fomalhaut:~/go/src/github.com/google/syzkaller> bin/syz-manager -config perf.cfg > 2016/03/08 17:24:19 loading corpus... > 2016/03/08 17:24:19 loaded 0 programs > 2016/03/08 17:24:19 serving http on http://localhost:50000 > 2016/03/08 17:24:19 serving rpc on tcp://127.0.0.1:37006 > 2016/03/08 17:24:34 local-0: saving crash 'BUG: /sys/kernel/debug/kcov is missing (permission denied). Enable CONFIG_KCOV and mount debugfs.' to crash-local-0-1457454274467286949 > 2016/03/08 17:24:34 local-0: lost connection: exit status 1 > 2016/03/08 17:24:34 local-0: saving crash 'lost connection' to crash-local-0-1457454274467603509 > 2016/03/08 17:24:49 local-0: saving crash 'BUG: /sys/kernel/debug/kcov is missing (permission denied). Enable CONFIG_KCOV and mount debugfs.' to crash-local-0-1457454289719432704 > 2016/03/08 17:24:49 local-0: lost connection: exit status 1 > 2016/03/08 17:24:49 local-0: saving crash 'lost connection' to crash-local-0-1457454289719774031 > 2016/03/08 17:25:04 local-0: saving crash 'BUG: /sys/kernel/debug/kcov is missing (permission denied). Enable CONFIG_KCOV and mount debugfs.' to crash-local-0-1457454304992856310 > 2016/03/08 17:25:04 local-0: lost connection: exit status 1 > 2016/03/08 17:25:04 local-0: saving crash 'lost connection' to crash-local-0-1457454304993224299 > 2016/03/08 17:25:20 local-0: saving crash 'BUG: /sys/kernel/debug/kcov is missing (permission denied). Enable CONFIG_KCOV and mount debugfs.' to crash-local-0-1457454320280216980 > 2016/03/08 17:25:20 local-0: lost connection: exit status 1 > 2016/03/08 17:25:20 local-0: saving crash 'lost connection' to crash-local-0-1457454320280581459 > 2016/03/08 17:25:35 local-0: saving crash 'BUG: /sys/kernel/debug/kcov is missing (permission denied). Enable CONFIG_KCOV and mount debugfs.' to crash-local-0-1457454335572633035 > 2016/03/08 17:25:35 local-0: lost connection: exit status 1 > 2016/03/08 17:25:35 local-0: saving crash 'lost connection' to crash-local-0-1457454335572967343 > 2016/03/08 17:25:50 local-0: saving crash 'BUG: /sys/kernel/debug/kcov is missing (permission denied). Enable CONFIG_KCOV and mount debugfs.' to crash-local-0-1457454350865099485 > 2016/03/08 17:25:50 local-0: lost connection: exit status 1 > 2016/03/08 17:25:50 local-0: saving crash 'lost connection' to crash-local-0-1457454350865429049 > > is CONFIG_KCOV=y a must-have feature? There's no KCOV support upstream that I can > see. Change: "nocover": true, to: "cover": false, in the config file. KCOV will increase efficiency of the fuzzer, but it is not necessary. As far as I understand Peter tested without KCOV.