From patchwork Tue Aug 6 22:50:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuxuan Luo X-Patchwork-Id: 1969714 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WdpSJ2SNRz1yfM for ; Wed, 7 Aug 2024 08:50:56 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1sbT10-0005kN-MK; Tue, 06 Aug 2024 22:50:50 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1sbT0y-0005gP-BP for kernel-team@lists.ubuntu.com; Tue, 06 Aug 2024 22:50:48 +0000 Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 2DE583F0E9 for ; Tue, 6 Aug 2024 22:50:48 +0000 (UTC) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-7a1d9a712bcso60689585a.1 for ; Tue, 06 Aug 2024 15:50:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722984647; x=1723589447; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CPTJDHrJvHzPXneXeuT8qJQOC++FS+eVLfQVutPsb+w=; b=EK1QfEEHQkDmxiV8Tspvor/N+4XOjTUcmJkyPAlka+R9OYIWBgrJv3ETa/JTThCrPC AMHSjN1Btj106djm0aaO+QEpbYGpVFJL2jyCVpML+cZWf8XhzPiM29m1EC4BV3RSC6Wk h8QhK8pT07XtMSXU7e9yU3UEULKOk9jgacOtVsbvTd27BqbEj0ruato9LrK6XUib/ZZY XLBym57TW31Fgrbuqg4FEFibRedTv7YSDY3dE/BeXz5dts1uavbGpzh7fnCKTwXsPaeO Bj43CgqBHcR6YY/ztx9G4vpW45VzUnPzy34YXxDwuJXePq5OVLKNkNR0DfBULVTZj4zX 0xMQ== X-Gm-Message-State: AOJu0YyotSlfM2EAvCmywLguVoIiZveXSX00rIUFbdKOF4yjQ/x/twT/ iYNA9TI15jOwSWv0r5fq9v/XHYrW27ZRIxVTgnCZ4mDqe9HQV1jqcaSCmwEo/A2bWgjHVdWC/oO flOCulFsyK0zuv2h6MILz0RKvDIeLMA/6YburK3Ituxc/kfY3ycWCUojgID7z+kux6Rs7+AMymn 1yJzz3My8yM20z X-Received: by 2002:a05:620a:a53:b0:7a2:1bc:be05 with SMTP id af79cd13be357-7a377c6079emr63535585a.31.1722984646729; Tue, 06 Aug 2024 15:50:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHJcYQ0VsXcUIoGJ7pveqlujyHkMrPsmA1sRXeUxUMUg/Yp6x3hkOl57dbtn0Lya9CKGHO2JA== X-Received: by 2002:a05:620a:a53:b0:7a2:1bc:be05 with SMTP id af79cd13be357-7a377c6079emr63533985a.31.1722984646394; Tue, 06 Aug 2024 15:50:46 -0700 (PDT) Received: from cache-ubuntu.hsd1.nj.comcast.net ([2001:67c:1562:8007::aac:4795]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a3785e5c54sm4550885a.48.2024.08.06.15.50.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Aug 2024 15:50:45 -0700 (PDT) From: Yuxuan Luo To: kernel-team@lists.ubuntu.com Subject: [PATCH 7/8] x86/entry: Add do_SYSENTER_32() prototype Date: Tue, 6 Aug 2024 18:50:32 -0400 Message-Id: <20240806225033.4181439-8-yuxuan.luo@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240806225033.4181439-1-yuxuan.luo@canonical.com> References: <20240806225033.4181439-1-yuxuan.luo@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Arnd Bergmann The 32-bit system call entry points can be called on both 32-bit and 64-bit kernels, but on the former the declarations are hidden: arch/x86/entry/common.c:238:24: error: no previous prototype for 'do_SYSENTER_32' [-Werror=missing-prototypes] Move them all out of the #ifdef block to avoid the warnings. Signed-off-by: Arnd Bergmann Signed-off-by: Dave Hansen Reviewed-by: Alexander Lobakin Link: https://lore.kernel.org/all/20230516193549.544673-12-arnd%40kernel.org (cherry picked from commit f34f0d3c10eb4d3160fc6fe7a2482cb78d3b0c12) CVE-2024-25744 Signed-off-by: Yuxuan Luo --- arch/x86/include/asm/syscall.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/syscall.h b/arch/x86/include/asm/syscall.h index 825528bf0daf5..e873e95ff6bfc 100644 --- a/arch/x86/include/asm/syscall.h +++ b/arch/x86/include/asm/syscall.h @@ -158,9 +158,11 @@ static inline int syscall_get_arch(struct task_struct *task) } void do_syscall_64(struct pt_regs *regs, int nr); -void do_int80_syscall_32(struct pt_regs *regs); -long do_fast_syscall_32(struct pt_regs *regs); #endif /* CONFIG_X86_32 */ +void do_int80_syscall_32(struct pt_regs *regs); +long do_fast_syscall_32(struct pt_regs *regs); +long do_SYSENTER_32(struct pt_regs *regs); + #endif /* _ASM_X86_SYSCALL_H */