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]
Message-ID: <1493108014.2592.1.camel@sipsolutions.net>
Date:   Tue, 25 Apr 2017 10:13:34 +0200
From:   Johannes Berg <johannes@...solutions.net>
To:     Jakub Kicinski <jakub.kicinski@...ronome.com>,
        netdev@...r.kernel.org
Cc:     davem@...emloft.net, dsa@...ulusnetworks.com, daniel@...earbox.net,
        alexei.starovoitov@...il.com, bblanco@...il.com,
        john.fastabend@...il.com, kubakici@...pl, oss-drivers@...ronome.com
Subject: Re: [RFC 1/4] netlink: make extended ACK setting NULL-friendly

On Tue, 2017-04-25 at 01:06 -0700, Jakub Kicinski wrote:

> +#define NL_SET_ERR_MSG(extack, msg) do {		\
> +	struct netlink_ext_ack *_extack = (extack);	\
> +	static const char _msg[] = (msg);		\
> +							\
> +	if (_extack)					\
> +		_extack->_msg = _msg;			\
> +	else						\
> +		pr_info("%s\n", _msg);			\
>  } while (0)

That's a good point, I used it only for genetlink so far where it was
guaranteed non-NULL.

I'm not really sure about the printing though - I'd rather not people
start relying on that and then we convert to have non-NULL and the
message disappears as a result ...

johannes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ