From patchwork Wed Feb 15 10:00:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 57463 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp102784wrn; Wed, 15 Feb 2023 02:03:56 -0800 (PST) X-Google-Smtp-Source: AK7set87LCVkmctYZM22VQF2hVpPJ1qEqKF50pUw60UDKbaA9eHbpsVc3HaT2L9JofKpc4Rewnbb X-Received: by 2002:a17:903:11c5:b0:196:489a:a79f with SMTP id q5-20020a17090311c500b00196489aa79fmr2241813plh.6.1676455435903; Wed, 15 Feb 2023 02:03:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676455435; cv=none; d=google.com; s=arc-20160816; b=kPCxCAtF+GaLu4y/k1N18/m6oWEzbsMa8w2A9m5qqAo5/hJiutdw9U/1DNOo54brWZ wIxyWaOxl3qftqjoLGqxIxXCgy4HsEspH7f4vgzNV3sfPu14fun7AG+i81TuYF/B4rRk hEbx0M0PQGjnFF7nA97HwsTtvCT0xpbfspFJItT/iTgwZyrkrZQnOu6hPOgGwHXo4VSr NiNbNGgfl7cwzq8G2ajQvuk4hzWPM2UpAy3xIob9MdINHL53BxkfDALuOUP26ZntBcC4 yTjG/3fKipWtNLLSvkeDuDf5pjBmNz4+erArxhVQ3vCjTpQ8ew0GbxUukc1cw8J2Pzo5 oC2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0IKRQqNlHG2QczAaokLXa6Wh/y/hkIQr/X2tH4nMxJg=; b=Bw6PEbUOyVdjQSFu66A5qIcNU+FFz2yNvZc9jX4h9IA59PiX7BhYYBwBUNHoGK0Fyz IJ23Fc5AblI6DmkDKi3Q1qqWWVqD+x47K6/yNf8Ym649zMl3Uf1puki4sV3fF1EiWD+j 0djk1w/f70S/VQHgf3zNWJI+zk1rErG1hMF7vnpJPZbFzDRQQRTvptxD/ikgln530nQR a/i13sJMrlfB69s3ydqHMLlDGhN5hq2VPQNxy4pwEECJ7XBQ7ks5ZKkq6xpC9E/KnqRW auml/dHjDnphLy3ut9AAD5as5U7xYEvDvLTxVTGMWdQdqq8JdIqVCRMNvQkUcETi5Cc1 LrNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=f5m4bayX; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n12-20020a170903110c00b00189c05664e8si19078292plh.563.2023.02.15.02.03.43; Wed, 15 Feb 2023 02:03:55 -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=@kernel.org header.s=k20201202 header.b=f5m4bayX; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233726AbjBOKAt (ORCPT + 99 others); Wed, 15 Feb 2023 05:00:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234030AbjBOKAh (ORCPT ); Wed, 15 Feb 2023 05:00:37 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 050D7367D2; Wed, 15 Feb 2023 02:00:26 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 76E7061AEC; Wed, 15 Feb 2023 10:00:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 85F6AC433D2; Wed, 15 Feb 2023 10:00:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676455225; bh=43J0YXNjBb0jRxtz8vThlKhvDOdInf9zkQbt27M+QHU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f5m4bayXDWcNaGfj+KlsYW91nrNt0XyfqKbJsSapZKcihPDWU07jK9kFJ9jl4c0aL OXeFeFQwOokzSz5cbkPYNuxHJbS9S+3/lc/LxnNL6eYxhD7h0PG0YnbGfTJQnj/msL quq8myu4TLjDy3YVBOI8w4gPsC78+n6VZ4KaScIcxZAg3bgdwn8CvjTmYBLVI1OJfy lbfgS9kR5RSt+7fOqzukFgfaKVyUKuZqzL2DBqEV6gxEqzFpMEanlzmtS3pJ6vUeGt v97LcMSMCl3dS0VxjtMAYjoVToiCb9BrbjeEEtJF4yanD2WtPW7Q2dA43DXLSo3fsa +fwIlKcwA8Pzw== From: Ard Biesheuvel To: linux-kernel@vger.kernel.org Cc: Ard Biesheuvel , Jonathan Corbet , Arnd Bergmann , Tony Luck , Jessica Clarke , John Paul Adrian Glaubitz , Matthew Wilcox , Marc Zyngier , Guenter Roeck , Linus Torvalds , linux-ia64@vger.kernel.org Subject: [RFC PATCH 2/5] kernel: Drop IA64 support from sig_fault handlers Date: Wed, 15 Feb 2023 11:00:05 +0100 Message-Id: <20230215100008.2565237-3-ardb@kernel.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230215100008.2565237-1-ardb@kernel.org> References: <20230215100008.2565237-1-ardb@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3273; i=ardb@kernel.org; h=from:subject; bh=43J0YXNjBb0jRxtz8vThlKhvDOdInf9zkQbt27M+QHU=; b=owEB7QES/pANAwAKAcNPIjmS2Y8kAcsmYgBj7K0TpTQjBcfOZcP32cK1/Uz0i9BerrtVwIY1k V4p5TfewjqJAbMEAAEKAB0WIQT72WJ8QGnJQhU3VynDTyI5ktmPJAUCY+ytEwAKCRDDTyI5ktmP JI17C/9BVjb63M4G2YtKEMbiajE+wbi0zUus/MBs9dX9NHtasw4I9yBfSM2v8jLBwY72h/vMuAQ h/a6Zi+//p+0sg7TxVhHUmat+Mk0cEklPj7Ngq/67bwtPuU6KnonOENiB7cl4xdXnQiZt0r4WcP NiRUGZf7wXJJ+c79LurhvWUgs8q5lJ5GmdP1pEF0CrStgChl9z70qWaAwo57+A765BHkB2qO/1O gzA5lPsxyzsWTzSXgwl8dJM2IjuqkHBHdW90OOXb1By8Emhz9OYs3q+bnNlwWPc4lnddjUeoWWO rPCXgMpzA/1II6vAqZ5gApHFvlPrSXZkc3ouipnumLdJE03WIBOQQTG7oew2wSiBI5oQX8MZMOV ZRXMjpu0NCYAk1N3Yg3e0isT6KrdZzNAAEuBNUusSPDD+t3fv3QtOqlR5WXSK10sEVw918jiV7z uIvc0G1L02/bqEb04zRAHLuxgsgF+8vJZ6M6xfkOiKSkOZDiB/8ScaSuB0eBgIZL5eRsI= X-Developer-Key: i=ardb@kernel.org; a=openpgp; fpr=F43D03328115A198C90016883D200E9CA6329909 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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?1757890935064361563?= X-GMAIL-MSGID: =?utf-8?q?1757890935064361563?= Signed-off-by: Ard Biesheuvel --- include/linux/sched/signal.h | 17 ++++--------- kernel/signal.c | 25 ++++---------------- 2 files changed, 9 insertions(+), 33 deletions(-) diff --git a/include/linux/sched/signal.h b/include/linux/sched/signal.h index 20099268fa257f40..6aecfbf823656f6c 100644 --- a/include/linux/sched/signal.h +++ b/include/linux/sched/signal.h @@ -303,20 +303,11 @@ static inline void kernel_signal_stop(void) schedule(); } -#ifdef __ia64__ -# define ___ARCH_SI_IA64(_a1, _a2, _a3) , _a1, _a2, _a3 -#else -# define ___ARCH_SI_IA64(_a1, _a2, _a3) -#endif -int force_sig_fault_to_task(int sig, int code, void __user *addr - ___ARCH_SI_IA64(int imm, unsigned int flags, unsigned long isr) - , struct task_struct *t); -int force_sig_fault(int sig, int code, void __user *addr - ___ARCH_SI_IA64(int imm, unsigned int flags, unsigned long isr)); -int send_sig_fault(int sig, int code, void __user *addr - ___ARCH_SI_IA64(int imm, unsigned int flags, unsigned long isr) - , struct task_struct *t); +int force_sig_fault_to_task(int sig, int code, void __user *addr, + struct task_struct *t); +int force_sig_fault(int sig, int code, void __user *addr); +int send_sig_fault(int sig, int code, void __user *addr, struct task_struct *t); int force_sig_mceerr(int code, void __user *, short); int send_sig_mceerr(int code, void __user *, short, struct task_struct *); diff --git a/kernel/signal.c b/kernel/signal.c index ae26da61c4d9fa6a..5b7f0bf2713901da 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -1701,9 +1701,8 @@ void force_sigsegv(int sig) force_sig(SIGSEGV); } -int force_sig_fault_to_task(int sig, int code, void __user *addr - ___ARCH_SI_IA64(int imm, unsigned int flags, unsigned long isr) - , struct task_struct *t) +int force_sig_fault_to_task(int sig, int code, void __user *addr, + struct task_struct *t) { struct kernel_siginfo info; @@ -1712,24 +1711,15 @@ int force_sig_fault_to_task(int sig, int code, void __user *addr info.si_errno = 0; info.si_code = code; info.si_addr = addr; -#ifdef __ia64__ - info.si_imm = imm; - info.si_flags = flags; - info.si_isr = isr; -#endif return force_sig_info_to_task(&info, t, HANDLER_CURRENT); } -int force_sig_fault(int sig, int code, void __user *addr - ___ARCH_SI_IA64(int imm, unsigned int flags, unsigned long isr)) +int force_sig_fault(int sig, int code, void __user *addr) { - return force_sig_fault_to_task(sig, code, addr - ___ARCH_SI_IA64(imm, flags, isr), current); + return force_sig_fault_to_task(sig, code, addr, current); } -int send_sig_fault(int sig, int code, void __user *addr - ___ARCH_SI_IA64(int imm, unsigned int flags, unsigned long isr) - , struct task_struct *t) +int send_sig_fault(int sig, int code, void __user *addr, struct task_struct *t) { struct kernel_siginfo info; @@ -1738,11 +1728,6 @@ int send_sig_fault(int sig, int code, void __user *addr info.si_errno = 0; info.si_code = code; info.si_addr = addr; -#ifdef __ia64__ - info.si_imm = imm; - info.si_flags = flags; - info.si_isr = isr; -#endif return send_sig_info(info.si_signo, &info, t); }