Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp128112lqp; Thu, 4 Apr 2024 08:43:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU+cJ2/hMpmKHtZgoEG9r+Xz3Atx4Hv9gX56DcCzm9WtkeyCts14qAo6I/RgPq8yD4xBMCmYH06zo/7GFbrqFhzHMUejIZH03yl1WNiyA== X-Google-Smtp-Source: AGHT+IENooPYaYE9yGoEukaPPizf5SPpetOZwP4rzAHswOYVauwqDsb8UkG+VM56Akno9xQZE7+a X-Received: by 2002:a17:902:9005:b0:1e0:e1dc:f27 with SMTP id a5-20020a170902900500b001e0e1dc0f27mr2848185plp.69.1712245385571; Thu, 04 Apr 2024 08:43:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712245385; cv=pass; d=google.com; s=arc-20160816; b=U4RFXgyEcM9dznFCvEkt+kl/ye1W0XQE41OZVuxhrllrk4n8atwZN0QymuqT/Pb8eZ Yuu0SrKWhgTUWW33CajkqzmP/Xn2/f+s1KoaSIjZEDzHjSoldIdG35JmYSiaTroP7tA/ tXawV4T3Ne9DbD3jATLHIHb/DRR0eBLyoqL8tue9M8QoSMMN/q3K98lw6jFSEBSA0ahc O6Nkt7LLWsV9C8JIaJk053w+v+5ulRfRFDhFtFsnYmAvdBPhaJk2zBTzMeWcLpzq4LXI 8rypf5niPTmtd4J0PNvMUM+4T8yv5jo5RG9sVS1ayXAiEi9hqEtWGGki1Lg/8uJV1B+c c0rQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=MZKvnRETMwp3vRHbubTwJKIHeHj7/93DuJZEp8NapvE=; fh=5uu4YM8BwXC6zv+thv7wVEOynL45ac2jK8McHxCMfcw=; b=unuwFugPy1oHVL6Q6q86h6c8o3XShcV4AcHQE/OAEUwjBQUbHEvhjl83ary5f82yVA aMbSVkSSfvgvUQ7baxgS3sxtGS0queY1ipGHy8u7209CDVZwxeNAcTlKDeZ2I1C/KklT On9WnwzsMiruDmr3zSa3q7wXHWxtbiSJpFhze3RseBmxzKOE5KWFpx/TXa4/eLbnM97S R/9GEwQRxidIlbMUX7A4R1CY8hJSdoWJ/Aa4b6HKF3Del+fNHCC4mIwLLxLzgqdho+LV p49CUnn6G287dQ6z48LbDdjIIMwhRO5aYiywOdMwtDJjZviwnwM74gmKDHtyrGIzibo9 3U2w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=tEsCeRxJ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-131676-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131676-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u14-20020a170902e5ce00b001dca6272e21si15783621plf.36.2024.04.04.08.43.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 08:43:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131676-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=tEsCeRxJ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-131676-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131676-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id C11CDB25E7C for ; Thu, 4 Apr 2024 15:10:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6D24828689; Thu, 4 Apr 2024 15:10:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="tEsCeRxJ"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="yfaZbJHJ" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 8DCE18462; Thu, 4 Apr 2024 15:10:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712243406; cv=none; b=qZ/eqYi95RI/8BmjJixcKBkaswDbs2bd8arqEDZ2Ci73A56B0YrnfuTRxxpZ4rvKBKPw+A8vPyf8pMnT68THrZUjOiQvIkwixHFJbAEmROTKHZhniQtQO5DGJSozBXJUYkF8y+YgzHOX7mfeql2OrUwxXQDptVQ8sJcTxFhdGcw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712243406; c=relaxed/simple; bh=sImcZy9gzsz7Ui+Tzrvagua+22Z8PK2Sf/87AIAuMK4=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=MEbPLTjKkkMcP+oPs10Rn5t+xj++GQoxUX5qLQPeLlxdpwIxu24yGyh/EIPel/0LE0sKk2niv9PgfPazIVp8r/Oxbb4cSvWIDagCgn5C05g5rJgP1DDAvU7Xi5vfJuLVWERhGvWaqzP8CVW7nHL6swHv1WSPSJiZimvHojZkBds= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=tEsCeRxJ; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=yfaZbJHJ; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Thu, 04 Apr 2024 15:09:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1712243400; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MZKvnRETMwp3vRHbubTwJKIHeHj7/93DuJZEp8NapvE=; b=tEsCeRxJ9ogbrtTv4gSSeqZ32cSN6gGo7pJ0Sw95hjPKCH46oG1XaJki8LchUKIfnjurSD jxJNI04Ozuuy3AC4HlbX4lv0qsPKWaLRDJmGWtZT9jXMjUk1nx623QsrVOzRwNgnWe1p61 nVCS4BIDJ97sVzsgd1tXF+kTd19UY/eUFlR9mskhd7h7nHwGfi5+lPWovkX05vs12P2k+E YmfEC/FsfaQx17Bk6fLu+gurMOXlnYrZSukSgmopFw8zFWtUqimg/hKDKId54AvWrdQEYd VE1K7QiP9IRRniB4Tg3OppmMZ/F57ZwvGfdQcPjCeu58No5+0l7e/dYbFTgDTg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1712243400; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MZKvnRETMwp3vRHbubTwJKIHeHj7/93DuJZEp8NapvE=; b=yfaZbJHJOxxfQrkAJK3vepWEOKrwlj7KH083xj5JuEUrd7tD9u2UUHofhldTjvm4PoUDqR z8wf1cQpozFNsaBA== From: "tip-bot2 for Tong Tiangen" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cleanups] x86/extable: Remove unused fixup type EX_TYPE_COPY Cc: Tong Tiangen , "Borislav Petkov (AMD)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240204082627.3892816-2-tongtiangen@huawei.com> References: <20240204082627.3892816-2-tongtiangen@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <171224339947.10875.6370842297740311104.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the x86/cleanups branch of tip: Commit-ID: cb517619f96718a4c3c2534a3124177633f8998d Gitweb: https://git.kernel.org/tip/cb517619f96718a4c3c2534a3124177633f8998d Author: Tong Tiangen AuthorDate: Sun, 04 Feb 2024 16:26:25 +08:00 Committer: Borislav Petkov (AMD) CommitterDate: Thu, 04 Apr 2024 17:01:40 +02:00 x86/extable: Remove unused fixup type EX_TYPE_COPY After 034ff37d3407 ("x86: rewrite '__copy_user_nocache' function") rewrote __copy_user_nocache() to use EX_TYPE_UACCESS instead of the EX_TYPE_COPY exception type, there are no more EX_TYPE_COPY users, so remove it. [ bp: Massage commit message. ] Signed-off-by: Tong Tiangen Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240204082627.3892816-2-tongtiangen@huawei.com --- arch/x86/include/asm/asm.h | 3 --- arch/x86/include/asm/extable_fixup_types.h | 2 +- arch/x86/kernel/cpu/mce/severity.c | 1 - arch/x86/mm/extable.c | 9 --------- 4 files changed, 1 insertion(+), 14 deletions(-) diff --git a/arch/x86/include/asm/asm.h b/arch/x86/include/asm/asm.h index ca8eed1..2bec0c8 100644 --- a/arch/x86/include/asm/asm.h +++ b/arch/x86/include/asm/asm.h @@ -229,9 +229,6 @@ register unsigned long current_stack_pointer asm(_ASM_SP); #define _ASM_EXTABLE_UA(from, to) \ _ASM_EXTABLE_TYPE(from, to, EX_TYPE_UACCESS) -#define _ASM_EXTABLE_CPY(from, to) \ - _ASM_EXTABLE_TYPE(from, to, EX_TYPE_COPY) - #define _ASM_EXTABLE_FAULT(from, to) \ _ASM_EXTABLE_TYPE(from, to, EX_TYPE_FAULT) diff --git a/arch/x86/include/asm/extable_fixup_types.h b/arch/x86/include/asm/extable_fixup_types.h index 7acf038..906b0d5 100644 --- a/arch/x86/include/asm/extable_fixup_types.h +++ b/arch/x86/include/asm/extable_fixup_types.h @@ -36,7 +36,7 @@ #define EX_TYPE_DEFAULT 1 #define EX_TYPE_FAULT 2 #define EX_TYPE_UACCESS 3 -#define EX_TYPE_COPY 4 +/* unused, was: #define EX_TYPE_COPY 4 */ #define EX_TYPE_CLEAR_FS 5 #define EX_TYPE_FPU_RESTORE 6 #define EX_TYPE_BPF 7 diff --git a/arch/x86/kernel/cpu/mce/severity.c b/arch/x86/kernel/cpu/mce/severity.c index c447716..bca780f 100644 --- a/arch/x86/kernel/cpu/mce/severity.c +++ b/arch/x86/kernel/cpu/mce/severity.c @@ -290,7 +290,6 @@ static noinstr int error_context(struct mce *m, struct pt_regs *regs) switch (fixup_type) { case EX_TYPE_UACCESS: - case EX_TYPE_COPY: if (!copy_user) return IN_KERNEL; m->kflags |= MCE_IN_KERNEL_COPYIN; diff --git a/arch/x86/mm/extable.c b/arch/x86/mm/extable.c index b522933..51986e8 100644 --- a/arch/x86/mm/extable.c +++ b/arch/x86/mm/extable.c @@ -164,13 +164,6 @@ static bool ex_handler_uaccess(const struct exception_table_entry *fixup, return ex_handler_default(fixup, regs); } -static bool ex_handler_copy(const struct exception_table_entry *fixup, - struct pt_regs *regs, int trapnr) -{ - WARN_ONCE(trapnr == X86_TRAP_GP, "General protection fault in user access. Non-canonical address?"); - return ex_handler_fault(fixup, regs, trapnr); -} - static bool ex_handler_msr(const struct exception_table_entry *fixup, struct pt_regs *regs, bool wrmsr, bool safe, int reg) { @@ -341,8 +334,6 @@ int fixup_exception(struct pt_regs *regs, int trapnr, unsigned long error_code, return ex_handler_fault(e, regs, trapnr); case EX_TYPE_UACCESS: return ex_handler_uaccess(e, regs, trapnr, fault_addr); - case EX_TYPE_COPY: - return ex_handler_copy(e, regs, trapnr); case EX_TYPE_CLEAR_FS: return ex_handler_clear_fs(e, regs); case EX_TYPE_FPU_RESTORE: