From: Vince Weaver <vincent.weaver@maine.edu>
To: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Vince Weaver <vincent.weaver@maine.edu>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
"dvyukov@google.com" <dvyukov@google.com>
Subject: Re: perf: fuzzer KASAN: global-out-of-bounds in match_token
Date: Fri, 18 Nov 2016 13:02:58 -0500 (EST) [thread overview]
Message-ID: <alpine.DEB.2.20.1611181259170.16531@macbook-air> (raw)
In-Reply-To: <877f81f264.fsf@ashishki-desk.ger.corp.intel.com>
On Fri, 18 Nov 2016, Alexander Shishkin wrote:
> From 139306c3bcf7abf49c51a8e56131aaae51222594 Mon Sep 17 00:00:00 2001
> From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> Date: Fri, 18 Nov 2016 13:24:55 +0200
> Subject: [PATCH] perf: Fix address filter parser
>
> The token table passed into match_token() must be null-terminated, which
> it currently is not in the perf's address filter string parser, as caught
> by Vince's perf_fuzzer and KASAN. It doesn't blow up otherwise because of
> the alignment padding of the table to the next element in the .rodata,
> which is luck.
I can confirm that with this patch applied I no longer get the
token-parsing KASAN messages.
This is even after I enhanced the perf_fuzzer to generate more realistic
address-filters.
As an aside, is there any better documentation on what a "proper" address
filter looks like? In kernel/events/core.c it says
* ACTION RANGE_SPEC
* where ACTION is one of the
* * "filter": limit the trace to this region
* * "start": start tracing from this address
* * "stop": stop tracing at this address/region;
* RANGE_SPEC is
* * for kernel addresses: <start address>[/<size>]
* * for object files: <start address>[/<size>]@</path/to/object/file>
Does each action always get a range?
Are the ranges hex? decimal? can they have a leading 0x?
Are the sizes hex? decimal?
What's the path to object file for? What kind of object file?
Vince
next prev parent reply other threads:[~2016-11-18 18:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-17 20:24 Vince Weaver
2016-11-17 20:37 ` Vince Weaver
2016-11-17 22:11 ` Vince Weaver
2016-11-18 2:51 ` Vince Weaver
2016-11-18 8:24 ` Ingo Molnar
2016-11-18 11:38 ` Alexander Shishkin
2016-11-18 18:02 ` Vince Weaver [this message]
2016-11-21 10:38 ` [tip:perf/urgent] perf/core: Fix address filter parser tip-bot for Alexander Shishkin
2016-11-17 23:11 ` perf: fuzzer KASAN: global-out-of-bounds in match_token Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.20.1611181259170.16531@macbook-air \
--to=vincent.weaver@maine.edu \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=dvyukov@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®