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: <20191207.160457.297470232945357742.davem@davemloft.net>
Date:   Sat, 07 Dec 2019 16:04:57 -0800 (PST)
From:   David Miller <davem@...emloft.net>
To:     bpf@...r.kernel.org, netdev@...r.kernel.org
CC:     ast@...nel.org, daniel@...earbox.net, tglx@...utronix.de
Subject: [RFC v1 PATCH 7/7] bpf: Don't use tasklet in stackmap code when RT.


In the RT kernel we can't use up_read_non_owner().

So in such a configuration, simply elide the annotated stackmap and
just report the raw IPs.

In the longer term, we can make atomic friendly versions of the page
cache traversal which will at least provide the info if the pages are
resident and don't need to be paged in.

Signed-off-by: David S. Miller <davem@...emloft.net>
---
 kernel/bpf/stackmap.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/kernel/bpf/stackmap.c b/kernel/bpf/stackmap.c
index caca752ee5e6..d49b5f184082 100644
--- a/kernel/bpf/stackmap.c
+++ b/kernel/bpf/stackmap.c
@@ -288,10 +288,17 @@ static void stack_map_get_build_id_offset(struct bpf_stack_build_id *id_offs,
 	struct stack_map_irq_work *work = NULL;
 
 	if (irqs_disabled()) {
+#ifdef CONFIG_PREEMPT_RT_FULL
+		/* We cannot use the up_read_non_owner() interface in RT
+		 * kernels, so just force reporting of IPs.
+		 */
+		irq_work_busy = true;
+#else
 		work = this_cpu_ptr(&up_read_work);
 		if (work->irq_work.flags & IRQ_WORK_BUSY)
 			/* cannot queue more up_read, fallback */
 			irq_work_busy = true;
+#endif
 	}
 
 	/*
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ