]> Git Repo - linux.git/commit
perf: Limit perf_event_attr::sample_period to 63 bits
authorPeter Zijlstra <[email protected]>
Thu, 15 May 2014 18:23:48 +0000 (20:23 +0200)
committerThomas Gleixner <[email protected]>
Mon, 19 May 2014 12:44:55 +0000 (21:44 +0900)
commit0819b2e30ccb93edf04876237b6205eef84ec8d2
tree24d327b78578595da4c822b62a581e557a6d3ee0
parenta45e903842226071d231924a5bff09d7535109dc
perf: Limit perf_event_attr::sample_period to 63 bits

Vince reported that using a large sample_period (one with bit 63 set)
results in wreckage since while the sample_period is fundamentally
unsigned (negative periods don't make sense) the way we implement
things very much rely on signed logic.

So limit sample_period to 63 bits to avoid tripping over this.

Reported-by: Vince Weaver <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
kernel/events/core.c
This page took 0.0486 seconds and 4 git commands to generate.