bytecodealliance / bytecodealliance/rustix
speculative_feature_state should not return Ok(None)
- Lingua principale
- Rust
- Stelle
- 2.1k
- Fork
- 294
- Merge medio
- 6g 22h
- PR unite (30g)
- 4
Descrizione
The return type of `speculative_feature_state` is `Result>`.
The return logic is
- error -> `Err(Errno)`
- success, value known by rustix -> `Ok(Some(SpeculationFeatureState))`
- success, value not known by rustix -> `Ok(None)`
The third cases isn't useful at all. We should either return the raw kernel answer, possibly inside SpeculationFeatureState, or treat this as an error. The only thing you know is that the operation was successful (known by the kernel and no permission error).
I presume this was meant to return the "not vulnerable" case. However this is indistinguishable from "new kernel value".
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia cercando speculative_feature_state nel repository e ispeziona i relativi chiamanti e gli eventuali test o la documentazione correlati. Determina se l'API debba esporre la risposta grezza del kernel o rappresentare i valori sconosciuti come un errore; il lavoro è completato quando il contratto di ritorno non confonde più un valore sconosciuto del kernel con “non vulnerabile”.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- linux, rust
- Ambito
- operating-systems, security
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 30/100