🇰🇷 한글 설명
Tegra 플랫폼의 PMC(전력 관리 컨트롤러)에서 인터럽트가 아닌 컨텍스트에서 generic_handle_irq()를 호출하는 문제를 IRQ work를 통해 안전한 하드 IRQ 컨텍스트에서 실행되도록 수정한 커널 버그 패치입니다.
💡 쉬운 설명
Linux 커널의 Tegra 칩셋에서 시스템 재개 시 특정 함수를 잘못된 방식으로 호출하는 문제를 수정했습니다. 새로운 방식으로 안전하게 호출하도록 변경되었습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
soc/tegra: pmc: Fix unsafe generic_handle_irq() call
Currently, when resuming from system suspend on Tegra platforms,
the following warning is observed:
WARNING: CPU: 0 PID: 14459 at kernel/irq/irqdesc.c:666
Call trace:
handle_irq_desc+0x20/0x58 (P)
tegra186_pmc_wake_syscore_resume+0xe4/0x15c
syscore_resume+0x3c/0xb8
suspend_devices_and_enter+0x510/0x540
pm_suspend+0x16c/0x1d8
The warning occurs because generic_handle_irq() is being called from
a non-interrupt context which is considered as unsafe.
Fix this warning by deferring generic_handle_irq() call to an IRQ work
which gets executed in hard IRQ context where generic_handle_irq()
can be called safely.
When PREEMPT_RT kernels are used, regular IRQ work (initialized with
init_irq_work) is deferred to run in per-CPU kthreads in preemptible
context rather than hard IRQ context. Hence, use the IRQ_WORK_INIT_HARD
variant so that with PREEMPT_RT kernels, the IRQ work is processed in
hardirq context instead of being deferred to a thread which is required
for calling generic_handle_irq().
On non-PREEMPT_RT kernels, both init_irq_work() and IRQ_WORK_INIT_HARD()
execute in IRQ context, so this change has no functional impact for
standard kernel configurations.
[
[email protected]: miscellaneous cleanups]
📍 영향받는 시스템
Tegra186 이상의 Tegra 기반 플랫폼 Linux 커널 (NVIDIA Tegra SoC)
⚔️ 공격 벡터
로컬 공격자가 시스템 절전 모드 재개 중에 커널 경고를 트리거할 수 있음
🛡️ 대응 방법
최신 Linux 커널 패치 적용 또는 해당 수정사항이 포함된 커널 버전 업데이트
🔧 검증 코드
Tegra 플랫폼 확인: 'Tegra system'이 출력되면 영향받을 수 있는 시스템이며, 커널 버전이 패치된 버전인지 NVIDIA 공식 문서에서 확인 필요
uname -r | grep -E 'tegra|nvidia' && echo 'Tegra system' || echo 'Non-Tegra system'