Address a Smatch static checker warning regarding an unchecked
dereference in the function call:
set_cdie_id(i, cluster_info, plat_info)
when plat_info is NULL.
Instead of addressing this one case, in general if plat_info is NULL
then it can cause other issues. For example in a two package system it
will give warning for duplicate sysfs entry as package ID will be always
zero for both packages when creating string for attribute group name.
plat_info is derived from TPMI ID TPMI_BUS_INFO, which is integral to
the core TPMI design. Therefore, it should not be NULL on a production
platform. Consequently, the module should fail to load if plat_info is
NULL.
Reported-by: Dan Carpenter <dan.carpenter(a)linaro.org>
Closes: https://lore.kernel.org/platform-driver-x86/aEKvGCLd1qmX04Tc@stanley.mounta…
Fixes: 8a54e2253e4c ("platform/x86/intel-uncore-freq: Uncore frequency control via TPMI")
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada(a)linux.intel.com>
Cc: stable(a)vger.kernel.org
---
.../x86/intel/uncore-frequency/uncore-frequency-tpmi.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c b/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c
index 1c7b2f2716ca..44d9948ed224 100644
--- a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c
+++ b/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c
@@ -511,10 +511,13 @@ static int uncore_probe(struct auxiliary_device *auxdev, const struct auxiliary_
/* Get the package ID from the TPMI core */
plat_info = tpmi_get_platform_data(auxdev);
- if (plat_info)
- pkg = plat_info->package_id;
- else
+ if (unlikely(!plat_info)) {
dev_info(&auxdev->dev, "Platform information is NULL\n");
+ ret = -ENODEV;
+ goto err_rem_common;
+ }
+
+ pkg = plat_info->package_id;
for (i = 0; i < num_resources; ++i) {
struct tpmi_uncore_power_domain_info *pd_info;
--
2.49.0
Hi,
On Fri, Jun 6, 2025 at 6:40 PM Greg KH <gregkh(a)linuxfoundation.org> wrote:
>
> On Wed, May 28, 2025 at 02:26:06PM +0800, Yunhui Cui wrote:
> > When the PSLVERR_RESP_EN parameter is set to 1, the device generates
> > an error response if an attempt is made to read an empty RBR (Receive
> > Buffer Register) while the FIFO is enabled.
> >
> > In serial8250_do_startup(), calling serial_port_out(port, UART_LCR,
> > UART_LCR_WLEN8) triggers dw8250_check_lcr(), which invokes
> > dw8250_force_idle() and serial8250_clear_and_reinit_fifos(). The latter
> > function enables the FIFO via serial_out(p, UART_FCR, p->fcr).
> > Execution proceeds to the serial_port_in(port, UART_RX).
> > This satisfies the PSLVERR trigger condition.
> >
> > When another CPU (e.g., using printk()) is accessing the UART (UART
> > is busy), the current CPU fails the check (value & ~UART_LCR_SPAR) ==
> > (lcr & ~UART_LCR_SPAR) in dw8250_check_lcr(), causing it to enter
> > dw8250_force_idle().
> >
> > Put serial_port_out(port, UART_LCR, UART_LCR_WLEN8) under the port->lock
> > to fix this issue.
> >
> > Panic backtrace:
> > [ 0.442336] Oops - unknown exception [#1]
> > [ 0.442343] epc : dw8250_serial_in32+0x1e/0x4a
> > [ 0.442351] ra : serial8250_do_startup+0x2c8/0x88e
> > ...
> > [ 0.442416] console_on_rootfs+0x26/0x70
> >
> > Fixes: c49436b657d0 ("serial: 8250_dw: Improve unwritable LCR workaround")
> > Link: https://lore.kernel.org/all/84cydt5peu.fsf@jogness.linutronix.de/T/
> > Signed-off-by: Yunhui Cui <cuiyunhui(a)bytedance.com>
> > ---
> > drivers/tty/serial/8250/8250_port.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
> > index 6d7b8c4667c9c..07fe818dffa34 100644
> > --- a/drivers/tty/serial/8250/8250_port.c
> > +++ b/drivers/tty/serial/8250/8250_port.c
> > @@ -2376,9 +2376,10 @@ int serial8250_do_startup(struct uart_port *port)
> > /*
> > * Now, initialize the UART
> > */
> > - serial_port_out(port, UART_LCR, UART_LCR_WLEN8);
> >
> > uart_port_lock_irqsave(port, &flags);
> > + serial_port_out(port, UART_LCR, UART_LCR_WLEN8);
> > +
> > if (up->port.flags & UPF_FOURPORT) {
> > if (!up->port.irq)
> > up->port.mctrl |= TIOCM_OUT1;
> > --
> > 2.39.5
> >
> >
>
> Hi,
>
> This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
> a patch that has triggered this response. He used to manually respond
> to these common problems, but in order to save his sanity (he kept
> writing the same thing over and over, yet to different people), I was
> created. Hopefully you will not take offence and will fix the problem
> in your patch and resubmit it so that it can be accepted into the Linux
> kernel tree.
>
> You are receiving this message because of the following common error(s)
> as indicated below:
>
> - You have marked a patch with a "Fixes:" tag for a commit that is in an
> older released kernel, yet you do not have a cc: stable line in the
> signed-off-by area at all, which means that the patch will not be
> applied to any older kernel releases. To properly fix this, please
> follow the documented rules in the
> Documentation/process/stable-kernel-rules.rst file for how to resolve
> this.
Okay, update under v8.
>
> If you wish to discuss this problem further, or you have questions about
> how to resolve this issue, please feel free to respond to this email and
> Greg will reply once he has dug out from the pending patches received
> from other developers.
>
> thanks,
>
> greg k-h's patch email bot
Thanks,
Yunhui
From: Pu Lehui <pulehui(a)huawei.com>
The backport mainly refers to the merge tag [0], and the corresponding patches are:
arm64: proton-pack: Add new CPUs 'k' values for branch mitigation
arm64: bpf: Only mitigate cBPF programs loaded by unprivileged users
arm64: bpf: Add BHB mitigation to the epilogue for cBPF programs
arm64: proton-pack: Expose whether the branchy loop k value
arm64: proton-pack: Expose whether the platform is mitigated by firmware
arm64: insn: Add support for encoding DSB
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… [0]
Douglas Anderson (3):
arm64: errata: Assume that unknown CPUs _are_ vulnerable to Spectre
BHB
arm64: errata: Add KRYO 2XX/3XX/4XX silver cores to Spectre BHB safe
list
arm64: errata: Add newer ARM cores to the spectre_bhb_loop_affected()
lists
Hou Tao (2):
arm64: move AARCH64_BREAK_FAULT into insn-def.h
arm64: insn: add encoders for atomic operations
James Morse (6):
arm64: insn: Add support for encoding DSB
arm64: proton-pack: Expose whether the platform is mitigated by
firmware
arm64: proton-pack: Expose whether the branchy loop k value
arm64: bpf: Add BHB mitigation to the epilogue for cBPF programs
arm64: bpf: Only mitigate cBPF programs loaded by unprivileged users
arm64: proton-pack: Add new CPUs 'k' values for branch mitigation
Julien Thierry (1):
arm64: insn: Add barrier encodings
Liu Song (1):
arm64: spectre: increase parameters that can be used to turn off bhb
mitigation individually
Will Deacon (1):
arm64: errata: Add missing sentinels to Spectre-BHB MIDR arrays
.../admin-guide/kernel-parameters.txt | 5 +
arch/arm64/include/asm/cputype.h | 2 +
arch/arm64/include/asm/debug-monitors.h | 12 -
arch/arm64/include/asm/insn.h | 114 +++++++++-
arch/arm64/include/asm/spectre.h | 4 +-
arch/arm64/kernel/insn.c | 199 +++++++++++++++--
arch/arm64/kernel/proton-pack.c | 206 +++++++++++-------
arch/arm64/net/bpf_jit.h | 11 +-
arch/arm64/net/bpf_jit_comp.c | 58 ++++-
9 files changed, 488 insertions(+), 123 deletions(-)
--
2.34.1
From: Pu Lehui <pulehui(a)huawei.com>
The backport mainly refers to the merge tag [0], and the corresponding patches are:
arm64: proton-pack: Add new CPUs 'k' values for branch mitigation
arm64: bpf: Only mitigate cBPF programs loaded by unprivileged users
arm64: bpf: Add BHB mitigation to the epilogue for cBPF programs
arm64: proton-pack: Expose whether the branchy loop k value
arm64: proton-pack: Expose whether the platform is mitigated by firmware
arm64: insn: Add support for encoding DSB
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… [0]
Hou Tao (2):
arm64: move AARCH64_BREAK_FAULT into insn-def.h
arm64: insn: add encoders for atomic operations
James Morse (6):
arm64: insn: Add support for encoding DSB
arm64: proton-pack: Expose whether the platform is mitigated by
firmware
arm64: proton-pack: Expose whether the branchy loop k value
arm64: bpf: Add BHB mitigation to the epilogue for cBPF programs
arm64: bpf: Only mitigate cBPF programs loaded by unprivileged users
arm64: proton-pack: Add new CPUs 'k' values for branch mitigation
Liu Song (1):
arm64: spectre: increase parameters that can be used to turn off bhb
mitigation individually
.../admin-guide/kernel-parameters.txt | 5 +
arch/arm64/include/asm/cputype.h | 2 +
arch/arm64/include/asm/debug-monitors.h | 12 --
arch/arm64/include/asm/insn-def.h | 14 ++
arch/arm64/include/asm/insn.h | 81 ++++++-
arch/arm64/include/asm/spectre.h | 3 +
arch/arm64/kernel/proton-pack.c | 21 +-
arch/arm64/lib/insn.c | 199 ++++++++++++++++--
arch/arm64/net/bpf_jit.h | 11 +-
arch/arm64/net/bpf_jit_comp.c | 58 ++++-
10 files changed, 366 insertions(+), 40 deletions(-)
--
2.34.1
Hi,
We're excited to offer exclusive access to the “Mobile World Congress Shanghai 2025” Visitor Contact List.
Event Recap:-
Date: 18 - 20 Jun 2025
Location: Shanghai, China
Registrants Counts: 42,276 Visitors Contacts
Data Fields Available: Individual Email Address, Cell Phone Number, Contact Name, Job Title, Company Name, Website, Physical Address, LinkedIn Profile, and more.
This list gives you a direct line to your ideal audience—no gatekeepers, no guesswork.
If you're interested in the list, just reply "Send me Pricing" or sample?
Best regards,
Delilah Murray
Sr. Marketing Manager
Prefer not to receive these emails? Just reply “NOT INTERESTED”.