[axi_sram] a partialy written capability can still be stored as valid
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 70/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- embedded-iot, security
Direzione di ricerca
Start with the block DV test axi_sram_wuser_partial_strobe using the provided dvsim command, then read axi_to_detailed_mem.sv around line 414 and the vendor patch 0004_Add_CHERI_support_to_axi_to_mem.patch. Check how byte enables affect cheri_w_tag; done when the partial-strobe test confirms the tag is not set and the vendored file has been regenerated from the patch.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
A capability is stored in a 128-bit aligned region, written as two 64-bit beats, and each region has one tag bit that marks it as a valid capability. doc/ref/arch.md (8rlwol, 893tz4) says the tag may only be set when the whole 16 bytes are written, and that any partial write must clear it.
The SRAM decides whether to set the tag from three things: the request's tag bit, the transfer's shape (two 8-byte beats) and its alignment. It ignores the byte-enables, which say which bytes of a beat are actually written. So a correctly shaped write with the tag bit set, but with only some bytes enabled on either beat, still sets the tag. The slot then holds a capability marked valid whose bytes are part new data and part old memory contents, which software could use to forge a capability.
This scenario is captured in the block DV environment, and can be ran with:
dvsim hw/top_chip/dv/axi_sram/block_tb/axi_sram_block_sim_cfg.hjson -i axi_sram_wuser_partial_strobe
This test does a 2 beat aligned write with the tag bit set and only 4 of 8 bytes enabled. The tag is stored, and TagSetNeedsFullStrobe_A fires.
Proposed fix: only set the tag when every byte-enable on the beat is set. This means adding & (&axi_req_i.w.strb) to cheri_w_tag in axi_to_detailed_mem.sv (around line 414). The CHERI logic comes from the vendor patch 0004_Add_CHERI_support_to_axi_to_mem.patch, so the change goes in that patch and the vendored file is regenerated, not hand-edited.
- Lingua principale
- SystemVerilog
- Stelle
- 45
- Fork
- 22
- Merge medio
- 2g 4h
- PR unite (30g)
- 9
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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 lowRISC/mocha
-
Document lowRISC Nix cacheAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 2 giorni
-
[axi_sram] Clarify when SRAM can invalidate a capability by clearing only one of its tag bitsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 60/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
lowRISC/mocha#753 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
lowRISC/mocha#752 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di lowRISC/mocha
Issue simili
-
快速入门那里会不会对新手不太友好,提出优化方案Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
zephyrproject-rtos/zephyr#125543 ·
I maintainer di solito rispondono entro 2 giorni
-
type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
tensorflow/tflite-micro#3995 ·
I maintainer di solito rispondono entro 1 giorno
-
Template: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
betaflight/betaflight#16014 ·
I maintainer di solito rispondono entro 3 giorni
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100