This is the start of the stable review cycle for the 6.6.1 release.
There are 30 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Wed, 08 Nov 2023 13:02:46 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.1-rc1.…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.6.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 6.6.1-rc1
Mark Hasemeyer <markhas(a)chromium.org>
ASoC: SOF: sof-pci-dev: Fix community key quirk detection
Mark Hasemeyer <markhas(a)chromium.org>
ALSA: hda: intel-dsp-config: Fix JSL Chromebook quirk detection
Tony Lindgren <tony(a)atomide.com>
serial: core: Fix runtime PM handling for pending tx
Siddharth Vadapalli <s-vadapalli(a)ti.com>
misc: pci_endpoint_test: Add deviceID for J721S2 PCIe EP device support
Francesco Dolcini <francesco.dolcini(a)toradex.com>
dt-bindings: serial: rs485: Add rs485-rts-active-high
Cameron Williams <cang1(a)live.co.uk>
tty: 8250: Add Brainboxes Oxford Semiconductor-based quirks
Cameron Williams <cang1(a)live.co.uk>
tty: 8250: Add support for Intashield IX cards
Cameron Williams <cang1(a)live.co.uk>
tty: 8250: Add support for additional Brainboxes PX cards
Cameron Williams <cang1(a)live.co.uk>
tty: 8250: Fix up PX-803/PX-857
Cameron Williams <cang1(a)live.co.uk>
tty: 8250: Fix port count of PX-257
Cameron Williams <cang1(a)live.co.uk>
tty: 8250: Add support for Intashield IS-100
Cameron Williams <cang1(a)live.co.uk>
tty: 8250: Add support for Brainboxes UP cards
Cameron Williams <cang1(a)live.co.uk>
tty: 8250: Add support for additional Brainboxes UC cards
Cameron Williams <cang1(a)live.co.uk>
tty: 8250: Remove UC-257 and UC-431
Daniel Starke <daniel.starke(a)siemens.com>
tty: n_gsm: fix race condition in status line change on dead connections
Janne Grunau <j(a)jannau.net>
Bluetooth: hci_bcm4377: Mark bcm4378/bcm4387 as BROKEN_LE_CODED
Andrey Konovalov <andreyknvl(a)gmail.com>
usb: raw-gadget: properly handle interrupted requests
Jimmy Hu <hhhuuu(a)google.com>
usb: typec: tcpm: Fix NULL pointer dereference in tcpm_pd_svdm()
Badhri Jagan Sridharan <badhri(a)google.com>
usb: typec: tcpm: Add additional checks for contaminant
LihaSika <lihasika(a)gmail.com>
usb: storage: set 1.50 as the lower bcdDevice for older "Super Top" compatibility
Vicki Pfau <vi(a)endrift.com>
PCI: Prevent xHCI driver from claiming AMD VanGogh USB3 DRD device
Max McCarthy <mmccarthy(a)mcintoshlabs.com>
ALSA: usb-audio: add quirk flag to enable native DSD for McIntosh devices
Steven Rostedt (Google) <rostedt(a)goodmis.org>
eventfs: Use simple_recursive_removal() to clean up dentries
Steven Rostedt (Google) <rostedt(a)goodmis.org>
eventfs: Delete eventfs_inode when the last dentry is freed
Steven Rostedt (Google) <rostedt(a)goodmis.org>
eventfs: Save ownership and mode
Steven Rostedt (Google) <rostedt(a)goodmis.org>
eventfs: Remove "is_freed" union with rcu head
Steven Rostedt (Google) <rostedt(a)goodmis.org>
tracing: Have trace_event_file have ref counters
Ian Rogers <irogers(a)google.com>
perf evlist: Avoid frequency mode for the dummy event
Kai-Heng Feng <kai.heng.feng(a)canonical.com>
power: supply: core: Use blocking_notifier_call_chain to avoid RCU complaint
Nicholas Kazlauskas <nicholas.kazlauskas(a)amd.com>
drm/amd/display: Don't use fsleep for PSR exit waits
-------------
Diffstat:
.../devicetree/bindings/serial/rs485.yaml | 4 +
Makefile | 4 +-
drivers/bluetooth/hci_bcm4377.c | 5 +
drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 3 +-
drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 3 +-
drivers/misc/pci_endpoint_test.c | 4 +
drivers/pci/quirks.c | 8 +-
drivers/power/supply/power_supply_core.c | 8 +-
drivers/tty/n_gsm.c | 2 +
drivers/tty/serial/8250/8250_pci.c | 327 ++++++++++++++++++++-
drivers/tty/serial/serial_core.c | 2 +-
drivers/usb/gadget/legacy/raw_gadget.c | 26 +-
drivers/usb/storage/unusual_cypress.h | 2 +-
drivers/usb/typec/tcpm/tcpm.c | 5 +
fs/tracefs/event_inode.c | 288 +++++++++++-------
include/linux/pci_ids.h | 1 +
include/linux/power_supply.h | 2 +-
include/linux/trace_events.h | 4 +
kernel/trace/trace.c | 15 +
kernel/trace/trace.h | 3 +
kernel/trace/trace_events.c | 31 +-
kernel/trace/trace_events_filter.c | 3 +
sound/hda/intel-dsp-config.c | 6 +
sound/soc/sof/sof-pci-dev.c | 7 +
sound/usb/quirks.c | 2 +
tools/perf/util/evlist.c | 5 +-
26 files changed, 624 insertions(+), 146 deletions(-)
During SMBus block data read process, we have seen high interrupt rate
because of TX_EMPTY irq status while waiting for block length byte (the
first data byte after the address phase). The interrupt handler does not
do anything because the internal state is kept as STATUS_WRITE_IN_PROGRESS.
Hence, we should disable TX_EMPTY IRQ until I2C DesignWare receives
first data byte from I2C device, then re-enable it to resume SMBus
transaction.
It takes 0.789 ms for host to receive data length from slave.
Without the patch, i2c_dw_isr() is called 99 times by TX_EMPTY interrupt.
And it is none after applying the patch.
Cc: stable(a)vger.kernel.org
Co-developed-by: Chuong Tran <chuong(a)os.amperecomputing.com>
Signed-off-by: Chuong Tran <chuong(a)os.amperecomputing.com>
Signed-off-by: Tam Nguyen <tamnguyenchi(a)os.amperecomputing.com>
---
v2:
+ Reduce the indentations level
+ Use regmap_update_bits for bitfield update
+ Rewrite comment statement [Serge]
+ Update commit message
+ Add Co-developed-by tag for co-authors [Andy]
v1:
https://lore.kernel.org/lkml/avd7jhwexehgbvi6euzdwvf5zvqqgjx4ozo6uxu2qpmlar…
---
drivers/i2c/busses/i2c-designware-master.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c
index 55ea91a63382..ae76620ef35e 100644
--- a/drivers/i2c/busses/i2c-designware-master.c
+++ b/drivers/i2c/busses/i2c-designware-master.c
@@ -456,10 +456,16 @@ i2c_dw_xfer_msg(struct dw_i2c_dev *dev)
/*
* Because we don't know the buffer length in the
- * I2C_FUNC_SMBUS_BLOCK_DATA case, we can't stop
- * the transaction here.
+ * I2C_FUNC_SMBUS_BLOCK_DATA case, we can't stop the
+ * transaction here. Also disable the TX_EMPTY IRQ
+ * while waiting for the data length byte to avoid the
+ * bogus interrupts flood.
*/
- if (buf_len > 0 || flags & I2C_M_RECV_LEN) {
+ if (flags & I2C_M_RECV_LEN) {
+ dev->status |= STATUS_WRITE_IN_PROGRESS;
+ intr_mask &= ~DW_IC_INTR_TX_EMPTY;
+ break;
+ } else if (buf_len > 0) {
/* more bytes to be written */
dev->status |= STATUS_WRITE_IN_PROGRESS;
break;
@@ -495,6 +501,13 @@ i2c_dw_recv_len(struct dw_i2c_dev *dev, u8 len)
msgs[dev->msg_read_idx].len = len;
msgs[dev->msg_read_idx].flags &= ~I2C_M_RECV_LEN;
+ /*
+ * Received buffer length, re-enable TX_EMPTY interrupt
+ * to resume the SMBUS transaction.
+ */
+ regmap_update_bits(dev->map, DW_IC_INTR_MASK, DW_IC_INTR_TX_EMPTY,
+ DW_IC_INTR_TX_EMPTY);
+
return len;
}
--
2.25.1
From: Heiner Kallweit <hkallweit1(a)gmail.com>
This effectively reverts 4b5f82f6aaef. On a number of systems ASPM L1
causes tx timeouts with RTL8168h, see referenced bug report.
Fixes: 4b5f82f6aaef ("r8169: enable ASPM L1/L1.1 from RTL8168h")
Cc: stable(a)vger.kernel.org
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217814
Signed-off-by: Heiner Kallweit <hkallweit1(a)gmail.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
(cherry picked from commit 90ca51e8c654699b672ba61aeaa418dfb3252e5e)
---
drivers/net/ethernet/realtek/r8169_main.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 45147a1016be..27efd07f09ef 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5224,13 +5224,9 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
/* Disable ASPM L1 as that cause random device stop working
* problems as well as full system hangs for some PCIe devices users.
- * Chips from RTL8168h partially have issues with L1.2, but seem
- * to work fine with L1 and L1.1.
*/
if (rtl_aspm_is_safe(tp))
rc = 0;
- else if (tp->mac_version >= RTL_GIGA_MAC_VER_46)
- rc = pci_disable_link_state(pdev, PCIE_LINK_STATE_L1_2);
else
rc = pci_disable_link_state(pdev, PCIE_LINK_STATE_L1);
tp->aspm_manageable = !rc;
--
2.25.1
A recent change to the optimization pipeline in LLVM reveals some
fragility around the inlining of LoongArch's __percpu functions, which
manifests as a BUILD_BUG() failure:
In file included from kernel/sched/build_policy.c:17:
In file included from include/linux/sched/cputime.h:5:
In file included from include/linux/sched/signal.h:5:
In file included from include/linux/rculist.h:11:
In file included from include/linux/rcupdate.h:26:
In file included from include/linux/irqflags.h:18:
arch/loongarch/include/asm/percpu.h:97:3: error: call to '__compiletime_assert_51' declared with 'error' attribute: BUILD_BUG failed
97 | BUILD_BUG();
| ^
include/linux/build_bug.h:59:21: note: expanded from macro 'BUILD_BUG'
59 | #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
| ^
include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^
include/linux/compiler_types.h:425:2: note: expanded from macro 'compiletime_assert'
425 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:413:2: note: expanded from macro '_compiletime_assert'
413 | __compiletime_assert(condition, msg, prefix, suffix)
| ^
include/linux/compiler_types.h:406:4: note: expanded from macro '__compiletime_assert'
406 | prefix ## suffix(); \
| ^
<scratch space>:86:1: note: expanded from here
86 | __compiletime_assert_51
| ^
1 error generated.
If these functions are not inlined (which the compiler is free to do
even with functions marked with the standard 'inline' keyword), the
BUILD_BUG() in the default case cannot be eliminated since the compiler
cannot prove it is never used, resulting in a build failure due to the
error attribute.
Mark these functions as __always_inline to guarantee inlining so that
the BUILD_BUG() only triggers when the default case genuinely cannot be
eliminated due to an unexpected size.
Cc: <stable(a)vger.kernel.org>
Closes: https://github.com/ClangBuiltLinux/linux/issues/1955
Fixes: 46859ac8af52 ("LoongArch: Add multi-processor (SMP) support")
Link: https://github.com/llvm/llvm-project/commit/1a2e77cf9e11dbf56b5720c607313a5…
Suggested-by: Nick Desaulniers <ndesaulniers(a)google.com>
Signed-off-by: Nathan Chancellor <nathan(a)kernel.org>
---
Changes in v2:
- Change 'inline' to __always_inline for all functions that contain
BUILD_BUG() (Huacai)
- Notate that 'inline' does not guarantee inlining in the commit message
to further clarify the change to __always_inline.
- Link to v1: https://lore.kernel.org/r/20231101-loongarch-always-inline-percpu-ops-v1-1-…
---
arch/loongarch/include/asm/percpu.h | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/arch/loongarch/include/asm/percpu.h b/arch/loongarch/include/asm/percpu.h
index b9f567e66016..313852fba845 100644
--- a/arch/loongarch/include/asm/percpu.h
+++ b/arch/loongarch/include/asm/percpu.h
@@ -32,7 +32,7 @@ static inline void set_my_cpu_offset(unsigned long off)
#define __my_cpu_offset __my_cpu_offset
#define PERCPU_OP(op, asm_op, c_op) \
-static inline unsigned long __percpu_##op(void *ptr, \
+static __always_inline unsigned long __percpu_##op(void *ptr, \
unsigned long val, int size) \
{ \
unsigned long ret; \
@@ -63,7 +63,7 @@ PERCPU_OP(and, and, &)
PERCPU_OP(or, or, |)
#undef PERCPU_OP
-static inline unsigned long __percpu_read(void *ptr, int size)
+static __always_inline unsigned long __percpu_read(void *ptr, int size)
{
unsigned long ret;
@@ -100,7 +100,8 @@ static inline unsigned long __percpu_read(void *ptr, int size)
return ret;
}
-static inline void __percpu_write(void *ptr, unsigned long val, int size)
+static __always_inline void __percpu_write(void *ptr, unsigned long val,
+ int size)
{
switch (size) {
case 1:
@@ -132,8 +133,8 @@ static inline void __percpu_write(void *ptr, unsigned long val, int size)
}
}
-static inline unsigned long __percpu_xchg(void *ptr, unsigned long val,
- int size)
+static __always_inline unsigned long __percpu_xchg(void *ptr, unsigned long val,
+ int size)
{
switch (size) {
case 1:
---
base-commit: 278be83601dd1725d4732241f066d528e160a39d
change-id: 20231101-loongarch-always-inline-percpu-ops-cf77c161871f
Best regards,
--
Nathan Chancellor <nathan(a)kernel.org>
Hello,
This v2 series fixes the use-after-free bug in mtk_jpeg_dec_device_run.
This patch fixes the security bug in chrome-os.
It inclues reverting the incomplete fix before and make the right fix.
Also,it fixes the error of timeout-worker-schedule in multiple-core
devices.
1. Remove cancel worker in mtk_jpeg_remove for the worker is only
registered in single-core device but we try to cacnel it in both
single-core and multiple-core devices.
2. Fix use-after-free bug by delay the schedule_delayed_work only if
mtk_jpeg_set_dec_dst runs successfully.
3. Delay the schedule_delayed_work in mtk_jpegdec_worker as it has same
code logic in mtk_jpeg_dec_device_run.
version 2 changes
-put the patches into on series suggested by Dmitry
Zheng Wang (3):
media: mtk-jpeg: Remove cancel worker in mtk_jpeg_remove to avoid the
crash of multi-core JPEG devices
media: mtk-jpeg: Fix use after free bug due to error path handling
in mtk_jpeg_dec_device_run
media: mtk-jpeg: Fix timeout schedule error in mtk_jpegdec_worker.
.../media/platform/mediatek/jpeg/mtk_jpeg_core.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
--
2.25.1
From: Heiner Kallweit <hkallweit1(a)gmail.com>
[Backport: commit 90ca51e8c654699b672ba61aeaa418dfb3252e5e]
This backport to avoid the bug caused by r8169.
This effectively reverts 4b5f82f6aaef. On a number of systems ASPM L1
causes tx timeouts with RTL8168h, see referenced bug report.
Fixes: 4b5f82f6aaef ("r8169: enable ASPM L1/L1.1 from RTL8168h")
Cc: stable(a)vger.kernel.org
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217814
Signed-off-by: Heiner Kallweit <hkallweit1(a)gmail.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
---
drivers/net/ethernet/realtek/r8169_main.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 45147a1016be..27efd07f09ef 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5224,13 +5224,9 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
/* Disable ASPM L1 as that cause random device stop working
* problems as well as full system hangs for some PCIe devices users.
- * Chips from RTL8168h partially have issues with L1.2, but seem
- * to work fine with L1 and L1.1.
*/
if (rtl_aspm_is_safe(tp))
rc = 0;
- else if (tp->mac_version >= RTL_GIGA_MAC_VER_46)
- rc = pci_disable_link_state(pdev, PCIE_LINK_STATE_L1_2);
else
rc = pci_disable_link_state(pdev, PCIE_LINK_STATE_L1);
tp->aspm_manageable = !rc;
--
2.25.1