Deprecated: Creation of dynamic property Timber\Site::$pingback is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Site.php on line 180

Deprecated: Creation of dynamic property Timber\User::$name is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/User.php on line 118

Deprecated: Creation of dynamic property Timber\Post::$has_disclaimer is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_edit_lock is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_edit_last is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_thumbnail_id is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$onesignal_meta_box_present is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$onesignal_send_notification is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$onesignal_modify_title_and_content is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$onesignal_notification_custom_heading is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$onesignal_notification_custom_content is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$tipologia is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_tipologia is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$attributi is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_attributi is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$in_evidenza_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_in_evidenza_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$inviato_in_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_inviato_in_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$fonte is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_fonte is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$fonte_url is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_fonte_url is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_category is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_blz_affiliation_attributes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_content_type is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_attributes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_speciali is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_focuskw is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_metadesc is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_linkdex is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_content_score is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_focuskeywords is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_keywordsynonyms is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_estimated-reading-time-minutes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$response_body is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_indexnow_last_ping is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_oembed_645a719780a4d2a94e4f791e7a82d771 is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_oembed_time_645a719780a4d2a94e4f791e7a82d771 is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_oembed_521292f95528b63bf7238ee1382c5746 is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_oembed_time_521292f95528b63bf7238ee1382c5746 is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_date_gmt is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$comment_status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$ping_status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_password is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_name is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$to_ping is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$pinged is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_modified is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_modified_gmt is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_content_filtered is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$guid is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$menu_order is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_mime_type is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$comment_count is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$filter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71
Linus Torvalds batte i pugni sul tavolo: il codice Rust va inserito nel kernel Linux

Linus Torvalds batte i pugni sul tavolo: il codice Rust va inserito nel kernel Linux

L'introduzione di Rust nel kernel Linux ha generato dibattiti e polemiche. Mentre offre vantaggi in termini di sicurezza della memoria, la sua integrazione solleva preoccupazioni per la frammentazione del codice e la mancanza di direttive chiare. Linus Torvalds ha le idee chiare.

L’introduzione di codice sviluppato nel linguaggio di programmazione Rust all’interno del kernel Linux ha sollevato un acceso dibattito in seno alla comunità di sviluppatori e manutentori del progetto. Se da un lato vi sono chiari vantaggi legati alla sicurezza della memoria e alla robustezza del codice, dall’altro emergono perplessità sulla gestione di un codice base sempre più frammentato e sulla mancanza di direttive chiare riguardo all’adozione di Rust nei diversi sottosistemi.

Rust nel kernel: una decisione imposta da Linus Torvalds?

Uno degli aspetti più controversi riguarda il modo con cui l’adozione di Rust nel kernel Linux sta procedendo. Secondo alcune voci all’interno della comunità, l’introduzione di Rust nei sottosistemi del kernel non è un’opzione discrezionale per i manutentori, ma una direttiva imposta dall’alto. Linus Torvalds, creatore e leader del progetto Linux, avrebbe infatti dichiarato in privato di essere disposto a forzare l’integrazione di Rust nel kernel, anche contro il parere di alcuni manutentori. Questa dinamica solleva interrogativi sulla governance del progetto e sulle reali possibilità di opposizione a una scelta tecnica di tale portata.

A svelare la posizione di Torvalds è Christoph Hellwig, consulente indipendente e sviluppatore del kernel Linux che scrive: “Linus ha dichiarato in privato che è assolutamente determinato a integrare codice Rust nel kernel, anche al di là delle obiezioni dei maintainer“.

Un’implementazione problematica

L’adozione di Rust nel kernel non è limitata alla scrittura di nuovi moduli in questo linguaggio, ma implica anche la creazione di binding per interfacciarsi con il codice esistente in C. Questi binding non sono semplici interfacce, ma rappresentano un vero e proprio ponte tra due paradigmi di programmazione molto diversi.

L’approccio, se da un lato garantisce una transizione progressiva, dall’altro introduce un aumento esponenziale della complessità della base di codice. Il rischio, secondo alcuni sviluppatori, è che questi binding si diffondano in maniera incontrollata, portando a un kernel sempre più compartimentalizzato e difficile da gestire.

Un altro punto critico riguarda l’assenza di direttive precise su quando e dove utilizzare Rust. Attualmente, l’integrazione di Rust nei diversi sottosistemi sembra avvenire in modo disomogeneo, senza una strategia unitaria. Uno schema che, stando alle valutazioni dei detrattori, potrebbe portare a un kernel in cui coesistono moduli scritti in diversi linguaggi senza una chiara definizione delle best practice per ciascuno di essi. La mancanza di una politica chiara può aumentare il rischio di frammentazione del codice e rendere più difficile la manutenzione a lungo termine.

Rust come soluzione ai problemi di sicurezza?

Uno degli argomenti a favore dell’introduzione di Rust è la maggiore sicurezza della memoria rispetto al C. Tuttavia, se l’obiettivo principale è migliorare la sicurezza del kernel, alcuni sviluppatori suggeriscono che sarebbe più efficace investire in strumenti per rendere più sicuro il codice esistente. In questo senso, tecnologie come Thread Sanitizer o il controllo degli overflow degli interi potrebbero essere soluzioni più immediate e meno impattanti rispetto a un cambio di linguaggio.

Il rovescio della medaglia è che Rust introduce vantaggi concreti: non per niente Microsoft sta portando Rust nel kernel di Windows 11.

Rust previene errori di memoria come buffer overflow, use-after-free e race conditions senza bisogno di un garbage collector. Grazie al sistema di ownership e borrowing, il compilatore garantisce la gestione sicura della memoria riducendo verticalmente la possibilità di aggressione. Il tutto senza compromettere le prestazioni.

Nonostante le polemiche sull’adozione di Rust, che tra l’altro hanno portato il leader del progetto Asahi Linux, Hector Martin, ad abbandonare il suo ruolo, Linus Torvalds sembra a questo punto determinato a forzare la mano.

Ciononostante, l’adozione di Rust nel kernel Linux rappresenta un cambiamento epocale. Se l’obiettivo è migliorare la sicurezza e l’affidabilità del kernel, è fondamentale che la transizione avvenga con una strategia ben definita e con il supporto dell’intera comunità.

Il granchio come simbolo di Rust

Il simbolo non ufficiale di Rust è un granchio chiamato Ferris; il logo ufficiale di Rust è invece un ingranaggio con la lettera “R” al centro.

Ferris è una mascotte creata dalla community di Rust per rappresentare il linguaggio in modo più amichevole e riconoscibile. L’idea di usare un granchio come mascotte è nata perché i granchi camminano di lato, un concetto che può essere metaforicamente associato al modello basato su ownership e borrowing: in Rust le variabili devono rispettare regole precise senza poter essere duplicate o modificate arbitrariamente.

Ti consigliamo anche

Link copiato negli appunti