]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop random-restore-o_nonblock-support.patch from 5.4 and older
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Oct 2022 13:36:11 +0000 (15:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Oct 2022 13:36:11 +0000 (15:36 +0200)
queue-4.14/random-restore-o_nonblock-support.patch [deleted file]
queue-4.14/series
queue-4.19/random-restore-o_nonblock-support.patch [deleted file]
queue-4.19/series
queue-4.9/random-restore-o_nonblock-support.patch [deleted file]
queue-4.9/series
queue-5.4/random-restore-o_nonblock-support.patch [deleted file]
queue-5.4/series

diff --git a/queue-4.14/random-restore-o_nonblock-support.patch b/queue-4.14/random-restore-o_nonblock-support.patch
deleted file mode 100644 (file)
index 96f1258..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-From cd4f24ae9404fd31fc461066e57889be3b68641b Mon Sep 17 00:00:00 2001
-From: "Jason A. Donenfeld" <Jason@zx2c4.com>
-Date: Thu, 8 Sep 2022 16:14:00 +0200
-Subject: random: restore O_NONBLOCK support
-
-From: Jason A. Donenfeld <Jason@zx2c4.com>
-
-commit cd4f24ae9404fd31fc461066e57889be3b68641b upstream.
-
-Prior to 5.6, when /dev/random was opened with O_NONBLOCK, it would
-return -EAGAIN if there was no entropy. When the pools were unified in
-5.6, this was lost. The post 5.6 behavior of blocking until the pool is
-initialized, and ignoring O_NONBLOCK in the process, went unnoticed,
-with no reports about the regression received for two and a half years.
-However, eventually this indeed did break somebody's userspace.
-
-So we restore the old behavior, by returning -EAGAIN if the pool is not
-initialized. Unlike the old /dev/random, this can only occur during
-early boot, after which it never blocks again.
-
-In order to make this O_NONBLOCK behavior consistent with other
-expectations, also respect users reading with preadv2(RWF_NOWAIT) and
-similar.
-
-Fixes: 30c08efec888 ("random: make /dev/random be almost like /dev/urandom")
-Reported-by: Guozihua <guozihua@huawei.com>
-Reported-by: Zhongguohua <zhongguohua1@huawei.com>
-Cc: Al Viro <viro@zeniv.linux.org.uk>
-Cc: Theodore Ts'o <tytso@mit.edu>
-Cc: Andrew Lutomirski <luto@kernel.org>
-Cc: stable@vger.kernel.org
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/char/mem.c    |    4 ++--
- drivers/char/random.c |    5 +++++
- 2 files changed, 7 insertions(+), 2 deletions(-)
-
---- a/drivers/char/mem.c
-+++ b/drivers/char/mem.c
-@@ -887,8 +887,8 @@ static const struct memdev {
- #endif
-        [5] = { "zero", 0666, &zero_fops, 0 },
-        [7] = { "full", 0666, &full_fops, 0 },
--       [8] = { "random", 0666, &random_fops, 0 },
--       [9] = { "urandom", 0666, &urandom_fops, 0 },
-+       [8] = { "random", 0666, &random_fops, FMODE_NOWAIT },
-+       [9] = { "urandom", 0666, &urandom_fops, FMODE_NOWAIT },
- #ifdef CONFIG_PRINTK
-       [11] = { "kmsg", 0644, &kmsg_fops, 0 },
- #endif
---- a/drivers/char/random.c
-+++ b/drivers/char/random.c
-@@ -1294,6 +1294,11 @@ static ssize_t random_read_iter(struct k
- {
-       int ret;
-+      if (!crng_ready() &&
-+          ((kiocb->ki_flags & (IOCB_NOWAIT | IOCB_NOIO)) ||
-+           (kiocb->ki_filp->f_flags & O_NONBLOCK)))
-+              return -EAGAIN;
-+
-       ret = wait_for_random_bytes();
-       if (ret != 0)
-               return ret;
index 9f6b49abed5bb3f92b4a867355753e2e84fb381f..d8605ee9d762f88e8768a1325ddfa08799e1c7ab 100644 (file)
@@ -37,7 +37,6 @@ nilfs2-fix-null-pointer-dereference-at-nilfs_bmap_lookup_at_level.patch
 nilfs2-fix-leak-of-nilfs_root-in-case-of-writer-thread-creation-failure.patch
 nilfs2-replace-warn_ons-by-nilfs_error-for-checkpoint-acquisition-failure.patch
 ceph-don-t-truncate-file-in-atomic_open.patch
-random-restore-o_nonblock-support.patch
 random-clamp-credited-irq-bits-to-maximum-mixed.patch
 alsa-hda-fix-position-reporting-on-poulsbo.patch
 scsi-stex-properly-zero-out-the-passthrough-command-structure.patch
diff --git a/queue-4.19/random-restore-o_nonblock-support.patch b/queue-4.19/random-restore-o_nonblock-support.patch
deleted file mode 100644 (file)
index b153a15..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-From cd4f24ae9404fd31fc461066e57889be3b68641b Mon Sep 17 00:00:00 2001
-From: "Jason A. Donenfeld" <Jason@zx2c4.com>
-Date: Thu, 8 Sep 2022 16:14:00 +0200
-Subject: random: restore O_NONBLOCK support
-
-From: Jason A. Donenfeld <Jason@zx2c4.com>
-
-commit cd4f24ae9404fd31fc461066e57889be3b68641b upstream.
-
-Prior to 5.6, when /dev/random was opened with O_NONBLOCK, it would
-return -EAGAIN if there was no entropy. When the pools were unified in
-5.6, this was lost. The post 5.6 behavior of blocking until the pool is
-initialized, and ignoring O_NONBLOCK in the process, went unnoticed,
-with no reports about the regression received for two and a half years.
-However, eventually this indeed did break somebody's userspace.
-
-So we restore the old behavior, by returning -EAGAIN if the pool is not
-initialized. Unlike the old /dev/random, this can only occur during
-early boot, after which it never blocks again.
-
-In order to make this O_NONBLOCK behavior consistent with other
-expectations, also respect users reading with preadv2(RWF_NOWAIT) and
-similar.
-
-Fixes: 30c08efec888 ("random: make /dev/random be almost like /dev/urandom")
-Reported-by: Guozihua <guozihua@huawei.com>
-Reported-by: Zhongguohua <zhongguohua1@huawei.com>
-Cc: Al Viro <viro@zeniv.linux.org.uk>
-Cc: Theodore Ts'o <tytso@mit.edu>
-Cc: Andrew Lutomirski <luto@kernel.org>
-Cc: stable@vger.kernel.org
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/char/mem.c    |    4 ++--
- drivers/char/random.c |    5 +++++
- 2 files changed, 7 insertions(+), 2 deletions(-)
-
---- a/drivers/char/mem.c
-+++ b/drivers/char/mem.c
-@@ -893,8 +893,8 @@ static const struct memdev {
- #endif
-        [5] = { "zero", 0666, &zero_fops, 0 },
-        [7] = { "full", 0666, &full_fops, 0 },
--       [8] = { "random", 0666, &random_fops, 0 },
--       [9] = { "urandom", 0666, &urandom_fops, 0 },
-+       [8] = { "random", 0666, &random_fops, FMODE_NOWAIT },
-+       [9] = { "urandom", 0666, &urandom_fops, FMODE_NOWAIT },
- #ifdef CONFIG_PRINTK
-       [11] = { "kmsg", 0644, &kmsg_fops, 0 },
- #endif
---- a/drivers/char/random.c
-+++ b/drivers/char/random.c
-@@ -1294,6 +1294,11 @@ static ssize_t random_read_iter(struct k
- {
-       int ret;
-+      if (!crng_ready() &&
-+          ((kiocb->ki_flags & (IOCB_NOWAIT | IOCB_NOIO)) ||
-+           (kiocb->ki_filp->f_flags & O_NONBLOCK)))
-+              return -EAGAIN;
-+
-       ret = wait_for_random_bytes();
-       if (ret != 0)
-               return ret;
index 5b12b2c661855e21c12c14b66db590ea6ec2f951..a1eb971a7dc8e19945895658ad35c839eacb6cc8 100644 (file)
@@ -19,7 +19,6 @@ nilfs2-fix-null-pointer-dereference-at-nilfs_bmap_lookup_at_level.patch
 nilfs2-fix-leak-of-nilfs_root-in-case-of-writer-thread-creation-failure.patch
 nilfs2-replace-warn_ons-by-nilfs_error-for-checkpoint-acquisition-failure.patch
 ceph-don-t-truncate-file-in-atomic_open.patch
-random-restore-o_nonblock-support.patch
 random-clamp-credited-irq-bits-to-maximum-mixed.patch
 alsa-hda-fix-position-reporting-on-poulsbo.patch
 scsi-stex-properly-zero-out-the-passthrough-command-structure.patch
diff --git a/queue-4.9/random-restore-o_nonblock-support.patch b/queue-4.9/random-restore-o_nonblock-support.patch
deleted file mode 100644 (file)
index ec178ef..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-From cd4f24ae9404fd31fc461066e57889be3b68641b Mon Sep 17 00:00:00 2001
-From: "Jason A. Donenfeld" <Jason@zx2c4.com>
-Date: Thu, 8 Sep 2022 16:14:00 +0200
-Subject: random: restore O_NONBLOCK support
-
-From: Jason A. Donenfeld <Jason@zx2c4.com>
-
-commit cd4f24ae9404fd31fc461066e57889be3b68641b upstream.
-
-Prior to 5.6, when /dev/random was opened with O_NONBLOCK, it would
-return -EAGAIN if there was no entropy. When the pools were unified in
-5.6, this was lost. The post 5.6 behavior of blocking until the pool is
-initialized, and ignoring O_NONBLOCK in the process, went unnoticed,
-with no reports about the regression received for two and a half years.
-However, eventually this indeed did break somebody's userspace.
-
-So we restore the old behavior, by returning -EAGAIN if the pool is not
-initialized. Unlike the old /dev/random, this can only occur during
-early boot, after which it never blocks again.
-
-In order to make this O_NONBLOCK behavior consistent with other
-expectations, also respect users reading with preadv2(RWF_NOWAIT) and
-similar.
-
-Fixes: 30c08efec888 ("random: make /dev/random be almost like /dev/urandom")
-Reported-by: Guozihua <guozihua@huawei.com>
-Reported-by: Zhongguohua <zhongguohua1@huawei.com>
-Cc: Al Viro <viro@zeniv.linux.org.uk>
-Cc: Theodore Ts'o <tytso@mit.edu>
-Cc: Andrew Lutomirski <luto@kernel.org>
-Cc: stable@vger.kernel.org
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/char/mem.c    |    4 ++--
- drivers/char/random.c |    5 +++++
- 2 files changed, 7 insertions(+), 2 deletions(-)
-
---- a/drivers/char/mem.c
-+++ b/drivers/char/mem.c
-@@ -869,8 +869,8 @@ static const struct memdev {
- #endif
-        [5] = { "zero", 0666, &zero_fops, 0 },
-        [7] = { "full", 0666, &full_fops, 0 },
--       [8] = { "random", 0666, &random_fops, 0 },
--       [9] = { "urandom", 0666, &urandom_fops, 0 },
-+       [8] = { "random", 0666, &random_fops, FMODE_NOWAIT },
-+       [9] = { "urandom", 0666, &urandom_fops, FMODE_NOWAIT },
- #ifdef CONFIG_PRINTK
-       [11] = { "kmsg", 0644, &kmsg_fops, 0 },
- #endif
---- a/drivers/char/random.c
-+++ b/drivers/char/random.c
-@@ -1295,6 +1295,11 @@ static ssize_t random_read_iter(struct k
- {
-       int ret;
-+      if (!crng_ready() &&
-+          ((kiocb->ki_flags & (IOCB_NOWAIT | IOCB_NOIO)) ||
-+           (kiocb->ki_filp->f_flags & O_NONBLOCK)))
-+              return -EAGAIN;
-+
-       ret = wait_for_random_bytes();
-       if (ret != 0)
-               return ret;
index ff23954b75ef58f91d20c9c33a3b7df45bc7a60b..f2b762c962129c983f6b3ff3b0bb55dbcde373f0 100644 (file)
@@ -28,7 +28,6 @@ nilfs2-fix-null-pointer-dereference-at-nilfs_bmap_lookup_at_level.patch
 nilfs2-fix-leak-of-nilfs_root-in-case-of-writer-thread-creation-failure.patch
 nilfs2-replace-warn_ons-by-nilfs_error-for-checkpoint-acquisition-failure.patch
 ceph-don-t-truncate-file-in-atomic_open.patch
-random-restore-o_nonblock-support.patch
 random-clamp-credited-irq-bits-to-maximum-mixed.patch
 alsa-hda-fix-position-reporting-on-poulsbo.patch
 scsi-stex-properly-zero-out-the-passthrough-command-structure.patch
diff --git a/queue-5.4/random-restore-o_nonblock-support.patch b/queue-5.4/random-restore-o_nonblock-support.patch
deleted file mode 100644 (file)
index 89f085e..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-From cd4f24ae9404fd31fc461066e57889be3b68641b Mon Sep 17 00:00:00 2001
-From: "Jason A. Donenfeld" <Jason@zx2c4.com>
-Date: Thu, 8 Sep 2022 16:14:00 +0200
-Subject: random: restore O_NONBLOCK support
-
-From: Jason A. Donenfeld <Jason@zx2c4.com>
-
-commit cd4f24ae9404fd31fc461066e57889be3b68641b upstream.
-
-Prior to 5.6, when /dev/random was opened with O_NONBLOCK, it would
-return -EAGAIN if there was no entropy. When the pools were unified in
-5.6, this was lost. The post 5.6 behavior of blocking until the pool is
-initialized, and ignoring O_NONBLOCK in the process, went unnoticed,
-with no reports about the regression received for two and a half years.
-However, eventually this indeed did break somebody's userspace.
-
-So we restore the old behavior, by returning -EAGAIN if the pool is not
-initialized. Unlike the old /dev/random, this can only occur during
-early boot, after which it never blocks again.
-
-In order to make this O_NONBLOCK behavior consistent with other
-expectations, also respect users reading with preadv2(RWF_NOWAIT) and
-similar.
-
-Fixes: 30c08efec888 ("random: make /dev/random be almost like /dev/urandom")
-Reported-by: Guozihua <guozihua@huawei.com>
-Reported-by: Zhongguohua <zhongguohua1@huawei.com>
-Cc: Al Viro <viro@zeniv.linux.org.uk>
-Cc: Theodore Ts'o <tytso@mit.edu>
-Cc: Andrew Lutomirski <luto@kernel.org>
-Cc: stable@vger.kernel.org
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/char/mem.c    |    4 ++--
- drivers/char/random.c |    5 +++++
- 2 files changed, 7 insertions(+), 2 deletions(-)
-
---- a/drivers/char/mem.c
-+++ b/drivers/char/mem.c
-@@ -953,8 +953,8 @@ static const struct memdev {
- #endif
-        [5] = { "zero", 0666, &zero_fops, 0 },
-        [7] = { "full", 0666, &full_fops, 0 },
--       [8] = { "random", 0666, &random_fops, 0 },
--       [9] = { "urandom", 0666, &urandom_fops, 0 },
-+       [8] = { "random", 0666, &random_fops, FMODE_NOWAIT },
-+       [9] = { "urandom", 0666, &urandom_fops, FMODE_NOWAIT },
- #ifdef CONFIG_PRINTK
-       [11] = { "kmsg", 0644, &kmsg_fops, 0 },
- #endif
---- a/drivers/char/random.c
-+++ b/drivers/char/random.c
-@@ -1294,6 +1294,11 @@ static ssize_t random_read_iter(struct k
- {
-       int ret;
-+      if (!crng_ready() &&
-+          ((kiocb->ki_flags & (IOCB_NOWAIT | IOCB_NOIO)) ||
-+           (kiocb->ki_filp->f_flags & O_NONBLOCK)))
-+              return -EAGAIN;
-+
-       ret = wait_for_random_bytes();
-       if (ret != 0)
-               return ret;
index 418f6e69dcfc836cad5605ea54eb5d42db9d1f1f..e054b385a4ee8014ecb88c5cdcc4c18da3efa7ec 100644 (file)
@@ -19,7 +19,6 @@ nilfs2-fix-null-pointer-dereference-at-nilfs_bmap_lookup_at_level.patch
 nilfs2-fix-leak-of-nilfs_root-in-case-of-writer-thread-creation-failure.patch
 nilfs2-replace-warn_ons-by-nilfs_error-for-checkpoint-acquisition-failure.patch
 ceph-don-t-truncate-file-in-atomic_open.patch
-random-restore-o_nonblock-support.patch
 random-clamp-credited-irq-bits-to-maximum-mixed.patch
 alsa-hda-fix-position-reporting-on-poulsbo.patch
 efi-correct-macmini-dmi-match-in-uefi-cert-quirk.patch