AArch64: `reschedule` returns with interrupts enabled
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 47/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- operating-systems
Direzione di ricerca
Read src/scheduler/mod.rs, especially the AArch64 reschedule implementation at lines 146–177 and the x86_64 and RISC-V implementations for comparison. Trace how the AArch64 reschedule mechanism affects the caller’s interrupt state, then determine whether the function’s contract requires restoring that state or requires callers to have interrupts enabled. Done means the intended contract and a safe behavior are established, with relevant scheduler tests or architecture checks updated.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
On AArch64, reschedule unconditionally enables interrupts so that the reschedule SGI is taken (src/scheduler/mod.rs#L146-L177), so it always returns with interrupts enabled. On x86_64 and RISC-V, it returns with the caller's state (#L119-L144, #L179-L182).
This matters when a task blocks inside without_interrupts or while holding an InterruptSpinMutex/InterruptTicketMutex. After the task wakes up, the rest of that section runs with interrupts enabled until the guard is dropped. Since every interrupt handler ends in scheduler(), an interrupt in that window can switch away from the task while it still holds the lock, and if the next task on that core takes the same lock, it spins with interrupts disabled and the core hangs. Blocking in such a section is a bug on every architecture, and #2772 and #2778 fix two paths that did so, but on AArch64 it additionally leaves the remaining critical section unprotected.
Should reschedule on AArch64 restore the caller's state, e.g. by yielding with svc instead of a self-SGI, or is it only meant to be called with interrupts enabled?
- Lingua principale
- Rust
- Stelle
- 1.5k
- Fork
- 138
- Merge medio
- 1g 9h
- PR unite (30g)
- 18
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di hermit-os/kernel
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
hermit-os/kernel#2747 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
x86_64: no network on QEMU microvm with ACPI onForse già presa @martijnhoekstra l’ha presa 1 giorno fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
I maintainer di solito rispondono entro 2 giorni
-
static 10% reserve of heap memory for device & stack is inefficient and causes issues.Forse già presa @jounathaen l’ha presa 27 giorni fa. Aperta
hermit-os/kernel#2740 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
sys_read_entropy silently returns non-cryptographic bytes when no entropy source is availableAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
hermit-os/kernel#2736 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
Lost network wakeupAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di hermit-os/kernel
Issue simili
-
Shell `yoyo <verb> <sub>` missing its required argument prints usage and exits 0: `config get`Apertaagent-self
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
yologdev/yoyo-evolve#1154 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
eliasstravik/herdr-projects#789 · 1 commento ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Alex-Sebastian-Ene/mind-over-chicken#195 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni