From: Matthew Wilcox <willy@infradead.org>
To: James Bottomley <James.Bottomley@hansenpartnership.com>
Cc: Kent Overstreet <kent.overstreet@linux.dev>,
lsf-pc@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org,
rust-for-linux@vger.kernel.org,
Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
Alice Ryhl <aliceryhl@google.com>,
Wedson Almeida Filho <wedsonaf@gmail.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>,
Kees Cook <keescook@chromium.org>, Gary Guo <gary@garyguo.net>,
Dave Chinner <dchinner@redhat.com>,
David Howells <dhowells@redhat.com>,
Ariel Miculas <amiculas@cisco.com>,
Paul McKenney <paulmck@kernel.org>
Subject: Re: [LSF/MM TOPIC] Rust
Date: Wed, 24 Jan 2024 15:43:38 +0000 [thread overview]
Message-ID: <ZbEwKjWxdD4HhcA_@casper.infradead.org> (raw)
In-Reply-To: <cf6a065636b5006235dbfcaf83ff9dbcc51b2d11.camel@HansenPartnership.com>
On Wed, Jan 24, 2024 at 09:26:34AM -0500, James Bottomley wrote:
> On Tue, 2024-01-23 at 19:09 +0000, Matthew Wilcox wrote:
> > > - The use of outside library code: Historically, C code was
> > > either written for userspace or the kernel, and not both. But
> > > that's not particularly true in Rust land (and getting to be less
> > > true even in C land); should we consider some sort of structure or
> > > (cough) package management? Is it time to move beyond ye olde cut-
> > > and-paste?
> >
> > Rust has a package manager. I don't think we need kCargo. I'm not
> > deep enough in the weeds on this to make sensible suggestions, but if
> > a package (eg a crypto suite or compression library) doesn't depend
> > on anything ridiculous then what's the harm in just pulling it in?
>
> The problem with this is that it leads to combinatoric explosions and
> multiple copies of everything[1].
OK, but why do we care? We still have buffer_heads in the kernel (v1.0
of the block layer abstraction) while also have bios, iomap and numerous
NIH in various filesystems. I don't even know if it's going to be
quantitatively worse.
> For crypto in particular the last
> thing you want to do is pull some random encryption routine off the
> internet, particularly if the kernel already supplies it because it's
> usually not properly optimized for your CPU and it makes it a nightmare
> to deduce the security properties of the system.
That seems like a strawman. Why is it _so_ much worse to have your kernel
compromised than your web browser, your email client, or your corporate
authentication provider? Why would we allow code in that pulls in random
shit from the internet instead of the vetted stuff on crates.io?
> However, there's nothing wrong with a vetted approach to this: keep a
> list of stuff rust needs, make sure it's properly plumbed in to the
> kernel routines (which likely necessitates package changes) and keep it
> somewhere everyone can use.
... like crates.io. Why are we better at this than they are?
> [1] just to support this point, I maintain a build of element-desktop
> that relies on node (which uses the same versioned package management
> style rust does). It pulls in 2115 packages of which 417 are version
> duplicates (same package but different version numbers).
I'd suggest that node.js has a very different approach from crates.io.
I don't see there being a rust left-pad.
next prev parent reply other threads:[~2024-01-24 15:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-23 4:23 [LSF/MM TOPIC] Rust Kent Overstreet
2024-01-23 19:09 ` Matthew Wilcox
2024-01-23 21:04 ` Boqun Feng
2024-01-24 14:26 ` James Bottomley
2024-01-24 15:43 ` Matthew Wilcox [this message]
2024-01-24 16:04 ` James Bottomley
2024-01-24 18:50 ` Kent Overstreet
2024-01-24 19:23 ` Morten Linderud
2024-01-24 19:43 ` James Bottomley
2024-01-24 19:57 ` Kent Overstreet
2024-01-25 3:47 ` James Bottomley
2024-01-25 9:24 ` Kent Overstreet
2024-01-25 21:30 ` James Bottomley
2024-01-23 22:58 ` David Howells
2024-01-24 3:57 ` Boqun Feng
2024-01-24 21:20 ` Kent Overstreet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZbEwKjWxdD4HhcA_@casper.infradead.org \
--to=willy@infradead.org \
--cc=James.Bottomley@hansenpartnership.com \
--cc=aliceryhl@google.com \
--cc=amiculas@cisco.com \
--cc=brauner@kernel.org \
--cc=dchinner@redhat.com \
--cc=dhowells@redhat.com \
--cc=gary@garyguo.net \
--cc=keescook@chromium.org \
--cc=kent.overstreet@linux.dev \
--cc=linux-fsdevel@vger.kernel.org \
--cc=lsf-pc@lists.linux-foundation.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=paulmck@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=wedsonaf@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).