All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benno Lossin <benno.lossin@proton.me>
To: Antonio Hickey <contact@antoniohickey.com>
Cc: a.hindborg@kernel.org, alex.gaynor@gmail.com,
	aliceryhl@google.com, bjorn3_gh@protonmail.com,
	boqun.feng@gmail.com, dakr@kernel.org, gary@garyguo.net,
	justinstitt@google.com, linux-kernel@vger.kernel.org,
	llvm@lists.linux.dev, morbo@google.com, nathan@kernel.org,
	nick.desaulniers+lkml@gmail.com, ojeda@kernel.org,
	rust-for-linux@vger.kernel.org, tmgross@umich.edu
Subject: Re: [PATCH v2] rust: uaccess: mark UserSliceWriter method inline
Date: Mon, 17 Mar 2025 15:06:51 +0000	[thread overview]
Message-ID: <D8IMV6MH4EVX.3BWHLLY5UGLC0@proton.me> (raw)
In-Reply-To: <20250316185439.913013-1-contact@antoniohickey.com>

On Sun Mar 16, 2025 at 7:54 PM CET, Antonio Hickey wrote:
> On Sun, Mar 16, 2025 at 05:47:40PM +0000, Benno Lossin wrote:
>> On Thu Mar 13, 2025 at 3:57 AM CET, Antonio Hickey wrote:
>> > When you build the kernel using the llvm-19.1.4-rust-1.83.0-x86_64
>> > toolchain provided by kernel.org with ARCH=x86_64, the following symbol
>> > is generated:
>> >
>> > $nm vmlinux | grep ' _R' | rustfilt | rg UserSliceWriter
>> > ffffffff817c3390 T <kernel::uaccess::UserSliceWriter>::write_slice
>> >
>> > However, this Rust symbol is a trivial wrapper around the function
>> > copy_to_user. It doesn't make sense to go through a trivial wrapper
>> > for this function, so mark it inline.
>> >
>> > After applying this patch, the above command will produce no output.
>> >
>> > Suggested-by: Alice Ryhl <aliceryhl@google.com>
>> > Link: https://github.com/Rust-for-Linux/linux/issues/1145
>> > Signed-off-by: Antonio Hickey <contact@antoniohickey.com>
>> 
>> What about the other methods (like `write` and `read`?) in this file?
>
> Hey Benno,
>
> The other methods in this file were handled with the patch
> linked below. This was one of my first patches, so I was
> unaware of patch sets and did 2 seperate patches.
>
> Link to other patch: https://lore.kernel.org/all/010001958798b97c-4da7647e-d0bc-4f81-9132-ad24353139cb-000000@email.amazonses.com/

Ah I see.

> Do you think it would be best to send these as new patch which
> includes both of these patches? also if so would it be ok to
> start that new patch set at v1 ?

I don't 100% know what to do here, maybe Miguel can help. Personally,
I'd think that another v1 is confusing, but I have seen people in the
past add patches to their already existing series (while incrementing
the version number). I think it's a good idea to merge the patches into
a single one that handles the entire file though.

> Sorry for the confusion I'm new to kernel dev and patches,
> but starting to get the hang of it now.

No worries.

---
Cheers,
Benno


  reply	other threads:[~2025-03-17 15:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-13  2:51 [PATCH] rust: uaccess: mark UserSliceWriter method inline Antonio Hickey
2025-03-13  2:57 ` [PATCH v2] " Antonio Hickey
2025-03-16 17:47   ` Benno Lossin
2025-03-16 18:54     ` Antonio Hickey
2025-03-17 15:06       ` Benno Lossin [this message]
2025-03-17 15:45         ` Miguel Ojeda

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=D8IMV6MH4EVX.3BWHLLY5UGLC0@proton.me \
    --to=benno.lossin@proton.me \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=contact@antoniohickey.com \
    --cc=dakr@kernel.org \
    --cc=gary@garyguo.net \
    --cc=justinstitt@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=nick.desaulniers+lkml@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.