From patchwork Fri Sep 18 12:46:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11785003 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DF5DF6CB for ; Fri, 18 Sep 2020 12:51:29 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F13812084C for ; Fri, 18 Sep 2020 12:51:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="zR139WK9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F13812084C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arndb.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=hlHBRMb6yAda29DKBaSMZCqpSMx7u3Y/CkndvPsZOYQ=; b=zR139WK9nnC/CDikPtWOs8YJfE FtrvbDIkhgwThNP7Q6RX4rnXhosZvvXLUH74qUqXqrCestMhezR5TY2h+luXF9qd7a6YXpZvc8u2t IVZqQUQEGuzMbvwrI4HStMmFox+b5beolPa+BNI51tTl4yesQwQnXxNE73wwgESfCVAXKpDWOylIx zGi3Xr2+CEvqRPw0TYcKYrcdFnV9uitZla50zMchF3aB6WZIYtqNnhDJCw6mqQV7IfCRB49Jx24tX dv6Vmf/qedEzoOYRWlIrz+f8AWQvWm5J7qcaw7JPGk6q2YnjkMSsjwtELz0Z+iZqikaCm7PDUGVoW pszLyXRw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJFpO-0007Kf-IX; Fri, 18 Sep 2020 12:49:26 +0000 Received: from mout.kundenserver.de ([212.227.126.187]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJFmk-00067X-2b for linux-arm-kernel@lists.infradead.org; Fri, 18 Sep 2020 12:46:47 +0000 Received: from threadripper.lan ([149.172.98.151]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1M89XH-1kOUyv18jL-005LlK; Fri, 18 Sep 2020 14:46:34 +0200 From: Arnd Bergmann To: Christoph Hellwig , Russell King , Alexander Viro Subject: [PATCH v2 0/9] ARM: remove set_fs callers and implementation Date: Fri, 18 Sep 2020 14:46:15 +0200 Message-Id: <20200918124624.1469673-1-arnd@arndb.de> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:nmxKQc8+mlxCdbwLh20YUK4iPyhFqrbIVbvONGu23xOQJJLdRN2 2+xyADSruG1O9wHrRftwYOLBHwRJfDyIXwaFTqnimdCPzKF1SKWmVOt6fCwk3KuiaCx2wXO nkXcOq0MrNeyJcp3/UixkWJ4gh/yKLCgR1IjVyFiiEnKoX5Q+84c27tN793aFzlv+w0JEdv Rpy7xvT/VMvSLKz4XqQaA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Yb7i0b89nVM=:P1939kZNz1oQxZjce03F3i n1Vv9IQaC8UxUrT/lhWAgqknz972LLDSVMGUl84nEnA2cKCDf0QNINGtTzmSlA9ler9NXWmgU 6cj6c2JfKMzjygFjM7Z1qFWp95ujwd9Ki37gkY8+hGQgwg7/MDe4yfBlBJQ43uWaFuuGvmS8Y YFyRZgfQXcL8giaaOrOoxwmk6Zn6vxCjcKEekj8EZamFq3WSVENaul1aSB5FWp7/1ubxio+HF HysS+bKsKGfbnEqCu7Zbho9RRW+AYEMN7VLNqXF6HDM3zwKZoSFO3qUDMQlQwkwwWFqQl8VBC 4MHyBPovfS7DpjrXuHEGrdiYYOj25Bkj6nFHk14cKY0VadkiGHybWWbGUw5JzrpCR/XUpO3EL eqjcYy0JywW2nOsraHUvvHuTRbA9bFEH6sHxP9oJ6WedJrBS7KtOhUx2pBDXmKp3t8jjtp5OM SJc28Lf4oBF8XifenM3gWPodnuJ/NTpdPQ+UUvKLUQnC7Riz71XGvZ0S6eWCwGEX/vVGx0/kP FaXCHrY6AGvcVfT9uNteygV3yCSfCoyH0hn5//euyx0hfryqcwgYqpL1lbxO5eb01jY6IqHn3 pHxpIAeYjinrLpCUHGXCz6OrZ2feJB7FWs91rZkFsRpC8IjX7DOlFRKvHgMMsFKz5KhCmIf6N 6uS+B0cVAFoL4+qOUN/Evcz0sqiEz7xvpLqp+g9QhgROLmIlRYMxRe4f5Oc9t6nCoMSne0bY0 1Tumx1w2w1hwfzgot5teXWCUUVMrUajMHwJjFPhk8/mpznPZ2Ne6tNs+EKMh8nOtd2VtVywDE FlU3pubYMMb4M3ROJ+YHubbyBU1kIS0+bhY3JC16aC4l69RCvDouoB6B+ZiPT5iSEipC04w X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200918_084642_561481_785A6DCF X-CRM114-Status: GOOD ( 14.26 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.126.187 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.227.126.187 listed in list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, linux-mm@kvack.org, Arnd Bergmann , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Hi Christoph, Russell, Here is an updated series for removing set_fs() from arch/arm, based on the previous feedback. I have tested the oabi-compat changes using the LTP tests for the three modified syscalls using an Armv7 kernel and a Debian 5 OABI user space, and I have lightly tested the get_kernel_nofault infrastructure by loading the test_lockup.ko module after setting CONFIG_DEBUG_SPINLOCK. Arnd Arnd Bergmann (9): mm/maccess: fix unaligned copy_{from,to}_kernel_nofault ARM: traps: use get_kernel_nofault instead of set_fs() ARM: oabi-compat: add epoll_pwait handler ARM: syscall: always store thread_info->syscall ARM: oabi-compat: rework epoll_wait/epoll_pwait emulation ARM: oabi-compat: rework sys_semtimedop emulation ARM: oabi-compat: rework fcntl64() emulation ARM: uaccess: add __{get,put}_kernel_nofault ARM: uaccess: remove set_fs() implementation arch/arm/Kconfig | 1 - arch/arm/include/asm/ptrace.h | 1 - arch/arm/include/asm/syscall.h | 16 ++- arch/arm/include/asm/thread_info.h | 4 - arch/arm/include/asm/uaccess-asm.h | 6 - arch/arm/include/asm/uaccess.h | 169 ++++++++++++++------------- arch/arm/kernel/asm-offsets.c | 3 +- arch/arm/kernel/entry-common.S | 16 +-- arch/arm/kernel/process.c | 7 +- arch/arm/kernel/ptrace.c | 4 +- arch/arm/kernel/signal.c | 8 -- arch/arm/kernel/sys_oabi-compat.c | 181 ++++++++++++++++------------- arch/arm/kernel/traps.c | 47 +++----- arch/arm/lib/copy_from_user.S | 3 +- arch/arm/lib/copy_to_user.S | 3 +- arch/arm/tools/syscall.tbl | 2 +- fs/eventpoll.c | 5 +- include/linux/eventpoll.h | 18 +++ include/linux/syscalls.h | 3 + ipc/sem.c | 84 ++++++++----- mm/maccess.c | 28 ++++- 21 files changed, 328 insertions(+), 281 deletions(-)