]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 4.19
authorSasha Levin <sashal@kernel.org>
Wed, 30 Nov 2022 12:55:55 +0000 (07:55 -0500)
committerSasha Levin <sashal@kernel.org>
Wed, 30 Nov 2022 12:55:55 +0000 (07:55 -0500)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.19/dm-integrity-flush-the-journal-on-suspend.patch [new file with mode: 0644]
queue-4.19/input-synaptics-switch-touchpad-on-hp-laptop-15-da30.patch [new file with mode: 0644]
queue-4.19/net-usb-qmi_wwan-add-telit-0x103a-composition.patch [new file with mode: 0644]
queue-4.19/platform-x86-acer-wmi-enable-sw_tablet_mode-on-switc.patch [new file with mode: 0644]
queue-4.19/platform-x86-asus-wmi-add-missing-pci_dev_put-in-asu.patch [new file with mode: 0644]
queue-4.19/platform-x86-hp-wmi-ignore-smart-experience-app-even.patch [new file with mode: 0644]
queue-4.19/serial-8250-8250_omap-avoid-rs485-rts-glitch-on-set_.patch [new file with mode: 0644]
queue-4.19/series
queue-4.19/tcp-configurable-source-port-perturb-table-size.patch [new file with mode: 0644]
queue-4.19/xen-platform-pci-add-missing-free_irq-in-error-path.patch [new file with mode: 0644]

diff --git a/queue-4.19/dm-integrity-flush-the-journal-on-suspend.patch b/queue-4.19/dm-integrity-flush-the-journal-on-suspend.patch
new file mode 100644 (file)
index 0000000..abe557f
--- /dev/null
@@ -0,0 +1,52 @@
+From 0b5f9c1813de8378d6134dc3ca19670907a473fc Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 15 Nov 2022 12:48:26 -0500
+Subject: dm integrity: flush the journal on suspend
+
+From: Mikulas Patocka <mpatocka@redhat.com>
+
+[ Upstream commit 5e5dab5ec763d600fe0a67837dd9155bdc42f961 ]
+
+This commit flushes the journal on suspend. It is prerequisite for the
+next commit that enables activating dm integrity devices in read-only mode.
+
+Note that we deliberately didn't flush the journal on suspend, so that the
+journal replay code would be tested. However, the dm-integrity code is 5
+years old now, so that journal replay is well-tested, and we can make this
+change now.
+
+Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
+Signed-off-by: Mike Snitzer <snitzer@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/md/dm-integrity.c | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c
+index 8456e82409e2..b054271066ac 100644
+--- a/drivers/md/dm-integrity.c
++++ b/drivers/md/dm-integrity.c
+@@ -2116,10 +2116,6 @@ static void integrity_writer(struct work_struct *w)
+       unsigned prev_free_sectors;
+-      /* the following test is not needed, but it tests the replay code */
+-      if (unlikely(dm_post_suspending(ic->ti)) && !ic->meta_dev)
+-              return;
+-
+       spin_lock_irq(&ic->endio_wait.lock);
+       write_start = ic->committed_section;
+       write_sections = ic->n_committed_sections;
+@@ -2455,8 +2451,7 @@ static void dm_integrity_postsuspend(struct dm_target *ti)
+       drain_workqueue(ic->commit_wq);
+       if (ic->mode == 'J') {
+-              if (ic->meta_dev)
+-                      queue_work(ic->writer_wq, &ic->writer_work);
++              queue_work(ic->writer_wq, &ic->writer_work);
+               drain_workqueue(ic->writer_wq);
+               dm_integrity_flush_buffers(ic, true);
+       }
+-- 
+2.35.1
+
diff --git a/queue-4.19/input-synaptics-switch-touchpad-on-hp-laptop-15-da30.patch b/queue-4.19/input-synaptics-switch-touchpad-on-hp-laptop-15-da30.patch
new file mode 100644 (file)
index 0000000..bfde766
--- /dev/null
@@ -0,0 +1,35 @@
+From 743d00bda2cadbe0d32d6e2df7ee964800cef911 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 15 Oct 2022 20:41:17 -0700
+Subject: Input: synaptics - switch touchpad on HP Laptop 15-da3001TU to RMI
+ mode
+
+From: Aman Dhoot <amandhoot12@gmail.com>
+
+[ Upstream commit ac5408991ea6b06e29129b4d4861097c4c3e0d59 ]
+
+The device works fine in native RMI mode, there is no reason to use legacy
+PS/2 mode with it.
+
+Signed-off-by: Aman Dhoot <amandhoot12@gmail.com>
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/input/mouse/synaptics.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
+index c6d393114502..7dc8ca5fd75f 100644
+--- a/drivers/input/mouse/synaptics.c
++++ b/drivers/input/mouse/synaptics.c
+@@ -192,6 +192,7 @@ static const char * const smbus_pnp_ids[] = {
+       "SYN3221", /* HP 15-ay000 */
+       "SYN323d", /* HP Spectre X360 13-w013dx */
+       "SYN3257", /* HP Envy 13-ad105ng */
++      "SYN3286", /* HP Laptop 15-da3001TU */
+       NULL
+ };
+-- 
+2.35.1
+
diff --git a/queue-4.19/net-usb-qmi_wwan-add-telit-0x103a-composition.patch b/queue-4.19/net-usb-qmi_wwan-add-telit-0x103a-composition.patch
new file mode 100644 (file)
index 0000000..d0f00df
--- /dev/null
@@ -0,0 +1,40 @@
+From 68df644390abe24516e271c23e53dc5e8fbc0481 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 15 Nov 2022 11:58:59 +0100
+Subject: net: usb: qmi_wwan: add Telit 0x103a composition
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Enrico Sau <enrico.sau@gmail.com>
+
+[ Upstream commit e103ba33998d0f25653cc8ebe745b68d1ee10cda ]
+
+Add the following Telit LE910C4-WWX composition:
+
+0x103a: rmnet
+
+Signed-off-by: Enrico Sau <enrico.sau@gmail.com>
+Acked-by: Bjørn Mork <bjorn@mork.no>
+Link: https://lore.kernel.org/r/20221115105859.14324-1-enrico.sau@gmail.com
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/usb/qmi_wwan.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
+index 56115792bea1..24fb9708fb11 100644
+--- a/drivers/net/usb/qmi_wwan.c
++++ b/drivers/net/usb/qmi_wwan.c
+@@ -1317,6 +1317,7 @@ static const struct usb_device_id products[] = {
+       {QMI_FIXED_INTF(0x2357, 0x0201, 4)},    /* TP-LINK HSUPA Modem MA180 */
+       {QMI_FIXED_INTF(0x2357, 0x9000, 4)},    /* TP-LINK MA260 */
+       {QMI_QUIRK_SET_DTR(0x1bc7, 0x1031, 3)}, /* Telit LE910C1-EUX */
++      {QMI_QUIRK_SET_DTR(0x1bc7, 0x103a, 0)}, /* Telit LE910C4-WWX */
+       {QMI_QUIRK_SET_DTR(0x1bc7, 0x1040, 2)}, /* Telit LE922A */
+       {QMI_QUIRK_SET_DTR(0x1bc7, 0x1050, 2)}, /* Telit FN980 */
+       {QMI_QUIRK_SET_DTR(0x1bc7, 0x1060, 2)}, /* Telit LN920 */
+-- 
+2.35.1
+
diff --git a/queue-4.19/platform-x86-acer-wmi-enable-sw_tablet_mode-on-switc.patch b/queue-4.19/platform-x86-acer-wmi-enable-sw_tablet_mode-on-switc.patch
new file mode 100644 (file)
index 0000000..8cfde70
--- /dev/null
@@ -0,0 +1,48 @@
+From 88b89bb8c8d8b09a5e86d00c73aaa9e126ddb34a Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 11 Nov 2022 12:16:39 +0100
+Subject: platform/x86: acer-wmi: Enable SW_TABLET_MODE on Switch V 10
+ (SW5-017)
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+[ Upstream commit 1e817b889c7d8c14e7005258e15fec62edafe03c ]
+
+Like the Acer Switch 10 (SW5-012) and Acer Switch 10 (S1003) models
+the Acer Switch V 10 (SW5-017) supports reporting SW_TABLET_MODE
+through acer-wmi.
+
+Add a DMI quirk for the SW5-017 setting force_caps to ACER_CAP_KBD_DOCK
+(these devices have no other acer-wmi based functionality).
+
+Cc: Rudolf Polzer <rpolzer@google.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Link: https://lore.kernel.org/r/20221111111639.35730-1-hdegoede@redhat.com
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/platform/x86/acer-wmi.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
+index c73ce07b66c9..9387a370b2ff 100644
+--- a/drivers/platform/x86/acer-wmi.c
++++ b/drivers/platform/x86/acer-wmi.c
+@@ -550,6 +550,15 @@ static const struct dmi_system_id acer_quirks[] __initconst = {
+               },
+               .driver_data = (void *)ACER_CAP_KBD_DOCK,
+       },
++      {
++              .callback = set_force_caps,
++              .ident = "Acer Aspire Switch V 10 SW5-017",
++              .matches = {
++                      DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Acer"),
++                      DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "SW5-017"),
++              },
++              .driver_data = (void *)ACER_CAP_KBD_DOCK,
++      },
+       {
+               .callback = set_force_caps,
+               .ident = "Acer One 10 (S1003)",
+-- 
+2.35.1
+
diff --git a/queue-4.19/platform-x86-asus-wmi-add-missing-pci_dev_put-in-asu.patch b/queue-4.19/platform-x86-asus-wmi-add-missing-pci_dev_put-in-asu.patch
new file mode 100644 (file)
index 0000000..3b85f4b
--- /dev/null
@@ -0,0 +1,39 @@
+From 66c44e9735527e3afd864cbe2736cd6bd4a8f5fa Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 11 Nov 2022 18:07:52 +0800
+Subject: platform/x86: asus-wmi: add missing pci_dev_put() in
+ asus_wmi_set_xusb2pr()
+
+From: Xiongfeng Wang <wangxiongfeng2@huawei.com>
+
+[ Upstream commit d0cdd85046b15089df71a50548617ac1025300d0 ]
+
+pci_get_device() will increase the reference count for the returned
+pci_dev. We need to use pci_dev_put() to decrease the reference count
+before asus_wmi_set_xusb2pr() returns.
+
+Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
+Link: https://lore.kernel.org/r/20221111100752.134311-1-wangxiongfeng2@huawei.com
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/platform/x86/asus-wmi.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
+index 339b753ba447..3723ae37993d 100644
+--- a/drivers/platform/x86/asus-wmi.c
++++ b/drivers/platform/x86/asus-wmi.c
+@@ -1176,6 +1176,8 @@ static void asus_wmi_set_xusb2pr(struct asus_wmi *asus)
+       pci_write_config_dword(xhci_pdev, USB_INTEL_XUSB2PR,
+                               cpu_to_le32(ports_available));
++      pci_dev_put(xhci_pdev);
++
+       pr_info("set USB_INTEL_XUSB2PR old: 0x%04x, new: 0x%04x\n",
+                       orig_ports_available, ports_available);
+ }
+-- 
+2.35.1
+
diff --git a/queue-4.19/platform-x86-hp-wmi-ignore-smart-experience-app-even.patch b/queue-4.19/platform-x86-hp-wmi-ignore-smart-experience-app-even.patch
new file mode 100644 (file)
index 0000000..c67d6e3
--- /dev/null
@@ -0,0 +1,48 @@
+From 43ae38db5cdeee9182424b68759672f47081fe5f Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 14 Nov 2022 15:38:41 +0800
+Subject: platform/x86: hp-wmi: Ignore Smart Experience App event
+
+From: Kai-Heng Feng <kai.heng.feng@canonical.com>
+
+[ Upstream commit 8b9b6a044b408283b086702b1d9e3cf4ba45b426 ]
+
+Sometimes hp-wmi driver complains on system resume:
+[ 483.116451] hp_wmi: Unknown event_id - 33 - 0x0
+
+According to HP it's a feature called "HP Smart Experience App" and it's
+safe to be ignored.
+
+Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
+Link: https://lore.kernel.org/r/20221114073842.205392-1-kai.heng.feng@canonical.com
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/platform/x86/hp-wmi.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
+index ba1a3e2fcebe..c65b800310f3 100644
+--- a/drivers/platform/x86/hp-wmi.c
++++ b/drivers/platform/x86/hp-wmi.c
+@@ -76,6 +76,7 @@ enum hp_wmi_event_ids {
+       HPWMI_PEAKSHIFT_PERIOD          = 0x0F,
+       HPWMI_BATTERY_CHARGE_PERIOD     = 0x10,
+       HPWMI_SANITIZATION_MODE         = 0x17,
++      HPWMI_SMART_EXPERIENCE_APP      = 0x21,
+ };
+ struct bios_args {
+@@ -634,6 +635,8 @@ static void hp_wmi_notify(u32 value, void *context)
+               break;
+       case HPWMI_SANITIZATION_MODE:
+               break;
++      case HPWMI_SMART_EXPERIENCE_APP:
++              break;
+       default:
+               pr_info("Unknown event_id - %d - 0x%x\n", event_id, event_data);
+               break;
+-- 
+2.35.1
+
diff --git a/queue-4.19/serial-8250-8250_omap-avoid-rs485-rts-glitch-on-set_.patch b/queue-4.19/serial-8250-8250_omap-avoid-rs485-rts-glitch-on-set_.patch
new file mode 100644 (file)
index 0000000..69e47aa
--- /dev/null
@@ -0,0 +1,94 @@
+From e9d5349fb1aa917e2fe91a53b4715d06198745b0 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 27 Sep 2022 13:52:34 +0200
+Subject: serial: 8250: 8250_omap: Avoid RS485 RTS glitch on ->set_termios()
+
+From: Lukas Wunner <lukas@wunner.de>
+
+[ Upstream commit 038ee49fef18710bedd38b531d173ccd746b2d8d ]
+
+RS485-enabled UART ports on TI Sitara SoCs with active-low polarity
+exhibit a Transmit Enable glitch on ->set_termios():
+
+omap8250_restore_regs(), which is called from omap_8250_set_termios(),
+sets the TCRTLR bit in the MCR register and clears all other bits,
+including RTS.  If RTS uses active-low polarity, it is now asserted
+for no reason.
+
+The TCRTLR bit is subsequently cleared by writing up->mcr to the MCR
+register.  That variable is always zero, so the RTS bit is still cleared
+(incorrectly so if RTS is active-high).
+
+(up->mcr is not, as one might think, a cache of the MCR register's
+current value.  Rather, it only caches a single bit of that register,
+the AFE bit.  And it only does so if the UART supports the AFE bit,
+which OMAP does not.  For details see serial8250_do_set_termios() and
+serial8250_do_set_mctrl().)
+
+Finally at the end of omap8250_restore_regs(), the MCR register is
+restored (and RTS deasserted) by a call to up->port.ops->set_mctrl()
+(which equals serial8250_set_mctrl()) and serial8250_em485_stop_tx().
+
+So there's an RTS glitch between setting TCRTLR and calling
+serial8250_em485_stop_tx().  Avoid by using a read-modify-write
+when setting TCRTLR.
+
+While at it, drop a redundant initialization of up->mcr.  As explained
+above, the variable isn't used by the driver and it is already
+initialized to zero because it is part of the static struct
+serial8250_ports[] declared in 8250_core.c.  (Static structs are
+initialized to zero per section 6.7.8 nr. 10 of the C99 standard.)
+
+Cc: Jan Kiszka <jan.kiszka@siemens.com>
+Cc: Su Bao Cheng <baocheng.su@siemens.com>
+Tested-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
+Signed-off-by: Lukas Wunner <lukas@wunner.de>
+Link: https://lore.kernel.org/r/6554b0241a2c7fd50f32576fdbafed96709e11e8.1664278942.git.lukas@wunner.de
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/tty/serial/8250/8250_omap.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
+index 8cf4819312f5..b9352d3bb2ed 100644
+--- a/drivers/tty/serial/8250/8250_omap.c
++++ b/drivers/tty/serial/8250/8250_omap.c
+@@ -244,6 +244,7 @@ static void omap8250_restore_regs(struct uart_8250_port *up)
+ {
+       struct omap8250_priv *priv = up->port.private_data;
+       struct uart_8250_dma    *dma = up->dma;
++      u8 mcr = serial8250_in_MCR(up);
+       if (dma && dma->tx_running) {
+               /*
+@@ -260,7 +261,7 @@ static void omap8250_restore_regs(struct uart_8250_port *up)
+       serial_out(up, UART_EFR, UART_EFR_ECB);
+       serial_out(up, UART_LCR, UART_LCR_CONF_MODE_A);
+-      serial8250_out_MCR(up, UART_MCR_TCRTLR);
++      serial8250_out_MCR(up, mcr | UART_MCR_TCRTLR);
+       serial_out(up, UART_FCR, up->fcr);
+       omap8250_update_scr(up, priv);
+@@ -276,7 +277,8 @@ static void omap8250_restore_regs(struct uart_8250_port *up)
+       serial_out(up, UART_LCR, 0);
+       /* drop TCR + TLR access, we setup XON/XOFF later */
+-      serial8250_out_MCR(up, up->mcr);
++      serial8250_out_MCR(up, mcr);
++
+       serial_out(up, UART_IER, up->ier);
+       serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B);
+@@ -585,7 +587,6 @@ static int omap_8250_startup(struct uart_port *port)
+       pm_runtime_get_sync(port->dev);
+-      up->mcr = 0;
+       serial_out(up, UART_FCR, UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT);
+       serial_out(up, UART_LCR, UART_LCR_WLEN8);
+-- 
+2.35.1
+
index 434eacbb923ffe5f69afc82d8babd154aa8d0b72..496eee312348154800f4426265e4fc362d3c90bc 100644 (file)
@@ -46,3 +46,12 @@ driver-core-add-device-probe-log-helper.patch
 revert-usb-bcma-add-a-check-for-devm_gpiod_get.patch
 usb-bcma-make-gpio-explicitly-optional.patch
 nilfs2-fix-nilfs_sufile_mark_dirty-not-set-segment-usage-as-dirty.patch
+input-synaptics-switch-touchpad-on-hp-laptop-15-da30.patch
+serial-8250-8250_omap-avoid-rs485-rts-glitch-on-set_.patch
+xen-platform-pci-add-missing-free_irq-in-error-path.patch
+platform-x86-asus-wmi-add-missing-pci_dev_put-in-asu.patch
+platform-x86-acer-wmi-enable-sw_tablet_mode-on-switc.patch
+platform-x86-hp-wmi-ignore-smart-experience-app-even.patch
+tcp-configurable-source-port-perturb-table-size.patch
+net-usb-qmi_wwan-add-telit-0x103a-composition.patch
+dm-integrity-flush-the-journal-on-suspend.patch
diff --git a/queue-4.19/tcp-configurable-source-port-perturb-table-size.patch b/queue-4.19/tcp-configurable-source-port-perturb-table-size.patch
new file mode 100644 (file)
index 0000000..cf6b0a4
--- /dev/null
@@ -0,0 +1,78 @@
+From 8f4f86d915a1f0099f9593ef0ae9bf81211ee8f7 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 14 Nov 2022 22:56:16 +0000
+Subject: tcp: configurable source port perturb table size
+
+From: Gleb Mazovetskiy <glex.spb@gmail.com>
+
+[ Upstream commit aeac4ec8f46d610a10adbaeff5e2edf6a88ffc62 ]
+
+On embedded systems with little memory and no relevant
+security concerns, it is beneficial to reduce the size
+of the table.
+
+Reducing the size from 2^16 to 2^8 saves 255 KiB
+of kernel RAM.
+
+Makes the table size configurable as an expert option.
+
+The size was previously increased from 2^8 to 2^16
+in commit 4c2c8f03a5ab ("tcp: increase source port perturb table to
+2^16").
+
+Signed-off-by: Gleb Mazovetskiy <glex.spb@gmail.com>
+Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ net/ipv4/Kconfig           | 10 ++++++++++
+ net/ipv4/inet_hashtables.c | 10 +++++-----
+ 2 files changed, 15 insertions(+), 5 deletions(-)
+
+diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
+index 2e12f848203a..8acfa1487478 100644
+--- a/net/ipv4/Kconfig
++++ b/net/ipv4/Kconfig
+@@ -388,6 +388,16 @@ config INET_IPCOMP
+         If unsure, say Y.
++config INET_TABLE_PERTURB_ORDER
++      int "INET: Source port perturbation table size (as power of 2)" if EXPERT
++      default 16
++      help
++        Source port perturbation table size (as power of 2) for
++        RFC 6056 3.3.4.  Algorithm 4: Double-Hash Port Selection Algorithm.
++
++        The default is almost always what you want.
++        Only change this if you know what you are doing.
++
+ config INET_XFRM_TUNNEL
+       tristate
+       select INET_TUNNEL
+diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
+index 70070f1003a0..3c58019f0718 100644
+--- a/net/ipv4/inet_hashtables.c
++++ b/net/ipv4/inet_hashtables.c
+@@ -718,13 +718,13 @@ EXPORT_SYMBOL_GPL(inet_unhash);
+  * Note that we use 32bit integers (vs RFC 'short integers')
+  * because 2^16 is not a multiple of num_ephemeral and this
+  * property might be used by clever attacker.
++ *
+  * RFC claims using TABLE_LENGTH=10 buckets gives an improvement, though
+- * attacks were since demonstrated, thus we use 65536 instead to really
+- * give more isolation and privacy, at the expense of 256kB of kernel
+- * memory.
++ * attacks were since demonstrated, thus we use 65536 by default instead
++ * to really give more isolation and privacy, at the expense of 256kB
++ * of kernel memory.
+  */
+-#define INET_TABLE_PERTURB_SHIFT 16
+-#define INET_TABLE_PERTURB_SIZE (1 << INET_TABLE_PERTURB_SHIFT)
++#define INET_TABLE_PERTURB_SIZE (1 << CONFIG_INET_TABLE_PERTURB_ORDER)
+ static u32 *table_perturb;
+ int __inet_hash_connect(struct inet_timewait_death_row *death_row,
+-- 
+2.35.1
+
diff --git a/queue-4.19/xen-platform-pci-add-missing-free_irq-in-error-path.patch b/queue-4.19/xen-platform-pci-add-missing-free_irq-in-error-path.patch
new file mode 100644 (file)
index 0000000..6eb132e
--- /dev/null
@@ -0,0 +1,54 @@
+From 1588d06845e102be05f0c5d84e8b6b7fa2749d33 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 14 Nov 2022 19:21:24 +0800
+Subject: xen/platform-pci: add missing free_irq() in error path
+
+From: ruanjinjie <ruanjinjie@huawei.com>
+
+[ Upstream commit c53717e1e3f0d0f9129b2e0dbc6dcc5e0a8132e9 ]
+
+free_irq() is missing in case of error in platform_pci_probe(), fix that.
+
+Signed-off-by: ruanjinjie <ruanjinjie@huawei.com>
+Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
+Link: https://lore.kernel.org/r/20221114112124.1965611-1-ruanjinjie@huawei.com
+Signed-off-by: Juergen Gross <jgross@suse.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/xen/platform-pci.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c
+index 4cec8146609a..c7e190e5db30 100644
+--- a/drivers/xen/platform-pci.c
++++ b/drivers/xen/platform-pci.c
+@@ -150,7 +150,7 @@ static int platform_pci_probe(struct pci_dev *pdev,
+               if (ret) {
+                       dev_warn(&pdev->dev, "Unable to set the evtchn callback "
+                                        "err=%d\n", ret);
+-                      goto out;
++                      goto irq_out;
+               }
+       }
+@@ -158,13 +158,16 @@ static int platform_pci_probe(struct pci_dev *pdev,
+       grant_frames = alloc_xen_mmio(PAGE_SIZE * max_nr_gframes);
+       ret = gnttab_setup_auto_xlat_frames(grant_frames);
+       if (ret)
+-              goto out;
++              goto irq_out;
+       ret = gnttab_init();
+       if (ret)
+               goto grant_out;
+       return 0;
+ grant_out:
+       gnttab_free_auto_xlat_frames();
++irq_out:
++      if (!xen_have_vector_callback)
++              free_irq(pdev->irq, pdev);
+ out:
+       pci_release_region(pdev, 0);
+ mem_out:
+-- 
+2.35.1
+