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>] [day] [month] [year] [list]
Message-ID: <tip-atpt07y2x9a8ttlwja94ow3j@git.kernel.org>
Date:   Wed, 26 Jul 2017 10:14:15 -0700
From:   tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     jolsa@...nel.org, dsahern@...il.com, acme@...hat.com,
        mingo@...nel.org, namhyung@...nel.org, tglx@...utronix.de,
        wangnan0@...wei.com, adrian.hunter@...el.com, hpa@...or.com,
        linux-kernel@...r.kernel.org
Subject: [tip:perf/core] perf trace beauty mmap: Ignore 'fd' and 'offset'
 args for MAP_ANONYMOUS

Commit-ID:  d57da8c9a5e11e7786931cfa1fd744969f530b2e
Gitweb:     http://git.kernel.org/tip/d57da8c9a5e11e7786931cfa1fd744969f530b2e
Author:     Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Wed, 19 Jul 2017 12:16:15 -0300
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Thu, 20 Jul 2017 09:55:51 -0300

perf trace beauty mmap: Ignore 'fd' and 'offset' args for MAP_ANONYMOUS

Just suppress them, not used by the kernel.

Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Wang Nan <wangnan0@...wei.com>
Link: http://lkml.kernel.org/n/tip-atpt07y2x9a8ttlwja94ow3j@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/trace/beauty/mmap.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/perf/trace/beauty/mmap.c b/tools/perf/trace/beauty/mmap.c
index af1cfde..754558f 100644
--- a/tools/perf/trace/beauty/mmap.c
+++ b/tools/perf/trace/beauty/mmap.c
@@ -34,6 +34,9 @@ static size_t syscall_arg__scnprintf_mmap_flags(char *bf, size_t size,
 {
 	int printed = 0, flags = arg->val;
 
+	if (flags & MAP_ANONYMOUS)
+		arg->mask |= (1 << 4) | (1 << 5); /* Mask 4th ('fd') and 5th ('offset') args, ignored */
+
 #define	P_MMAP_FLAG(n) \
 	if (flags & MAP_##n) { \
 		printed += scnprintf(bf + printed, size - printed, "%s%s", printed ? "|" : "", #n); \

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ