[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <62371527c2a74bce82881a8a09d65e10@AcuMS.aculab.com>
Date: Wed, 14 Apr 2021 22:08:39 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Linus Torvalds' <torvalds@...ux-foundation.org>,
Matthew Wilcox <willy@...radead.org>
CC: "ojeda@...nel.org" <ojeda@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"rust-for-linux@...r.kernel.org" <rust-for-linux@...r.kernel.org>,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 00/13] [RFC] Rust support
From: Linus Torvalds
> Sent: 14 April 2021 21:22
>
> On Wed, Apr 14, 2021 at 1:10 PM Matthew Wilcox <willy@...radead.org> wrote:
> >
> > There's a philosophical point to be discussed here which you're skating
> > right over! Should rust-in-the-linux-kernel provide the same memory
> > allocation APIs as the rust-standard-library, or should it provide a Rusty
> > API to the standard-linux-memory-allocation APIs?
>
> Yeah, I think that the standard Rust API may simply not be acceptable
> inside the kernel, if it has similar behavior to the (completely
> broken) C++ "new" operator.
ISTM that having memory allocation failure cause a user process
to exit is a complete failure in something designed to run as
and kind of service program.
There are all sorts of reasons why malloc() might fail.
You almost never want a 'real' program to abort on one.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists