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: <1424472443-12422-1-git-send-email-zi.yan@cs.rutgers.edu>
Date:	Fri, 20 Feb 2015 17:47:23 -0500
From:	Zi Yan <zi.yan@...rutgers.edu>
To:	rostedt@...dmis.org, mingo@...hat.com, linux-kernel@...r.kernel.org
Cc:	Zi Yan <zi.yan@...rutgers.edu>
Subject: [PATCH]     tracing: Allow larger than PAGE_SIZE filter pattern

    Large applications(e.g. Cassandra) may have hundreds of threads
    running. To trace all those threads, larger size(>PAGE_SIZE) of
    filter pattern is needed.

Signed-off-by: Zi Yan <zi.yan@...rutgers.edu>
---
 kernel/trace/trace_events.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index db54dda..8347c48 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -1092,15 +1092,12 @@ event_filter_write(struct file *filp, const char __user *ubuf, size_t cnt,
 	char *buf;
 	int err = -ENODEV;

-	if (cnt >= PAGE_SIZE)
-		return -EINVAL;
-
-	buf = (char *)__get_free_page(GFP_TEMPORARY);
+	buf = (char *)alloc_pages_exact(cnt, GFP_TEMPORARY);
 	if (!buf)
 		return -ENOMEM;

 	if (copy_from_user(buf, ubuf, cnt)) {
-		free_page((unsigned long) buf);
+		free_pages_exact((unsigned long) buf, cnt);
 		return -EFAULT;
 	}
 	buf[cnt] = '\0';
@@ -1111,7 +1108,7 @@ event_filter_write(struct file *filp, const char __user *ubuf, size_t cnt,
 		err = apply_event_filter(file, buf);
 	mutex_unlock(&event_mutex);

-	free_page((unsigned long) buf);
+	free_pages_exact((unsigned long) buf, cnt);
 	if (err < 0)
 		return err;

--
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ