Re: perf: bug, kernel ignores the buffer size on large read
From: Vince Weaver
Date: Wed Sep 02 2015 - 22:24:54 EST
On Thu, 3 Sep 2015, Peter Zijlstra wrote:
> I think we should try and just ban events with a read_size > 64k; that's
> one _large_ group -- there's other issues with that as well I imagine.
yes, I don't really have a use case for this, I just noticed the problem
because Debian apparently bumped the default file descriptor limit from
1k to 64k and suddenly some of my perf_event_test suite started failing
in interesting ways.
The limit for read() would come down to about 4k events per group assuming
you also have ID enabled.
The complication is that header_size is calculated similarly and lots of
other things get added in, and a lot of it is done with u16 math. So I
have no idea if there's a possibility for creating sampled events that can
corrupt the mmap buffer.
Vince
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/