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]
Message-Id: <20130930.154326.1864735743256219379.davem@davemloft.net>
Date:	Mon, 30 Sep 2013 15:43:26 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	hannes@...essinduktion.org
Cc:	netdev@...r.kernel.org, edumazet@...gle.com
Subject: Re: [PATCH net-next 3/7] net: introduce new macro
 net_get_random_once

From: Hannes Frederic Sowa <hannes@...essinduktion.org>
Date: Fri, 27 Sep 2013 00:56:35 +0200

> +/* BE CAREFUL: this function is not interrupt safe */
> +#define net_get_random_once(buf, nbytes)				\
> +	({								\
> +		static bool ___done = false;				\
> +		bool ___ret = false;					\
> +		if (unlikely(!___done))					\
> +			___ret = __net_get_random_once(buf,		\
> +						       nbytes,		\
> +						       &___done);	\
> +		___ret;							\
> +	})

I don't want to see this happening in every fast path, it's silly to test
this every time after the first iteration.

Maybe... _maybe_ I can be convinced if you use a static branch for this so
that it _really_ costs next to nothing.

But as-is I am not going to apply this series, sorry.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ