rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] init/Kconfig: Only block on RANDSTRUCT for RUST
@ 2024-07-31 12:54 Neal Gompa
  2024-08-18  7:04 ` Neal Gompa
  2024-08-18 21:32 ` Miguel Ojeda
  0 siblings, 2 replies; 4+ messages in thread
From: Neal Gompa @ 2024-07-31 12:54 UTC (permalink / raw)
  To: rust-for-linux
  Cc: asahi, linux-kernel, Miguel Ojeda, Hector Martin, Janne Grunau,
	Asahi Lina, Neal Gompa

When enabling Rust in the kernel, we only need to block on the
RANDSTRUCT feature and GCC plugin. The rest of the GCC plugins
are reasonably safe to enable.

Signed-off-by: Neal Gompa <neal@gompa.dev>
---
Changes in v2
- Drop changing !RANDSTRUCT to RANDSTRUCT_NONE 
  (they're equivalent anyway)
---
 init/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/init/Kconfig b/init/Kconfig
index a465ea9525bd..0939486938cc 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1900,7 +1900,7 @@ config RUST
 	depends on RUST_IS_AVAILABLE
 	depends on !CFI_CLANG
 	depends on !MODVERSIONS
-	depends on !GCC_PLUGINS
+	depends on !GCC_PLUGIN_RANDSTRUCT
 	depends on !RANDSTRUCT
 	depends on !DEBUG_INFO_BTF || PAHOLE_HAS_LANG_EXCLUDE
 	help
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] init/Kconfig: Only block on RANDSTRUCT for RUST
  2024-07-31 12:54 [PATCH v2] init/Kconfig: Only block on RANDSTRUCT for RUST Neal Gompa
@ 2024-08-18  7:04 ` Neal Gompa
  2024-08-18  7:55   ` Miguel Ojeda
  2024-08-18 21:32 ` Miguel Ojeda
  1 sibling, 1 reply; 4+ messages in thread
From: Neal Gompa @ 2024-08-18  7:04 UTC (permalink / raw)
  To: rust-for-linux
  Cc: asahi, linux-kernel, Miguel Ojeda, Hector Martin, Janne Grunau,
	Asahi Lina

On Wed, Jul 31, 2024 at 8:57 AM Neal Gompa <neal@gompa.dev> wrote:
>
> When enabling Rust in the kernel, we only need to block on the
> RANDSTRUCT feature and GCC plugin. The rest of the GCC plugins
> are reasonably safe to enable.
>
> Signed-off-by: Neal Gompa <neal@gompa.dev>
> ---
> Changes in v2
> - Drop changing !RANDSTRUCT to RANDSTRUCT_NONE
>   (they're equivalent anyway)
> ---
>  init/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/init/Kconfig b/init/Kconfig
> index a465ea9525bd..0939486938cc 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -1900,7 +1900,7 @@ config RUST
>         depends on RUST_IS_AVAILABLE
>         depends on !CFI_CLANG
>         depends on !MODVERSIONS
> -       depends on !GCC_PLUGINS
> +       depends on !GCC_PLUGIN_RANDSTRUCT
>         depends on !RANDSTRUCT
>         depends on !DEBUG_INFO_BTF || PAHOLE_HAS_LANG_EXCLUDE
>         help
> --
> 2.45.2
>

Bump for notice... Can we get this looked at to incorporate for 6.11?


-- 
真実はいつも一つ!/ Always, there's only one truth!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] init/Kconfig: Only block on RANDSTRUCT for RUST
  2024-08-18  7:04 ` Neal Gompa
@ 2024-08-18  7:55   ` Miguel Ojeda
  0 siblings, 0 replies; 4+ messages in thread
From: Miguel Ojeda @ 2024-08-18  7:55 UTC (permalink / raw)
  To: Neal Gompa
  Cc: rust-for-linux, asahi, linux-kernel, Miguel Ojeda, Hector Martin,
	Janne Grunau, Asahi Lina

On Sun, Aug 18, 2024 at 9:04 AM Neal Gompa <neal@gompa.dev> wrote:
>
> Bump for notice... Can we get this looked at to incorporate for 6.11?

We have not picked up any patch yet. -rc4 will be out later today,
where we will start applying things on top.

Thanks!

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] init/Kconfig: Only block on RANDSTRUCT for RUST
  2024-07-31 12:54 [PATCH v2] init/Kconfig: Only block on RANDSTRUCT for RUST Neal Gompa
  2024-08-18  7:04 ` Neal Gompa
@ 2024-08-18 21:32 ` Miguel Ojeda
  1 sibling, 0 replies; 4+ messages in thread
From: Miguel Ojeda @ 2024-08-18 21:32 UTC (permalink / raw)
  To: Neal Gompa
  Cc: rust-for-linux, asahi, linux-kernel, Miguel Ojeda, Hector Martin,
	Janne Grunau, Asahi Lina

On Wed, Jul 31, 2024 at 2:57 PM Neal Gompa <neal@gompa.dev> wrote:
>
> When enabling Rust in the kernel, we only need to block on the
> RANDSTRUCT feature and GCC plugin. The rest of the GCC plugins
> are reasonably safe to enable.
>
> Signed-off-by: Neal Gompa <neal@gompa.dev>

Applied to `rust-next` -- thanks!

    [ Originally (years ago) we only had this restriction, but we ended up
      restricting also the rest of the GCC plugins 1) to be on the safe side,
      2) since compiler plugin support could be going away in the kernel and
      3) since mixed builds are best effort so far; so I asked Neal about
      his experience enabling the other plugins -- Neal says:

        When I originally wrote this patch two years ago to get things
        working, Fedora used all the GCC plugins, so I was trying to get GCC +
        Rust to work while minimizing the delta on build differences. This was
        the combination that worked. We've been carrying this patch in the
        Asahi tree for a year now. And while Fedora does not currently have
        GCC plugins enabled because it caused issues with some third-party
        modules (I think it was the NVIDIA driver, but I'm not sure), it was
        around long enough for me to know with some confidence that it was
        fine this way.

      - Miguel ]

Cheers,
Migul

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-08-18 21:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-31 12:54 [PATCH v2] init/Kconfig: Only block on RANDSTRUCT for RUST Neal Gompa
2024-08-18  7:04 ` Neal Gompa
2024-08-18  7:55   ` Miguel Ojeda
2024-08-18 21:32 ` Miguel Ojeda

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).