rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Bertschinger <tahbertschinger@gmail.com>
To: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Cc: rust-for-linux@vger.kernel.org, ojeda@kernel.org,
	alex.gaynor@gmail.com, wedsonaf@gmail.com
Subject: Re: [PATCH] rust: place generated init_module() function in .init.text
Date: Sat, 3 Feb 2024 13:26:27 -0700	[thread overview]
Message-ID: <20240203202627.GA296718@fedora-laptop> (raw)
In-Reply-To: <492b7c1c-22ae-4464-98ea-000889301375@gmail.com>

On Sat, Feb 03, 2024 at 03:50:02PM -0300, Martin Rodriguez Reboredo wrote:
> In resumi, to call `init` funcs in a module you must do it in
> `.init.text`. Amirite?

Yeah, well, I'd say that's needed to do it without warnings from
modpost at least.

In theory it "shouldn't" cause any problems to call __init functions
from the Rust init() even if it's in .text, since that init() should
only ever run once. But then if anything does run Rust's init() after
module initialization, that will definitely cause problems. I don't
think that should ever happen though...

- Thomas Bertschinger

  reply	other threads:[~2024-02-03 20:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-03 18:27 [PATCH] rust: place generated init_module() function in .init.text Thomas Bertschinger
2024-02-03 18:50 ` Martin Rodriguez Reboredo
2024-02-03 20:26   ` Thomas Bertschinger [this message]
2024-02-05  9:45 ` Alice Ryhl
2024-02-05 14:46   ` Thomas Bertschinger
2024-02-05 14:48     ` Alice Ryhl

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=20240203202627.GA296718@fedora-laptop \
    --to=tahbertschinger@gmail.com \
    --cc=alex.gaynor@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=wedsonaf@gmail.com \
    --cc=yakoyoku@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).