From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF50A4D8C8; Thu, 26 Sep 2024 15:36:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727365005; cv=none; b=qeSP387rb2PV8XW4cw4uwv8iZrT1KUKEsFt2SgEKK/flaPuDTeADpKrdwlL0K+YGkk2zn7CfkCbzXq39syGA3Lq6pCFetKkia+hpinJXmuS+gKJEb2V+/CZxwW0Nmlpvr8oy5HqvI2W0A2g0Sv0eVo820pJxBab2MKcAHjN4QeY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727365005; c=relaxed/simple; bh=MnHn5Un5GctlEYw8FQfVsnDO6azbNmYGLMtZ416WHA8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TdZpeZR8te6KtTJX7MrHu5srBAWGaM65vqooga+55vHk4H1MeezNSG8DZq38iYKSdRSQbSGPLvrETVlDBvp9BqhGlpOvuhoyxP9/qa1zygL6faBsdfkhE0CH7pQOgexfFTmt0Hl9t9c4VOOKMrn0ZArQrzBvDu8o6HBppmLY57Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=qBOdu2mQ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="qBOdu2mQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17978C4CEC5; Thu, 26 Sep 2024 15:36:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1727365004; bh=MnHn5Un5GctlEYw8FQfVsnDO6azbNmYGLMtZ416WHA8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qBOdu2mQaW34VK0viO1CHr5mi7XaLWDsdmQj2Llx95tsJec3C1IqknVDGCsoK+fqA E+EQUeVouFnJ3ljflOzTf85FnnQEFOMTwc15jRFIJ481Mj33Sr32CVpQutCjg9zDve i6huG2wAlwqAeupmGmUnTbsdkq8YKSIV0AB3e+og= Date: Thu, 26 Sep 2024 17:36:41 +0200 From: Greg Kroah-Hartman To: Alice Ryhl Cc: Arnd Bergmann , Miguel Ojeda , Alexander Viro , Christian Brauner , Jan Kara , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Trevor Gross , rust-for-linux@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/3] Miscdevices in Rust Message-ID: <2024092657-snorkel-unmovable-7a6a@gregkh> References: <20240926-b4-miscdevice-v1-0-7349c2b2837a@google.com> <2024092647-subgroup-aqueduct-ec24@gregkh> Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, Sep 26, 2024 at 05:20:15PM +0200, Alice Ryhl wrote: > On Thu, Sep 26, 2024 at 5:05 PM Greg Kroah-Hartman > wrote: > > > > On Thu, Sep 26, 2024 at 02:58:54PM +0000, Alice Ryhl wrote: > > > A misc device is generally the best place to start with your first Rust > > > driver, so having abstractions for miscdevice in Rust will be important > > > for our ability to teach Rust to kernel developers. > > > > > > I intend to add a sample driver using these abstractions, and I also > > > intend to use it in Rust Binder to handle the case where binderfs is > > > turned off. > > > > > > I know that the patchset is still a bit rough. It could use some work on > > > the file position aspect. But I'm sending this out now to get feedback > > > on the overall approach. > > > > Very cool! > > > > > This patchset depends on files [1] and vma [2]. > > > > > > Link: https://lore.kernel.org/all/20240915-alice-file-v10-0-88484f7a3dcf@google.com/ [1] > > > Link: https://lore.kernel.org/all/20240806-vma-v5-1-04018f05de2b@google.com/ [2] > > > Signed-off-by: Alice Ryhl > > > > Does it really need all of those dependencies? I know your development > > stack is deep here, but maybe I can unwind a bit of the file stuff to > > get this in for the next merge window (6.13-rc1) if those two aren't > > going to be planned for there. > > Ah, maybe not. The dependency on files is necessary to allow the file > to look at its own fields, e.g. whether O_NONBLOCK is set or what the > file position is. But we can take that out for now and add it once > both miscdevice and file have landed. I'm hoping that file will land > for 6.13, but untangling them allows both to land in 6.13. > > As for vma, it's needed for mmap, but if I take out the ability to > define an mmap operation, I don't need it. We can always add back mmap > once both miscdevice and vma have landed. Yes, let's drop the mmap interface for now, and probably the seek stuff too as most "normal" misc devices do not mess with them at all. If that makes the dependencies simpler, that would be great. thanks, greg k-h