From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0337CC54731 for ; Tue, 27 Aug 2024 19:17:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 599AA6B0085; Tue, 27 Aug 2024 15:17:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 548C26B0088; Tue, 27 Aug 2024 15:17:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3C2286B0089; Tue, 27 Aug 2024 15:17:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 18CE86B0085 for ; Tue, 27 Aug 2024 15:17:45 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id BA59EA1783 for ; Tue, 27 Aug 2024 19:17:44 +0000 (UTC) X-FDA: 82498984848.18.137BB5F Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) by imf14.hostedemail.com (Postfix) with ESMTP id 845D8100010 for ; Tue, 27 Aug 2024 19:17:42 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="HZtepuD/"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf14.hostedemail.com: domain of boqun.feng@gmail.com designates 209.85.219.52 as permitted sender) smtp.mailfrom=boqun.feng@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1724786198; a=rsa-sha256; cv=none; b=hJ5miXdKho0k8An841OAVj98NGJzu74GrWbXij1s8PZUVkGem4kHdzN6y14DrVKCja5G/h d+sZPiO9IENe9PBnq4LtZ1tDWYIzeiL7beLJC/JHyLMBIKY2HO7EYQrYb5MyCPIb2MF2KT oLzT1qqad8YcLeDmcYHUcY1QMpDnH5s= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="HZtepuD/"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf14.hostedemail.com: domain of boqun.feng@gmail.com designates 209.85.219.52 as permitted sender) smtp.mailfrom=boqun.feng@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1724786198; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=YtFcWiFabVE+TEGEk7y46bKWyNtZQWsWB7C5BT2PA/c=; b=bnznuxrhM+QbUQotfK1QLz6W34VTJ0MvhJ+CY2lkE0W3cb/86w/FrERgyiDdOYL27IV2mg gF2Qhp3a72YuTJwPQ0qJqVpC/thcbx80URf6mR2MicxV8s4gBO23LBfMSGCCWJNjFY4g3I vRN42QYJNnantjhLey0UOetDkdrS3Hw= Received: by mail-qv1-f52.google.com with SMTP id 6a1803df08f44-6bf6beda038so32940786d6.2 for ; Tue, 27 Aug 2024 12:17:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724786261; x=1725391061; darn=kvack.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:from:to:cc:subject:date :message-id:reply-to; bh=YtFcWiFabVE+TEGEk7y46bKWyNtZQWsWB7C5BT2PA/c=; b=HZtepuD/3zY/UoGaC0oSkI4vz2YKjYrXX9eM+WjdQW6rVAryyhwIunD5Xyh7tQ3K/P SxS/8uVmcW2M1sDPGkyKfE539t8NJpscXRG/t20mJNKMNZyi9j6pxlbRvnGhQ6Rp0bl5 Nb6xreb34EI3OrZG8G8asqSLrGwZZ79qTFO3Psw4VLlFgXklFr4c+ufrRKFLbQIWByRL zmeOxVxa+MdHm5qZu8bmq2IGvq3O0nrGoL2rqHzOJp2fTfH80lCp+kBSnXgh8oqurFqV DcGtDwbcRlw8kWoneT8TK/lWDlfiNkwFzLVDMUfHkTwz1nmIYbo71VbzCxXvIn5OVHbi 4m0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724786261; x=1725391061; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YtFcWiFabVE+TEGEk7y46bKWyNtZQWsWB7C5BT2PA/c=; b=RJCbcI2FBLZ0gayG9I0lVLdhjelf7g3ABEspTy009OZen5Lb7MegZb0clnQoPDDyAL gj+1nCm5MbQUkLczfScBZoHACjKuoNMyXvlwERgiHuMUdw4wWM1igigmCIjxJB5rMPw6 z+SiYnqzPIg+g/Gvx3xuPjzlccqtUYzaJx9JKxn1Jx2ptBWQMQHXP0nEg69BgnURLFyJ WHUaNca7r4cwmk8PqMJSDPQEWd2NS6FiOJ46URFVIVTRYkaQxIvUHmUZFI0COBHdOavZ N60vfgzHZxFgqXsZwjeIrLiVBGtEw/MKdM56oHxEWDpMR+hlCyk6ktK6hqvVhKG0bxdI 6h8w== X-Forwarded-Encrypted: i=1; AJvYcCXMVW2LW3HPvDBNdAt6oMcyJZn29AjHbO2zpuHNis2aYHNGAMOrRvird+DM4aye/H7Nmnnpg0/gHQ==@kvack.org X-Gm-Message-State: AOJu0YySAV8MBxLfE7AYwbx9yLPKNzmRLAGBGmLLarIa/DcM5tl993rI IO1oNu/8H2vkvGT15DLz1eYszsw0BCDQCL67tRADvAiFAGmB+qVG X-Google-Smtp-Source: AGHT+IHljUkXfiqmQvnos9EPS/iO6ae2Q7hAsy57vVzJjX3TGKTCl9MUWNi2m2Zj+jSIKpDNBGIqKw== X-Received: by 2002:a0c:ea8d:0:b0:6c1:6ec9:605d with SMTP id 6a1803df08f44-6c16ec96164mr126616466d6.15.1724786261293; Tue, 27 Aug 2024 12:17:41 -0700 (PDT) Received: from fauth2-smtp.messagingengine.com (fauth2-smtp.messagingengine.com. [103.168.172.201]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6c162d29000sm59019426d6.10.2024.08.27.12.17.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Aug 2024 12:17:40 -0700 (PDT) Received: from phl-compute-02.internal (phl-compute-02.nyi.internal [10.202.2.42]) by mailfauth.nyi.internal (Postfix) with ESMTP id 2A9AE1200043; Tue, 27 Aug 2024 15:17:40 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Tue, 27 Aug 2024 15:17:40 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudeftddgudefgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpeffhffvvefukfhfgggtuggjsehttdertddttddv necuhfhrohhmpeeuohhquhhnucfhvghnghcuoegsohhquhhnrdhfvghnghesghhmrghilh drtghomheqnecuggftrfgrthhtvghrnhephfetvdfgtdeukedvkeeiteeiteejieehvdet heduudejvdektdekfeegvddvhedtnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsohhquhhn odhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdeigedqudejje ekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfihigmhgvrdhn rghmvgdpnhgspghrtghpthhtohepvdehpdhmohguvgepshhmthhpohhuthdprhgtphhtth hopegurghkrheskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepohhjvggurgeskhgvrhhn vghlrdhorhhgpdhrtghpthhtoheprghlvgigrdhgrgihnhhorhesghhmrghilhdrtghomh dprhgtphhtthhopeifvggushhonhgrfhesghhmrghilhdrtghomhdprhgtphhtthhopehg rghrhiesghgrrhihghhuohdrnhgvthdprhgtphhtthhopegsjhhorhhnfegpghhhsehprh hothhonhhmrghilhdrtghomhdprhgtphhtthhopegsvghnnhhordhlohhsshhinhesphhr ohhtohhnrdhmvgdprhgtphhtthhopegrrdhhihhnuggsohhrghesshgrmhhsuhhnghdrtg homhdprhgtphhtthhopegrlhhitggvrhihhhhlsehgohhoghhlvgdrtghomh X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 27 Aug 2024 15:17:39 -0400 (EDT) Date: Tue, 27 Aug 2024 12:17:15 -0700 From: Boqun Feng To: Danilo Krummrich Cc: ojeda@kernel.org, alex.gaynor@gmail.com, wedsonaf@gmail.com, gary@garyguo.net, bjorn3_gh@protonmail.com, benno.lossin@proton.me, a.hindborg@samsung.com, aliceryhl@google.com, akpm@linux-foundation.org, daniel.almeida@collabora.com, faith.ekstrand@collabora.com, boris.brezillon@collabora.com, lina@asahilina.net, mcanal@igalia.com, zhiw@nvidia.com, cjia@nvidia.com, jhubbard@nvidia.com, airlied@redhat.com, ajanulgu@redhat.com, lyude@redhat.com, linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v6 00/26] Generic `Allocator` support for Rust Message-ID: References: <20240816001216.26575-1-dakr@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240816001216.26575-1-dakr@kernel.org> X-Rspamd-Queue-Id: 845D8100010 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: g788bgbr76x53ttg9j5adxd5a3d1uxok X-HE-Tag: 1724786262-722336 X-HE-Meta: U2FsdGVkX1/3G6JltDKHiBj6iDIl3L0hX2EHDzdGb4MmG5EwgiyGHyFSDAcIs+dflNfjkkoDexBnK7y7ihJLC6GNYQCTnBoeFZVlgdOFSq3x6tUMBXHa+TCCzrBCzEdTJY8dtKFhp8oXDlxBUoUEeL922C5zVgc9zgVUCgPJC58m1U3M9MDC2hcL5KZC526RyykzcG5oMhukVf/j4SfEABzwNfZTUF5HXKv2SaTifxmE+juSkUY1L+qvWbYFqtdJDejLAmmFogUa+xO8yw4p5C4CkUBGgyKw1R9MStwMnE54iKAsuN7jhDHJyGjh8tj9Js8l3nMiZDgfc1W/rOdnzYZD1bnY15ilpo/A+8Hy8E704MILhl/1XwrlbU2qEXuRC08brJlVJSPlqeLHsVITXDqcJt17tosDOVIpkmkNGotMByvDQrRFjuIhKYrCpTpRzcNonrFhz5oSPfedWQ608CPTN9jDyu/tyzHMKrgs8R+KOUPNBXYLDIY7o8O1pIa9fBFq/t8AzMYZsCDx3Cjt2XXMEPww+hT78FAo+iXg8UgnmoB6GkyF5o037vHU3ynCeaD/FklqiUHhp1jVo1Kdc5hFqNeDGtnAMg5FSL7VB1y5HOjS8yh8/wxgIiTn0aqpZSUSRDybyzNGwWTxbsXz0/6+nmBRkGHZZTU5/6nsnZK/z4iw19gamXEduEuRfXiFcHvR1XI9lvh9H5YHjXfFKGml2v0t8Xjg/meIzatkTfbHmw5reN6HmvzXkVVbq+PuNS514js8B0F394AKvCNYY/Ho8CN7GNHFylMlaPOWUEP+R0Bpam66t4s/QmqRqHx+B6uPznLV6MbAVdzDRkJjcpy3XBf4ne+yKVIKfjQXaLXhjcNfik62RpYNKFLAZHXWLiydTTGjU/2VaYWkECOAiHpUe2jLjmD42sSL3xZel62viqFnDQesj+RQVgr4jqABlffVOACZ9YsccYmIJ1S yCObfItf PvO8OoOembuN2LfG+Dsti5Hvh7iVJki1Vh6bJfCzCaBQpA/MDzYzYyFWoOQbiT5sCZaCgutAECNHZL4SjN3A9VDKExyoFzccCKxTlag8GCfKChll4/Iiyh7gJfY8neMzk4c9aYPAsf8dB0fllZuA0mPeC7wzscGwlUKm6a7Hg0cXDbnDOLs0ye9Q/wzu+uubkDPusQvRLzOkY24oeUutGK92WN+xifaumIB3rBXDNLhHrkm5KUdsK5O8x2QN8yE1fsSLEaOcK4n2Q0wIH9MJ2QellPwFVAh2kE1g9vwgwpDBmCU+/WfTG/z8cc8P3sbxLyOASttuBvrj8pORaRzDfORT+Jf2cicE3ll3KGBj9gYiR3fRQOhx/lqnFy7UI/uHYdIm2DgkoUsqJA+pNXTnNgSYToXlBpJ8/e1RybkTg1dW/j6ScgoOOmDMb7btde3ZvC0V6futyHBCXJh/u3pb2laCa3MZeiF/GloZ3SXQYXzMOyyzf/qQZAgc0VF0bjsjR/eo4 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Fri, Aug 16, 2024 at 02:10:42AM +0200, Danilo Krummrich wrote: > Hi, > > This patch series adds generic kernel allocator support for Rust, which so far > is limited to `kmalloc` allocations. > > In order to abstain from (re-)adding unstable Rust features to the kernel, this > patch series does not extend the `Allocator` trait from Rust's `alloc` crate, > nor does it extend the `BoxExt` and `VecExt` extensions. > > Instead, this series introduces a kernel specific `Allocator` trait, which is > implemented by the `Kmalloc`, `Vmalloc` and `KVmalloc` allocators, also > implemented in the context of this series. > > As a consequence we need our own kernel `Box` and `Vec` types. > Additionally, this series adds the following type aliases: > > ``` > pub type KBox = Box; > pub type VBox = Box; > pub type KVBox = Box; > > > pub type KVec = Vec; > pub type VVec = Vec; > pub type KVVec = Vec; > ``` > > With that, we can start using the kernel `Box` and `Vec` types throughout the > tree and remove the now obolete extensions `BoxExt` and `VecExt`. > > For a final cleanup, this series removes the last minor dependencies to Rust's > `alloc` crate and removes it from the entire kernel build. > > The series ensures not to break the `rusttest` make target by implementing the > `allocator_test` module providing a stub implementation for all kernel > `Allocator`s. > > This patch series passes all KUnit tests, including the ones added by this > series. Additionally, the tests were run with `kmemleak` and `KASAN` enabled, > without any issues. > > This series is based on [1], which hit -mm/mm-unstable, and is also available > in [2]. > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/dakr/linux.git/log/?h=mm/krealloc > [2] https://git.kernel.org/pub/scm/linux/kernel/git/dakr/linux.git/log/?h=rust/mm > Finally managed to apply this on rust-dev ;-) A few things I resolved, JFYI: * Resolve the conflicts between patch 6 & 7 and the helper split, note that the vmalloc() helper temporarily lives in a file called `slab.c`. * Adjust patch 9 with the introduction of InPlaceInit::PinnedSelf, also drop the ForeignOwnable::borrow_mut() implemenation. * Resolve the conflict between patch 10 and the latest rbtree patchset (v12). * Adjust patch 11 with the introduction of InPlaceInit::PinnedSelf. * Resolve the conflicts between patch 25 and the helper split. (very likely I could make mistakes during these conflict resolution, just let me know) I've put this on the rust-dev based on today's rust-next (+ your mm changes) for testing, will continue to review the series, thanks! Regards, Boqun > Changes in v6: > - rebase onto rust-dev > - keep compiler annotations for {k,v,kv}realloc() > - documentation changes suggested by Alice, Benno > - remove `Box::into_pin` > - fix typo in `Send` and `Sync` for `Box` and `Vec` > - `kvec!` changes suggested by Alice > - free `src` after copy in `Cmalloc` > - handle `n == 0` in `Vec::extend_with` > > Changes in v5: > - (safety) comment / documentation fixes suggested by Alice, Benno and Gary > - remove `Unique` and implement `Send` and `Sync` for `Box` and `Vec` > - use `KMALLOC_MAX_SIZE` for `KVmalloc` test and add a `Kmalloc` test that > expects to fail for `KMALLOC_MAX_SIZE` > - create use constants `KREALLOC`, `VREALLOC` and `KVREALLOC` for > `ReallocFuncs` > - drop `Box::drop_contents` for now, will add it again, once I actually rebase > on the original patch that introduces it > - improve usage of `size_of_val` in `Box` > - move `InPlaceInit` and `ForeignOwnable` impls into kbox.rs > - fix missing `Box` conversions in rnull.rs > - reworked `Cmalloc` to keep track of the size of memory allocations itself > - remove `GlobalAlloc` together with the `alloc` crate to avoid a linker error > - remove `alloc` from scripts/generate_rust_analyzer.py > > Changes in v4: > - (safety) comment fixes suggested by Alice and Boqun > - remove `Box::from_raw_alloc` and `Box::into_raw_alloc`, we don't need them > - in `Box::drop` call `size_of_val` before `drop_in_place` > - implement ForeignOwnable for Pin> as suggested by Alice > - in `Vec::extend_with`, iterate over `n` instead of `spare.len()` > - for `Vmalloc` and `KVmalloc` fail allocation for alignments larger than > PAGE_SIZE for now (will add support for larger alignments in a separate > series) > - implement `Cmalloc` in `allocator_test` and type alias all kernel allocator > types to it, such that we can use the kernel's `Box` and `Vec` types in > userspace tests (rusttest) > - this makes patch "rust: str: test: replace `alloc::format`" rather trivial > > Changes in v3: > - Box: > - minor documentation fixes > - removed unnecessary imports in doc tests > - dropeed `self` argument from some remaining `Box` methods > - implement `InPlaceInit` for Box rather than specifically for `KBox` > - Vec: > - minor documentation fixes > - removed useless `Vec::allocator` method > - in `Vec::extend_with` use `Vec::spare_capacity_mut` instead of raw pointer operations > - added a few missing safety comments > - pass GFP flags to `Vec::collect` > - fixed a rustdoc warning in alloc.rs > - fixed the allocator_test module to implement the `Allocator` trait correctly > - rebased to rust-next > > Changes in v2: > - preserve `impl GlobalAlloc for Kmalloc` and remove it at the end (Benno) > - remove `&self` parameter from all `Allocator` functions (Benno) > - various documentation fixes for `Allocator` (Benno) > - use `NonNull` for `Allocator::free` and `Option>` for > `Allocator::realloc` (Benno) > - fix leak of `IntoIter` in `Vec::collect` (Boqun) > - always realloc (try to shrink) in `Vec::collect`, it's up the the > `Allocator` to provide a heuristic whether it makes sense to actually shrink > - rename `KBox` -> `Box` and `KVec` -> `Vec` and > provide type aliases `KBox`, `VBox`, `KVBox`, etc. > - This allows for much cleaner code and, in combination with removing > `&self` parameters from `Allocator`s, gets us rid of the need for > `Box::new` and `Box::new_alloc` and all other "_alloc" postfixed > functions. > - Before: `KBox::new_alloc(foo, Vmalloc)?` > - After: `VBox::new(foo)?`, which resolves to > `Box::::new(foo)?; > > > Danilo Krummrich (26): > rust: alloc: add `Allocator` trait > rust: alloc: separate `aligned_size` from `krealloc_aligned` > rust: alloc: rename `KernelAllocator` to `Kmalloc` > rust: alloc: implement `Allocator` for `Kmalloc` > rust: alloc: add module `allocator_test` > rust: alloc: implement `Vmalloc` allocator > rust: alloc: implement `KVmalloc` allocator > rust: alloc: add __GFP_NOWARN to `Flags` > rust: alloc: implement kernel `Box` > rust: treewide: switch to our kernel `Box` type > rust: alloc: remove `BoxExt` extension > rust: alloc: add `Box` to prelude > rust: alloc: implement kernel `Vec` type > rust: alloc: implement `IntoIterator` for `Vec` > rust: alloc: implement `collect` for `IntoIter` > rust: treewide: switch to the kernel `Vec` type > rust: alloc: remove `VecExt` extension > rust: alloc: add `Vec` to prelude > rust: error: use `core::alloc::LayoutError` > rust: error: check for config `test` in `Error::name` > rust: alloc: implement `contains` for `Flags` > rust: alloc: implement `Cmalloc` in module allocator_test > rust: str: test: replace `alloc::format` > rust: alloc: update module comment of alloc.rs > kbuild: rust: remove the `alloc` crate and `GlobalAlloc` > MAINTAINERS: add entry for the Rust `alloc` module > > MAINTAINERS | 7 + > drivers/block/rnull.rs | 4 +- > rust/Makefile | 44 +- > rust/bindings/bindings_helper.h | 1 + > rust/exports.c | 1 - > rust/helpers.c | 15 + > rust/kernel/alloc.rs | 142 ++++- > rust/kernel/alloc/allocator.rs | 173 ++++-- > rust/kernel/alloc/allocator_test.rs | 185 ++++++ > rust/kernel/alloc/box_ext.rs | 80 --- > rust/kernel/alloc/kbox.rs | 480 +++++++++++++++ > rust/kernel/alloc/kvec.rs | 891 ++++++++++++++++++++++++++++ > rust/kernel/alloc/vec_ext.rs | 185 ------ > rust/kernel/error.rs | 6 +- > rust/kernel/init.rs | 93 +-- > rust/kernel/init/__internal.rs | 2 +- > rust/kernel/lib.rs | 1 - > rust/kernel/prelude.rs | 5 +- > rust/kernel/rbtree.rs | 34 +- > rust/kernel/str.rs | 35 +- > rust/kernel/sync/arc.rs | 17 +- > rust/kernel/sync/condvar.rs | 4 +- > rust/kernel/sync/lock/mutex.rs | 2 +- > rust/kernel/sync/lock/spinlock.rs | 2 +- > rust/kernel/sync/locked_by.rs | 2 +- > rust/kernel/types.rs | 30 +- > rust/kernel/uaccess.rs | 17 +- > rust/kernel/workqueue.rs | 20 +- > rust/macros/lib.rs | 12 +- > samples/rust/rust_minimal.rs | 4 +- > scripts/Makefile.build | 7 +- > scripts/generate_rust_analyzer.py | 11 +- > 32 files changed, 1973 insertions(+), 539 deletions(-) > create mode 100644 rust/kernel/alloc/allocator_test.rs > delete mode 100644 rust/kernel/alloc/box_ext.rs > create mode 100644 rust/kernel/alloc/kbox.rs > create mode 100644 rust/kernel/alloc/kvec.rs > delete mode 100644 rust/kernel/alloc/vec_ext.rs > > > base-commit: f005c686d6c1a2e66f2f9d21179d6b6bd45b20e2 > -- > 2.46.0 >