Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile.rhelver
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RHEL_MINOR = 10
#
# Use this spot to avoid future merge conflicts.
# Do not trim this comment.
RHEL_RELEASE = 553.72.1
RHEL_RELEASE = 553.74.1

#
# ZSTREAM
Expand Down
44 changes: 29 additions & 15 deletions arch/s390/pci/pci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ static inline bool ers_result_indicates_abort(pci_ers_result_t ers_res)
case PCI_ERS_RESULT_CAN_RECOVER:
case PCI_ERS_RESULT_RECOVERED:
case PCI_ERS_RESULT_NEED_RESET:
case PCI_ERS_RESULT_NONE:
return false;
default:
return true;
Expand All @@ -70,10 +71,6 @@ static bool is_driver_supported(struct pci_driver *driver)
return false;
if (!driver->err_handler->error_detected)
return false;
if (!driver->err_handler->slot_reset)
return false;
if (!driver->err_handler->resume)
return false;
return true;
}

Expand Down Expand Up @@ -110,16 +107,18 @@ static pci_ers_result_t zpci_event_do_error_state_clear(struct pci_dev *pdev,
return PCI_ERS_RESULT_NEED_RESET;
}

if (driver->err_handler->mmio_enabled) {
if (driver->err_handler->mmio_enabled)
ers_res = driver->err_handler->mmio_enabled(pdev);
if (ers_result_indicates_abort(ers_res)) {
pr_info("%s: Automatic recovery failed after MMIO re-enable\n",
pci_name(pdev));
return ers_res;
} else if (ers_res == PCI_ERS_RESULT_NEED_RESET) {
pr_debug("%s: Driver needs reset to recover\n", pci_name(pdev));
return ers_res;
}
else
ers_res = PCI_ERS_RESULT_NONE;

if (ers_result_indicates_abort(ers_res)) {
pr_info("%s: Automatic recovery failed after MMIO re-enable\n",
pci_name(pdev));
return ers_res;
} else if (ers_res == PCI_ERS_RESULT_NEED_RESET) {
pr_debug("%s: Driver needs reset to recover\n", pci_name(pdev));
return ers_res;
}

pr_debug("%s: Unblocking DMA\n", pci_name(pdev));
Expand All @@ -146,7 +145,12 @@ static pci_ers_result_t zpci_event_do_reset(struct pci_dev *pdev,
return ers_res;
}
pdev->error_state = pci_channel_io_normal;
ers_res = driver->err_handler->slot_reset(pdev);

if (driver->err_handler->slot_reset)
ers_res = driver->err_handler->slot_reset(pdev);
else
ers_res = PCI_ERS_RESULT_NONE;

if (ers_result_indicates_abort(ers_res)) {
pr_info("%s: Automatic recovery failed after slot reset\n", pci_name(pdev));
return ers_res;
Expand Down Expand Up @@ -202,7 +206,7 @@ static pci_ers_result_t zpci_event_attempt_error_recovery(struct pci_dev *pdev)
if (ers_result_indicates_abort(ers_res))
goto out_unlock;

if (ers_res == PCI_ERS_RESULT_CAN_RECOVER) {
if (ers_res != PCI_ERS_RESULT_NEED_RESET) {
ers_res = zpci_event_do_error_state_clear(pdev, driver);
if (ers_result_indicates_abort(ers_res))
goto out_unlock;
Expand All @@ -211,6 +215,16 @@ static pci_ers_result_t zpci_event_attempt_error_recovery(struct pci_dev *pdev)
if (ers_res == PCI_ERS_RESULT_NEED_RESET)
ers_res = zpci_event_do_reset(pdev, driver);

/*
* ers_res can be PCI_ERS_RESULT_NONE either because the driver
* decided to return it, indicating that it abstains from voting
* on how to recover, or because it didn't implement the callback.
* Both cases assume, that if there is nothing else causing a
* disconnect, we recovered successfully.
*/
if (ers_res == PCI_ERS_RESULT_NONE)
ers_res = PCI_ERS_RESULT_RECOVERED;

if (ers_res != PCI_ERS_RESULT_RECOVERED) {
pr_err("%s: Automatic recovery failed; operator intervention is required\n",
pci_name(pdev));
Expand Down
2 changes: 2 additions & 0 deletions arch/x86/include/asm/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <asm/mpspec.h>
#include RH_KABI_FAKE_INCLUDE(<asm/realmode.h>)
#include <asm/x86_init.h>
#include <asm/irq_vectors.h>

#ifdef CONFIG_ACPI_APEI
# include <asm/pgtable_types.h>
Expand All @@ -51,6 +52,7 @@ extern int acpi_skip_timer_override;
extern int acpi_use_timer_override;
extern int acpi_fix_pin2_polarity;
extern int acpi_disable_cmcff;
extern bool acpi_int_src_ovr[NR_IRQS_LEGACY];

extern u8 acpi_sci_flags;
extern u32 acpi_sci_override_gsi;
Expand Down
4 changes: 4 additions & 0 deletions arch/x86/kernel/acpi/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ int acpi_lapic;
int acpi_ioapic;
int acpi_strict;
int acpi_disable_cmcff;
bool acpi_int_src_ovr[NR_IRQS_LEGACY];

/* ACPI SCI override configuration */
u8 acpi_sci_flags __initdata;
Expand Down Expand Up @@ -581,6 +582,9 @@ acpi_parse_int_src_ovr(union acpi_subtable_headers * header,

acpi_table_print_madt_entry(&header->common);

if (intsrc->source_irq < NR_IRQS_LEGACY)
acpi_int_src_ovr[intsrc->source_irq] = true;

if (intsrc->source_irq == acpi_gbl_FADT.sci_interrupt) {
acpi_sci_ioapic_setup(intsrc->source_irq,
intsrc->inti_flags & ACPI_MADT_POLARITY_MASK,
Expand Down
85 changes: 85 additions & 0 deletions ciq/ciq_backports/kernel-4.18.0-553.74.1.el8_10/c6a1fd91.failed
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
ACPI: resource: Honor MADT INT_SRC_OVR settings for IRQ1 on AMD Zen

jira LE-4107
Rebuild_History Non-Buildable kernel-4.18.0-553.74.1.el8_10
commit-author Hans de Goede <[email protected]>
commit c6a1fd910d1bf8a0e3db7aebb229e3c81bc305c4
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-4.18.0-553.74.1.el8_10/c6a1fd91.failed

On AMD Zen acpi_dev_irq_override() by default prefers the DSDT IRQ 1
settings over the MADT settings.

This causes the keyboard to malfunction on some laptop models
(see Links), all models from the Links have an INT_SRC_OVR MADT entry
for IRQ 1.

Fixes: a9c4a912b7dc ("ACPI: resource: Remove "Zen" specific match and quirks")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217336
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217394
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217406
Cc: All applicable <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
(cherry picked from commit c6a1fd910d1bf8a0e3db7aebb229e3c81bc305c4)
Signed-off-by: Jonathan Maple <[email protected]>

# Conflicts:
# arch/x86/include/asm/acpi.h
diff --cc arch/x86/include/asm/acpi.h
index 43e79aaaf06d,2888c0ee4df0..000000000000
--- a/arch/x86/include/asm/acpi.h
+++ b/arch/x86/include/asm/acpi.h
@@@ -33,8 -13,9 +33,13 @@@
#include <asm/processor.h>
#include <asm/mmu.h>
#include <asm/mpspec.h>
+#include RH_KABI_FAKE_INCLUDE(<asm/realmode.h>)
#include <asm/x86_init.h>
++<<<<<<< HEAD
++=======
+ #include <asm/cpufeature.h>
+ #include <asm/irq_vectors.h>
++>>>>>>> c6a1fd910d1b (ACPI: resource: Honor MADT INT_SRC_OVR settings for IRQ1 on AMD Zen)

#ifdef CONFIG_ACPI_APEI
# include <asm/pgtable_types.h>
* Unmerged path arch/x86/include/asm/acpi.h
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 84d6b21dd296..fe13ad8e0a12 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -70,6 +70,7 @@ int acpi_lapic;
int acpi_ioapic;
int acpi_strict;
int acpi_disable_cmcff;
+bool acpi_int_src_ovr[NR_IRQS_LEGACY];

/* ACPI SCI override configuration */
u8 acpi_sci_flags __initdata;
@@ -581,6 +582,9 @@ acpi_parse_int_src_ovr(union acpi_subtable_headers * header,

acpi_table_print_madt_entry(&header->common);

+ if (intsrc->source_irq < NR_IRQS_LEGACY)
+ acpi_int_src_ovr[intsrc->source_irq] = true;
+
if (intsrc->source_irq == acpi_gbl_FADT.sci_interrupt) {
acpi_sci_ioapic_setup(intsrc->source_irq,
intsrc->inti_flags & ACPI_MADT_POLARITY_MASK,
diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
index fd254ece07d5..38fac8d36015 100644
--- a/drivers/acpi/resource.c
+++ b/drivers/acpi/resource.c
@@ -559,6 +559,10 @@ static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity,
if (gsi != 1 && gsi != 12)
return true;

+ /* If the override comes from an INT_SRC_OVR MADT entry, honor it. */
+ if (acpi_int_src_ovr[gsi])
+ return true;
+
/*
* IRQ override isn't needed on modern AMD Zen systems and
* this override breaks active low IRQs on AMD Ryzen 6000 and
106 changes: 106 additions & 0 deletions ciq/ciq_backports/kernel-4.18.0-553.74.1.el8_10/f90fff1e.failed
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
posix-cpu-timers: fix race between handle_posix_cpu_timers() and posix_cpu_timer_del()

jira LE-4107
cve CVE-2025-38352
Rebuild_History Non-Buildable kernel-4.18.0-553.74.1.el8_10
commit-author Oleg Nesterov <[email protected]>
commit f90fff1e152dedf52b932240ebbd670d83330eca
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-4.18.0-553.74.1.el8_10/f90fff1e.failed

If an exiting non-autoreaping task has already passed exit_notify() and
calls handle_posix_cpu_timers() from IRQ, it can be reaped by its parent
or debugger right after unlock_task_sighand().

If a concurrent posix_cpu_timer_del() runs at that moment, it won't be
able to detect timer->it.cpu.firing != 0: cpu_timer_task_rcu() and/or
lock_task_sighand() will fail.

Add the tsk->exit_state check into run_posix_cpu_timers() to fix this.

This fix is not needed if CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y, because
exit_task_work() is called before exit_notify(). But the check still
makes sense, task_work_add(&tsk->posix_cputimers_work.work) will fail
anyway in this case.

Cc: [email protected]
Reported-by: Benoît Sevens <[email protected]>
Fixes: 0bdd2ed4138e ("sched: run_posix_cpu_timers: Don't check ->exit_state, use lock_task_sighand()")
Signed-off-by: Oleg Nesterov <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
(cherry picked from commit f90fff1e152dedf52b932240ebbd670d83330eca)
Signed-off-by: Jonathan Maple <[email protected]>

# Conflicts:
# kernel/time/posix-cpu-timers.c
diff --cc kernel/time/posix-cpu-timers.c
index d6378f9d0ea5,2e5b89d7d866..000000000000
--- a/kernel/time/posix-cpu-timers.c
+++ b/kernel/time/posix-cpu-timers.c
@@@ -1165,17 -1373,62 +1165,57 @@@ void run_posix_cpu_timers(void
spin_lock(&timer->it_lock);
list_del_init(&timer->it.cpu.elist);
cpu_firing = timer->it.cpu.firing;
- timer->it.cpu.firing = false;
+ timer->it.cpu.firing = 0;
/*
- * If the firing flag is cleared then this raced with a
- * timer rearm/delete operation. So don't generate an
- * event.
+ * The firing flag is -1 if we collided with a reset
+ * of the timer, which already reported this
+ * almost-firing as an overrun. So don't generate an event.
*/
- if (likely(cpu_firing))
+ if (likely(cpu_firing >= 0))
cpu_timer_fire(timer);
- /* See posix_cpu_timer_wait_running() */
- rcu_assign_pointer(timer->it.cpu.handling, NULL);
spin_unlock(&timer->it_lock);
}
++<<<<<<< HEAD
+ lockdep_posixtimer_exit();
++=======
+ }
+
+ /*
+ * This is called from the timer interrupt handler. The irq handler has
+ * already updated our counts. We need to check if any timers fire now.
+ * Interrupts are disabled.
+ */
+ void run_posix_cpu_timers(void)
+ {
+ struct task_struct *tsk = current;
+
+ lockdep_assert_irqs_disabled();
+
+ /*
+ * Ensure that release_task(tsk) can't happen while
+ * handle_posix_cpu_timers() is running. Otherwise, a concurrent
+ * posix_cpu_timer_del() may fail to lock_task_sighand(tsk) and
+ * miss timer->it.cpu.firing != 0.
+ */
+ if (tsk->exit_state)
+ return;
+
+ /*
+ * If the actual expiry is deferred to task work context and the
+ * work is already scheduled there is no point to do anything here.
+ */
+ if (posix_cpu_timers_work_scheduled(tsk))
+ return;
+
+ /*
+ * The fast path checks that there are no expired thread or thread
+ * group timers. If that's so, just return.
+ */
+ if (!fastpath_timer_check(tsk))
+ return;
+
+ __run_posix_cpu_timers(tsk);
++>>>>>>> f90fff1e152d (posix-cpu-timers: fix race between handle_posix_cpu_timers() and posix_cpu_timer_del())
}

/*
* Unmerged path kernel/time/posix-cpu-timers.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Rebuild_History BUILDABLE
Rebuilding Kernel from rpm changelog with Fuzz Limit: 87.50%
Number of commits in upstream range v4.18~1..kernel-mainline: 567023
Number of commits in rpm: 12
Number of commits matched with upstream: 6 (50.00%)
Number of commits in upstream but not in rpm: 567017
Number of commits NOT found in upstream: 6 (50.00%)

Rebuilding Kernel on Branch rocky8_10_rebuild_kernel-4.18.0-553.74.1.el8_10 for kernel-4.18.0-553.74.1.el8_10
Clean Cherry Picks: 4 (66.67%)
Empty Cherry Picks: 2 (33.33%)
_______________________________

__EMPTY COMMITS__________________________
c6a1fd910d1bf8a0e3db7aebb229e3c81bc305c4 ACPI: resource: Honor MADT INT_SRC_OVR settings for IRQ1 on AMD Zen
f90fff1e152dedf52b932240ebbd670d83330eca posix-cpu-timers: fix race between handle_posix_cpu_timers() and posix_cpu_timer_del()

__CHANGES NOT IN UPSTREAM________________
Adding prod certs and changed cert date to 20210620
Adding Rocky secure boot certs
Fixing vmlinuz removal
Fixing UEFI CA path
Porting to 8.10, debranding and Rocky branding
Fixing pesign_key_name values
Loading