rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
To: ManeraKai <manerakai@protonmail.com>
Cc: "aliceryhl@google.com" <aliceryhl@google.com>,
	"arnd@arndb.de" <arnd@arndb.de>,
	"rust-for-linux@vger.kernel.org" <rust-for-linux@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] rust: miscdevice: Moved `MiscDevice` to a more general abstraction
Date: Thu, 18 Sep 2025 17:00:32 +0200	[thread overview]
Message-ID: <2025091803-rephrase-deepen-52fd@gregkh> (raw)
In-Reply-To: <20250918144356.28585-2-manerakai@protonmail.com>

On Thu, Sep 18, 2025 at 02:45:28PM +0000, ManeraKai wrote:
> This new general abstraction is called `FileOperations`.
> 
> `struct file_operations` is not only meant for misc. Its methods are
> accessible from any other driver type. This change, however, doesn't
> generalize the safe wrapping for all driver types, but rather just the
> method declarations. The actual safe wrappings are left for every driver
> type to implement. This may make each implementation simpler. For
> example, misc can choose not to implement the safe wrapping for `lock`,
> `sendfile`, or `sendpage`, since they have no use in misc drivers.

This has come up many times, but we really are not "ready" for a generic
file operations export.  Let's keep this just for misc for now, until we
have another use for it, as the interaction with the vfs is tricky and
subtle and full of corner cases (see the debugfs bindings for lots of
examples here.)

So for a misc device, let's just stick with what we have for now.

> Signed-off-by: ManeraKai <manerakai@protonmail.com>

Nit, we need a full name please.

thanks,

greg k-h

  reply	other threads:[~2025-09-18 15:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-18 14:44 [PATCH 0/3] rust: miscdevice: Extending the abstraction ManeraKai
2025-09-18 14:45 ` [PATCH 1/3] rust: miscdevice: Moved `MiscDevice` to a more general abstraction ManeraKai
2025-09-18 15:00   ` gregkh [this message]
2025-09-18 14:45 ` [PATCH 2/3] rust: miscdevice: Implemented `read` and `write` ManeraKai
2025-09-18 14:59   ` gregkh
2025-09-18 15:06     ` gregkh
2025-09-18 15:57       ` ManeraKai
2025-09-18 15:15   ` Alice Ryhl
2025-09-18 17:22     ` ManeraKai
2025-09-18 17:24       ` Alice Ryhl
2025-09-18 14:45 ` [PATCH 3/3] samples: rust: Updated the example using the Rust MiscDevice abstraction ManeraKai
2025-09-18 15:01   ` gregkh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2025091803-rephrase-deepen-52fd@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=aliceryhl@google.com \
    --cc=arnd@arndb.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manerakai@protonmail.com \
    --cc=rust-for-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).