Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp982480rdb; Tue, 30 Jan 2024 04:48:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IHGLhNt0Pzc9dwoKCVFwASqvte0ZjBtU3x1NAa0eJLglmnwqgsy86dWZCSF/PaxJZ2K6XQC X-Received: by 2002:a05:620a:c84:b0:783:9bd6:742 with SMTP id q4-20020a05620a0c8400b007839bd60742mr7347880qki.77.1706618929780; Tue, 30 Jan 2024 04:48:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706618929; cv=pass; d=google.com; s=arc-20160816; b=hHSwxTj9npUkAEXxTtSr51kZbC92xvhXTKhN1bmOARwNVklR0VRfMuHskru0Lxv4sN pjZM4xlmLddOBQ7Iwkbi955VRk6OpK7yL17Afp6zySSqQTGzmNGp4RHtMMB7vZNwyYG+ FLO7N0xQwQUE8BeRCbpwENtlXKlN/iB48FfY8wQrN++WRFAfz1JhttUbmU2omcCGU1Cg gmZZSa9IVlCcdU5YKBn9+v++aVzl1IL06t8ww1r5biqKzp0YQ+RONglGmclpVYPs7dJp ohqaKn7xEUG9lY6Nwf6igzP4LvCzFWw6ATbiC6ABUe82o2JFn0bJyWeTeB6/JZgVGuuW WlFw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=6gdHYVPhKxJvSAFz4Dpfu8Iy9Q86+dYYmwzGBxOd/r4=; fh=bHrIcLfJwLqUUs6jU4xjI2gpzfR4w7+lgat4f2KyGlE=; b=KkiKLpftY+PwrvAN8Gph/F8vE4+pLR6CgjYoXjcM7AlBCqXFAFo0OGpUyZT9Udi+y/ Z0Ofb3xdTUe5307IGuszkP8edOjdokdjLR19R1PdEbCCkRR27fDCefwYa6cYUzOmtS9+ Jb0BXzDAIiCGwSBzwkPqDJ1DQtgucwUh17tLWr+bhX23LKA6YVZ2MjRbsUOTlMvZnK80 XfDM/0HnyK1RSOkfrHt65O/1/29gcqYHdSH8eEFFkwRkpYtM2vXtXfEjdBVeM1DBY1xi rAM3YM5opeMrKX7MTcNBzhzLd+2gUb6urUxVf1j5cE1vlTYbLVHBtHgj5QhQ0VCpzJEy 7vBw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=UoiAhKX1; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-44626-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44626-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h14-20020a05620a13ee00b00783f40977a1si6494065qkl.258.2024.01.30.04.48.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 04:48:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44626-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=UoiAhKX1; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-44626-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44626-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 852811C237E0 for ; Tue, 30 Jan 2024 12:48:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 15FF36A32B; Tue, 30 Jan 2024 12:48:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b="UoiAhKX1" Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5D71B679F2 for ; Tue, 30 Jan 2024 12:48:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=65.109.113.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706618921; cv=none; b=juKEAb8Wgfm7buf1FxX9O6gVaUwdtbnS6DhYM01FlEg0FxsYlNnkQnOcaFxAbKd17Du/hU5p5uARlseCJ6q4BArmoLAxFP+4XqhNNsYiygVG6C/uTGhht2kwwUiuF9fZylNEGT3bnyY3Dy8EJ+uOx1zW31SjWyiuvdyh8Pn4ggg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706618921; c=relaxed/simple; bh=7VwHUSMVB7tJB3T1NjipffOmlucmeWOP2SgE55gk384=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=m/wVyEsmSk5RdTUhIJgFznzAbuA/ZwRq0Pdyei44FAzqk9XJ35BUvcbmpVmJHw6piHn2umk3lDgYmnvsGS7mZRyH2Zpb6vwyeReFZtsj7oXnJ0IZqiqnGozfA7BtRMJ/Hr4P4PZ49k4RVLjtjgt+iDxpOWNa5jjKWNYIZ3/VtKI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de; spf=pass smtp.mailfrom=alien8.de; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b=UoiAhKX1; arc=none smtp.client-ip=65.109.113.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alien8.de Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id D40A940E01BB; Tue, 30 Jan 2024 12:48:34 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id JZ9g6t8sfRuZ; Tue, 30 Jan 2024 12:48:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1706618912; bh=6gdHYVPhKxJvSAFz4Dpfu8Iy9Q86+dYYmwzGBxOd/r4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UoiAhKX1WC4OnnrSI+d0Y5dPy8uzr3mdr3pKnAJaoOYI6Uu9Lhl1RZ4DinCCGfBgA QvOjSvAYY5DOQbNUjaQgVRswN4E1XS2OerlqlkawxeAaqHo23gB9g4A+aG2yUO2cXC nVIZWYi1KD0WlLbw08kX7/U6F2QlPFNrHtm8+pBkBlz2O3S1QdRDBnINpXOOPGaMn2 8HvQjJ8hYHx28xoDh9is8jd3DQj+lojqiDJGI6HY+67RyMNwu8A/Tqn4d9j4/ySvaQ AVes9NOGB5lTY6f5KW/72h8cxpu/LwWBFoICkPBhuyhzzaB8nRtJBzYxLlWBgRSj7A yiATQYvCJVTwItKMzQ/6/V63GkBZe2Q846qXJMIkMZCADav+Kyy0eeU3GxowevRNRq 71z/KUqZT5RR96rvtvVoX+XV686kyXdpnn/t+cbMFmhkzEHcHesIx8Li17LMk1jA7G RiROYhDLW5MI+E8tOO969kCMdoKL1/RoywTSsOglEVNxbEnQjg/MK2hqy+EYbIo6c3 c29JO3dyAb+p0/roZ9t9BdNDRQijuk0DB/u3VVcKSEQVPtp686CcxwKxFUsVeSnjFv BsSqoq9v0hgrpVlIYv+6L4RaE64CEgMYAZtf2A2P2fkqPoalcPUUZN9uGbv4nKLiBk z0fkmmwghhCU0uuOsXczxC/E= Received: from zn.tnic (pd953033e.dip0.t-ipconnect.de [217.83.3.62]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 19A6140E0177; Tue, 30 Jan 2024 12:48:22 +0000 (UTC) Date: Tue, 30 Jan 2024 13:48:16 +0100 From: Borislav Petkov To: Xin Li Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, luto@kernel.org, ravi.v.shankar@intel.com, andrew.cooper3@citrix.com Subject: Re: [PATCH 2/2] x86/fred: Fix build with CONFIG_IA32_EMULATION=n Message-ID: <20240130124816.GCZbjwEFrZS55FLxb8@fat_crate.local> References: <20240127093728.1323-1-xin3.li@intel.com> <20240127093728.1323-3-xin3.li@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20240127093728.1323-3-xin3.li@intel.com> 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) > Signed-off-by: Xin Li > --- > 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