Aya, raibhurari yekutanga kugadzira eBPF vanodzora muRust

Linus torvalds pamwe nevazhinji vanogadzira Kernel uye zvakasiyana kugoverwa vakaratidza kufarira kwavo pamusoro peRust uye kunyangwe pane kanopfuura kamwechete nyaya yekumisikidzwa kwevatyairi mumutauro wepurogiramu iyi paLinux Kernel yakaratidzwa.

Uye pane izvi, akasiyana mabasa akatoburitswa, ayo isu tambotaura pano pa blog uye tinogona kutaura, semuenzaniso, kuyedza kubudirira kubva kune imwe seti yezvishandiso, coreutils, yakanyorwa zvekare muRust (Izvi zvinosanganisira zvinoshandiswa senge rudzi, kati, chmod, chown, chroot, cp, zuva, dd, echo, zita rezita, id, ln, uye ls).

Tichifunga izvi, Linus torvalds haana kunyatso kupa pfungwa yake achitsigira danho iri uye ataura zvisina kunaka mapoinzi (unogona kutarisa ruzivo Mune inotevera chinongedzo.)

Zvisinei nekushoropodzwa kwakakomba kubva kuna Linus, mabasa nezve kuita Ngura muKernel haina kumira kupfuurira mberi uye munguva pfupi yapfuura vhezheni yekutanga raibhurari yeAya yakapihwa, iyo inokutendera iwe kuti ugadzire eBPF driver muRust inomhanya mukati meLinux kernel mune yakasarudzika JIT chaiyo muchina.

Kusiyana nemamwe EBPF maturusi ekuvandudza, Aya haashandisi libbpf uye iyo BCC compiler, asi inopa kuita kwayo kwakanyorwa muRust iyo inoshandisa iyo libc dhirowa package kuti iwane zvakananga kernel system mafoni. Kuvaka Aya hakudi iyo C mitauro maturusi kana kernel misoro.

Kune uyo ari havazive eBPF, vanofanirwa kuziva kuti uyu muturikiri we bytecode yakavakwa mukati meLinux kernel iyo inokutendera iwe kuti ugadzire ma network mashandiro ekubata, tarisa mashandiro esisitimu, bvisa masisitimu ekufona, kudzora kupinda, kugadzirisa zviitiko nenguva, kuverenga kuwanda uye nguva yekushanda, uye kuteedzera uchishandisa kprobes / uprobes / tracepoints.

Kutenda kuunganidzwa kweJIT, bytecode inoshandurwa kuita muchina mirairo pane nhunzi uye inomhanya nekuita kwekodhi yekodhi. XDP inopa nzira yekumhanyisa BPF zvirongwa padanho rekutyaira nhanho, nekusvika kwakananga kune iyo DMA packet buffer, ichikubvumidza iwe kuti ugadzire ekumusoro-mashandiro madhiraivha eakakwira network mutoro mamiriro.

About Aya

Pane akakosha maficha ataurwa kubva kuna Aya tinogona kuzviwana ine rutsigiro rweBTF (BPF mhando fomati), iyo inopa mhando yeruzivo muBPF pseudocode kutarisa uye kuenzanisa mhando dzakapihwa neyezvino kernel Kushandisa BTF kunoita kuti zvikwanise kugadzira madhiraivhu eBPF epasirese anogona kushandiswa pasina kuadzosera neshanduro dzakasiyana dzeLinux kernel.

Zvakare neiyo Tsigiro ye bpf-to-bpf mafoni, kusiyanisa kwepasirese uye kutanga, iyo inobvumidza kudhirowa mapurogiramu eBPF nekufananidza nezvakajairwa zvirongwa uchishandisa aya senguva yekuuraya, kudzima mabasa achifunga nezve basa muIPPF.

Kune rimwe divi, zvakare ine iyo rutsigiro rwemukati kernel mhando, kusanganisira anogara arongedzwa, hash mepu, matura, mitsetse, stack mitezo uye zvivakwa zvemasokisi uye kuita kwekutevera.

Tambien ine hunyanzvi hwekugadzira akasiyana marudzi eEBTF zvirongwa, kusanganisira zvirongwa zvekusefa nekutungamira traffic, cgroup uye akasiyana masokisi madhiraivha, XDP zvirongwa uye zvakare chikuva rutsigiro rweasynchronous chikumbiro kugadzirisa mune isiri-inovhara tokyo mode uye async-std.
Kurumidza kuumbiridza, pasina kusungwa kune kernel kuunganidzwa kana kernel misoro.

Izvo zvakakosha kutaura izvozvo chirongwa ichi chichiri kutariswa pakuedza sezvo API ichigere kugadzikana uye inoramba ichichinja. Zvakare, haazi ese mabasa epamuviri asati aitwa.

Pakupera kwegore, ivo vanogadzira vanotarisira kuunza mashandiro aAya pamwe ne libbpf uye muna Ndira 2022 fomu yekutanga yakagadzikana vhezheni. Izvo zvakare zvakarongedzwa kusanganisa izvo Aya zvikamu zvinodiwa kunyora Rust kodhi yeLinux kernel pamwe nemushandisi nzvimbo yezvinhu zvinoshandiswa kurodha, kubatanidza, uye kuyanana nemapurogiramu eBPF.

Finalmente kana iwe uchifarira kuziva zvakawanda nezvazvo, unogona tarisa 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