perf tools fixes for v5.13: 5th batch
- Correct buffer copying when peeking events. - Sync cpufeatures/disabled-features.h header with the kernel sources. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQR2GiIUctdOfX2qHhGyPKLppCJ+JwUCYMYTTgAKCRCyPKLppCJ+ J0rKAQDgWLBEQ1ieiUaRYhqeaDbmxgWZ50tRadQGIaWyfuvvJQD+Pl6jQ1nEwDt9 bP407DPeTr4fG7qkEOLt6zbM6qbj6wA= =XXQR -----END PGP SIGNATURE----- Merge tag 'perf-tools-fixes-for-v5.13-2021-06-13' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools fixes from Arnaldo Carvalho de Melo: - Correct buffer copying when peeking events - Sync cpufeatures/disabled-features.h header with the kernel sources * tag 'perf-tools-fixes-for-v5.13-2021-06-13' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: tools headers cpufeatures: Sync with the kernel sources perf session: Correct buffer copying when peeking events
This commit is contained in:
commit
e4e453434a
|
@ -56,11 +56,8 @@
|
|||
# define DISABLE_PTI (1 << (X86_FEATURE_PTI & 31))
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IOMMU_SUPPORT
|
||||
# define DISABLE_ENQCMD 0
|
||||
#else
|
||||
# define DISABLE_ENQCMD (1 << (X86_FEATURE_ENQCMD & 31))
|
||||
#endif
|
||||
/* Force disable because it's broken beyond repair */
|
||||
#define DISABLE_ENQCMD (1 << (X86_FEATURE_ENQCMD & 31))
|
||||
|
||||
#ifdef CONFIG_X86_SGX
|
||||
# define DISABLE_SGX 0
|
||||
|
|
|
@ -1723,6 +1723,7 @@ int perf_session__peek_event(struct perf_session *session, off_t file_offset,
|
|||
if (event->header.size < hdr_sz || event->header.size > buf_sz)
|
||||
return -1;
|
||||
|
||||
buf += hdr_sz;
|
||||
rest = event->header.size - hdr_sz;
|
||||
|
||||
if (readn(fd, buf, rest) != (ssize_t)rest)
|
||||
|
|
Loading…
Reference in New Issue