Commit e4e45343 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'perf-tools-fixes-for-v5.13-2021-06-13' of...

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
parents 960f0716 36524112
Loading
Loading
Loading
Loading
+2 −5
Original line number Original line Diff line number Diff line
@@ -56,11 +56,8 @@
# define DISABLE_PTI		(1 << (X86_FEATURE_PTI & 31))
# define DISABLE_PTI		(1 << (X86_FEATURE_PTI & 31))
#endif
#endif


#ifdef CONFIG_IOMMU_SUPPORT
/* Force disable because it's broken beyond repair */
# define DISABLE_ENQCMD	0
#else
#define DISABLE_ENQCMD		(1 << (X86_FEATURE_ENQCMD & 31))
#define DISABLE_ENQCMD		(1 << (X86_FEATURE_ENQCMD & 31))
#endif


#ifdef CONFIG_X86_SGX
#ifdef CONFIG_X86_SGX
# define DISABLE_SGX	0
# define DISABLE_SGX	0
+1 −0
Original line number Original line Diff line number Diff line
@@ -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)
	if (event->header.size < hdr_sz || event->header.size > buf_sz)
		return -1;
		return -1;


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


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