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]
Date:   Mon, 29 Jul 2019 14:36:41 -0700
From:   tip-bot for Andrii Nakryiko <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     andriin@...com, andrii.nakryiko@...il.com, ast@...com,
        acme@...hat.com, linux-kernel@...r.kernel.org, tglx@...utronix.de,
        daniel@...earbox.net, hpa@...or.com, mingo@...nel.org
Subject: [tip:perf/urgent] libbpf: fix missing __WORDSIZE definition

Commit-ID:  8aa259b10a6a759c50137bbbf225df0c17ca5d27
Gitweb:     https://git.kernel.org/tip/8aa259b10a6a759c50137bbbf225df0c17ca5d27
Author:     Andrii Nakryiko <andriin@...com>
AuthorDate: Thu, 18 Jul 2019 10:30:21 -0700
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Mon, 29 Jul 2019 10:18:08 -0300

libbpf: fix missing __WORDSIZE definition

hashmap.h depends on __WORDSIZE being defined. It is defined by
glibc/musl in different headers. It's an explicit goal for musl to be
"non-detectable" at compilation time, so instead include glibc header if
glibc is explicitly detected and fall back to musl header otherwise.

Reported-by: Arnaldo Carvalho de Melo <acme@...hat.com>
Signed-off-by: Andrii Nakryiko <andriin@...com>
Tested-by: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Alexei Starovoitov <ast@...com>
Cc: Andrii Nakryiko <andrii.nakryiko@...il.com>
Cc: Daniel Borkmann <daniel@...earbox.net>
Fixes: e3b924224028 ("libbpf: add resizable non-thread safe internal hashmap")
Link: https://lkml.kernel.org/r/20190718173021.2418606-1-andriin@fb.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/lib/bpf/hashmap.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/lib/bpf/hashmap.h b/tools/lib/bpf/hashmap.h
index 03748a742146..bae8879cdf58 100644
--- a/tools/lib/bpf/hashmap.h
+++ b/tools/lib/bpf/hashmap.h
@@ -10,6 +10,11 @@
 
 #include <stdbool.h>
 #include <stddef.h>
+#ifdef __GLIBC__
+#include <bits/wordsize.h>
+#else
+#include <bits/reg.h>
+#endif
 #include "libbpf_internal.h"
 
 static inline size_t hash_bits(size_t h, int bits)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ