Re: [PATCH] random: use offstack cpumask when necessary
From: Jason A. Donenfeld
Date: Tue Jun 10 2025 - 13:34:10 EST
Hi Arnd,
On Tue, Jun 10, 2025 at 11:27:08AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> The entropy generation function keeps a local cpu mask on the stack, which
> can trigger warnings in configurations with a large number of CPUs:
>
> drivers/char/random.c:1292:20: error: stack frame size (1288) exceeds limit (1280) in 'try_to_generate_entropy' [-Werror,-Wframe-larger-than]
>
> Use the cpumask interface to dynamically allocate it in those configurations.
Thanks. I hadn't seen this interface before. Applied with one nit fixed:
> + goto out;;
Double semi-colon changed to single semi-colon.
Jason