Yechishanu vhezheni yezvigamba zveRust mutyairi rutsigiro paLinux yakabudiswa

Munguva pfupi yapfuura Miguel Ojeda, munyori wepurojekiti yeRust-for-Linux akaburitsa chikumbiro chechishanu Linux kernel vagadziri vesarudzo yekusimudzira zvikamu Ngura mudziyo vatyairi kuti vafunge.

Kune avo vasati vaziva nezve nhevedzano yezvikumbiro zvakaburitswa kwemwedzi yakati wandei ikozvino, iwe unofanirwa kuziva kuti pfungwa iri shure kwayo imhaka yekuti Rust rutsigiro parizvino inoonekwa seyekuyedza, asi. yakatoverengerwa mulinux-inotevera bazi uye yakakura zvakakwana kuti itange kushanda pakugadzira abstraction layer. nezve kernel subsystems, pamwe nekunyora madhiraivha nemamodule.

Iye zvino, Komisheni yebudiriro yaMiguel Ojeda inopihwa mari neGoogle neISRG (Internet Security Research Group), inova muvambi weLet Encrypt project uye inosimudzira HTTPS nekuvandudzwa kwetekinoroji yekuwedzera kuchengetedzeka kweInternet.

Zvakakosha kutaura kuti zvakarongwa zvinoshanduka vanoita kuti zvikwanise kushandisa Rust semutauro wechipiri pakugadzira vatyairi uye kernel modules. Rutsigiro rutsigiro runounzwa sechisarudzo chisingagoneswe nekukasira uye hachikonzereri kuti Rust ibatanidzwe pakati pezvinodiwa zvekuvaka kernel.

Kushandisa Rust kugadzira madhiraivha kuchakubvumidza kuti ugadzire madhiraivha ari nani uye akachengeteka nekuedza kushoma, pasina matambudziko sekuwana nzvimbo yendangariro mushure mekuisunungura, dereference null pointers, uye buffer mafashama.

Kuchengetedzwa kwendangariro kunopihwa muRust panguva yekuunganidza nekutarisa mareferensi, kuteedzera chinhu muridzi, uye chinhu hupenyu hwese (chiyero), pamwe nekuongorora iko kurongeka kwekusvika kwendangariro panguva yekuitwa kwekodhi. Rust inopawo kuchengetedzwa kwehuwandu hwekufashukira, inoda zvinosiyana kuti zvitangwe isati yashandiswa, inobata zvirinani zvikanganiso muraibhurari yakajairwa, inosimbisa pfungwa yezvisingachinjiki uye mareferensi nekusarudzika, uye inopa yakasimba static typing kuderedza zvikanganiso zvine musoro. .

Main novelties muchishanu chirevo

Mushanduro itsva yezvigamba, akaenderera mberi nekudzima macomments yakaitwa panguva yehurukuro yekutanga, yechipiri, yechitatu uye yechina zvigamba zvechinyorwa.

Muchikamu chekuchinja uye kuvandudzwa kwakaitwa tinogona kuona kuti kusimbiswa kwechikamu kuitira kugarisana neRust yakawedzerwa kune inoenderera mberi yekubatanidza system zvichibva paIntel inoenderana 0DAY/LKP bot uye mishumo yebvunzo yatanga kuburitswa.

Mukuwedzera kune izvi, zvinoratidzwa kuti kubatanidzwa kweRust rutsigiro kuri kugadzirirwa mukati otomatiki bvunzo system KernelCI, plus GitHub CI based bvunzo dzakachinjirwa kushandisa midziyo.

Izvo zvakare zvakasimbiswa izvo yakawedzera kugona kutsanangura mamwe ma parameter pakunyoresa midziyo, pamwe chete iyo is_rust_module.sh script yagadziridzwa uye iyo tsigiro ye static synchronization primitives (pasi rose zvakagovaniswa zvakasiyana) zvichibva pane "CONFIG_CONSTRUCTORS" kuita yakawedzerwa.

Of the dzimwe shanduko dzinomira pachena mune iyi nyowani controller zano:

  • Rust Core modules anochengetedzwa kukosha kwekutsanangura hunhu: "#![no_std]" uye "#![feature(...)]".
  • Yakawedzerwa tsigiro yechinangwa chekuvaka chimwe chete (.o, .s, .ll, uye .i).
  • Iyo kodhi nhungamiro zvino inotsanangura mitemo yekuganhura makomendi ("//") uye kunyora kodhi ("///").
  • Yakareruka yekuvhara manejimendi: Guard uye GuardMut anosanganiswa kuita imwe parameterized mhando.
  • Yakawedzera iyo "RwSemaphore" abstraction, iyo inoita seyakaputira pamusoro peiyo C rw_semaphore chimiro.
  • Kushandisa mmap, itsva mm module uye VMA abstraction (inosunga pane vm_area_struct chimiro) yakawedzerwa.
  • Iyo PL061 GPIO controller yakashandurwa kuti ishandise iyo "dev_*!" macro.
  • General kodhi yekuchenesa.

Finalmente kana iwe uchifarira kuziva zvakawanda nezvazvo nezvechikumbiro chitsva ichi, unogona kubvunza ruzivo Mune inotevera chinongedzo.


Izvo zviri muchinyorwa zvinoomerera pamisimboti yedu ye tsika dzekunyora. Kuti utaure chikanganiso tinya pano.

Iva wekutanga kutaura

Siya yako yekutaura

Your kero e havazobvumirwi ichibudiswa.

*

*

  1. Inotarisira data: AB Internet Networks 2008 SL
  2. Chinangwa cheiyo data: Kudzora SPAM, manejimendi manejimendi.
  3. Legitimation: Kubvuma kwako
  4. Kutaurirana kwedata
  5. Dhata yekuchengetedza: Dhatabhesi inobatwa neOccentus Networks (EU)
  6. Kodzero: Panguva ipi neipi iwe unogona kudzora, kupora uye kudzima ruzivo rwako