Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932190AbcCILUd (ORCPT ); Wed, 9 Mar 2016 06:20:33 -0500 Received: from mail-wm0-f52.google.com ([74.125.82.52]:33178 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753459AbcCILUR (ORCPT ); Wed, 9 Mar 2016 06:20:17 -0500 MIME-Version: 1.0 In-Reply-To: <20160309105302.GA20931@pd.tnic> 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> <20160309105302.GA20931@pd.tnic> From: Dmitry Vyukov Date: Wed, 9 Mar 2016 12:19:55 +0100 Message-ID: Subject: Re: [RESEND PATCH 0/5] perf core: Support overwrite ring buffer To: Borislav Petkov Cc: Ingo Molnar , 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: 1868 Lines: 46 On Wed, Mar 9, 2016 at 11:53 AM, Borislav Petkov wrote: > On Tue, Mar 08, 2016 at 04:54:23PM +0100, Ingo Molnar wrote: >> 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", > > Btw, is there a way to specify range of arguments to feed into > perf_event_open? Like, limit @attr_uptr to single or multiple event IDs > or so, for example? No, there is no _that_ level of granularity in the config. If you really-really want that, then you can alter description of the perf_event_open syscall in sys/perf.txt file: https://github.com/google/syzkaller/blob/master/sys/perf.txt to be more restrictive. For example, you can limit set of values passed in a particular argument, or even set some args/fields to const values. Then you will need to do: $ make generate LINUX=/path/to/fresh/linux/checkout $ make But I would suggest to not do that. That perf config already limits set of syscalls to a very small set. The fuzzer should be able to examine all interesting combinations of arguments for these syscalls in a reasonable time (provided that you use CONFIG_KCOV). And in the end you don't know where the bugs. They are usually where you don't expect them. So I would suggest the opposite: describe and more perf-related syscalls, describe arguments in greater detail, enable other syscalls that can have effect on perf subsystem. And then just run it for longer using more machines.