Skip to content

Commit 8c7e975

Browse files
virtuosoingomolnar
authored andcommitted
perf/core: Start rejecting the syscall with attr.__reserved_2 set
Commit: 1a59413 ("perf: Add wakeup watermark control to the AUX area") added attr.__reserved_2 padding, but forgot to add an ABI check to reject attributes with this field set. Fix that. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vince Weaver <vincent.weaver@maine.edu> Cc: adrian.hunter@intel.com Cc: mathieu.poirier@linaro.org Link: https://lkml.kernel.org/r/20191025121636.75182-1-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent d6d5df1 commit 8c7e975

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/events/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10635,7 +10635,7 @@ static int perf_copy_attr(struct perf_event_attr __user *uattr,
1063510635

1063610636
attr->size = size;
1063710637

10638-
if (attr->__reserved_1)
10638+
if (attr->__reserved_1 || attr->__reserved_2)
1063910639
return -EINVAL;
1064010640

1064110641
if (attr->sample_type & ~(PERF_SAMPLE_MAX-1))

0 commit comments

Comments
 (0)