Skip to content

Commit e4e4534

Browse files
committed
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
2 parents 960f071 + 3652411 commit e4e4534

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

tools/arch/x86/include/asm/disabled-features.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,8 @@
5656
# define DISABLE_PTI (1 << (X86_FEATURE_PTI & 31))
5757
#endif
5858

59-
#ifdef CONFIG_IOMMU_SUPPORT
60-
# define DISABLE_ENQCMD 0
61-
#else
62-
# define DISABLE_ENQCMD (1 << (X86_FEATURE_ENQCMD & 31))
63-
#endif
59+
/* Force disable because it's broken beyond repair */
60+
#define DISABLE_ENQCMD (1 << (X86_FEATURE_ENQCMD & 31))
6461

6562
#ifdef CONFIG_X86_SGX
6663
# define DISABLE_SGX 0

tools/perf/util/session.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1723,6 +1723,7 @@ int perf_session__peek_event(struct perf_session *session, off_t file_offset,
17231723
if (event->header.size < hdr_sz || event->header.size > buf_sz)
17241724
return -1;
17251725

1726+
buf += hdr_sz;
17261727
rest = event->header.size - hdr_sz;
17271728

17281729
if (readn(fd, buf, rest) != (ssize_t)rest)

0 commit comments

Comments
 (0)