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]
Date:   Wed, 28 Nov 2018 16:51:56 +0900
From:   Prashant Bhole <bhole_prashant_q7@....ntt.co.jp>
To:     Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>
Cc:     Prashant Bhole <bhole_prashant_q7@....ntt.co.jp>,
        Mauricio Vasquez B <mauricio.vasquez@...ito.it>,
        netdev@...r.kernel.org
Subject: [PATCH bpf 1/2] bpf: queue/stack map, fix return value of map_lookup_elem

Since commit 509db2833e0d ("bpf: error handling when map_lookup_elem
isn't supported") when map lookup isn't supported, the map_lookup_elem
function should return ERR_PTR(-EOPNOTSUPP).

Fixes: f1a2e44a3aec ("bpf: add queue and stack maps")
Signed-off-by: Prashant Bhole <bhole_prashant_q7@....ntt.co.jp>
---
 kernel/bpf/queue_stack_maps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/bpf/queue_stack_maps.c b/kernel/bpf/queue_stack_maps.c
index b384ea9f3254..8fd19b06da66 100644
--- a/kernel/bpf/queue_stack_maps.c
+++ b/kernel/bpf/queue_stack_maps.c
@@ -240,7 +240,7 @@ static int queue_stack_map_push_elem(struct bpf_map *map, void *value,
 /* Called from syscall or from eBPF program */
 static void *queue_stack_map_lookup_elem(struct bpf_map *map, void *key)
 {
-	return NULL;
+	return ERR_PTR(-EOPNOTSUPP);
 }
 
 /* Called from syscall or from eBPF program */
-- 
2.17.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ