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: <1468860187-318-4-git-send-email-mathieu.poirier@linaro.org>
Date:	Mon, 18 Jul 2016 10:43:07 -0600
From:	Mathieu Poirier <mathieu.poirier@...aro.org>
To:	alexander.shishkin@...ux.intel.com
Cc:	peterz@...radead.org, mingo@...hat.com,
	linux-kernel@...r.kernel.org,
	Mathieu Poirier <mathieu.poirier@...aro.org>
Subject: [PATCH V2 3/3] perf/core: Enabling mapping of the stop filters

At this time function perf_addr_filter_needs_mmap() will _not_
return true on a user space 'stop' filter.  But stop filters
needs exactly the same kind of mapping that range and start
filters get.

Signed-off-by: Mathieu Poirier <mathieu.poirier@...aro.org>
---
 kernel/events/core.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index f2bb2a0fae2b..6768ac4a2fcf 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -6493,15 +6493,6 @@ got_name:
 }
 
 /*
- * Whether this @filter depends on a dynamic object which is not loaded
- * yet or its load addresses are not known.
- */
-static bool perf_addr_filter_needs_mmap(struct perf_addr_filter *filter)
-{
-	return filter->filter && filter->inode;
-}
-
-/*
  * Check whether inode and address range match filter criteria.
  */
 static bool perf_addr_filter_match(struct perf_addr_filter *filter,
@@ -7728,7 +7719,11 @@ static void perf_event_addr_filters_apply(struct perf_event *event)
 	list_for_each_entry(filter, &ifh->list, entry) {
 		event->addr_filters_offs[count] = 0;
 
-		if (perf_addr_filter_needs_mmap(filter))
+		/*
+		 * Adjust base offset if the filter is associated to a binary
+		 * that needs to be mapped.
+		 */
+		if (filter->inode)
 			event->addr_filters_offs[count] =
 				perf_addr_filter_apply(filter, mm);
 
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ