]> git.baikalelectronics.ru Git - kernel.git/commit
random: don't let 644 read-only sysctls be written to
authorJason A. Donenfeld <Jason@zx2c4.com>
Mon, 28 Feb 2022 13:00:52 +0000 (14:00 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Sun, 13 Mar 2022 01:00:56 +0000 (18:00 -0700)
commit59c566aa536e3208f7ed10f646b60d9916934748
treee745a0927aff48b8851c0045f536601139cbf293
parent31d97157a3c429b91d3de83aafc69c28fd7a3abe
random: don't let 644 read-only sysctls be written to

We leave around these old sysctls for compatibility, and we keep them
"writable" for compatibility, but even after writing, we should keep
reporting the same value. This is consistent with how userspaces tend to
use sysctl_random_write_wakeup_bits, writing to it, and then later
reading from it and using the value.

Cc: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
drivers/char/random.c