[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240130124816.GCZbjwEFrZS55FLxb8@fat_crate.local>
Date: Tue, 30 Jan 2024 13:48:16 +0100
From: Borislav Petkov <bp@...en8.de>
To: Xin Li <xin3.li@...el.com>
Cc: linux-kernel@...r.kernel.org, tglx@...utronix.de, mingo@...hat.com,
dave.hansen@...ux.intel.com, x86@...nel.org, hpa@...or.com,
luto@...nel.org, ravi.v.shankar@...el.com,
andrew.cooper3@...rix.com
Subject: Re: [PATCH 2/2] x86/fred: Fix build with CONFIG_IA32_EMULATION=n
On Sat, Jan 27, 2024 at 01:37:28AM -0800, Xin Li wrote:
> When CONFIG_IA32_EMULATION=n, int80_emulation() is NOT defined, fix it.
>
> Fixes: 5e0636a41485 ("x86/fred: FRED entry/exit and dispatch code")
> Link: https://lore.kernel.org/lkml/20240126100519.GBZbOD3xFB0v3mp5B1@fat_crate.local/
> Reported-by: Borislav Petkov (AMD) <bp@...en8.de>
> Signed-off-by: Xin Li <xin3.li@...el.com>
> ---
> arch/x86/entry/entry_fred.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/x86/entry/entry_fred.c b/arch/x86/entry/entry_fred.c
> index 06d00c60ea64..ac120cbdaaf2 100644
> --- a/arch/x86/entry/entry_fred.c
> +++ b/arch/x86/entry/entry_fred.c
> @@ -62,11 +62,13 @@ static noinstr void fred_intx(struct pt_regs *regs)
> case X86_TRAP_OF:
> return exc_overflow(regs);
>
> +#ifdef CONFIG_IA32_EMULATION
> /* INT80 */
> case IA32_SYSCALL_VECTOR:
> if (ia32_enabled())
> return int80_emulation(regs);
> fallthrough;
> +#endif
>
> default:
> return exc_general_protection(regs, 0);
> --
That .config is still not happy after this:
ld: vmlinux.o: in function `fred_entry_from_user':
(.noinstr.text+0x177a): undefined reference to `do_fast_syscall_32'
make[2]: *** [scripts/Makefile.vmlinux:37: vmlinux] Error 1
make[1]: *** [/mnt/kernel/kernel/linux/Makefile:1158: vmlinux] Error 2
make: *** [Makefile:240: __sub-make] Error 2
I'm pushing the latest state I have here:
https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git/log/?h=tip-x86-fred
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists