anolis-cloud-kernel/arch
leoliu-oc 8cfe551cd7 anolis: x86/hpet: Read HPET directly if panic in progress
ANBZ: #9396

When the clocksource of the system is HPET,a CPU executing read_hpet might
be interrupted by #GP/#PF to executing the panic,this may lead to
read_hpet dead loops:

CPU x				    CPU x
----                                ----
read_hpet()
  arch_spin_trylock(&hpet.lock)
  [CPU x got the hpet.lock]         #GP/#PF happened
                                    panic()
                                      kmsg_dump()
                                        pstore_dump()
                                          pstore_record_init()
                                            ktime_get_real_fast_ns()
                                              read_hpet()
                                              [dead loops]

To avoid this dead loops, read HPET directly if panic in progress.

Signed-off-by: leoliu-oc <leoliu-oc@zhaoxin.com>
Reviewed-by: Artie Ding <artie.ding@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/3396
2024-09-05 11:20:36 +00:00
..
alpha .gitignore: add SPDX License Identifier 2020-09-02 17:52:15 +08:00
arc .gitignore: add SPDX License Identifier 2020-09-02 17:52:15 +08:00
arm bpf: Introduce BPF nospec instruction for mitigating Spectre v4 2024-03-25 03:47:25 +00:00
arm64 anolis: config: default to build txgbevf for module 2024-05-27 07:30:09 +00:00
c6x
h8300
hexagon
ia64 hugetlbfs: flush TLBs correctly after huge_pmd_unshare 2022-03-14 02:45:15 +00:00
m68k .gitignore: add SPDX License Identifier 2020-09-02 17:52:15 +08:00
microblaze .gitignore: add SPDX License Identifier 2020-09-02 17:52:15 +08:00
mips bpf: Introduce BPF nospec instruction for mitigating Spectre v4 2024-03-25 03:47:25 +00:00
nds32 nds32: Fix the items of hwcap_str ordering issue. 2019-12-13 08:51:35 +01:00
nios2 .gitignore: add SPDX License Identifier 2020-09-02 17:52:15 +08:00
openrisc .gitignore: add SPDX License Identifier 2020-09-02 17:52:15 +08:00
parisc parisc: Declare pci_iounmap() parisc version only when CONFIG_PCI enabled 2023-01-03 01:38:49 +00:00
powerpc bpf: Introduce BPF nospec instruction for mitigating Spectre v4 2024-03-25 03:47:25 +00:00
riscv .gitignore: add SPDX License Identifier 2020-09-02 17:52:15 +08:00
s390 bpf: Introduce BPF nospec instruction for mitigating Spectre v4 2024-03-25 03:47:25 +00:00
sh hugetlbfs: flush TLBs correctly after huge_pmd_unshare 2022-03-14 02:45:15 +00:00
sparc bpf: Introduce BPF nospec instruction for mitigating Spectre v4 2024-03-25 03:47:25 +00:00
um hugetlbfs: flush TLBs correctly after huge_pmd_unshare 2022-03-14 02:45:15 +00:00
unicore32 x86/mpx, mm/core: Fix recursive munmap() corruption 2020-09-02 17:52:54 +08:00
x86 anolis: x86/hpet: Read HPET directly if panic in progress 2024-09-05 11:20:36 +00:00
xtensa .gitignore: add SPDX License Identifier 2020-09-02 17:52:15 +08:00
.gitignore .gitignore: add SPDX License Identifier 2020-09-02 17:52:15 +08:00
Kconfig x86/mm/cpa: Add set_direct_map_*() functions 2024-02-29 20:43:36 +08:00