From: Alice Ryhl <alice@ryhl.io>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
asahi@lists.linux.dev, "Asahi Lina" <lina@asahilina.net>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Wedson Almeida Filho" <wedsonaf@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"John Stultz" <jstultz@google.com>,
"Stephen Boyd" <sboyd@kernel.org>,
"Josh Stone" <jistone@redhat.com>,
"Gaelan Steele" <gbs@canishe.com>,
"Heghedus Razvan" <heghedus.razvan@protonmail.com>
Subject: Re: [PATCH v2] rust: time: New module for timekeeping functions
Date: Sat, 15 Jul 2023 10:14:57 +0200 [thread overview]
Message-ID: <37795dc7-a121-b30b-76de-1ba6dd705c5e@ryhl.io> (raw)
In-Reply-To: <87r0pax9a6.ffs@tglx>
On 7/15/23 03:17, Thomas Gleixner wrote:
> On Fri, Jul 14 2023 at 16:55, Asahi Lina wrote:
>> +ktime_t rust_helper_ktime_get_real(void) {
>> + return ktime_get_real();
>> +}
>> +EXPORT_SYMBOL_GPL(rust_helper_ktime_get_real);
>
> Colour me confused. But why does this need another export?
>
> This just creates yet another layer of duct tape. If it's unsafe from
> the rust perspective then wrapping it into rust_"unsafe_function" does not
> make it any better.
>
> Why on earth can't you use the actual C interfaces diretly which are
> already exported?
Currently, you can't call inline C functions directly from Rust. So we
wrap them in non-inline functions for now.
It's something we definitely want to fix, but it hasn't been fixed yet.
Alice
next prev parent reply other threads:[~2023-07-15 8:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-14 7:55 [PATCH v2] rust: time: New module for timekeeping functions Asahi Lina
2023-07-14 10:05 ` Alice Ryhl
2023-07-15 16:59 ` Miguel Ojeda
2023-07-14 13:58 ` Martin Rodriguez Reboredo
2023-07-14 17:15 ` Boqun Feng
2023-07-15 1:17 ` Thomas Gleixner
2023-07-15 8:14 ` Alice Ryhl [this message]
2023-07-16 9:20 ` Asahi Lina
2023-07-15 15:33 ` Gary Guo
2023-07-19 12:17 ` Heghedus Razvan
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=37795dc7-a121-b30b-76de-1ba6dd705c5e@ryhl.io \
--to=alice@ryhl.io \
--cc=alex.gaynor@gmail.com \
--cc=asahi@lists.linux.dev \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=gary@garyguo.net \
--cc=gbs@canishe.com \
--cc=heghedus.razvan@protonmail.com \
--cc=jistone@redhat.com \
--cc=jstultz@google.com \
--cc=lina@asahilina.net \
--cc=linux-kernel@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=sboyd@kernel.org \
--cc=tglx@linutronix.de \
--cc=wedsonaf@gmail.com \
/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).