Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
Am Freitag, 31. August 2012, 12:51:43 schrieb Dzianis Kahanovich: > Philipp Reisner написал: > >> 2) Building module: detecting security_netlink_recv > >> (COMPAT_HAVE_SECURITY_NETLINK_RECV defined) false positive. > > > > On what kernel? (Version and dist flavour) > > 3.5.3 vanilla (sys-kernel/vanilla-sources "from Gentoo", real vanilla > sources). > > I use next code in my ebuild (gentoo-ish) to workaround: > grep -qw security_netlink_recv "${KERNEL_DIR}/include/linux/security.h" || > sed -i -e 's:ifdef COMPAT_HAVE_SECURITY_NETLINK_RECV:if 0:' drbd_nl.c Sorry, I can not reproduce this issue on my machine. I guess it has something to do with different gcc versions or Gentoo's gcc being more relaxed about warnings: Please do: $ cd ~/src/drbd-8.4.2rc3/drbd $ make clean $ rm compat.h $ make KDIR=~/src/linux-3.5.3 V=1 >compile.log 2>&1 $ grep have_security_netlink_recv.c: compile.log /home/phil/src/drbd84/drbd/compat/tests/have_security_netlink_recv.c: In function ‘f’: /home/phil/src/drbd84/drbd/compat/tests/have_security_netlink_recv.c:7:2: error: implicit declaration of function ‘security_netlink_recv’ [-Werror=implicit-function-declaration] $ grep COMPAT_HAVE_SECURITY_NETLINK_RECV compat.h /* #undef COMPAT_HAVE_SECURITY_NETLINK_RECV */ Compilation of the test fails, I get the correct compat.h. I guess that you gcc either ignores -Werror=implicit-function-declaration, or something on that level... The check we delivered in drbd-8.4.2rc3 looks like this: --snip-- #include <linux/security.h> int f(void) { struct sk_buff *skb = NULL; return security_netlink_recv(skb, CAP_SYS_ADMIN); } --snap-- Pleas replace it (compat/tests/have_security_netlink_recv.c) with: --snip-- #include <linux/security.h> void *p = security_netlink_recv; --snap-- If this makes it work for you (compilation of compat/tests/have_security_netlink_recv.c fails) I will commit it... Best regards, Philipp