From: "Arnd Bergmann" <arnd@arndb.de>
To: "Lee Jones" <lee@kernel.org>
Cc: linux-kernel@vger.kernel.org,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <benno.lossin@proton.me>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
rust-for-linux@vger.kernel.org
Subject: Re: [PATCH v4 2/4] samples: rust: Provide example using the new Rust MiscDevice abstraction
Date: Fri, 06 Dec 2024 11:04:57 +0100 [thread overview]
Message-ID: <57c35f7f-76e8-4e21-8288-c66a1b6e7069@app.fastmail.com> (raw)
In-Reply-To: <20241206090515.752267-5-lee@kernel.org>
On Fri, Dec 6, 2024, at 10:05, Lee Jones wrote:
> This sample driver demonstrates the following basic operations:
>
> * Register a Misc Device
> * Create /dev/rust-misc-device
> * Provide open call-back for the aforementioned character device
> * Operate on the character device via a simple ioctl()
> * Provide close call-back for the character device
>
> Signed-off-by: Lee Jones <lee@kernel.org>
Could you include a compat_ioctl() callback in the example?
I think it would be good to include it as a reminder for
authors of actual drivers that every driver implementing
ioctl should also implement compat_ioctl. In C drivers, this
can usually be done by pointing .compat_ioctl() to the
generic compat_ptr_ioctl() function, which assumes that 'arg'
is a pointer disguised as an 'unsigned long'.
Arnd
next prev parent reply other threads:[~2024-12-06 10:05 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-06 9:05 [PATCH v4 0/4] rust: miscdevice: Provide sample driver using the new MiscDevice bindings Lee Jones
2024-12-06 9:05 ` [PATCH v4 1/4] Documentation: ioctl-number: Carve out some identifiers for use by sample drivers Lee Jones
2024-12-06 9:05 ` [PATCH v3 1/5] rust: miscdevice: Provide accessor to pull out miscdevice::this_device Lee Jones
2024-12-06 10:25 ` Miguel Ojeda
2024-12-06 12:05 ` Lee Jones
2024-12-06 9:05 ` [PATCH v3 2/5] Documentation: ioctl-number: Carve out some identifiers for use by sample drivers Lee Jones
2024-12-06 9:05 ` [PATCH v4 2/4] samples: rust: Provide example using the new Rust MiscDevice abstraction Lee Jones
2024-12-06 9:29 ` Danilo Krummrich
2024-12-06 9:40 ` Alice Ryhl
2024-12-06 9:58 ` Danilo Krummrich
2024-12-06 10:04 ` Arnd Bergmann [this message]
2024-12-06 10:09 ` Alice Ryhl
2024-12-06 10:29 ` Arnd Bergmann
2024-12-06 10:40 ` Alice Ryhl
2024-12-06 11:15 ` Arnd Bergmann
2024-12-06 9:05 ` [PATCH v4 3/4] sample: rust_misc_device: Demonstrate additional get/set value functionality Lee Jones
2024-12-06 9:05 ` [PATCH v3 3/5] samples: rust: Provide example using the new Rust MiscDevice abstraction Lee Jones
2024-12-06 9:05 ` [PATCH v4 4/4] MAINTAINERS: Add Rust Misc Sample to MISC entry Lee Jones
2024-12-06 9:05 ` [PATCH v3 4/5] sample: rust_misc_device: Demonstrate additional get/set value functionality Lee Jones
2024-12-06 9:05 ` [PATCH v3 5/5] MAINTAINERS: Add Rust Misc Sample to MISC entry Lee Jones
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=57c35f7f-76e8-4e21-8288-c66a1b6e7069@app.fastmail.com \
--to=arnd@arndb.de \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=gary@garyguo.net \
--cc=gregkh@linuxfoundation.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
/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
all inboxes | Powered by JetHome®