Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp2533520imn; Tue, 2 Aug 2022 06:38:24 -0700 (PDT) X-Google-Smtp-Source: AA6agR7Cw1ZYrka2yK8XjMDUpO86OI0TfBWfX5Ao9oeyd61a08qzLGVFoO2QPIp9sq1UwgjZoYEP X-Received: by 2002:aa7:c946:0:b0:43d:3038:1381 with SMTP id h6-20020aa7c946000000b0043d30381381mr18631275edt.354.1659447503871; Tue, 02 Aug 2022 06:38:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659447503; cv=none; d=google.com; s=arc-20160816; b=UTn7tLme4IDwcQ/EMORhaf/OLl96f4WG08JUVC7lowR9O4NXN+R0aje8o/U/g6iAK7 gJk3VVqH23KIDUwrBFhQQUSC/gAukRGMl60d7Mvt4MG7sOmMAhR9MgqGvMKUlLHOrq7Y C8bvFK2CpEir6nf2YRQig86Qcjq9yh1u8s6VKf0foLo8+6PEf2HuQ4y/Ln6dbaGGz1X8 uqdlwp+KZpwcL9EHrRMYWA8d1GE6lLR8ZKCCClTI4JpcCx9dPYQIrRwYb4Tm6NWwMfme YkcGodP9dW/0SFUhj3B4uqY456ImW+ACzJg3970KKMReH1CH2sqrBYYPYS4VOYrXWLM2 2L6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=P2j0ynFm86raUFU3uvr/rNlX2jtChToiD/lsPZ8CPS8=; b=bwuIU8pxivtrIPPYR1edmOyk4fluLUnqJMrvn0QUUujGZ+Zjuc4mZvA4y9p2YcR44T gZmwrLQL97TAy5pVKJYmC7+ZAgIpCJ9pIx7fZoCHLqjKsPkGH3w4y8SVhS8PEyTlFEBh UyAkSp6Wvi2MdghNU92D0o4RWougijmPs2QDtKTQv3UflPU2gnQ5ETul8PpPv6VLUqO0 nIkRcybJqYkAby53rgtvi6WeihFlwN1O91l1D9Hvy5T87RDi161f/L/l6E5qfGd9Zghm GI+U317Din1l9jZJ6wdW3xnYw2RM+rZBw/UFQ3WJDYQ83USVkyzX4o69JpgqYr2g4OY2 S56w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xXsbUmWp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc16-20020a170907169000b0073097095cd4si2921073ejc.38.2022.08.02.06.37.58; Tue, 02 Aug 2022 06:38:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xXsbUmWp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236551AbiHBNec (ORCPT + 99 others); Tue, 2 Aug 2022 09:34:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232569AbiHBNe3 (ORCPT ); Tue, 2 Aug 2022 09:34:29 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD76717E3A; Tue, 2 Aug 2022 06:34:27 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3CF5EB81EFB; Tue, 2 Aug 2022 13:34:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F88AC433C1; Tue, 2 Aug 2022 13:34:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1659447264; bh=FtHGa4GAb7Wv5gMgYrY9d3VJP1ZXtm3ZJZTT33K2diY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=xXsbUmWphF15LCQVZteM5bYujnkwxYbOryBRiGJSVPbtnM4uQ9xB93UUKwATZx/Lr yZIgc+tyBC+atNhr+0msSXNKjYAFtnDj8xPrqlI1JbhvD+1F9oFb3uEX0zEjndtdAQ S52uK9l/0UQFbcDQZcNFy6AisNEC/Oc0+qDyRcwc= Date: Tue, 2 Aug 2022 15:34:22 +0200 From: Greg Kroah-Hartman To: Miguel Ojeda Cc: Linus Torvalds , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, Jarkko Sakkinen , Wedson Almeida Filho , Alex Gaynor , Geoffrey Thomas , Finn Behrens , Adam Bratschi-Kaye , Michael Ellerman , Sumera Priyadarsini , Sven Van Asbroeck , Gary Guo , Boris-Chengbiao Zhou , Boqun Feng , Fox Chen , Dan Robertson , Viktor Garske , Dariusz Sosnowski , =?iso-8859-1?B?TOlv?= Lanteri Thauvin , Niklas Mohrin , Gioh Kim , Daniel Xu , Milan Landaverde , Morgan Bartlett , Maciej Falkowski , Jiapeng Chong , =?iso-8859-1?Q?N=E1ndor_Istv=E1n_Kr=E1cser?= , David Gow , John Baublitz , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron Subject: Re: [PATCH v8 17/31] rust: add `kernel` crate Message-ID: References: <20220802015052.10452-1-ojeda@kernel.org> <20220802015052.10452-18-ojeda@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220802015052.10452-18-ojeda@kernel.org> X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 02, 2022 at 03:50:04AM +0200, Miguel Ojeda wrote: > From: Wedson Almeida Filho > > The `kernel` crate currently includes all the abstractions that wrap > kernel features written in C. > > These abstractions call the C side of the kernel via the generated > bindings with the `bindgen` tool. Modules developed in Rust should > never call the bindings themselves. > > In the future, as the abstractions grow in number, we may need > to split this crate into several, possibly following a similar > subdivision in subsystems as the kernel itself and/or moving > the code to the actual subsystems. > > Co-developed-by: Alex Gaynor > Signed-off-by: Alex Gaynor > Co-developed-by: Geoffrey Thomas > Signed-off-by: Geoffrey Thomas > Co-developed-by: Finn Behrens > Signed-off-by: Finn Behrens > Co-developed-by: Adam Bratschi-Kaye > Signed-off-by: Adam Bratschi-Kaye > Co-developed-by: Michael Ellerman > Signed-off-by: Michael Ellerman > Co-developed-by: Sumera Priyadarsini > Signed-off-by: Sumera Priyadarsini > Co-developed-by: Sven Van Asbroeck > Signed-off-by: Sven Van Asbroeck > Co-developed-by: Gary Guo > Signed-off-by: Gary Guo > Co-developed-by: Boris-Chengbiao Zhou > Signed-off-by: Boris-Chengbiao Zhou > Co-developed-by: Boqun Feng > Signed-off-by: Boqun Feng > Co-developed-by: Fox Chen > Signed-off-by: Fox Chen > Co-developed-by: Dan Robertson > Signed-off-by: Dan Robertson > Co-developed-by: Viktor Garske > Signed-off-by: Viktor Garske > Co-developed-by: Dariusz Sosnowski > Signed-off-by: Dariusz Sosnowski > Co-developed-by: L?o Lanteri Thauvin > Signed-off-by: L?o Lanteri Thauvin > Co-developed-by: Niklas Mohrin > Signed-off-by: Niklas Mohrin > Co-developed-by: Gioh Kim > Signed-off-by: Gioh Kim > Co-developed-by: Daniel Xu > Signed-off-by: Daniel Xu > Co-developed-by: Milan Landaverde > Signed-off-by: Milan Landaverde > Co-developed-by: Morgan Bartlett > Signed-off-by: Morgan Bartlett > Co-developed-by: Maciej Falkowski > Signed-off-by: Maciej Falkowski > Co-developed-by: Jiapeng Chong > Signed-off-by: Jiapeng Chong > Co-developed-by: N?ndor Istv?n Kr?cser > Signed-off-by: N?ndor Istv?n Kr?cser > Co-developed-by: David Gow > Signed-off-by: David Gow > Co-developed-by: John Baublitz > Signed-off-by: John Baublitz > Co-developed-by: Bj?rn Roy Baron > Signed-off-by: Bj?rn Roy Baron > Signed-off-by: Wedson Almeida Filho > Co-developed-by: Miguel Ojeda > Signed-off-by: Miguel Ojeda > --- > rust/kernel/allocator.rs | 64 ++ > rust/kernel/amba.rs | 261 +++++++ > rust/kernel/build_assert.rs | 83 +++ > rust/kernel/chrdev.rs | 206 ++++++ > rust/kernel/clk.rs | 79 ++ > rust/kernel/cred.rs | 46 ++ > rust/kernel/delay.rs | 104 +++ > rust/kernel/device.rs | 527 ++++++++++++++ > rust/kernel/driver.rs | 442 +++++++++++ > rust/kernel/error.rs | 564 ++++++++++++++ > rust/kernel/file.rs | 887 +++++++++++++++++++++++ > rust/kernel/fs.rs | 846 +++++++++++++++++++++ > rust/kernel/fs/param.rs | 553 ++++++++++++++ > rust/kernel/gpio.rs | 505 +++++++++++++ > rust/kernel/hwrng.rs | 210 ++++++ > rust/kernel/io_buffer.rs | 153 ++++ > rust/kernel/io_mem.rs | 278 +++++++ > rust/kernel/iov_iter.rs | 81 +++ > rust/kernel/irq.rs | 681 +++++++++++++++++ > rust/kernel/kasync.rs | 50 ++ > rust/kernel/kasync/executor.rs | 154 ++++ > rust/kernel/kasync/executor/workqueue.rs | 291 ++++++++ > rust/kernel/kasync/net.rs | 322 ++++++++ > rust/kernel/kunit.rs | 91 +++ > rust/kernel/lib.rs | 267 +++++++ > rust/kernel/linked_list.rs | 247 +++++++ > rust/kernel/miscdev.rs | 290 ++++++++ > rust/kernel/mm.rs | 149 ++++ > rust/kernel/module_param.rs | 499 +++++++++++++ > rust/kernel/net.rs | 392 ++++++++++ > rust/kernel/net/filter.rs | 447 ++++++++++++ > rust/kernel/of.rs | 63 ++ > rust/kernel/pages.rs | 144 ++++ > rust/kernel/platform.rs | 223 ++++++ > rust/kernel/power.rs | 118 +++ > rust/kernel/prelude.rs | 36 + > rust/kernel/print.rs | 406 +++++++++++ > rust/kernel/random.rs | 42 ++ > rust/kernel/raw_list.rs | 361 +++++++++ > rust/kernel/rbtree.rs | 563 ++++++++++++++ > rust/kernel/revocable.rs | 425 +++++++++++ > rust/kernel/security.rs | 38 + > rust/kernel/static_assert.rs | 34 + > rust/kernel/std_vendor.rs | 161 ++++ > rust/kernel/str.rs | 597 +++++++++++++++ > rust/kernel/sync.rs | 48 +- > rust/kernel/sysctl.rs | 199 +++++ > rust/kernel/task.rs | 239 ++++++ > rust/kernel/types.rs | 705 ++++++++++++++++++ > rust/kernel/unsafe_list.rs | 680 +++++++++++++++++ > rust/kernel/user_ptr.rs | 175 +++++ > rust/kernel/workqueue.rs | 512 +++++++++++++ > 52 files changed, 15518 insertions(+), 20 deletions(-) This is huge for a single commit, and pretty much impossible to review as-is. Any chance you can turn this into a series of commits, that starts with the basics and builds on top of that? Right now you are mixing many many different subsystems all at once into one commit, guaranteeing that no one can review the whole thing properly :( thanks, greg k-h