* [PATCH] backports: random: add prandom_bytes macro for pre-3.8 kernels
@ 2013-12-22 11:57 Arend van Spriel
2013-12-22 12:28 ` Johannes Berg
0 siblings, 1 reply; 4+ messages in thread
From: Arend van Spriel @ 2013-12-22 11:57 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: backports, Arend van Spriel
Map prandom_bytes() calls to get_random_bytes() for kernels before
3.8 kernel. This patch is needed by mac80211 rate control code
since following:
commit f7d8ad81ca8c447124821e58f876d1aff996c85f
Author: Karl Beldan <karl.beldan@rivierawaves.com>
Date: Wed Nov 13 10:54:19 2013 +0100
mac80211: minstrels: spare numerous useless calls to get_random_bytes
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
backport/backport-include/linux/random.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/backport/backport-include/linux/random.h b/backport/backport-include/linux/random.h
index 812ce7f..3adde28 100644
--- a/backport/backport-include/linux/random.h
+++ b/backport/backport-include/linux/random.h
@@ -8,6 +8,8 @@
#define prandom_seed(_seed) srandom32(_seed)
#define prandom_u32() random32()
#define prandom_u32_state(_state) prandom32(_state)
+/* use get_random_bytes() for lack of prandom_bytes() */
+#define prandom_bytes(a, b) get_random_bytes(a, b)
#endif
#endif /* __BACKPORT_RANDOM_H */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] backports: random: add prandom_bytes macro for pre-3.8 kernels
2013-12-22 11:57 [PATCH] backports: random: add prandom_bytes macro for pre-3.8 kernels Arend van Spriel
@ 2013-12-22 12:28 ` Johannes Berg
2013-12-22 17:15 ` Hauke Mehrtens
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2013-12-22 12:28 UTC (permalink / raw)
To: Arend van Spriel; +Cc: Luis R. Rodriguez, backports
On Sun, 2013-12-22 at 12:57 +0100, Arend van Spriel wrote:
> Map prandom_bytes() calls to get_random_bytes() for kernels before
> 3.8 kernel. This patch is needed by mac80211 rate control code
> since following:
> +/* use get_random_bytes() for lack of prandom_bytes() */
> +#define prandom_bytes(a, b) get_random_bytes(a, b)
I don't think this is a good idea, it's a completely different interface
(get_random_bytes is much higher "quality".)
We had a different patch for this fairly recently and I thought Luis
applied it?
johannes
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] backports: random: add prandom_bytes macro for pre-3.8 kernels
2013-12-22 12:28 ` Johannes Berg
@ 2013-12-22 17:15 ` Hauke Mehrtens
2013-12-22 17:27 ` Arend van Spriel
0 siblings, 1 reply; 4+ messages in thread
From: Hauke Mehrtens @ 2013-12-22 17:15 UTC (permalink / raw)
To: Johannes Berg, Arend van Spriel; +Cc: Luis R. Rodriguez, backports
On 12/22/2013 01:28 PM, Johannes Berg wrote:
> On Sun, 2013-12-22 at 12:57 +0100, Arend van Spriel wrote:
>> Map prandom_bytes() calls to get_random_bytes() for kernels before
>> 3.8 kernel. This patch is needed by mac80211 rate control code
>> since following:
>
>> +/* use get_random_bytes() for lack of prandom_bytes() */
>> +#define prandom_bytes(a, b) get_random_bytes(a, b)
>
> I don't think this is a good idea, it's a completely different interface
> (get_random_bytes is much higher "quality".)
>
> We had a different patch for this fairly recently and I thought Luis
> applied it?
Yes a different patch is already in backports:
https://git.kernel.org/cgit/linux/kernel/git/backports/backports.git/commit/?id=40ab1bac8c3680d726ee31fbdb590584ae99756f
Hauke
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] backports: random: add prandom_bytes macro for pre-3.8 kernels
2013-12-22 17:15 ` Hauke Mehrtens
@ 2013-12-22 17:27 ` Arend van Spriel
0 siblings, 0 replies; 4+ messages in thread
From: Arend van Spriel @ 2013-12-22 17:27 UTC (permalink / raw)
To: Hauke Mehrtens, Johannes Berg; +Cc: Luis R. Rodriguez, backports
On 12/22/2013 06:15 PM, Hauke Mehrtens wrote:
> On 12/22/2013 01:28 PM, Johannes Berg wrote:
>> On Sun, 2013-12-22 at 12:57 +0100, Arend van Spriel wrote:
>>> Map prandom_bytes() calls to get_random_bytes() for kernels before
>>> 3.8 kernel. This patch is needed by mac80211 rate control code
>>> since following:
>>
>>> +/* use get_random_bytes() for lack of prandom_bytes() */
>>> +#define prandom_bytes(a, b) get_random_bytes(a, b)
>>
>> I don't think this is a good idea, it's a completely different interface
>> (get_random_bytes is much higher "quality".)
>>
>> We had a different patch for this fairly recently and I thought Luis
>> applied it?
>
> Yes a different patch is already in backports:
> https://git.kernel.org/cgit/linux/kernel/git/backports/backports.git/commit/?id=40ab1bac8c3680d726ee31fbdb590584ae99756f
I was looking at your github repo, because kernel.org did not work for
3.13 a while ago. Distributed version control can be a curse as well as
a blessing.
Gr. AvS
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-12-22 17:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-22 11:57 [PATCH] backports: random: add prandom_bytes macro for pre-3.8 kernels Arend van Spriel
2013-12-22 12:28 ` Johannes Berg
2013-12-22 17:15 ` Hauke Mehrtens
2013-12-22 17:27 ` Arend van Spriel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.