gdb: register access corrupts rbx and x87 state

Aperta
#1,971 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
58/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

Start with src/hyperlight_host/src/hypervisor/gdb/x86_64_target.rs, especially the read_registers and write_registers locations linked in the issue. Trace how GDB register slots map to the x86_64 register state, including the FPU state. The fix is complete when reading and writing registers preserves the correct rbx and x87 values and reports the x87 and segment registers.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

C-bug S-confirmed
  • read_registers puts rbp in GDB slot 1, which is rbx (x86_64_target.rs#L202). gdb shows the wrong rbx. Any register write sends that value back, so set $rax = 1 also sets rbx to rbp.
  • write_registers builds CommonFpu with ..Default::default() (x86_64_target.rs#L272). Any register write resets ST0-7, FSW and FTW. read_registers also never reports x87 or segment registers.
Lingua principale
Rust
Stelle
4.8k
Fork
222
Merge medio
1g 16h
PR unite (30g)
60

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di hyperlight-dev/hyperlight

Tutte le issue di hyperlight-dev/hyperlight

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.