From patchwork Fri Jan 6 10:47:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 40089 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp756736wrt; Fri, 6 Jan 2023 02:50:02 -0800 (PST) X-Google-Smtp-Source: AMrXdXv2QhnF6NaEFFxkCYZuBPiuR8JeqJUhxpe+Z88v5iCLzidYByKQ1cbP9xf00p2tIavpaw8b X-Received: by 2002:a17:903:1d0:b0:18f:a447:2254 with SMTP id e16-20020a17090301d000b0018fa4472254mr74078419plh.64.1673002202175; Fri, 06 Jan 2023 02:50:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673002202; cv=none; d=google.com; s=arc-20160816; b=Dlk4mNaDgEsP2E0a49xhFo9RTNKF3fVg3GblvwyhZdHfccFunwdZIr2L3JrW3yKymP omr09g1epWPvQWmbrsmOZZLLtn7Rx9+zX/DhIkCXcFvpuK9DEjefUJyR4AKgy/IDVxrT 3khB5vwqvvCq/c4njX8PXbdanszlBpj7m4IpINngrB5h71vkADHk3z4npt4qVQzAJOlb 6XpnYlTvcHrroDWHMmyciFKnMa22FBzeklAIhVKtxNchwHs1wF9ovVPkqGfdYrPjxz9N bctPzXdYDWCcyWknnLmHi0n3FSBL3eIq5yJ43vYZqJTGt3Ecbcyz4mvYFf7oP+FSThKT zjig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=UCPmF4a7fJSy7N958ILHl30COeBhXJyN71lpqNDHdi4=; b=RhR9KLWk+N6SkuDUAcAGBGhZpRL35hC1iwiWDKFsUduQrJ1kzTvrKOa9haMj1UBw+4 H/1ALhsUaiDuhL/WTr9fPtcO6Ei9YGJLoweao1TGaLpqEEmGKKlgL2m4II9jKMpGGcTC Adn2hBZhHFl3Y3BCjVd+U0JTdgPh9T9aR9MF5W1gB/BEd+LwrV9QXeEQyZFbzsSzVsAQ wF9iafijRJ5mD1MBtEZ20zTKFBSxozWgRuDVXRmK6/PB0hlqab0CZsCw9Llm4VSHkZb1 DSEevtLx9heYOdvlaPhYsoFAOItpSLM1DYohuC495GSsolMFbylBEbPtlGiogaoy7INj Bz+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=gNI9r51o; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jd13-20020a170903260d00b00186c5eb0d48si597372plb.425.2023.01.06.02.49.49; Fri, 06 Jan 2023 02:50:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=gNI9r51o; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231666AbjAFKrs (ORCPT + 99 others); Fri, 6 Jan 2023 05:47:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229672AbjAFKrq (ORCPT ); Fri, 6 Jan 2023 05:47:46 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E2636CFD8; Fri, 6 Jan 2023 02:47:44 -0800 (PST) Date: Fri, 06 Jan 2023 10:47:40 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1673002061; 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=UCPmF4a7fJSy7N958ILHl30COeBhXJyN71lpqNDHdi4=; b=gNI9r51omTZ7ay/jxeNhhi8DdUpH7HxefHE5xsXPkpvwmOzP8XqzTuWuJJQXcYLeWovX6r 3k0Zy213zyd5Q8kQXjaKADO+f0XFdsN4MKdaePzRKo1SZNodtAw5Ch9Kj7WuLRMrvSGr21 /z990ZqHmIbdIEF8qLBl2VJGZpW02t8KwXe5L0z1vd7BkP4gtaRfxVrOA1v4FW8YzT13F1 ZlSS7Yzy4KdbCcSmHFUtH0WZntz2uS7B3tNYHiskHcK5e4F5D8QmRqXhO5CGBelEUof6i4 dHoEaApeDUtFUJhIQgBESZ3PoZuwzd99cgOFxGmI1E1M+k/ufMuY9mRMRRLYtg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1673002061; 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=UCPmF4a7fJSy7N958ILHl30COeBhXJyN71lpqNDHdi4=; b=xItUobodVDUSC86Sj9yLS7XaZDvDIEm+IEmdxLPy+yt3wvi7Tc23G6NUcpwDEiWqX/lD+x 0W04LXc1JZamefAw== From: "tip-bot2 for Brian Gerst" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/core] x86/signal/compat: Move sigaction_compat_abi() to signal_64.c Cc: Brian Gerst , Ingo Molnar , Al Viro , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221219193904.190220-3-brgerst@gmail.com> References: <20221219193904.190220-3-brgerst@gmail.com> MIME-Version: 1.0 Message-ID: <167300206067.4906.9151776655307963512.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752672884799664006?= X-GMAIL-MSGID: =?utf-8?q?1754269957548280503?= The following commit has been merged into the x86/core branch of tip: Commit-ID: 6be9a8f18fb2ea88d37a69f076f7011fc012ae1a Gitweb: https://git.kernel.org/tip/6be9a8f18fb2ea88d37a69f076f7011fc012ae1a Author: Brian Gerst AuthorDate: Mon, 19 Dec 2022 14:39:04 -05:00 Committer: Ingo Molnar CommitterDate: Fri, 06 Jan 2023 04:16:02 +01:00 x86/signal/compat: Move sigaction_compat_abi() to signal_64.c Also remove the now-empty signal_compat.c. Signed-off-by: Brian Gerst Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20221219193904.190220-3-brgerst@gmail.com Cc: Al Viro --- arch/x86/kernel/Makefile | 1 - arch/x86/kernel/signal_64.c | 13 +++++++++++++ arch/x86/kernel/signal_compat.c | 15 --------------- 3 files changed, 13 insertions(+), 16 deletions(-) delete mode 100644 arch/x86/kernel/signal_compat.c diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index 96d51bb..dd61752 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile @@ -45,7 +45,6 @@ obj-y += head$(BITS).o obj-y += ebda.o obj-y += platform-quirks.o obj-y += process_$(BITS).o signal.o signal_$(BITS).o -obj-$(CONFIG_COMPAT) += signal_compat.o obj-y += traps.o idt.o irq.o irq_$(BITS).o dumpstack_$(BITS).o obj-y += time.o ioport.o dumpstack.o nmi.o obj-$(CONFIG_MODIFY_LDT_SYSCALL) += ldt.o diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c index 9eea4e8..13a1e60 100644 --- a/arch/x86/kernel/signal_64.c +++ b/arch/x86/kernel/signal_64.c @@ -382,6 +382,19 @@ badframe: } #endif /* CONFIG_X86_X32_ABI */ +#ifdef CONFIG_COMPAT +void sigaction_compat_abi(struct k_sigaction *act, struct k_sigaction *oact) +{ + if (!act) + return; + + if (in_ia32_syscall()) + act->sa.sa_flags |= SA_IA32_ABI; + if (in_x32_syscall()) + act->sa.sa_flags |= SA_X32_ABI; +} +#endif /* CONFIG_COMPAT */ + /* * If adding a new si_code, there is probably new data in * the siginfo. Make sure folks bumping the si_code diff --git a/arch/x86/kernel/signal_compat.c b/arch/x86/kernel/signal_compat.c deleted file mode 100644 index c4e9b85..0000000 --- a/arch/x86/kernel/signal_compat.c +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -#include -#include -#include - -void sigaction_compat_abi(struct k_sigaction *act, struct k_sigaction *oact) -{ - if (!act) - return; - - if (in_ia32_syscall()) - act->sa.sa_flags |= SA_IA32_ABI; - if (in_x32_syscall()) - act->sa.sa_flags |= SA_X32_ABI; -}