From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-4322.protonmail.ch (mail-4322.protonmail.ch [185.70.43.22]) (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 3DF8F2236FD for ; Mon, 17 Mar 2025 15:07:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.43.22 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742224021; cv=none; b=CrLyzUzikQw/aAoSyHrI+S1hwPN7eoGpOh185DFwWPflPmtZKQ/zYHHo7ZjCVGbepJ5/pVMoYFKVjsCPmcCUdd0dox1Sij0oAzAQhf1RVXTn7u4Nb/LzK7QXZL+sKfynI3hM6p+9yGgAUSwv+pg/qf+m5bqVjWPZVP8n0kc7mS8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742224021; c=relaxed/simple; bh=SnfkXWnpxDUvaevMyD1OEmjq28ap9kFJGa4zZ0H+LVo=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=uYlZsQVIMNJmkYmde4L9zyrVQVedZBh/ARyN9hJmDhTk4qO5IjbgaKW2GGDkcjqRrnMpAlzNrEp7iNIzvqRhduwtuSRW9iBcZouSJEASYeqCvBhFdxqo3UZcG4dclcR0M29KZj3+iZsj9+4OIn3eVD2uuMFBVzKZW2b//KNzImM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me; spf=pass smtp.mailfrom=proton.me; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b=SUN/e+Em; arc=none smtp.client-ip=185.70.43.22 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=proton.me Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b="SUN/e+Em" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1742224018; x=1742483218; bh=SnfkXWnpxDUvaevMyD1OEmjq28ap9kFJGa4zZ0H+LVo=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=SUN/e+Em6PY0C4IgZtPNyXcgBju87M0js2sq7QjSugEWRp4J5TI2mlG/K8PiDkZBy oWW0s+l5+IPPOYXOGB8dz73vSvrfu8qBlBfYCQg+YM4tKSbhhXAwlJ8ci3hmrzBkfd iLsFTB+doCNTsrsw5oY9A+sVLhDaCzaNZ519zj2muvspv1uDb8kUbYtIRYjDQA3fxZ kpZf04IqIFFVHlDG1y48H0I2xfBGx3rrYeRsc8h2zlBvLq85ipEplXYPg+4v0NdigR 4bSCypgahAdecC3+Tu4Bj0Zf/lkK5uhRA8JDe4KpzJLbda+JS0zNCSJsFXIbyk5wCr DqMMKhAR0w9qw== Date: Mon, 17 Mar 2025 15:06:51 +0000 To: Antonio Hickey From: Benno Lossin 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 Message-ID: In-Reply-To: <20250316185439.913013-1-contact@antoniohickey.com> References: <20250316185439.913013-1-contact@antoniohickey.com> Feedback-ID: 71780778:user:proton X-Pm-Message-ID: cb721d3e4912cf4cfc2f0722b4ac03cd556c493c Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=3Dx86_64, the following sym= bol >> > is generated: >> > >> > $nm vmlinux | grep ' _R' | rustfilt | rg UserSliceWriter >> > ffffffff817c3390 T ::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 >> > Link: https://github.com/Rust-for-Linux/linux/issues/1145 >> > Signed-off-by: Antonio Hickey >>=20 >> 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-4da7647= e-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