Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Cc: stable@vger.kernel.org, Eric Biggers <ebiggers@google.com>,
	Alexandre Chartre <alexandre.chartre@oracle.com>
Subject: Re: [PATCH 6.1] x86/its: Fix build errors when CONFIG_MODULES=n
Date: Sat, 17 May 2025 08:53:31 +0200	[thread overview]
Message-ID: <2025051724-reaffirm-embezzle-a8e0@gregkh> (raw)
In-Reply-To: <20250516-its-module-alloc-fix-6-1-v1-1-f3b597b5ea35@linux.intel.com>

On Fri, May 16, 2025 at 01:42:37PM -0700, Pawan Gupta wrote:
> From: Eric Biggers <ebiggers@google.com>
> 
> commit 9f35e33144ae5377d6a8de86dd3bd4d995c6ac65 upstream.
> 
> Fix several build errors when CONFIG_MODULES=n, including the following:
> 
> ../arch/x86/kernel/alternative.c:195:25: error: incomplete definition of type 'struct module'
>   195 |         for (int i = 0; i < mod->its_num_pages; i++) {
> 
>   [ pawan: backport: Bring ITS dynamic thunk code under CONFIG_MODULES ]
> 
> Fixes: 872df34d7c51 ("x86/its: Use dynamic thunks for indirect branches")
> Cc: stable@vger.kernel.org
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> Acked-by: Dave Hansen <dave.hansen@intel.com>
> Tested-by: Steven Rostedt (Google) <rostedt@goodmis.org>
> Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com>
> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
> ---
>  arch/x86/kernel/alternative.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
> index 44bff34f7d10cb6868ad079ca1cb87e458d3f91b..acf6fce287dc0804cfea0377f6f8714a68d10452 100644
> --- a/arch/x86/kernel/alternative.c
> +++ b/arch/x86/kernel/alternative.c
> @@ -402,6 +402,7 @@ static int emit_indirect(int op, int reg, u8 *bytes)
>  
>  #ifdef CONFIG_MITIGATION_ITS
>  
> +#ifdef CONFIG_MODULES
>  static struct module *its_mod;
>  static void *its_page;
>  static unsigned int its_offset;
> @@ -518,6 +519,14 @@ static void *its_allocate_thunk(int reg)
>  
>  	return thunk;
>  }
> +#else /* CONFIG_MODULES */
> +
> +static void *its_allocate_thunk(int reg)
> +{
> +	return NULL;
> +}
> +
> +#endif /* CONFIG_MODULES */
>  
>  static int __emit_trampoline(void *addr, struct insn *insn, u8 *bytes,
>  			     void *call_dest, void *jmp_dest)
> 
> ---
> change-id: 20250516-its-module-alloc-fix-6-1-abb11f2e3829
> 
> 

THanks, now queued up.

greg k-h

  reply	other threads:[~2025-05-17  6:55 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-14 13:04 [PATCH 6.6 000/113] 6.6.91-rc2 review Greg Kroah-Hartman
2025-05-14 15:34 ` Jon Hunter
2025-05-14 18:34 ` Pavel Machek
2025-05-14 18:59 ` Harshit Mogalapalli
2025-05-14 20:05   ` Greg Kroah-Hartman
2025-05-14 20:33     ` Harshit Mogalapalli
2025-05-14 20:49       ` Guenter Roeck
2025-05-15  5:35         ` Greg Kroah-Hartman
2025-05-15 15:25           ` Pawan Gupta
2025-05-15 15:29             ` Pawan Gupta
2025-05-16  8:03               ` Greg Kroah-Hartman
2025-05-16 20:42                 ` [PATCH 6.1] x86/its: Fix build errors when CONFIG_MODULES=n Pawan Gupta
2025-05-17  6:53                   ` Greg Kroah-Hartman [this message]
2025-05-17 13:07                   ` Sasha Levin
2025-05-19 15:27             ` [PATCH 6.6 000/113] 6.6.91-rc2 review Greg Kroah-Hartman
2025-05-19 19:50               ` Pawan Gupta
2025-05-19 20:43                 ` [PATCH 6.6] x86/its: Fix build error for its_static_thunk() Pawan Gupta
2025-05-20  7:52                   ` Sasha Levin
2025-05-20  8:48                   ` Greg Kroah-Hartman
2025-05-14 20:47     ` [PATCH 6.6 000/113] 6.6.91-rc2 review Guenter Roeck
2025-05-15  5:36       ` Greg Kroah-Hartman
2025-05-15  8:03 ` Mark Brown
2025-05-15  8:10 ` Florian Fainelli
2025-05-15 12:01 ` Naresh Kamboju
2025-05-19 13:49 ` Guenter Roeck

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=2025051724-reaffirm-embezzle-a8e0@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=alexandre.chartre@oracle.com \
    --cc=ebiggers@google.com \
    --cc=pawan.kumar.gupta@linux.intel.com \
    --cc=stable@vger.kernel.org \
    /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