From patchwork Thu Oct 1 14:12:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11811527 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 098BA92C for ; Thu, 1 Oct 2020 14:13:56 +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 BEBB821D24 for ; Thu, 1 Oct 2020 14:13:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iVzT1L0Z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BEBB821D24 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=jnrtae+ucTMxZ3Z0QNMTTUUVNDR4FgoXKCip6mzi7ZU=; b=iVzT1L0ZeJW+uVNsKljqEnfslL 6HP1uNihEmUtpDkmnNSqpx/EA2JMAESz+tHm3hp+yUZgmxxKHQlU6gG0oZStzYj5dm15YW4nndT/p OUnq+gA7Lp0Bb+npF5DDCDb9jrNrmeGG1kzYu4k9Z6IpIh8Yu9Cnf3jtFjZbpuu+FiqQ/UuKITmX1 GQOqglCDGm68iQEZfEdlEUWov6q+KSPLla3EvbqyApf/LWIBjj7uxPJG63hnbDPwqpo9x5K/Njqbl bqDit3/uYLes+6iwdkjv5/kWme8PgUlggc8++8ZkXCLRxQcHBBTxnqYfP7yn3SQHw44rw1J2xvONh Mw5eAa6w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNzL0-0001WE-E9; Thu, 01 Oct 2020 14:13:38 +0000 Received: from mout.kundenserver.de ([217.72.192.73]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNzKO-0001Ay-CK for linux-arm-kernel@lists.infradead.org; Thu, 01 Oct 2020 14:13:04 +0000 Received: from threadripper.lan ([46.223.126.90]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MDQmW-1kEben1bZW-00ASUI; Thu, 01 Oct 2020 16:12:51 +0200 From: Arnd Bergmann To: Russell King , Christoph Hellwig Subject: [PATCH v3 00/10] ARM: remove set_fs callers and implementation Date: Thu, 1 Oct 2020 16:12:23 +0200 Message-Id: <20201001141233.119343-1-arnd@arndb.de> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:uvT0YYMCSl5yaLC0/r8RyA+xGdKVT1cAiXxy5fc6u04+Z7n9ImA J6uOW5QZ/LsnTiydt7y11fk9jnUMLq1J2fKNQj/BVedh2XfzFisuEDQrKA4ybpaUNFEUtnz IuuxJCH7VyCbIARbJox82g2ljhI7S52bXKBbaIFCrjE4UgS6vcwwQxXrAkf1Cv9E4YEMpgW geXoKOZ1Dl3DAgMusEkNQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:upTsn8YWAJw=:bCdYpMIkHwcotA5EW6TSXq iIuZdlAHh5fZnmzQj7wOUNsBOJbqbmCGyhYbaO6GS6UOUxI9ePnw49zQct8RaEDRTRf8KKiGk 03Sf2fIJcCnG4gpMu7KeYxOPHH0Vriqz27KTWuMNHDZ6OF0iTbtEhAn96dMHTJD97mHBTu6Jq uoTgZi6ElWW2sEOnp2jrrHq0Kk20CSwAnLlPWC7dlLIijzc+Id82FNXfaU55LPfJ014kOOrDi m7wnkLf87f33csKJEcUu6HtABRlMRwVtNOu7Roi6Cze7Zc/hmLyTca4zSNoFCA+f1Jg6SIMax f2YLED/AMOF/6xtWOihOzizHtGll7SaSeIMJs887u/RFXBr41sztwh1PbmOx4y2F5QBY2ETYg AmZcE2pwFlcJe5tPZkyxzddnXgUog0VxyqFm1VDm18d7TpCZy7dXZjxXSJNjZ6dxtDboz4kE1 DfkuwdL1lHKaIU3mYQneWnDU+1yutpqBZ17EvdfJ46lnb5V6mDvfJ6l34f9GrrrLDt65+6lAP J0oMVZ9cZxHTvw1tZgGRytaTxN9nT0a4j5QEU8PGZ8s/3XIIrH7EQSjc4/MnX0ALshbVpAr+J 1z736Q3pLNDRpkGP5+aoBg2Y34ox0wyvlyHyb1fddP6bS3nw9cEnl74x+XdHQQ0utT4fQFcSL Wm3H8Nb/Wzhy33xYSSY9F+Jae2cCHLzKbFr/TPGg6ua5OCHTrFYkDYXR+e/jnfnB/SqlebcML rk0C0eo5hAtplfQogMhE4zIzh65DH0MOoLsNW9w8O7ZYx5TPJf5CotTsnl6Uf+Y6oqv1aG7La J7dnKMtRyjA1fFUJw4BAFHowogyZNrte4cp0yzvlVrdQeajzPF2AlWSQWdEGnX1h07a8OGQ X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201001_101300_683804_2A3A0B6B X-CRM114-Status: GOOD ( 17.79 ) 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) [217.72.192.73 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [217.72.192.73 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender 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, Arnd Bergmann , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Alexander Viro , 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, This is the updated version of my ARM set_fs patches, hopefully I managed to address your previous concerns. 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. I also tested the syscall_get_nr() in all combinations of OABI/EABI kernel user space and fixed the bugs I found after Russell pointed out one of those issues. The series is now based on https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git/log/?h=base.set_fs with no extra patches, after I included a patch to define a private TASK_SIZE_MAX. Russell, if you would still consider this seris for the next merge window and there are no further review comments, you can pull it from https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git \ arm-kill-set_fs-7 At this point I'd probably just defer it another release and rebase once -rc1 is out, dropping the TASK_SIZE_MAX patch. Arnd Arnd Bergmann (10): 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: provide a TASK_SIZE_MAX definition ARM: uaccess: remove set_fs() implementation arch/arm/Kconfig | 1 - arch/arm/include/asm/memory.h | 2 + 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 | 17 +-- arch/arm/kernel/process.c | 7 +- arch/arm/kernel/ptrace.c | 9 +- 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 ++++- 22 files changed, 334 insertions(+), 283 deletions(-)