linux-stable/tools
Adrian Hunter 9992c2d50a perf intel-pt: Fix potential loop forever
TSC packets contain only 7 bytes of TSC.  The 8th byte is assumed to
change so infrequently that its value can be inferred.  However the
logic must cater for a 7 byte wraparound, which it does by adding 1 to
the top byte.

The existing code was doing that with a while loop even though the
addition should only need to be done once.  That logic won't work (will
loop forever) if TSC wraps around at the 8th byte.  Theoretically that
would take at least 10 years, unless something else went wrong.

And what else could go wrong.  Well, if the chunks of trace data are
processed out of order, it will make it look like the 7-byte TSC has
gone backwards (i.e. wrapped).  If that happens 256 times then stuck in
the while loop it will be.

Fix that by getting rid of the unnecessary while loop.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1443186956-18718-4-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-09-28 16:44:31 -03:00
..
arch tools include: Add basic atomic.h implementation from the kernel sources 2015-05-08 16:11:05 -03:00
build tools build: Build fixdep helper from perf and basic libs 2015-09-28 15:50:55 -03:00
cgroup
firewire
hv tools: hv: add a python script lsvmbus to list VMBus devices 2015-08-05 11:44:29 -07:00
iio iio: lsiio: fix error code handling error 2015-08-12 19:26:22 +01:00
include tools: Add err.h with ERR_PTR PTR_ERR interface 2015-09-15 09:48:32 -03:00
laptop/freefall Move freefall program from Documentation/ to tools/ 2015-06-08 16:42:07 -06:00
lguest tools/lguest: Clean up include dir 2015-08-26 06:12:35 +02:00
lib tools build: Build fixdep helper from perf and basic libs 2015-09-28 15:50:55 -03:00
net bpf_jit_disasm: also support reading jit dump from file 2015-07-31 15:13:14 -07:00
nfsd
perf perf intel-pt: Fix potential loop forever 2015-09-28 16:44:31 -03:00
power Power management and ACPI material for v4.3-rc1 2015-09-01 19:45:46 -07:00
scripts
testing membarrier: clean up selftest 2015-09-22 15:09:53 -07:00
thermal/tmon tools/thermal: tmon: fixed the 'make install' command 2015-05-09 13:36:58 +08:00
time tools: add script to test udelay 2014-07-23 10:16:38 -07:00
usb tools: ffs-aio-example: use endpoint addresses from descriptors 2015-01-15 09:41:49 -06:00
virtio tools/virtio: propagate V=X to kernel build 2015-09-16 12:48:07 +03:00
vm tools vm: Fix build due to removal of tools/lib/api/fs/debugfs.h 2015-09-22 22:42:39 -03:00
Makefile Staging driver patches for 4.2-rc1 2015-06-26 15:46:08 -07:00