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 660D73594E for ; Tue, 11 Mar 2025 16:33:23 +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=1741710805; cv=none; b=H4cHaoPOFLaGlE+XuQv3RSq5iMxwD/vZ2Eak+qd2zyfkvZRANISr7rd04+9QC2mmFTRUk7TCzZl88uPSmSTXuMmCkRGSNC5LC/sTmr2b7tNbQ17dMHfeNlGBwtiJYXOZTr1pvH9cqhT4a+7WJh4prG1ADgZPT4rLG23j/E/zfjk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741710805; c=relaxed/simple; bh=KXZfn+E+1UOPS6s6xjPmbs9/5t+fveiBOai0moxW8jA=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=mQOYymVINTsH0aFTGQU2xsQHieNhuIxh5T7vc4PaId+ppjbSI4/UXGglvIATP2fOm4VvV2jcRXVgLurdEtdGFyvOm9yUQ+Y7tBNHqR4MZEe18Sv7KDji+hhfcz/oOmqi+2yjxEWxGMf6xWewxcj1d2tmV51ZYlGXxsjwasXSJqg= 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=Eb6QomPg; 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="Eb6QomPg" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=ark2rwdxgbgn7jyg7trvov3zxe.protonmail; t=1741710801; x=1741970001; bh=KXZfn+E+1UOPS6s6xjPmbs9/5t+fveiBOai0moxW8jA=; 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=Eb6QomPgRoUkiUbVXTyTXTzkIRdUpicXNtrQgACu6wNF7q6skb1Sf2YlqD7Rju1kR oqZWPUfpTxjGHafGjn6pU5G8NImsXBC2xLR4XfrCPUkM65OkhTGC0rHYiZyqUErS1X W4rYuRYqHUOkald9coOVF9MKZm/nF+C8lnJcmiuoWC6CIWwGOcqNk1rhlGJxTPZ0MR 8ZGGciIvUK46Aiv//t/wWUpPjDeRH/J8wdDnlAoK5HyfgPBwLYp6xv/4MmneLH8hPR RIsHBov4eFCLDpHXulDY92A2/azIkU6Xlc6rvovIxjtN8QwvTpkrkJHHheemYOsrK3 tUjMdIrL5EDqA== Date: Tue, 11 Mar 2025 16:33:16 +0000 To: Panagiotis Foliadis , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?utf-8?Q?Bj=C3=B6rn_Roy_Baron?= , Andreas Hindborg , Alice Ryhl , Trevor Gross , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt From: Benno Lossin Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH v2] rust: task: mark Task methods inline Message-ID: In-Reply-To: <20250311-inline-c-wrappers-v2-1-72c99d35ff33@posteo.net> References: <20250311-inline-c-wrappers-v2-1-72c99d35ff33@posteo.net> Feedback-ID: 71780778:user:proton X-Pm-Message-ID: 0768b22bbf1dc2a7566b643e75c5d7b61f955053 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-Transfer-Encoding: quoted-printable On Tue Mar 11, 2025 at 4:05 PM CET, Panagiotis Foliadis wrote: > When you build the kernel using the llvm-18.1.3-rust-1.85.0-x86_64 > toolchain provided by kernel.org, the following symbols are generated: > > $ nm vmlinux | grep ' _R'.*Task | rustfilt > ffffffff817b2d30 T ::get_pid_ns > ffffffff817b2d50 T ::tgid_nr_ns > ffffffff817b2c90 T ::current_pid_ns > ffffffff817b2d00 T ::signal_pending > ffffffff817b2cc0 T ::uid > ffffffff817b2ce0 T ::euid > ffffffff817b2c70 T ::current > ffffffff817b2d70 T ::wake_up > ffffffff817b2db0 T ::dec_ref > ffffffff817b2d90 T ::inc_ref > > These Rust symbols are trivial wrappers around the C functions > get_pid_ns, task_tgid_nr_ns, task_active_pid_ns, signal_pending, uid, > euid, get_current, wake_up, get_task_struct and put_task_struct.It > doesn't make sense to go through a trivial wrapper for these > functions, so mark them inline. > > After applying this patch, the above command will produce no output. > > Link: https://github.com/Rust-for-Linux/linux/issues/1145 > Signed-off-by: Panagiotis Foliadis Reviewed-by: Benno Lossin --- Cheers, Benno