lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72mv2uYe1x6cy4zUq8XHhAZcYYpt6hVXMG4yQZeqw1kY7Q@mail.gmail.com>
Date:   Tue, 11 Apr 2023 14:36:01 +0200
From:   Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To:     Hans Petter Selasky <hps@...asky.org>
Cc:     Daniel Almeida <daniel.almeida@...labora.com>, wedsonaf@...il.com,
        ojeda@...nel.org, mchehab@...nel.org, hverkuil@...all.nl,
        rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-media@...r.kernel.org, kernel@...labora.com
Subject: Re: [PATCH 0/6] Initial Rust V4L2 support

On Tue, Apr 11, 2023 at 11:52 AM Hans Petter Selasky <hps@...asky.org> wrote:
>
> Assume you need to update both the kernel and the rust compiler at the
> same time. How do you do that? In the binary download case you have two
> machines. One to build rust and one to build the kernel, so it is
> technically not possible?

I don't understand the problem -- you can build (or download) new
toolchains without changing the kernel, and you can keep several
kernels and several toolchains installed, too.

> I'll give you a real-life example to emphasis this. Apple and Microsoft
> has done something very bad in the file system area. They mistreat what
> happens to be the Norwegian character "å" (0xE5). Norway is where I
> live. Their solution is to split the "å" character into the "a"
> character (0x61) and the combining ring-over character (0x30A).

Sorry, but I don't see how all that relates to the current discussion (kernel).

> Daniel and Miguel: By saying it is not a good thing to build systems
> completely from source,

I haven't said that at all. I regularly build from source myself, in fact.

> For people that build stuff on their laptops it still matters. If you
> have a beefy machine, it is a different case.

I don't follow. You said you are downloading 100s of GiB for XCode,
but you are not OK with 100s of MiBs for Rust?

Anyway, both the Rust toolchain and the kernel can be built on laptops
(I do so), and they don't need to be the highest end ones at all.

> I thought that Rust didn't allow you to write outside the bounds of
> arrays, similarly to the old Turbo Pascal language?

It avoids all UB, including data races, not just out-of-bounds
accesses, as long as the unsafe parts are sound (and there are no
compiler bugs etc.). Which is one of the main reasons we want it in
the kernel.

> If there could be one base compiler and toolchain, I would be happy.

If you mean a single vendor, then it may be interesting for you that
GCC will include Rust support in future releases. It remains to be
seen when their compiler is ready for building the kernel parts, but
it is one of their goals as far as I understand.

> Right, so think about where that slowness may end up one day, if you
> suddenly need to re-build everything from sources so to say :-)

If you want to build everything from source, then you will need some
CPU time to do so. That is just how things work. Most people will just
use the toolchain from their distribution.

> Thanks for your input!

Not at all, thanks for your input too :)

Cheers,
Miguel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ