lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-82489c5fe5f99ca95f708fecae9f2c8aa99398bb@git.kernel.org>
Date:   Fri, 25 May 2018 02:50:07 -0700
From:   tip-bot for Eugene Syromiatnikov <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     peterz@...radead.org, acme@...hat.com, esyr@...hat.com,
        linux-kernel@...r.kernel.org, eranian@...gle.com, hpa@...or.com,
        vincent.weaver@...ne.edu, mingo@...nel.org, tglx@...utronix.de,
        torvalds@...ux-foundation.org, acme@...nel.org, jolsa@...hat.com,
        alexander.shishkin@...ux.intel.com, namhyung@...nel.org
Subject: [tip:perf/core] perf/core: Wire up compat PERF_EVENT_IOC_QUERY_BPF,
 PERF_EVENT_IOC_MODIFY_ATTRIBUTES

Commit-ID:  82489c5fe5f99ca95f708fecae9f2c8aa99398bb
Gitweb:     https://git.kernel.org/tip/82489c5fe5f99ca95f708fecae9f2c8aa99398bb
Author:     Eugene Syromiatnikov <esyr@...hat.com>
AuthorDate: Mon, 21 May 2018 14:34:20 +0200
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Fri, 25 May 2018 08:11:11 +0200

perf/core: Wire up compat PERF_EVENT_IOC_QUERY_BPF, PERF_EVENT_IOC_MODIFY_ATTRIBUTES

Since pointer size is different in compat, and switching in _perf_ioctl
is done using exact ioctl numbers, all new ioctl numbers that use pointer
should be added to perf_compat_ioctl for _IOC_SIZE fixup before passing
to perf_ioctl routine (this shouldn't be needed if semantics of the size
argument of _IO* macros was honored).

Signed-off-by: Eugene Syromiatnikov <esyr@...hat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Stephane Eranian <eranian@...gle.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Vince Weaver <vincent.weaver@...ne.edu>
Link: http://lkml.kernel.org/r/20180521123420.GA24291@asgard.redhat.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 kernel/events/core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index 24dea13a27ed..08f5e1b42b43 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -5120,6 +5120,8 @@ static long perf_compat_ioctl(struct file *file, unsigned int cmd,
 	switch (_IOC_NR(cmd)) {
 	case _IOC_NR(PERF_EVENT_IOC_SET_FILTER):
 	case _IOC_NR(PERF_EVENT_IOC_ID):
+	case _IOC_NR(PERF_EVENT_IOC_QUERY_BPF):
+	case _IOC_NR(PERF_EVENT_IOC_MODIFY_ATTRIBUTES):
 		/* Fix up pointer size (usually 4 -> 8 in 32-on-64-bit case */
 		if (_IOC_SIZE(cmd) == sizeof(compat_uptr_t)) {
 			cmd &= ~IOCSIZE_MASK;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ