remarkable-linux/tools
Adrian Hunter 1dbfa9387b perf evlist: Fix mmap pages rounding to power of 2
'next_pow2()' only works for 'unsigned int' but the argument is
'unsigned long'.  Checking for values less than (1 << 31) ensures that
'next_pow2()' is not passed a value out of range but lets anything else
go through unvalidated.

As a result mmap_pages of zero is used e.g.

  perf record -v -m2147483649 uname
  mmap size 0B
  failed to mmap with 22 (Invalid argument)

Fixed:

  perf record -m2147483649 uname
  rounding mmap pages size to 17592186044416 bytes (4294967296 pages)
  Invalid argument for --mmap_pages/-m

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1386595120-22978-4-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2013-12-09 15:18:05 -03:00
..
cgroup cgroups: fix cgroup_event_listener error handling 2013-01-08 10:00:44 -08:00
firewire
hv Tools: hv: use single send+recv buffer 2013-09-26 12:03:31 -07:00
include/tools tools/include: use stdint types for user-space byteshift headers 2013-07-03 16:02:28 +02:00
lguest tools/lguest: offer VIRTIO_F_ANY_LAYOUT for net device. 2013-07-15 11:18:32 +09:30
lib tools lib traceevent: Report better error message on bad function args 2013-12-06 10:39:54 -03:00
net filter: add minimal BPF JIT image disassembler 2013-03-21 11:35:41 -04:00
nfsd
perf perf evlist: Fix mmap pages rounding to power of 2 2013-12-09 15:18:05 -03:00
power cpupower: Add Haswell family 0x45 specific idle monitor to show PC8,9,10 states 2013-07-05 01:52:19 +02:00
scripts tools: Harmonize the various build messages in perf, lib-traceevent, lib-lk 2013-10-11 12:18:08 -03:00
testing H8/300 has been dead for several years, the kernel for it has 2013-11-12 14:13:14 +09:00
thermal/tmon tools/thermal: Introduce tmon, a tool for thermal subsystem 2013-11-07 08:45:34 +08:00
usb tools: usb: ffs-test: Fix build failure 2013-03-07 12:23:17 +08:00
virtio virtio_test: verify if virtqueue_kick() succeeded 2013-10-29 11:28:16 +10:30
vm tools/vm/page-types.c: support KPF_SOFTDIRTY bit 2013-11-13 12:09:07 +09:00
Makefile tools/thermal: Introduce tmon, a tool for thermal subsystem 2013-11-07 08:45:34 +08:00