]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.5-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Oct 2023 20:01:40 +0000 (22:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Oct 2023 20:01:40 +0000 (22:01 +0200)
added patches:
apple-gmux-hard-code-max-brightness-for-mmio-gmux.patch
keys-asymmetric-fix-sign-verify-on-pkcs1pad-without-a-hash.patch
perf-disallow-mis-matched-inherited-group-reads.patch
platform-surface-platform_profile-propagate-error-if-profile-registration-fails.patch
platform-x86-asus-wmi-change-asus_wmi_brn_down-code-from-0x20-to-0x2e.patch
platform-x86-asus-wmi-map-0x2a-code-ignore-0x2b-and-0x2c-events.patch
platform-x86-asus-wmi-only-map-brightness-codes-when-using-asus-wmi-backlight-control.patch
platform-x86-intel-uncore-freq-conditionally-create-attribute-for-read-frequency.patch
platform-x86-msi-ec-fix-the-3rd-config.patch
s390-cio-fix-a-memleak-in-css_alloc_subchannel.patch
s390-pci-fix-iommu-bitmap-allocation.patch
selftests-ftrace-add-new-test-case-which-checks-non-unique-symbol.patch
thunderbolt-call-tb_switch_put-once-displayport-bandwidth-request-is-finished.patch
tracing-kprobes-return-eaddrnotavail-when-func-matches-several-symbols.patch
usb-serial-option-add-entry-for-sierra-em9191-with-new-firmware.patch
usb-serial-option-add-fibocom-to-dell-custom-modem-fm101r-gl.patch
usb-serial-option-add-telit-le910c4-wwx-0x1035-composition.patch

18 files changed:
queue-6.5/apple-gmux-hard-code-max-brightness-for-mmio-gmux.patch [new file with mode: 0644]
queue-6.5/keys-asymmetric-fix-sign-verify-on-pkcs1pad-without-a-hash.patch [new file with mode: 0644]
queue-6.5/perf-disallow-mis-matched-inherited-group-reads.patch [new file with mode: 0644]
queue-6.5/platform-surface-platform_profile-propagate-error-if-profile-registration-fails.patch [new file with mode: 0644]
queue-6.5/platform-x86-asus-wmi-change-asus_wmi_brn_down-code-from-0x20-to-0x2e.patch [new file with mode: 0644]
queue-6.5/platform-x86-asus-wmi-map-0x2a-code-ignore-0x2b-and-0x2c-events.patch [new file with mode: 0644]
queue-6.5/platform-x86-asus-wmi-only-map-brightness-codes-when-using-asus-wmi-backlight-control.patch [new file with mode: 0644]
queue-6.5/platform-x86-intel-uncore-freq-conditionally-create-attribute-for-read-frequency.patch [new file with mode: 0644]
queue-6.5/platform-x86-msi-ec-fix-the-3rd-config.patch [new file with mode: 0644]
queue-6.5/s390-cio-fix-a-memleak-in-css_alloc_subchannel.patch [new file with mode: 0644]
queue-6.5/s390-pci-fix-iommu-bitmap-allocation.patch [new file with mode: 0644]
queue-6.5/selftests-ftrace-add-new-test-case-which-checks-non-unique-symbol.patch [new file with mode: 0644]
queue-6.5/series
queue-6.5/thunderbolt-call-tb_switch_put-once-displayport-bandwidth-request-is-finished.patch [new file with mode: 0644]
queue-6.5/tracing-kprobes-return-eaddrnotavail-when-func-matches-several-symbols.patch [new file with mode: 0644]
queue-6.5/usb-serial-option-add-entry-for-sierra-em9191-with-new-firmware.patch [new file with mode: 0644]
queue-6.5/usb-serial-option-add-fibocom-to-dell-custom-modem-fm101r-gl.patch [new file with mode: 0644]
queue-6.5/usb-serial-option-add-telit-le910c4-wwx-0x1035-composition.patch [new file with mode: 0644]

diff --git a/queue-6.5/apple-gmux-hard-code-max-brightness-for-mmio-gmux.patch b/queue-6.5/apple-gmux-hard-code-max-brightness-for-mmio-gmux.patch
new file mode 100644 (file)
index 0000000..b423037
--- /dev/null
@@ -0,0 +1,55 @@
+From 0e51cb42438b8754d8f4cee4c802a8c5bb2cd5e0 Mon Sep 17 00:00:00 2001
+From: Orlando Chamberlain <orlandoch.dev@gmail.com>
+Date: Tue, 17 Oct 2023 22:14:45 +1100
+Subject: apple-gmux: Hard Code max brightness for MMIO gmux
+
+From: Orlando Chamberlain <orlandoch.dev@gmail.com>
+
+commit 0e51cb42438b8754d8f4cee4c802a8c5bb2cd5e0 upstream.
+
+The data in the max brightness port for iMacs with MMIO gmux incorrectly
+reports 0x03ff, but it should be 0xffff. As all other MMIO gmux models
+have 0xffff, hard code this for all MMIO gmux's so they all have the
+proper brightness range accessible.
+
+Fixes: 0c18184de990 ("platform/x86: apple-gmux: support MMIO gmux on T2 Macs")
+Reported-by: Karsten Leipold <poldi@dfn.de>
+Signed-off-by: Orlando Chamberlain <orlandoch.dev@gmail.com>
+Link: https://lore.kernel.org/r/20231017111444.19304-2-orlandoch.dev@gmail.com
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/platform/x86/apple-gmux.c |   14 +++++++++++++-
+ 1 file changed, 13 insertions(+), 1 deletion(-)
+
+--- a/drivers/platform/x86/apple-gmux.c
++++ b/drivers/platform/x86/apple-gmux.c
+@@ -105,6 +105,8 @@ struct apple_gmux_config {
+ #define GMUX_BRIGHTNESS_MASK          0x00ffffff
+ #define GMUX_MAX_BRIGHTNESS           GMUX_BRIGHTNESS_MASK
++# define MMIO_GMUX_MAX_BRIGHTNESS     0xffff
++
+ static u8 gmux_pio_read8(struct apple_gmux_data *gmux_data, int port)
+ {
+       return inb(gmux_data->iostart + port);
+@@ -857,7 +859,17 @@ get_version:
+       memset(&props, 0, sizeof(props));
+       props.type = BACKLIGHT_PLATFORM;
+-      props.max_brightness = gmux_read32(gmux_data, GMUX_PORT_MAX_BRIGHTNESS);
++
++      /*
++       * All MMIO gmux's have 0xffff as max brightness, but some iMacs incorrectly
++       * report 0x03ff, despite the firmware being happy to set 0xffff as the brightness
++       * at boot. Force 0xffff for all MMIO gmux's so they all have the correct brightness
++       * range.
++       */
++      if (type == APPLE_GMUX_TYPE_MMIO)
++              props.max_brightness = MMIO_GMUX_MAX_BRIGHTNESS;
++      else
++              props.max_brightness = gmux_read32(gmux_data, GMUX_PORT_MAX_BRIGHTNESS);
+ #if IS_REACHABLE(CONFIG_ACPI_VIDEO)
+       register_bdev = acpi_video_get_backlight_type() == acpi_backlight_apple_gmux;
diff --git a/queue-6.5/keys-asymmetric-fix-sign-verify-on-pkcs1pad-without-a-hash.patch b/queue-6.5/keys-asymmetric-fix-sign-verify-on-pkcs1pad-without-a-hash.patch
new file mode 100644 (file)
index 0000000..58dd3b1
--- /dev/null
@@ -0,0 +1,47 @@
+From b11950356c4b416d2e87941f3aa7a8bf089db72b Mon Sep 17 00:00:00 2001
+From: Herbert Xu <herbert@gondor.apana.org.au>
+Date: Mon, 16 Oct 2023 16:35:36 +0800
+Subject: KEYS: asymmetric: Fix sign/verify on pkcs1pad without a hash
+
+From: Herbert Xu <herbert@gondor.apana.org.au>
+
+commit b11950356c4b416d2e87941f3aa7a8bf089db72b upstream.
+
+The new sign/verify code broke the case of pkcs1pad without a
+hash algorithm.  Fix it by setting issig correctly for this case.
+
+Fixes: 63ba4d67594a ("KEYS: asymmetric: Use new crypto interface without scatterlists")
+Cc: stable@vger.kernel.org # v6.5
+Reported-by: Denis Kenzior <denkenz@gmail.com>
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+Tested-by: Denis Kenzior <denkenz@gmail.com>
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ crypto/asymmetric_keys/public_key.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/crypto/asymmetric_keys/public_key.c b/crypto/asymmetric_keys/public_key.c
+index abeecb8329b3..1dcab27986a6 100644
+--- a/crypto/asymmetric_keys/public_key.c
++++ b/crypto/asymmetric_keys/public_key.c
+@@ -81,14 +81,13 @@ software_key_determine_akcipher(const struct public_key *pkey,
+                * RSA signatures usually use EMSA-PKCS1-1_5 [RFC3447 sec 8.2].
+                */
+               if (strcmp(encoding, "pkcs1") == 0) {
++                      *sig = op == kernel_pkey_sign ||
++                             op == kernel_pkey_verify;
+                       if (!hash_algo) {
+-                              *sig = false;
+                               n = snprintf(alg_name, CRYPTO_MAX_ALG_NAME,
+                                            "pkcs1pad(%s)",
+                                            pkey->pkey_algo);
+                       } else {
+-                              *sig = op == kernel_pkey_sign ||
+-                                     op == kernel_pkey_verify;
+                               n = snprintf(alg_name, CRYPTO_MAX_ALG_NAME,
+                                            "pkcs1pad(%s,%s)",
+                                            pkey->pkey_algo, hash_algo);
+-- 
+2.42.0
+
diff --git a/queue-6.5/perf-disallow-mis-matched-inherited-group-reads.patch b/queue-6.5/perf-disallow-mis-matched-inherited-group-reads.patch
new file mode 100644 (file)
index 0000000..989aadb
--- /dev/null
@@ -0,0 +1,142 @@
+From 32671e3799ca2e4590773fd0e63aaa4229e50c06 Mon Sep 17 00:00:00 2001
+From: Peter Zijlstra <peterz@infradead.org>
+Date: Wed, 18 Oct 2023 13:56:54 +0200
+Subject: perf: Disallow mis-matched inherited group reads
+
+From: Peter Zijlstra <peterz@infradead.org>
+
+commit 32671e3799ca2e4590773fd0e63aaa4229e50c06 upstream.
+
+Because group consistency is non-atomic between parent (filedesc) and children
+(inherited) events, it is possible for PERF_FORMAT_GROUP read() to try and sum
+non-matching counter groups -- with non-sensical results.
+
+Add group_generation to distinguish the case where a parent group removes and
+adds an event and thus has the same number, but a different configuration of
+events as inherited groups.
+
+This became a problem when commit fa8c269353d5 ("perf/core: Invert
+perf_read_group() loops") flipped the order of child_list and sibling_list.
+Previously it would iterate the group (sibling_list) first, and for each
+sibling traverse the child_list. In this order, only the group composition of
+the parent is relevant. By flipping the order the group composition of the
+child (inherited) events becomes an issue and the mis-match in group
+composition becomes evident.
+
+That said; even prior to this commit, while reading of a group that is not
+equally inherited was not broken, it still made no sense.
+
+(Ab)use ECHILD as error return to indicate issues with child process group
+composition.
+
+Fixes: fa8c269353d5 ("perf/core: Invert perf_read_group() loops")
+Reported-by: Budimir Markovic <markovicbudimir@gmail.com>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Link: https://lkml.kernel.org/r/20231018115654.GK33217@noisy.programming.kicks-ass.net
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ include/linux/perf_event.h |    1 +
+ kernel/events/core.c       |   39 +++++++++++++++++++++++++++++++++------
+ 2 files changed, 34 insertions(+), 6 deletions(-)
+
+--- a/include/linux/perf_event.h
++++ b/include/linux/perf_event.h
+@@ -704,6 +704,7 @@ struct perf_event {
+       /* The cumulative AND of all event_caps for events in this group. */
+       int                             group_caps;
++      unsigned int                    group_generation;
+       struct perf_event               *group_leader;
+       /*
+        * event->pmu will always point to pmu in which this event belongs.
+--- a/kernel/events/core.c
++++ b/kernel/events/core.c
+@@ -1954,6 +1954,7 @@ static void perf_group_attach(struct per
+       list_add_tail(&event->sibling_list, &group_leader->sibling_list);
+       group_leader->nr_siblings++;
++      group_leader->group_generation++;
+       perf_event__header_size(group_leader);
+@@ -2144,6 +2145,7 @@ static void perf_group_detach(struct per
+       if (leader != event) {
+               list_del_init(&event->sibling_list);
+               event->group_leader->nr_siblings--;
++              event->group_leader->group_generation++;
+               goto out;
+       }
+@@ -5440,7 +5442,7 @@ static int __perf_read_group_add(struct
+                                       u64 read_format, u64 *values)
+ {
+       struct perf_event_context *ctx = leader->ctx;
+-      struct perf_event *sub;
++      struct perf_event *sub, *parent;
+       unsigned long flags;
+       int n = 1; /* skip @nr */
+       int ret;
+@@ -5450,6 +5452,33 @@ static int __perf_read_group_add(struct
+               return ret;
+       raw_spin_lock_irqsave(&ctx->lock, flags);
++      /*
++       * Verify the grouping between the parent and child (inherited)
++       * events is still in tact.
++       *
++       * Specifically:
++       *  - leader->ctx->lock pins leader->sibling_list
++       *  - parent->child_mutex pins parent->child_list
++       *  - parent->ctx->mutex pins parent->sibling_list
++       *
++       * Because parent->ctx != leader->ctx (and child_list nests inside
++       * ctx->mutex), group destruction is not atomic between children, also
++       * see perf_event_release_kernel(). Additionally, parent can grow the
++       * group.
++       *
++       * Therefore it is possible to have parent and child groups in a
++       * different configuration and summing over such a beast makes no sense
++       * what so ever.
++       *
++       * Reject this.
++       */
++      parent = leader->parent;
++      if (parent &&
++          (parent->group_generation != leader->group_generation ||
++           parent->nr_siblings != leader->nr_siblings)) {
++              ret = -ECHILD;
++              goto unlock;
++      }
+       /*
+        * Since we co-schedule groups, {enabled,running} times of siblings
+@@ -5483,8 +5512,9 @@ static int __perf_read_group_add(struct
+                       values[n++] = atomic64_read(&sub->lost_samples);
+       }
++unlock:
+       raw_spin_unlock_irqrestore(&ctx->lock, flags);
+-      return 0;
++      return ret;
+ }
+ static int perf_read_group(struct perf_event *event,
+@@ -5503,10 +5533,6 @@ static int perf_read_group(struct perf_e
+       values[0] = 1 + leader->nr_siblings;
+-      /*
+-       * By locking the child_mutex of the leader we effectively
+-       * lock the child list of all siblings.. XXX explain how.
+-       */
+       mutex_lock(&leader->child_mutex);
+       ret = __perf_read_group_add(leader, read_format, values);
+@@ -13357,6 +13383,7 @@ static int inherit_group(struct perf_eve
+                   !perf_get_aux_event(child_ctr, leader))
+                       return -EINVAL;
+       }
++      leader->group_generation = parent_event->group_generation;
+       return 0;
+ }
diff --git a/queue-6.5/platform-surface-platform_profile-propagate-error-if-profile-registration-fails.patch b/queue-6.5/platform-surface-platform_profile-propagate-error-if-profile-registration-fails.patch
new file mode 100644 (file)
index 0000000..f13f6eb
--- /dev/null
@@ -0,0 +1,41 @@
+From fe0e04cf66a12ffe6d1b43725ddaabd5599d024f Mon Sep 17 00:00:00 2001
+From: Armin Wolf <W_Armin@gmx.de>
+Date: Sun, 15 Oct 2023 01:54:49 +0200
+Subject: platform/surface: platform_profile: Propagate error if profile registration fails
+
+From: Armin Wolf <W_Armin@gmx.de>
+
+commit fe0e04cf66a12ffe6d1b43725ddaabd5599d024f upstream.
+
+If platform_profile_register() fails, the driver does not propagate
+the error, but instead probes successfully. This means when the driver
+unbinds, the a warning might be issued by platform_profile_remove().
+
+Fix this by propagating the error back to the caller of
+surface_platform_profile_probe().
+
+Compile-tested only.
+
+Fixes: b78b4982d763 ("platform/surface: Add platform profile driver")
+Signed-off-by: Armin Wolf <W_Armin@gmx.de>
+Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com>
+Tested-by: Maximilian Luz <luzmaximilian@gmail.com>
+Link: https://lore.kernel.org/r/20231014235449.288702-1-W_Armin@gmx.de
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/platform/surface/surface_platform_profile.c |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/platform/surface/surface_platform_profile.c
++++ b/drivers/platform/surface/surface_platform_profile.c
+@@ -159,8 +159,7 @@ static int surface_platform_profile_prob
+       set_bit(PLATFORM_PROFILE_BALANCED_PERFORMANCE, tpd->handler.choices);
+       set_bit(PLATFORM_PROFILE_PERFORMANCE, tpd->handler.choices);
+-      platform_profile_register(&tpd->handler);
+-      return 0;
++      return platform_profile_register(&tpd->handler);
+ }
+ static void surface_platform_profile_remove(struct ssam_device *sdev)
diff --git a/queue-6.5/platform-x86-asus-wmi-change-asus_wmi_brn_down-code-from-0x20-to-0x2e.patch b/queue-6.5/platform-x86-asus-wmi-change-asus_wmi_brn_down-code-from-0x20-to-0x2e.patch
new file mode 100644 (file)
index 0000000..84802ca
--- /dev/null
@@ -0,0 +1,66 @@
+From f37cc2fc277b371fc491890afb7d8a26e36bb3a1 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Tue, 17 Oct 2023 11:07:23 +0200
+Subject: platform/x86: asus-wmi: Change ASUS_WMI_BRN_DOWN code from 0x20 to 0x2e
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+commit f37cc2fc277b371fc491890afb7d8a26e36bb3a1 upstream.
+
+Older Asus laptops change the backlight level themselves and then send
+WMI events with different codes for different backlight levels.
+
+The asus-wmi.c code maps the entire range of codes reported on
+brightness down keypresses to an internal ASUS_WMI_BRN_DOWN code:
+
+define NOTIFY_BRNUP_MIN                0x11
+define NOTIFY_BRNUP_MAX                0x1f
+define NOTIFY_BRNDOWN_MIN              0x20
+define NOTIFY_BRNDOWN_MAX              0x2e
+
+        if (code >= NOTIFY_BRNUP_MIN && code <= NOTIFY_BRNUP_MAX)
+                code = ASUS_WMI_BRN_UP;
+        else if (code >= NOTIFY_BRNDOWN_MIN && code <= NOTIFY_BRNDOWN_MAX)
+                code = ASUS_WMI_BRN_DOWN;
+
+Before this commit all the NOTIFY_BRNDOWN_MIN - NOTIFY_BRNDOWN_MAX
+aka 0x20 - 0x2e events were mapped to 0x20.
+
+This mapping is causing issues on new laptop models which actually
+send 0x2b events for printscreen presses and 0x2c events for
+capslock presses, which get translated into spurious brightness-down
+presses.
+
+The plan is disable the 0x11-0x2e special mapping on laptops
+where asus-wmi does not register a backlight-device to avoid
+the spurious brightness-down keypresses. New laptops always send
+0x2e for brightness-down presses, change the special internal
+ASUS_WMI_BRN_DOWN value from 0x20 to 0x2e to match this in
+preparation for fixing the spurious brightness-down presses.
+
+This change does not have any functional impact since all
+of 0x20 - 0x2e is mapped to ASUS_WMI_BRN_DOWN first and only
+then checked against the keymap code and the new 0x2e
+value is still in the 0x20 - 0x2e range.
+
+Reported-by: James John <me@donjajo.com>
+Closes: https://lore.kernel.org/platform-driver-x86/a2c441fe-457e-44cf-a146-0ecd86b037cf@donjajo.com/
+Closes: https://bbs.archlinux.org/viewtopic.php?pid=2123716
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Link: https://lore.kernel.org/r/20231017090725.38163-2-hdegoede@redhat.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/platform/x86/asus-wmi.h |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/platform/x86/asus-wmi.h
++++ b/drivers/platform/x86/asus-wmi.h
+@@ -18,7 +18,7 @@
+ #include <linux/i8042.h>
+ #define ASUS_WMI_KEY_IGNORE (-1)
+-#define ASUS_WMI_BRN_DOWN     0x20
++#define ASUS_WMI_BRN_DOWN     0x2e
+ #define ASUS_WMI_BRN_UP               0x2f
+ struct module;
diff --git a/queue-6.5/platform-x86-asus-wmi-map-0x2a-code-ignore-0x2b-and-0x2c-events.patch b/queue-6.5/platform-x86-asus-wmi-map-0x2a-code-ignore-0x2b-and-0x2c-events.patch
new file mode 100644 (file)
index 0000000..d6af1b3
--- /dev/null
@@ -0,0 +1,45 @@
+From 235985d1763f7aba92c1c64e5f5aaec26c2c9b18 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Tue, 17 Oct 2023 11:07:25 +0200
+Subject: platform/x86: asus-wmi: Map 0x2a code, Ignore 0x2b and 0x2c events
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+commit 235985d1763f7aba92c1c64e5f5aaec26c2c9b18 upstream.
+
+Newer Asus laptops send the following new WMI event codes when some
+of the F1 - F12 "media" hotkeys are pressed:
+
+0x2a Screen Capture
+0x2b PrintScreen
+0x2c CapsLock
+
+Map 0x2a to KEY_SELECTIVE_SCREENSHOT mirroring how similar hotkeys
+are mapped on other laptops.
+
+PrintScreem and CapsLock are also reported as normal PS/2 keyboard events,
+map these event codes to KE_IGNORE to avoid "Unknown key code 0x%x\n" log
+messages.
+
+Reported-by: James John <me@donjajo.com>
+Closes: https://lore.kernel.org/platform-driver-x86/a2c441fe-457e-44cf-a146-0ecd86b037cf@donjajo.com/
+Closes: https://bbs.archlinux.org/viewtopic.php?pid=2123716
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Link: https://lore.kernel.org/r/20231017090725.38163-4-hdegoede@redhat.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/platform/x86/asus-nb-wmi.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/platform/x86/asus-nb-wmi.c
++++ b/drivers/platform/x86/asus-nb-wmi.c
+@@ -531,6 +531,9 @@ static void asus_nb_wmi_quirks(struct as
+ static const struct key_entry asus_nb_wmi_keymap[] = {
+       { KE_KEY, ASUS_WMI_BRN_DOWN, { KEY_BRIGHTNESSDOWN } },
+       { KE_KEY, ASUS_WMI_BRN_UP, { KEY_BRIGHTNESSUP } },
++      { KE_KEY, 0x2a, { KEY_SELECTIVE_SCREENSHOT } },
++      { KE_IGNORE, 0x2b, }, /* PrintScreen (also send via PS/2) on newer models */
++      { KE_IGNORE, 0x2c, }, /* CapsLock (also send via PS/2) on newer models */
+       { KE_KEY, 0x30, { KEY_VOLUMEUP } },
+       { KE_KEY, 0x31, { KEY_VOLUMEDOWN } },
+       { KE_KEY, 0x32, { KEY_MUTE } },
diff --git a/queue-6.5/platform-x86-asus-wmi-only-map-brightness-codes-when-using-asus-wmi-backlight-control.patch b/queue-6.5/platform-x86-asus-wmi-only-map-brightness-codes-when-using-asus-wmi-backlight-control.patch
new file mode 100644 (file)
index 0000000..f12b325
--- /dev/null
@@ -0,0 +1,89 @@
+From a5b92be2482e5f9ef30be4e4cda12ed484381493 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Tue, 17 Oct 2023 11:07:24 +0200
+Subject: platform/x86: asus-wmi: Only map brightness codes when using asus-wmi backlight control
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+commit a5b92be2482e5f9ef30be4e4cda12ed484381493 upstream.
+
+Older Asus laptops change the backlight level themselves and then send
+WMI events with different codes for different backlight levels.
+
+The asus-wmi.c code maps the entire range of codes reported on
+brightness down keypresses to an internal ASUS_WMI_BRN_DOWN code:
+
+define NOTIFY_BRNUP_MIN                0x11
+define NOTIFY_BRNUP_MAX                0x1f
+define NOTIFY_BRNDOWN_MIN              0x20
+define NOTIFY_BRNDOWN_MAX              0x2e
+
+        if (code >= NOTIFY_BRNUP_MIN && code <= NOTIFY_BRNUP_MAX)
+                code = ASUS_WMI_BRN_UP;
+        else if (code >= NOTIFY_BRNDOWN_MIN && code <= NOTIFY_BRNDOWN_MAX)
+                code = ASUS_WMI_BRN_DOWN;
+
+This mapping is causing issues on new laptop models which actually
+send 0x2b events for printscreen presses and 0x2c events for
+capslock presses, which get translated into spurious brightness-down
+presses.
+
+This mapping is really only necessary when asus-wmi has registered
+a backlight-device for backlight control. In this case the mapping
+was used to decide to filter out the keypresss since in this case
+the firmware has already modified the brightness itself and instead
+of reporting a keypress asus-wmi will just report the new brightness
+value to userspace.
+
+OTOH when the firmware does not adjust the brightness itself then
+it seems to always report 0x2e for brightness-down presses and
+0x2f for brightness up presses independent of the actual brightness
+level. So in this case the mapping of the code is not necessary
+and this translation actually leads to spurious brightness-down
+presses being send to userspace when pressing printscreen or capslock.
+
+Modify asus_wmi_handle_event_code() to only do the mapping
+when using asus-wmi backlight control to fix the spurious
+brightness-down presses.
+
+Reported-by: James John <me@donjajo.com>
+Closes: https://lore.kernel.org/platform-driver-x86/a2c441fe-457e-44cf-a146-0ecd86b037cf@donjajo.com/
+Closes: https://bbs.archlinux.org/viewtopic.php?pid=2123716
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Link: https://lore.kernel.org/r/20231017090725.38163-3-hdegoede@redhat.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/platform/x86/asus-wmi.c |   15 ++++-----------
+ 1 file changed, 4 insertions(+), 11 deletions(-)
+
+--- a/drivers/platform/x86/asus-wmi.c
++++ b/drivers/platform/x86/asus-wmi.c
+@@ -3268,7 +3268,6 @@ static void asus_wmi_handle_event_code(i
+ {
+       unsigned int key_value = 1;
+       bool autorelease = 1;
+-      int orig_code = code;
+       if (asus->driver->key_filter) {
+               asus->driver->key_filter(asus->driver, &code, &key_value,
+@@ -3277,16 +3276,10 @@ static void asus_wmi_handle_event_code(i
+                       return;
+       }
+-      if (code >= NOTIFY_BRNUP_MIN && code <= NOTIFY_BRNUP_MAX)
+-              code = ASUS_WMI_BRN_UP;
+-      else if (code >= NOTIFY_BRNDOWN_MIN && code <= NOTIFY_BRNDOWN_MAX)
+-              code = ASUS_WMI_BRN_DOWN;
+-
+-      if (code == ASUS_WMI_BRN_DOWN || code == ASUS_WMI_BRN_UP) {
+-              if (acpi_video_get_backlight_type() == acpi_backlight_vendor) {
+-                      asus_wmi_backlight_notify(asus, orig_code);
+-                      return;
+-              }
++      if (acpi_video_get_backlight_type() == acpi_backlight_vendor &&
++          code >= NOTIFY_BRNUP_MIN && code <= NOTIFY_BRNDOWN_MAX) {
++              asus_wmi_backlight_notify(asus, code);
++              return;
+       }
+       if (code == NOTIFY_KBD_BRTUP) {
diff --git a/queue-6.5/platform-x86-intel-uncore-freq-conditionally-create-attribute-for-read-frequency.patch b/queue-6.5/platform-x86-intel-uncore-freq-conditionally-create-attribute-for-read-frequency.patch
new file mode 100644 (file)
index 0000000..d2ec8fe
--- /dev/null
@@ -0,0 +1,52 @@
+From 4d73c6772ab771cbbe7e46a73e7c78ba490350fa Mon Sep 17 00:00:00 2001
+From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
+Date: Wed, 4 Oct 2023 11:19:15 -0700
+Subject: platform/x86: intel-uncore-freq: Conditionally create attribute for read frequency
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
+
+commit 4d73c6772ab771cbbe7e46a73e7c78ba490350fa upstream.
+
+When the current uncore frequency can't be read, don't create attribute
+"current_freq_khz" as any read will fail later. Some user space
+applications like turbostat fail to continue with the failure. So, check
+error during attribute creation.
+
+Fixes: 414eef27283a ("platform/x86/intel/uncore-freq: Display uncore current frequency")
+Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
+Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
+Link: https://lore.kernel.org/r/20231004181915.1887913-1-srinivas.pandruvada@linux.intel.com
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c |    8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c
++++ b/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c
+@@ -176,7 +176,7 @@ show_uncore_data(initial_max_freq_khz);
+ static int create_attr_group(struct uncore_data *data, char *name)
+ {
+-      int ret, index = 0;
++      int ret, freq, index = 0;
+       init_attribute_rw(max_freq_khz);
+       init_attribute_rw(min_freq_khz);
+@@ -197,7 +197,11 @@ static int create_attr_group(struct unco
+       data->uncore_attrs[index++] = &data->min_freq_khz_dev_attr.attr;
+       data->uncore_attrs[index++] = &data->initial_min_freq_khz_dev_attr.attr;
+       data->uncore_attrs[index++] = &data->initial_max_freq_khz_dev_attr.attr;
+-      data->uncore_attrs[index++] = &data->current_freq_khz_dev_attr.attr;
++
++      ret = uncore_read_freq(data, &freq);
++      if (!ret)
++              data->uncore_attrs[index++] = &data->current_freq_khz_dev_attr.attr;
++
+       data->uncore_attrs[index] = NULL;
+       data->uncore_attr_group.name = name;
diff --git a/queue-6.5/platform-x86-msi-ec-fix-the-3rd-config.patch b/queue-6.5/platform-x86-msi-ec-fix-the-3rd-config.patch
new file mode 100644 (file)
index 0000000..5f2948b
--- /dev/null
@@ -0,0 +1,46 @@
+From 6284e67aa6cb3af870ed11dfcfafd80fd927777b Mon Sep 17 00:00:00 2001
+From: Nikita Kravets <teackot@gmail.com>
+Date: Fri, 6 Oct 2023 20:53:53 +0300
+Subject: platform/x86: msi-ec: Fix the 3rd config
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Nikita Kravets <teackot@gmail.com>
+
+commit 6284e67aa6cb3af870ed11dfcfafd80fd927777b upstream.
+
+Fix the charge control address of CONF3 and remove an incorrect firmware
+version which turned out to be a BIOS firmware and not an EC firmware.
+
+Fixes: 392cacf2aa10 ("platform/x86: Add new msi-ec driver")
+Cc: Aakash Singh <mail@singhaakash.dev>
+Cc: Jose Angel Pastrana <japp0005@red.ujaen.es>
+Signed-off-by: Nikita Kravets <teackot@gmail.com>
+Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
+Link: https://lore.kernel.org/r/20231006175352.1753017-5-teackot@gmail.com
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/platform/x86/msi-ec.c |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/platform/x86/msi-ec.c
++++ b/drivers/platform/x86/msi-ec.c
+@@ -276,14 +276,13 @@ static struct msi_ec_conf CONF2 __initda
+ static const char * const ALLOWED_FW_3[] __initconst = {
+       "1592EMS1.111",
+-      "E1592IMS.10C",
+       NULL
+ };
+ static struct msi_ec_conf CONF3 __initdata = {
+       .allowed_fw = ALLOWED_FW_3,
+       .charge_control = {
+-              .address      = 0xef,
++              .address      = 0xd7,
+               .offset_start = 0x8a,
+               .offset_end   = 0x80,
+               .range_min    = 0x8a,
diff --git a/queue-6.5/s390-cio-fix-a-memleak-in-css_alloc_subchannel.patch b/queue-6.5/s390-cio-fix-a-memleak-in-css_alloc_subchannel.patch
new file mode 100644 (file)
index 0000000..4bd3636
--- /dev/null
@@ -0,0 +1,49 @@
+From 63e8b94ad1840f02462633abdb363397f56bc642 Mon Sep 17 00:00:00 2001
+From: Dinghao Liu <dinghao.liu@zju.edu.cn>
+Date: Thu, 21 Sep 2023 15:14:12 +0800
+Subject: s390/cio: fix a memleak in css_alloc_subchannel
+
+From: Dinghao Liu <dinghao.liu@zju.edu.cn>
+
+commit 63e8b94ad1840f02462633abdb363397f56bc642 upstream.
+
+When dma_set_coherent_mask() fails, sch->lock has not been
+freed, which is allocated in css_sch_create_locks(), leading
+to a memleak.
+
+Fixes: 4520a91a976e ("s390/cio: use dma helpers for setting masks")
+Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
+Message-Id: <20230921071412.13806-1-dinghao.liu@zju.edu.cn>
+Link: https://lore.kernel.org/linux-s390/bd38baa8-7b9d-4d89-9422-7e943d626d6e@linux.ibm.com/
+Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
+Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
+Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/s390/cio/css.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/s390/cio/css.c
++++ b/drivers/s390/cio/css.c
+@@ -233,17 +233,19 @@ struct subchannel *css_alloc_subchannel(
+        */
+       ret = dma_set_coherent_mask(&sch->dev, DMA_BIT_MASK(31));
+       if (ret)
+-              goto err;
++              goto err_lock;
+       /*
+        * But we don't have such restrictions imposed on the stuff that
+        * is handled by the streaming API.
+        */
+       ret = dma_set_mask(&sch->dev, DMA_BIT_MASK(64));
+       if (ret)
+-              goto err;
++              goto err_lock;
+       return sch;
++err_lock:
++      kfree(sch->lock);
+ err:
+       kfree(sch);
+       return ERR_PTR(ret);
diff --git a/queue-6.5/s390-pci-fix-iommu-bitmap-allocation.patch b/queue-6.5/s390-pci-fix-iommu-bitmap-allocation.patch
new file mode 100644 (file)
index 0000000..15f006e
--- /dev/null
@@ -0,0 +1,79 @@
+From c1ae1c59c8c6e0b66a718308c623e0cb394dab6b Mon Sep 17 00:00:00 2001
+From: Niklas Schnelle <schnelle@linux.ibm.com>
+Date: Tue, 17 Oct 2023 15:37:29 +0200
+Subject: s390/pci: fix iommu bitmap allocation
+
+From: Niklas Schnelle <schnelle@linux.ibm.com>
+
+commit c1ae1c59c8c6e0b66a718308c623e0cb394dab6b upstream.
+
+Since the fixed commits both zdev->iommu_bitmap and zdev->lazy_bitmap
+are allocated as vzalloc(zdev->iommu_pages / 8). The problem is that
+zdev->iommu_bitmap is a pointer to unsigned long but the above only
+yields an allocation that is a multiple of sizeof(unsigned long) which
+is 8 on s390x if the number of IOMMU pages is a multiple of 64.
+This in turn is the case only if the effective IOMMU aperture is
+a multiple of 64 * 4K = 256K. This is usually the case and so didn't
+cause visible issues since both the virt_to_phys(high_memory) reduced
+limit and hardware limits use nice numbers.
+
+Under KVM, and in particular with QEMU limiting the IOMMU aperture to
+the vfio DMA limit (default 65535), it is possible for the reported
+aperture not to be a multiple of 256K however. In this case we end up
+with an iommu_bitmap whose allocation is not a multiple of
+8 causing bitmap operations to access it out of bounds.
+
+Sadly we can't just fix this in the obvious way and use bitmap_zalloc()
+because for large RAM systems (tested on 8 TiB) the zdev->iommu_bitmap
+grows too large for kmalloc(). So add our own bitmap_vzalloc() wrapper.
+This might be a candidate for common code, but this area of code will
+be replaced by the upcoming conversion to use the common code DMA API on
+s390 so just add a local routine.
+
+Fixes: 224593215525 ("s390/pci: use virtual memory for iommu bitmap")
+Fixes: 13954fd6913a ("s390/pci_dma: improve lazy flush for unmap")
+Cc: stable@vger.kernel.org
+Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
+Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
+Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/s390/pci/pci_dma.c |   15 +++++++++++++--
+ 1 file changed, 13 insertions(+), 2 deletions(-)
+
+--- a/arch/s390/pci/pci_dma.c
++++ b/arch/s390/pci/pci_dma.c
+@@ -564,6 +564,17 @@ static void s390_dma_unmap_sg(struct dev
+               s->dma_length = 0;
+       }
+ }
++
++static unsigned long *bitmap_vzalloc(size_t bits, gfp_t flags)
++{
++      size_t n = BITS_TO_LONGS(bits);
++      size_t bytes;
++
++      if (unlikely(check_mul_overflow(n, sizeof(unsigned long), &bytes)))
++              return NULL;
++
++      return vzalloc(bytes);
++}
+       
+ int zpci_dma_init_device(struct zpci_dev *zdev)
+ {
+@@ -604,13 +615,13 @@ int zpci_dma_init_device(struct zpci_dev
+                               zdev->end_dma - zdev->start_dma + 1);
+       zdev->end_dma = zdev->start_dma + zdev->iommu_size - 1;
+       zdev->iommu_pages = zdev->iommu_size >> PAGE_SHIFT;
+-      zdev->iommu_bitmap = vzalloc(zdev->iommu_pages / 8);
++      zdev->iommu_bitmap = bitmap_vzalloc(zdev->iommu_pages, GFP_KERNEL);
+       if (!zdev->iommu_bitmap) {
+               rc = -ENOMEM;
+               goto free_dma_table;
+       }
+       if (!s390_iommu_strict) {
+-              zdev->lazy_bitmap = vzalloc(zdev->iommu_pages / 8);
++              zdev->lazy_bitmap = bitmap_vzalloc(zdev->iommu_pages, GFP_KERNEL);
+               if (!zdev->lazy_bitmap) {
+                       rc = -ENOMEM;
+                       goto free_bitmap;
diff --git a/queue-6.5/selftests-ftrace-add-new-test-case-which-checks-non-unique-symbol.patch b/queue-6.5/selftests-ftrace-add-new-test-case-which-checks-non-unique-symbol.patch
new file mode 100644 (file)
index 0000000..ad2bf8b
--- /dev/null
@@ -0,0 +1,41 @@
+From 03b80ff8023adae6780e491f66e932df8165e3a0 Mon Sep 17 00:00:00 2001
+From: Francis Laniel <flaniel@linux.microsoft.com>
+Date: Fri, 20 Oct 2023 13:42:50 +0300
+Subject: selftests/ftrace: Add new test case which checks non unique symbol
+
+From: Francis Laniel <flaniel@linux.microsoft.com>
+
+commit 03b80ff8023adae6780e491f66e932df8165e3a0 upstream.
+
+If name_show() is non unique, this test will try to install a kprobe on this
+function which should fail returning EADDRNOTAVAIL.
+On kernel where name_show() is not unique, this test is skipped.
+
+Link: https://lore.kernel.org/all/20231020104250.9537-3-flaniel@linux.microsoft.com/
+
+Cc: stable@vger.kernel.org
+Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>
+Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
+Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/testing/selftests/ftrace/test.d/kprobe/kprobe_non_uniq_symbol.tc |   13 ++++++++++
+ 1 file changed, 13 insertions(+)
+ create mode 100644 tools/testing/selftests/ftrace/test.d/kprobe/kprobe_non_uniq_symbol.tc
+
+--- /dev/null
++++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_non_uniq_symbol.tc
+@@ -0,0 +1,13 @@
++#!/bin/sh
++# SPDX-License-Identifier: GPL-2.0
++# description: Test failure of registering kprobe on non unique symbol
++# requires: kprobe_events
++
++SYMBOL='name_show'
++
++# We skip this test on kernel where SYMBOL is unique or does not exist.
++if [ "$(grep -c -E "[[:alnum:]]+ t ${SYMBOL}" /proc/kallsyms)" -le '1' ]; then
++      exit_unsupported
++fi
++
++! echo "p:test_non_unique ${SYMBOL}" > kprobe_events
index b66897428af08dceb09e22ed0d54ec999fa291c9..e114020a183d559d52db0984ef8f9fc2543fd099 100644 (file)
@@ -195,3 +195,20 @@ nvme-pci-add-bogus_nid-for-intel-0a54-device.patch
 nvme-auth-use-chap-s2-to-indicate-bidirectional-authentication.patch
 nvmet-auth-complete-a-request-only-after-freeing-the-dhchap-pointers.patch
 nvme-rdma-do-not-try-to-stop-unallocated-queues.patch
+usb-serial-option-add-telit-le910c4-wwx-0x1035-composition.patch
+usb-serial-option-add-entry-for-sierra-em9191-with-new-firmware.patch
+usb-serial-option-add-fibocom-to-dell-custom-modem-fm101r-gl.patch
+thunderbolt-call-tb_switch_put-once-displayport-bandwidth-request-is-finished.patch
+perf-disallow-mis-matched-inherited-group-reads.patch
+s390-pci-fix-iommu-bitmap-allocation.patch
+tracing-kprobes-return-eaddrnotavail-when-func-matches-several-symbols.patch
+selftests-ftrace-add-new-test-case-which-checks-non-unique-symbol.patch
+keys-asymmetric-fix-sign-verify-on-pkcs1pad-without-a-hash.patch
+apple-gmux-hard-code-max-brightness-for-mmio-gmux.patch
+s390-cio-fix-a-memleak-in-css_alloc_subchannel.patch
+platform-surface-platform_profile-propagate-error-if-profile-registration-fails.patch
+platform-x86-intel-uncore-freq-conditionally-create-attribute-for-read-frequency.patch
+platform-x86-msi-ec-fix-the-3rd-config.patch
+platform-x86-asus-wmi-change-asus_wmi_brn_down-code-from-0x20-to-0x2e.patch
+platform-x86-asus-wmi-only-map-brightness-codes-when-using-asus-wmi-backlight-control.patch
+platform-x86-asus-wmi-map-0x2a-code-ignore-0x2b-and-0x2c-events.patch
diff --git a/queue-6.5/thunderbolt-call-tb_switch_put-once-displayport-bandwidth-request-is-finished.patch b/queue-6.5/thunderbolt-call-tb_switch_put-once-displayport-bandwidth-request-is-finished.patch
new file mode 100644 (file)
index 0000000..15084ab
--- /dev/null
@@ -0,0 +1,73 @@
+From ec4405ed92036f5bb487b5c2f9a28f9e36a3e3d5 Mon Sep 17 00:00:00 2001
+From: Gil Fine <gil.fine@linux.intel.com>
+Date: Thu, 10 Aug 2023 23:18:25 +0300
+Subject: thunderbolt: Call tb_switch_put() once DisplayPort bandwidth request is finished
+
+From: Gil Fine <gil.fine@linux.intel.com>
+
+commit ec4405ed92036f5bb487b5c2f9a28f9e36a3e3d5 upstream.
+
+When handling DisplayPort bandwidth request tb_switch_find_by_route() is
+called and it returns a router structure with reference count increased.
+In order to avoid resource leak call tb_switch_put() when finished.
+
+Fixes: 6ce3563520be ("thunderbolt: Add support for DisplayPort bandwidth allocation mode")
+Cc: stable@vger.kernel.org
+Signed-off-by: Gil Fine <gil.fine@linux.intel.com>
+Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/thunderbolt/tb.c | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c
+index dd0a1ef8cf12..27bd6ca6f99e 100644
+--- a/drivers/thunderbolt/tb.c
++++ b/drivers/thunderbolt/tb.c
+@@ -1907,14 +1907,14 @@ static void tb_handle_dp_bandwidth_request(struct work_struct *work)
+       in = &sw->ports[ev->port];
+       if (!tb_port_is_dpin(in)) {
+               tb_port_warn(in, "bandwidth request to non-DP IN adapter\n");
+-              goto unlock;
++              goto put_sw;
+       }
+       tb_port_dbg(in, "handling bandwidth allocation request\n");
+       if (!usb4_dp_port_bandwidth_mode_enabled(in)) {
+               tb_port_warn(in, "bandwidth allocation mode not enabled\n");
+-              goto unlock;
++              goto put_sw;
+       }
+       ret = usb4_dp_port_requested_bandwidth(in);
+@@ -1923,7 +1923,7 @@ static void tb_handle_dp_bandwidth_request(struct work_struct *work)
+                       tb_port_dbg(in, "no bandwidth request active\n");
+               else
+                       tb_port_warn(in, "failed to read requested bandwidth\n");
+-              goto unlock;
++              goto put_sw;
+       }
+       requested_bw = ret;
+@@ -1932,7 +1932,7 @@ static void tb_handle_dp_bandwidth_request(struct work_struct *work)
+       tunnel = tb_find_tunnel(tb, TB_TUNNEL_DP, in, NULL);
+       if (!tunnel) {
+               tb_port_warn(in, "failed to find tunnel\n");
+-              goto unlock;
++              goto put_sw;
+       }
+       out = tunnel->dst_port;
+@@ -1959,6 +1959,8 @@ static void tb_handle_dp_bandwidth_request(struct work_struct *work)
+               tb_recalc_estimated_bandwidth(tb);
+       }
++put_sw:
++      tb_switch_put(sw);
+ unlock:
+       mutex_unlock(&tb->lock);
+-- 
+2.42.0
+
diff --git a/queue-6.5/tracing-kprobes-return-eaddrnotavail-when-func-matches-several-symbols.patch b/queue-6.5/tracing-kprobes-return-eaddrnotavail-when-func-matches-several-symbols.patch
new file mode 100644 (file)
index 0000000..5f2709d
--- /dev/null
@@ -0,0 +1,138 @@
+From b022f0c7e404887a7c5229788fc99eff9f9a80d5 Mon Sep 17 00:00:00 2001
+From: Francis Laniel <flaniel@linux.microsoft.com>
+Date: Fri, 20 Oct 2023 13:42:49 +0300
+Subject: tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols
+
+From: Francis Laniel <flaniel@linux.microsoft.com>
+
+commit b022f0c7e404887a7c5229788fc99eff9f9a80d5 upstream.
+
+When a kprobe is attached to a function that's name is not unique (is
+static and shares the name with other functions in the kernel), the
+kprobe is attached to the first function it finds. This is a bug as the
+function that it is attaching to is not necessarily the one that the
+user wants to attach to.
+
+Instead of blindly picking a function to attach to what is ambiguous,
+error with EADDRNOTAVAIL to let the user know that this function is not
+unique, and that the user must use another unique function with an
+address offset to get to the function they want to attach to.
+
+Link: https://lore.kernel.org/all/20231020104250.9537-2-flaniel@linux.microsoft.com/
+
+Cc: stable@vger.kernel.org
+Fixes: 413d37d1eb69 ("tracing: Add kprobe-based event tracer")
+Suggested-by: Masami Hiramatsu <mhiramat@kernel.org>
+Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>
+Link: https://lore.kernel.org/lkml/20230819101105.b0c104ae4494a7d1f2eea742@kernel.org/
+Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
+Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ kernel/trace/trace_kprobe.c |   63 ++++++++++++++++++++++++++++++++++++++++++++
+ kernel/trace/trace_probe.h  |    1 
+ 2 files changed, 64 insertions(+)
+
+--- a/kernel/trace/trace_kprobe.c
++++ b/kernel/trace/trace_kprobe.c
+@@ -705,6 +705,25 @@ static struct notifier_block trace_kprob
+       .priority = 1   /* Invoked after kprobe module callback */
+ };
++static int count_symbols(void *data, unsigned long unused)
++{
++      unsigned int *count = data;
++
++      (*count)++;
++
++      return 0;
++}
++
++static unsigned int number_of_same_symbols(char *func_name)
++{
++      unsigned int count;
++
++      count = 0;
++      kallsyms_on_each_match_symbol(count_symbols, func_name, &count);
++
++      return count;
++}
++
+ static int __trace_kprobe_create(int argc, const char *argv[])
+ {
+       /*
+@@ -836,6 +855,31 @@ static int __trace_kprobe_create(int arg
+               }
+       }
++      if (symbol && !strchr(symbol, ':')) {
++              unsigned int count;
++
++              count = number_of_same_symbols(symbol);
++              if (count > 1) {
++                      /*
++                       * Users should use ADDR to remove the ambiguity of
++                       * using KSYM only.
++                       */
++                      trace_probe_log_err(0, NON_UNIQ_SYMBOL);
++                      ret = -EADDRNOTAVAIL;
++
++                      goto error;
++              } else if (count == 0) {
++                      /*
++                       * We can return ENOENT earlier than when register the
++                       * kprobe.
++                       */
++                      trace_probe_log_err(0, BAD_PROBE_ADDR);
++                      ret = -ENOENT;
++
++                      goto error;
++              }
++      }
++
+       trace_probe_log_set_index(0);
+       if (event) {
+               ret = traceprobe_parse_event_name(&event, &group, gbuf,
+@@ -1699,6 +1743,7 @@ static int unregister_kprobe_event(struc
+ }
+ #ifdef CONFIG_PERF_EVENTS
++
+ /* create a trace_kprobe, but don't add it to global lists */
+ struct trace_event_call *
+ create_local_trace_kprobe(char *func, void *addr, unsigned long offs,
+@@ -1709,6 +1754,24 @@ create_local_trace_kprobe(char *func, vo
+       int ret;
+       char *event;
++      if (func) {
++              unsigned int count;
++
++              count = number_of_same_symbols(func);
++              if (count > 1)
++                      /*
++                       * Users should use addr to remove the ambiguity of
++                       * using func only.
++                       */
++                      return ERR_PTR(-EADDRNOTAVAIL);
++              else if (count == 0)
++                      /*
++                       * We can return ENOENT earlier than when register the
++                       * kprobe.
++                       */
++                      return ERR_PTR(-ENOENT);
++      }
++
+       /*
+        * local trace_kprobes are not added to dyn_event, so they are never
+        * searched in find_trace_kprobe(). Therefore, there is no concern of
+--- a/kernel/trace/trace_probe.h
++++ b/kernel/trace/trace_probe.h
+@@ -438,6 +438,7 @@ extern int traceprobe_define_arg_fields(
+       C(BAD_MAXACT,           "Invalid maxactive number"),            \
+       C(MAXACT_TOO_BIG,       "Maxactive is too big"),                \
+       C(BAD_PROBE_ADDR,       "Invalid probed address or symbol"),    \
++      C(NON_UNIQ_SYMBOL,      "The symbol is not unique"),            \
+       C(BAD_RETPROBE,         "Retprobe address must be an function entry"), \
+       C(NO_TRACEPOINT,        "Tracepoint is not found"),             \
+       C(BAD_ADDR_SUFFIX,      "Invalid probed address suffix"), \
diff --git a/queue-6.5/usb-serial-option-add-entry-for-sierra-em9191-with-new-firmware.patch b/queue-6.5/usb-serial-option-add-entry-for-sierra-em9191-with-new-firmware.patch
new file mode 100644 (file)
index 0000000..9004e28
--- /dev/null
@@ -0,0 +1,45 @@
+From 064f6e2ba9eb59b2c87b866e1e968e79ccedf9dd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Beno=C3=AEt=20Monin?= <benoit.monin@gmx.fr>
+Date: Mon, 2 Oct 2023 17:51:40 +0200
+Subject: USB: serial: option: add entry for Sierra EM9191 with new firmware
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Benoît Monin <benoit.monin@gmx.fr>
+
+commit 064f6e2ba9eb59b2c87b866e1e968e79ccedf9dd upstream.
+
+Following a firmware update of the modem, the interface for the AT
+command port changed, so add it back.
+
+T:  Bus=08 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  2 Spd=5000 MxCh= 0
+D:  Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs=  1
+P:  Vendor=1199 ProdID=90d3 Rev=00.06
+S:  Manufacturer=Sierra Wireless, Incorporated
+S:  Product=Sierra Wireless EM9191
+S:  SerialNumber=xxxxxxxxxxxxxxxx
+C:  #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=896mA
+I:  If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim
+I:  If#=0x1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
+I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=(none)
+I:  If#=0x4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
+
+Signed-off-by: Benoît Monin <benoit.monin@gmx.fr>
+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/option.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -2263,6 +2263,7 @@ static const struct usb_device_id option
+       { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1406, 0xff) },                   /* GosunCn GM500 ECM/NCM */
+       { USB_DEVICE_AND_INTERFACE_INFO(OPPO_VENDOR_ID, OPPO_PRODUCT_R11, 0xff, 0xff, 0x30) },
+       { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x30) },
++      { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x40) },
+       { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0, 0) },
+       { USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, TOZED_PRODUCT_LT70C, 0xff, 0, 0) },
+       { } /* Terminating entry */
diff --git a/queue-6.5/usb-serial-option-add-fibocom-to-dell-custom-modem-fm101r-gl.patch b/queue-6.5/usb-serial-option-add-fibocom-to-dell-custom-modem-fm101r-gl.patch
new file mode 100644 (file)
index 0000000..bfcadda
--- /dev/null
@@ -0,0 +1,88 @@
+From 52480e1f1a259c93d749ba3961af0bffedfe7a7a Mon Sep 17 00:00:00 2001
+From: Puliang Lu <puliang.lu@fibocom.com>
+Date: Mon, 16 Oct 2023 15:36:16 +0800
+Subject: USB: serial: option: add Fibocom to DELL custom modem FM101R-GL
+
+From: Puliang Lu <puliang.lu@fibocom.com>
+
+commit 52480e1f1a259c93d749ba3961af0bffedfe7a7a upstream.
+
+Update the USB serial option driver support for the Fibocom
+FM101R-GL LTE modules as there are actually several different variants.
+
+- VID:PID 413C:8213, FM101R-GL are laptop M.2 cards (with
+  MBIM interfaces for Linux)
+
+- VID:PID 413C:8215, FM101R-GL ESIM are laptop M.2 cards (with
+  MBIM interface for Linux)
+
+0x8213: mbim, tty
+0x8215: mbim, tty
+
+T:  Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=5000 MxCh= 0
+D:  Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs=  1
+P:  Vendor=413c ProdID=8213 Rev= 5.04
+S:  Manufacturer=Fibocom Wireless Inc.
+S:  Product=Fibocom FM101-GL Module
+S:  SerialNumber=a3b7cbf0
+C:* #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr=896mA
+A:  FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00
+I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim
+E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
+I:  If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
+I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
+E:  Ad=8e(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
+E:  Ad=0f(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
+I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=40 Driver=(none)
+E:  Ad=83(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
+E:  Ad=82(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
+E:  Ad=01(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
+
+T:  Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  3 Spd=5000 MxCh= 0
+D:  Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs=  1
+P:  Vendor=413c ProdID=8215 Rev= 5.04
+S:  Manufacturer=Fibocom Wireless Inc.
+S:  Product=Fibocom FM101-GL Module
+S:  SerialNumber=a3b7cbf0
+C:* #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr=896mA
+A:  FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00
+I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim
+E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
+I:  If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
+I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
+E:  Ad=8e(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
+E:  Ad=0f(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
+I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=40 Driver=(none)
+E:  Ad=83(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
+E:  Ad=82(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
+E:  Ad=01(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
+
+Signed-off-by: Puliang Lu <puliang.lu@fibocom.com>
+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/option.c |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -203,6 +203,9 @@ static void option_instat_callback(struc
+ #define DELL_PRODUCT_5829E_ESIM                       0x81e4
+ #define DELL_PRODUCT_5829E                    0x81e6
++#define DELL_PRODUCT_FM101R                   0x8213
++#define DELL_PRODUCT_FM101R_ESIM              0x8215
++
+ #define KYOCERA_VENDOR_ID                     0x0c88
+ #define KYOCERA_PRODUCT_KPC650                        0x17da
+ #define KYOCERA_PRODUCT_KPC680                        0x180a
+@@ -1108,6 +1111,8 @@ static const struct usb_device_id option
+         .driver_info = RSVD(0) | RSVD(6) },
+       { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5829E_ESIM),
+         .driver_info = RSVD(0) | RSVD(6) },
++      { USB_DEVICE_INTERFACE_CLASS(DELL_VENDOR_ID, DELL_PRODUCT_FM101R, 0xff) },
++      { USB_DEVICE_INTERFACE_CLASS(DELL_VENDOR_ID, DELL_PRODUCT_FM101R_ESIM, 0xff) },
+       { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) },   /* ADU-E100, ADU-310 */
+       { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) },
+       { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_620UW) },
diff --git a/queue-6.5/usb-serial-option-add-telit-le910c4-wwx-0x1035-composition.patch b/queue-6.5/usb-serial-option-add-telit-le910c4-wwx-0x1035-composition.patch
new file mode 100644 (file)
index 0000000..def35ca
--- /dev/null
@@ -0,0 +1,53 @@
+From 6a7be48e9bd18d309ba25c223a27790ad1bf0fa3 Mon Sep 17 00:00:00 2001
+From: Fabio Porcedda <fabio.porcedda@gmail.com>
+Date: Tue, 5 Sep 2023 09:37:24 +0200
+Subject: USB: serial: option: add Telit LE910C4-WWX 0x1035 composition
+
+From: Fabio Porcedda <fabio.porcedda@gmail.com>
+
+commit 6a7be48e9bd18d309ba25c223a27790ad1bf0fa3 upstream.
+
+Add support for the following Telit LE910C4-WWX composition:
+
+0x1035: TTY, TTY, ECM
+
+T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  5 Spd=480 MxCh= 0
+D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
+P:  Vendor=1bc7 ProdID=1035 Rev=00.00
+S:  Manufacturer=Telit
+S:  Product=LE910C4-WWX
+S:  SerialNumber=e1b117c7
+C:  #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=500mA
+I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
+E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
+E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=fe Prot=ff Driver=option
+E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
+E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:  If#= 2 Alt= 0 #EPs= 1 Cls=02(commc) Sub=06 Prot=00 Driver=cdc_ether
+E:  Ad=85(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
+I:  If#= 3 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
+E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+
+Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
+Cc: stable@vger.kernel.org
+Reviewed-by: Daniele Palmas <dnlplm@gmail.com>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/serial/option.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -1290,6 +1290,7 @@ static const struct usb_device_id option
+        .driver_info = NCTRL(0) | RSVD(3) },
+       { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1033, 0xff),    /* Telit LE910C1-EUX (ECM) */
+        .driver_info = NCTRL(0) },
++      { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1035, 0xff) }, /* Telit LE910C4-WWX (ECM) */
+       { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG0),
+         .driver_info = RSVD(0) | RSVD(1) | NCTRL(2) | RSVD(3) },
+       { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG1),