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] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-2b4383470675c85add72725cc08840d36b409276@git.kernel.org>
Date:	Sat, 16 Jul 2016 13:46:29 -0700
From:	tip-bot for Wang Nan <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	wangnan0@...wei.com, tglx@...utronix.de, mingo@...nel.org,
	adrian.hunter@...el.com, mhiramat@...nel.org, namhyung@...nel.org,
	lizefan@...wei.com, nilayvaish@...il.com, hpa@...or.com,
	hekuang@...wei.com, linux-kernel@...r.kernel.org, acme@...hat.com,
	a.p.zijlstra@...llo.nl, dsahern@...il.com, jolsa@...nel.org
Subject: [tip:perf/core] tools lib fd array: Allow associating a pointer
 cookie with each entry

Commit-ID:  2b4383470675c85add72725cc08840d36b409276
Gitweb:     http://git.kernel.org/tip/2b4383470675c85add72725cc08840d36b409276
Author:     Wang Nan <wangnan0@...wei.com>
AuthorDate: Thu, 14 Jul 2016 08:34:34 +0000
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Fri, 15 Jul 2016 17:27:46 -0300

tools lib fd array: Allow associating a pointer cookie with each entry

Add a 'ptr' field to fdarray->priv array.

This feature will be used by following commits, which introduce
muiltiple 'struct perf_mmap' arrays for different types of mapping.

Because of this, during fdarray__filter(), a simple 'idx' is not enough.

Add a pointer cookie that allows to directly associate a 'struct
perf_mmap' pointer to an fdarray entry.

Signed-off-by: Wang Nan <wangnan0@...wei.com>
Acked-by: Jiri Olsa <jolsa@...nel.org>
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: David Ahern <dsahern@...il.com>
Cc: He Kuang <hekuang@...wei.com>
Cc: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Nilay Vaish <nilayvaish@...il.com>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Zefan Li <lizefan@...wei.com>
Cc: pi3orama@....com
Link: http://lkml.kernel.org/r/1468485287-33422-3-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/lib/api/fd/array.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/lib/api/fd/array.h b/tools/lib/api/fd/array.h
index e87fd80..71287dd 100644
--- a/tools/lib/api/fd/array.h
+++ b/tools/lib/api/fd/array.h
@@ -22,6 +22,7 @@ struct fdarray {
 	struct pollfd *entries;
 	union {
 		int    idx;
+		void   *ptr;
 	} *priv;
 };
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ