Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Test harness: prove Mach name recycling is safe

Aperta
#156 1 commento 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
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
c

Direzione di ricerca

Start by reading the existing mach_test.c sysctl-handler pattern and the linked plan; the issue also identifies umbrella issue #145 and kernel #144 as context. Add in-kernel regression coverage for the listed name-recycling, allocation, uref, table-growth, reverse-hash, and cross-space cases, plus the namespace-separation assertions. Done means the assertions pass and the cold-boot wedge measurement is 0/100 across 10 blocks of 10 sends.

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

Descrizione

area:mach enhancement

The regression guard for the whole effort. In-kernel tests following the existing mach_test.c sysctl-handler pattern:

  • name recycle — allocate/free N names in one space; assert indices are reused, generation advances per slot, and a saved stale name fails lookup. This is the test the current design cannot pass.
  • alloc_name — assert the returned entry carries the requested name; assert KERN_NAME_EXISTS on repeat; assert no leaked slot
  • urefs — copy out a send right, mach_port_deallocate once, assert the entry is gone and ip_srights decremented
  • table growth — assert previously issued names still resolve after each growth step, and entry pointers held across growth stay valid
  • reverse hash — mach_task_self() twice returns the same name
  • cross-space — allocate in space A from a thread owning space B; assert it lands in A

Namespace-separation assertions: procstat -f 1 shows no port fds; close(port_name) returns EBADF; an ordinary fd passed as a port name returns KERN_INVALID_NAME.

Acceptance for the umbrella: cold-boot wedge measurement (10 blocks x 10 sends) at 0/100. Pre-fix baseline is 35/100; kernel #144 also measured 35/100.

Part of #145. Plan: https://pkgdemon.github.io/nextbsd-mach-namespace-separation-plan.html

Lingua principale
C
Stelle
12
Fork
3
Merge medio
7h 1m
PR unite (30g)
7

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

  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 nextbsd/nextbsd-kernel

Tutte le issue di nextbsd/nextbsd-kernel

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.