]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Oct 2022 13:23:08 +0000 (15:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Oct 2022 13:23:08 +0000 (15:23 +0200)
added patches:
alsa-hda-fix-position-reporting-on-poulsbo.patch
efi-correct-macmini-dmi-match-in-uefi-cert-quirk.patch
random-clamp-credited-irq-bits-to-maximum-mixed.patch
random-restore-o_nonblock-support.patch
scsi-stex-properly-zero-out-the-passthrough-command-structure.patch
usb-serial-qcserial-add-new-usb-id-for-dell-branded-em7455.patch

queue-5.4/alsa-hda-fix-position-reporting-on-poulsbo.patch [new file with mode: 0644]
queue-5.4/efi-correct-macmini-dmi-match-in-uefi-cert-quirk.patch [new file with mode: 0644]
queue-5.4/random-clamp-credited-irq-bits-to-maximum-mixed.patch [new file with mode: 0644]
queue-5.4/random-restore-o_nonblock-support.patch [new file with mode: 0644]
queue-5.4/scsi-stex-properly-zero-out-the-passthrough-command-structure.patch [new file with mode: 0644]
queue-5.4/series
queue-5.4/usb-serial-qcserial-add-new-usb-id-for-dell-branded-em7455.patch [new file with mode: 0644]

diff --git a/queue-5.4/alsa-hda-fix-position-reporting-on-poulsbo.patch b/queue-5.4/alsa-hda-fix-position-reporting-on-poulsbo.patch
new file mode 100644 (file)
index 0000000..a5c94c9
--- /dev/null
@@ -0,0 +1,40 @@
+From 56e696c0f0c71b77fff921fc94b58a02f0445b2c Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Sat, 1 Oct 2022 16:21:24 +0200
+Subject: ALSA: hda: Fix position reporting on Poulsbo
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 56e696c0f0c71b77fff921fc94b58a02f0445b2c upstream.
+
+Hans reported that his Sony VAIO VPX11S1E showed the broken sound
+behavior at the start of the stream for a couple of seconds, and it
+turned out that the position_fix=1 option fixes the issue.  It implies
+that the position reporting is inaccurate, and very likely hitting on
+all Poulsbo devices.
+
+The patch applies the workaround for Poulsbo generically to switch to
+LPIB mode instead of the default position buffer.
+
+Reported-and-tested-by: Hans de Goede <hdegoede@redhat.com>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/3e8697e1-87c6-7a7b-d2e8-b21f1d2f181b@redhat.com
+Link: https://lore.kernel.org/r/20221001142124.7241-1-tiwai@suse.de
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/pci/hda/hda_intel.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/sound/pci/hda/hda_intel.c
++++ b/sound/pci/hda/hda_intel.c
+@@ -2532,7 +2532,8 @@ static const struct pci_device_id azx_id
+         .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_NOPM },
+       /* Poulsbo */
+       { PCI_DEVICE(0x8086, 0x811b),
+-        .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_BASE },
++        .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_BASE |
++        AZX_DCAPS_POSFIX_LPIB },
+       /* Oaktrail */
+       { PCI_DEVICE(0x8086, 0x080a),
+         .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_BASE },
diff --git a/queue-5.4/efi-correct-macmini-dmi-match-in-uefi-cert-quirk.patch b/queue-5.4/efi-correct-macmini-dmi-match-in-uefi-cert-quirk.patch
new file mode 100644 (file)
index 0000000..857efb1
--- /dev/null
@@ -0,0 +1,55 @@
+From bab715bdaa9ebf28d99a6d1efb2704a30125e96d Mon Sep 17 00:00:00 2001
+From: Orlando Chamberlain <redecorating@protonmail.com>
+Date: Thu, 29 Sep 2022 11:49:56 +0000
+Subject: efi: Correct Macmini DMI match in uefi cert quirk
+
+From: Orlando Chamberlain <redecorating@protonmail.com>
+
+commit bab715bdaa9ebf28d99a6d1efb2704a30125e96d upstream.
+
+It turns out Apple doesn't capitalise the "mini" in "Macmini" in DMI, which
+is inconsistent with other model line names.
+
+Correct the capitalisation of Macmini in the quirk for skipping loading
+platform certs on T2 Macs.
+
+Currently users get:
+
+------------[ cut here ]------------
+[Firmware Bug]: Page fault caused by firmware at PA: 0xffffa30640054000
+WARNING: CPU: 1 PID: 8 at arch/x86/platform/efi/quirks.c:735 efi_crash_gracefully_on_page_fault+0x55/0xe0
+Modules linked in:
+CPU: 1 PID: 8 Comm: kworker/u12:0 Not tainted 5.18.14-arch1-2-t2 #1 4535eb3fc40fd08edab32a509fbf4c9bc52d111e
+Hardware name: Apple Inc. Macmini8,1/Mac-7BA5B2DFE22DDD8C, BIOS 1731.120.10.0.0 (iBridge: 19.16.15071.0.0,0) 04/24/2022
+Workqueue: efi_rts_wq efi_call_rts
+...
+---[ end trace 0000000000000000 ]---
+efi: Froze efi_rts_wq and disabled EFI Runtime Services
+integrity: Couldn't get size: 0x8000000000000015
+integrity: MODSIGN: Couldn't get UEFI db list
+efi: EFI Runtime Services are disabled!
+integrity: Couldn't get size: 0x8000000000000015
+integrity: Couldn't get UEFI dbx list
+
+Fixes: 155ca952c7ca ("efi: Do not import certificates from UEFI Secure Boot for T2 Macs")
+Cc: stable@vger.kernel.org
+Cc: Aditya Garg <gargaditya08@live.com>
+Tested-by: Samuel Jiang <chyishian.jiang@gmail.com>
+Signed-off-by: Orlando Chamberlain <redecorating@protonmail.com>
+Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ security/integrity/platform_certs/load_uefi.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/security/integrity/platform_certs/load_uefi.c
++++ b/security/integrity/platform_certs/load_uefi.c
+@@ -30,7 +30,7 @@ static const struct dmi_system_id uefi_s
+       { UEFI_QUIRK_SKIP_CERT("Apple Inc.", "MacBookAir8,1") },
+       { UEFI_QUIRK_SKIP_CERT("Apple Inc.", "MacBookAir8,2") },
+       { UEFI_QUIRK_SKIP_CERT("Apple Inc.", "MacBookAir9,1") },
+-      { UEFI_QUIRK_SKIP_CERT("Apple Inc.", "MacMini8,1") },
++      { UEFI_QUIRK_SKIP_CERT("Apple Inc.", "Macmini8,1") },
+       { UEFI_QUIRK_SKIP_CERT("Apple Inc.", "MacPro7,1") },
+       { UEFI_QUIRK_SKIP_CERT("Apple Inc.", "iMac20,1") },
+       { UEFI_QUIRK_SKIP_CERT("Apple Inc.", "iMac20,2") },
diff --git a/queue-5.4/random-clamp-credited-irq-bits-to-maximum-mixed.patch b/queue-5.4/random-clamp-credited-irq-bits-to-maximum-mixed.patch
new file mode 100644 (file)
index 0000000..cd034b6
--- /dev/null
@@ -0,0 +1,31 @@
+From e78a802a7b4febf53f2a92842f494b01062d85a8 Mon Sep 17 00:00:00 2001
+From: "Jason A. Donenfeld" <Jason@zx2c4.com>
+Date: Fri, 23 Sep 2022 02:42:51 +0200
+Subject: random: clamp credited irq bits to maximum mixed
+
+From: Jason A. Donenfeld <Jason@zx2c4.com>
+
+commit e78a802a7b4febf53f2a92842f494b01062d85a8 upstream.
+
+Since the most that's mixed into the pool is sizeof(long)*2, don't
+credit more than that many bytes of entropy.
+
+Fixes: e3e33fc2ea7f ("random: do not use input pool from hard IRQs")
+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/random.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/char/random.c
++++ b/drivers/char/random.c
+@@ -976,7 +976,7 @@ static void mix_interrupt_randomness(str
+       local_irq_enable();
+       mix_pool_bytes(pool, sizeof(pool));
+-      credit_init_bits(max(1u, (count & U16_MAX) / 64));
++      credit_init_bits(clamp_t(unsigned int, (count & U16_MAX) / 64, 1, sizeof(pool) * 8));
+       memzero_explicit(pool, sizeof(pool));
+ }
diff --git a/queue-5.4/random-restore-o_nonblock-support.patch b/queue-5.4/random-restore-o_nonblock-support.patch
new file mode 100644 (file)
index 0000000..89f085e
--- /dev/null
@@ -0,0 +1,65 @@
+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;
diff --git a/queue-5.4/scsi-stex-properly-zero-out-the-passthrough-command-structure.patch b/queue-5.4/scsi-stex-properly-zero-out-the-passthrough-command-structure.patch
new file mode 100644 (file)
index 0000000..8a9e100
--- /dev/null
@@ -0,0 +1,68 @@
+From 6022f210461fef67e6e676fd8544ca02d1bcfa7a Mon Sep 17 00:00:00 2001
+From: Linus Torvalds <torvalds@linux-foundation.org>
+Date: Fri, 9 Sep 2022 08:54:47 +0200
+Subject: scsi: stex: Properly zero out the passthrough command structure
+
+From: Linus Torvalds <torvalds@linux-foundation.org>
+
+commit 6022f210461fef67e6e676fd8544ca02d1bcfa7a upstream.
+
+The passthrough structure is declared off of the stack, so it needs to be
+set to zero before copied back to userspace to prevent any unintentional
+data leakage.  Switch things to be statically allocated which will fill the
+unused fields with 0 automatically.
+
+Link: https://lore.kernel.org/r/YxrjN3OOw2HHl9tx@kroah.com
+Cc: stable@kernel.org
+Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
+Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
+Cc: Dan Carpenter <dan.carpenter@oracle.com>
+Reported-by: hdthky <hdthky0@gmail.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/scsi/stex.c      |   17 +++++++++--------
+ include/scsi/scsi_cmnd.h |    2 +-
+ 2 files changed, 10 insertions(+), 9 deletions(-)
+
+--- a/drivers/scsi/stex.c
++++ b/drivers/scsi/stex.c
+@@ -668,16 +668,17 @@ stex_queuecommand_lck(struct scsi_cmnd *
+               return 0;
+       case PASSTHRU_CMD:
+               if (cmd->cmnd[1] == PASSTHRU_GET_DRVVER) {
+-                      struct st_drvver ver;
++                      const struct st_drvver ver = {
++                              .major = ST_VER_MAJOR,
++                              .minor = ST_VER_MINOR,
++                              .oem = ST_OEM,
++                              .build = ST_BUILD_VER,
++                              .signature[0] = PASSTHRU_SIGNATURE,
++                              .console_id = host->max_id - 1,
++                              .host_no = hba->host->host_no,
++                      };
+                       size_t cp_len = sizeof(ver);
+-                      ver.major = ST_VER_MAJOR;
+-                      ver.minor = ST_VER_MINOR;
+-                      ver.oem = ST_OEM;
+-                      ver.build = ST_BUILD_VER;
+-                      ver.signature[0] = PASSTHRU_SIGNATURE;
+-                      ver.console_id = host->max_id - 1;
+-                      ver.host_no = hba->host->host_no;
+                       cp_len = scsi_sg_copy_from_buffer(cmd, &ver, cp_len);
+                       cmd->result = sizeof(ver) == cp_len ?
+                               DID_OK << 16 | COMMAND_COMPLETE << 8 :
+--- a/include/scsi/scsi_cmnd.h
++++ b/include/scsi/scsi_cmnd.h
+@@ -204,7 +204,7 @@ static inline int scsi_get_resid(struct
+       for_each_sg(scsi_sglist(cmd), sg, nseg, __i)
+ static inline int scsi_sg_copy_from_buffer(struct scsi_cmnd *cmd,
+-                                         void *buf, int buflen)
++                                         const void *buf, int buflen)
+ {
+       return sg_copy_from_buffer(scsi_sglist(cmd), scsi_sg_count(cmd),
+                                  buf, buflen);
index 7b391deb6e53b158bb9697deec56cb17634f13ba..418f6e69dcfc836cad5605ea54eb5d42db9d1f1f 100644 (file)
@@ -19,3 +19,9 @@ 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
+scsi-stex-properly-zero-out-the-passthrough-command-structure.patch
+usb-serial-qcserial-add-new-usb-id-for-dell-branded-em7455.patch
diff --git a/queue-5.4/usb-serial-qcserial-add-new-usb-id-for-dell-branded-em7455.patch b/queue-5.4/usb-serial-qcserial-add-new-usb-id-for-dell-branded-em7455.patch
new file mode 100644 (file)
index 0000000..7a76a81
--- /dev/null
@@ -0,0 +1,29 @@
+From eee48781ea199e32c1d0c4732641c494833788ca Mon Sep 17 00:00:00 2001
+From: Frank Wunderlich <frank-w@public-files.de>
+Date: Mon, 26 Sep 2022 17:07:39 +0200
+Subject: USB: serial: qcserial: add new usb-id for Dell branded EM7455
+
+From: Frank Wunderlich <frank-w@public-files.de>
+
+commit eee48781ea199e32c1d0c4732641c494833788ca upstream.
+
+Add support for Dell 5811e (EM7455) with USB-id 0x413c:0x81c2.
+
+Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
+Cc: stable@vger.kernel.org
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/serial/qcserial.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/serial/qcserial.c
++++ b/drivers/usb/serial/qcserial.c
+@@ -177,6 +177,7 @@ static const struct usb_device_id id_tab
+       {DEVICE_SWI(0x413c, 0x81b3)},   /* Dell Wireless 5809e Gobi(TM) 4G LTE Mobile Broadband Card (rev3) */
+       {DEVICE_SWI(0x413c, 0x81b5)},   /* Dell Wireless 5811e QDL */
+       {DEVICE_SWI(0x413c, 0x81b6)},   /* Dell Wireless 5811e QDL */
++      {DEVICE_SWI(0x413c, 0x81c2)},   /* Dell Wireless 5811e */
+       {DEVICE_SWI(0x413c, 0x81cb)},   /* Dell Wireless 5816e QDL */
+       {DEVICE_SWI(0x413c, 0x81cc)},   /* Dell Wireless 5816e */
+       {DEVICE_SWI(0x413c, 0x81cf)},   /* Dell Wireless 5819 */