[DRBD-user] drbd 8.4.2rc2 (git) bugs

Philipp Reisner philipp.reisner at linbit.com
Mon Sep 3 11:21:39 CEST 2012

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

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]

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:
#include <linux/security.h>

int f(void)
	struct sk_buff *skb = NULL;
	return security_netlink_recv(skb, CAP_SYS_ADMIN);

Pleas replace it (compat/tests/have_security_netlink_recv.c) with:
#include <linux/security.h>

void *p = security_netlink_recv;

If this makes it work for you (compilation of 
compat/tests/have_security_netlink_recv.c fails) I will commit it...

Best regards,

More information about the drbd-user mailing list