-
Notifications
You must be signed in to change notification settings - Fork 2
[PW_SID:1044970] [v2] irqchip/sifive-plic: Fix insufficient irq_groups allocation #1357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: workflow__riscv__fixes
Are you sure you want to change the base?
Conversation
Since the first irq source is 1 instead of 0, when the number of irqs is multiple of 32, the last irq group will be ignored during allocation, saving, and restoring. This lead to memory corruption when accessing enable_save beyond allocated memory after commit 14ff9e5 ("irqchip/sifive-plic: Cache the interrupt enable state") which will access enable_save for all sources during plic_probe. Thus, we should allocate irq_groups based on (nr_irqs + 1) instead of nr_irqs to avoid this issue. This is an long standing bug since Linux v6.4 but since the last irq source is rarely used, it may not be triggered in practice until commit 14ff9e5 ("irqchip/sifive-plic: Cache the interrupt enable state"). Fixes: e80f0b6 ("irqchip/irq-sifive-plic: Add syscore callbacks for hibernation") Fixes: 4d936f1 ("irqchip/sifive-plic: Probe plic driver early for Allwinner D1 platform") Fixes: 539d147 ("irqchip/sifive-plic: Add support for UltraRISC DP1000 PLIC") Fixes: 14ff9e5 ("irqchip/sifive-plic: Cache the interrupt enable state") Signed-off-by: Yangyu Chen <cyy@cyyself.name> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[v2] irqchip/sifive-plic: Fix insufficient irq_groups allocation" |
|
Patch 1: "[v2] irqchip/sifive-plic: Fix insufficient irq_groups allocation" |
|
Patch 1: "[v2] irqchip/sifive-plic: Fix insufficient irq_groups allocation" |
|
Patch 1: "[v2] irqchip/sifive-plic: Fix insufficient irq_groups allocation" |
|
Patch 1: "[v2] irqchip/sifive-plic: Fix insufficient irq_groups allocation" |
|
Patch 1: "[v2] irqchip/sifive-plic: Fix insufficient irq_groups allocation" |
|
Patch 1: "[v2] irqchip/sifive-plic: Fix insufficient irq_groups allocation" |
|
Patch 1: "[v2] irqchip/sifive-plic: Fix insufficient irq_groups allocation" |
|
Patch 1: "[v2] irqchip/sifive-plic: Fix insufficient irq_groups allocation" |
|
Patch 1: "[v2] irqchip/sifive-plic: Fix insufficient irq_groups allocation" |
|
Patch 1: "[v2] irqchip/sifive-plic: Fix insufficient irq_groups allocation" |
|
Patch 1: "[v2] irqchip/sifive-plic: Fix insufficient irq_groups allocation" |
PR for series 1044970 applied to workflow__riscv__fixes
Name: [v2] irqchip/sifive-plic: Fix insufficient irq_groups allocation
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1044970
Version: 2