* [PATCH] perf: Start rejecting the syscall with attr.__reserved_2 set
@ 2019-10-25 12:16 Alexander Shishkin
2019-10-28 11:41 ` [tip: perf/urgent] perf/core: " tip-bot2 for Alexander Shishkin
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Shishkin @ 2019-10-25 12:16 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Arnaldo Carvalho de Melo, Ingo Molnar, linux-kernel, jolsa,
adrian.hunter, mathieu.poirier, mark.rutland, Alexander Shishkin
Commit
1a5941312414c ("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>
---
kernel/events/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 77793ef0d8bc..0940c8810be0 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -10660,7 +10660,7 @@ static int perf_copy_attr(struct perf_event_attr __user *uattr,
attr->size = size;
- if (attr->__reserved_1)
+ if (attr->__reserved_1 || attr->__reserved_2)
return -EINVAL;
if (attr->sample_type & ~(PERF_SAMPLE_MAX-1))
--
2.23.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [tip: perf/urgent] perf/core: Start rejecting the syscall with attr.__reserved_2 set
2019-10-25 12:16 [PATCH] perf: Start rejecting the syscall with attr.__reserved_2 set Alexander Shishkin
@ 2019-10-28 11:41 ` tip-bot2 for Alexander Shishkin
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Alexander Shishkin @ 2019-10-28 11:41 UTC (permalink / raw)
To: linux-tip-commits
Cc: Alexander Shishkin, Peter Zijlstra (Intel),
Arnaldo Carvalho de Melo, Jiri Olsa, Linus Torvalds,
Mark Rutland, Namhyung Kim, Stephane Eranian, Thomas Gleixner,
Vince Weaver, adrian.hunter, mathieu.poirier, Ingo Molnar,
Borislav Petkov, linux-kernel
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: 8c7e975667fbc3b7c816119dd56104739899f125
Gitweb: https://git.kernel.org/tip/8c7e975667fbc3b7c816119dd56104739899f125
Author: Alexander Shishkin <alexander.shishkin@linux.intel.com>
AuthorDate: Fri, 25 Oct 2019 15:16:36 +03:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Mon, 28 Oct 2019 11:01:59 +01:00
perf/core: Start rejecting the syscall with attr.__reserved_2 set
Commit:
1a5941312414c ("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>
---
kernel/events/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index bb3748d..aec8dba 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -10635,7 +10635,7 @@ static int perf_copy_attr(struct perf_event_attr __user *uattr,
attr->size = size;
- if (attr->__reserved_1)
+ if (attr->__reserved_1 || attr->__reserved_2)
return -EINVAL;
if (attr->sample_type & ~(PERF_SAMPLE_MAX-1))
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-28 11:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-25 12:16 [PATCH] perf: Start rejecting the syscall with attr.__reserved_2 set Alexander Shishkin
2019-10-28 11:41 ` [tip: perf/urgent] perf/core: " tip-bot2 for Alexander Shishkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).