`mmap` breaks easily
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- linux, rust
- Ambito
- operating-systems
Direzione di ricerca
Inizia esaminando l'implementazione corrente di mmap e munmap e il modo in cui interagiscono con le tabelle delle pagine e le liste delle pagine fisiche libere. Decidi se mmap è un'API di alto livello tracciata o un'operazione di basso livello sulle tabelle delle pagine, quindi documenta il comportamento previsto per protezioni miste, mapping identità, unmapping non validi e qualsiasi syscall aggiuntivo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
This looks like an ok fix for the issue at hand to me. However, I think mmap has a bunch of problems and this is more of a band-aid solution. For example, this implementaiton breaks if the affected area contains both pages mapped with PROT_NONE and pages with some access allowed. From my reading of the man pages, it is perfectly fine to use linux mmap like that.
For a proper solution, we should decide on which level mmap should operate on:
If it is a high level api, we should track the state of all pages mapped via mmap. munmap should refuse to unmap pages which have not been allocated via mmap. This could be done via a hashtable or using the extra bits available in the pagetable. As an example of why this is needed, you could use munmap to unmap the identity mappings with the current implementation.
If it is a low level api, it should interact directly with the free lists and the page table. In that case, munmap should just walk the page table and add anything it finds to the physical free list. We should specify incorrect use of mmap to be UB, as we can not really detect it reliably. This would make our mmap incompatible with the linux one.
I would prefer mmap to be an optional high level feature and to have an additional set of syscalls that allows direct access to the free lists.
Originally posted by @m-mueller678 in https://github.com/hermit-os/kernel/issues/2008#issuecomment-3432646702
- Lingua principale
- Rust
- Stelle
- 1.5k
- Fork
- 135
- Merge medio
- 13h 8m
- PR unite (30g)
- 8
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
-
`ConsoleStdin::poll()`does not register a waker, causing `select()` to remain blockedForse già presa @GloriousAlpaca l’ha presa 5 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
hermit-os/kernel#2747 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
static 10% reserve of heap memory for device & stack is inefficient and causes issues.Forse già presa @jounathaen l’ha presa 22 giorni fa. Aperta
hermit-os/kernel#2740 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
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 1 giorno
-
Lost network wakeupAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di hermit-os/kernel
Issue simili
-
area:docs documentation good first issue priority:medium
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
rtk-ai/rtk#4958 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
calagopus/panel#285 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: streamed Responses API flex_unavailable error maps to 500 InternalServerError instead of 429Apertallm translation
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 85/100
BerriAI/litellm#49736 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
question
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
autoindex tests: denied loopback bind shows only PermissionDenied (255 failures), not the causeApertafield-report
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno