From: Geert Stappers <stappers@stappers.nl>
To: Zigit Zo <zig@iorw.io>
Cc: ojeda@kernel.org, bjorn3_gh@protonmail.com, richard@nod.at,
anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net,
tglx@linutronix.de, mingo@redhat.com, nathan@kernel.org,
ndesaulniers@google.com, gary@garyguo.net,
rust-for-linux@vger.kernel.org, linux-um@lists.infradead.org,
llvm@lists.linux.dev, x86@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] rust: arch/um: use 'static' relocation model for uml modules
Date: Wed, 4 Sep 2024 11:30:12 +0200 [thread overview]
Message-ID: <ZtgopAHp+I2+xCIz@gpm.stappers.nl> (raw)
In-Reply-To: <FD7D773099A0C7EC+20240903130606.292935-2-zig@iorw.io>
On Tue, Sep 03, 2024 at 09:06:05PM +0800, Zigit Zo wrote:
> In the x86_64 UML, kernel modules compiled with Rust will currently
> generate some R_X86_64_GOTPCREL relocations, which will then be rejected
> by the kernel.
>
> And because of the kernel modules of UML are only got handled by the UML
> itself, relocation model 'static' can work as expected other than 'pie'.
> ---
> diff --git a/arch/um/Makefile b/arch/um/Makefile
> index 00b63bac5eff..b04b1d4d6dfe 100644
> --- a/arch/um/Makefile
> +++ b/arch/um/Makefile
> @@ -63,7 +63,7 @@ KBUILD_CFLAGS += $(CFLAGS) $(CFLAGS-y) -D__arch_um__ \
> -Din6addr_loopback=kernel_in6addr_loopback \
> -Din6addr_any=kernel_in6addr_any -Dstrrchr=kernel_strrchr
>
> -KBUILD_RUSTFLAGS += -Crelocation-model=pie
> +KBUILD_RUSTFLAGS_KERNEL += -Crelocation-model=pie
>
> KBUILD_AFLAGS += $(ARCH_INCLUDE)
>
> --
I failed to match the actual change with the commit message. Consider
that ignorance on my side.
I see a problem in just renaming a variable, might be my problem. Thing
is that removal of 'KBUILD_RUSTFLAG += ' feels wrong, hence this posting.
Groeten
Geert Stappers
--
Silence is hard to parse
next prev parent reply other threads:[~2024-09-04 9:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240903130606.292935-1-zig@iorw.io>
2024-09-03 13:06 ` [PATCH 1/2] rust: arch/um: use 'static' relocation model for uml modules Zigit Zo
2024-09-04 9:30 ` Geert Stappers [this message]
2024-09-04 12:28 ` Zigit Zo
2024-09-03 13:06 ` [PATCH 2/2] rust: arch/um: use 'large' code model for uml Zigit Zo
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=ZtgopAHp+I2+xCIz@gpm.stappers.nl \
--to=stappers@stappers.nl \
--cc=anton.ivanov@cambridgegreys.com \
--cc=bjorn3_gh@protonmail.com \
--cc=gary@garyguo.net \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=llvm@lists.linux.dev \
--cc=mingo@redhat.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=ojeda@kernel.org \
--cc=richard@nod.at \
--cc=rust-for-linux@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=zig@iorw.io \
/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).