perf: Fix u16 overflows
authorPeter Zijlstra <peterz@infradead.org>
Wed, 9 Sep 2015 17:06:33 +0000 (19:06 +0200)
committerIngo Molnar <mingo@kernel.org>
Fri, 18 Sep 2015 07:20:25 +0000 (09:20 +0200)
commita723968c0ed36db676478c3d26078f13484fe01c
tree291202901e28ed77ac9226d6fb2d6b0178a8497c
parentf55fc2a57cc9ca3b1bb4fb8eb25b6e1989e5b993
perf: Fix u16 overflows

Vince reported that its possible to overflow the various size fields
and get weird stuff if you stick too many events in a group.

Put a lid on this by requiring the fixed record size not exceed 16k.
This is still a fair amount of events (silly amount really) and leaves
plenty room for callchains and stack dwarves while also avoiding
overflowing the u16 variables.

Reported-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/core.c