From patchwork Mon Jun 24 16:36:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 807047 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp1969716wrt; Mon, 24 Jun 2024 09:37:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXAX28sohD9EY8wWc/SR3WMWhuD8BYwOVapocTQcl+7Egs+4gVV0VVyyWH1R8CfVHKtj55RZALbdtbkDBdHxxfH X-Google-Smtp-Source: AGHT+IFwnQmXuTf4Z5D9/HnHCADzjnROsb9wncq24pGkuEhCeZMGTlCHxjwnsgsFEYYPP0vpVSLu X-Received: by 2002:a67:e910:0:b0:48f:4c08:51ce with SMTP id ada2fe7eead31-48f52a5bde1mr4236862137.18.1719247057721; Mon, 24 Jun 2024 09:37:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1719247057; cv=pass; d=google.com; s=arc-20160816; b=1Jwzodtw82k3+9XBo8wsCbuVvLXtxzhPx/ix54VeneLsFw7zDAdYAt2KCrkvO5RguY Cf0nijkkvMgJrifSW6Gt82F7S/FunBTB4FthwbwgYXj94Aw6lIhrobLaHdVc/RotKuJU jvK2BX5JDwiBJ7XTTXsGoCqjnJd6XNrwfVR05kqMkNs56J+jE7lBLrpq/irP72DytwC2 klBuEZCwCTGbFJypdgumWZNaqEBkyIt1nztzF7CoGYpexkV713VO20BJopuCyKTLLCK3 L0ELNSVmaVIVvQuiE8dZfs33vKoGnqHp96pyPARFP5TWL2hppIv1EwW/VNgLfytVMqQU FeMw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=tcmPoqfgalaQ+J3Ht9Hr/eE0P3/3vfuvCbdwtrzwbYQ=; fh=/Leaim49jCG8ThqCg/tR+89kmuUv50DlIGS8+FtXxW8=; b=ze4RvVCM+guy5WulRsC/nqU68RcLTz6129VgUp662447qH63IMGtqPmVTDMLzky2oa AMuiAznm6wdbAhdpwZGfNsw592PL6ZIEhlGArR3WyWAqoFq8rofTmmahnKFatO6gSpqF abL1v0lF7vk0d+wQN/USudYXNrn6OxhOk/SOJHhAclJPxIj2dllWRxeCXYU3v5wtExnO na43S3GqXZ3iVdTrU4DLUj2qjZXugZKvaoxaWB2zjEyrxp+bXJ9UiBqeDNXJHOcHAbMi fzggk0MBQSzsCm/SBtlaapBdVx/Djt3gCctgrX8JjN+rW0cQkn4Rnp6LpEuUCi0CrMga KLdA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XAOXiQwJ; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id ada2fe7eead31-48f4d5f0387si617687137.79.2024.06.24.09.37.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 09:37:37 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XAOXiQwJ; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ADF3B384AB5C for ; Mon, 24 Jun 2024 16:37:36 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by sourceware.org (Postfix) with ESMTPS id 8F8953858D35 for ; Mon, 24 Jun 2024 16:37:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8F8953858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8F8953858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2604:1380:40e1:4800::1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719247046; cv=none; b=DihkrP+ag3792o6aRQllovL/H9CuGHwFxpKTDxv/s6rGiyLbK/r99zpdMrlFjz5vucOSPmHp3PehthV4AbCTw5yvvnt71HHHjAQkQQ5wQPTBwW2NFMiL1KKhwc1HuyOBIyP4xk2mheYL6T5trKd0ZxEepKT8+hVOGTQk7kozM/U= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719247046; c=relaxed/simple; bh=9d9HuVaLbxVvYIk0v7QFxagihDIyuBmHy3l8B29CCxM=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=QXoSsy3KdjfzrDc2HUBRDJpSCPMxmztgz1UhVPoXXTTgJ8oEhx7rONHjlZxaGw6aagiCgkPED4X4Sqv/HcffLCmUs323Y+xOQLYEvCwMEBEwnYhhFSEE5YCZRmxaLbXK9soEm/86Rx6ChLSN5wMQSUQ8RtSnmd38xx53hkCmREo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 9D0B5CE1331; Mon, 24 Jun 2024 16:37:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE60CC2BBFC; Mon, 24 Jun 2024 16:37:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1719247039; bh=9d9HuVaLbxVvYIk0v7QFxagihDIyuBmHy3l8B29CCxM=; h=From:To:Cc:Subject:Date:From; b=XAOXiQwJP3v0AYOMXFbOl+aKwam/G8B8vHPH86S/9LShi99xORnlW4piK1/QXzERr xSDLEVIY2XUL2OstfMJIdt0rq3JemXryccEJPkd4ghrh6UDdFQr1tbDgHrMymJ5lkT LCJAwLpGg/YP4mak7hJUeKjerzj3Sjeuk9mEeI0PO4M8ngXVwYPSEkSZYIjYXv3lsO IWmu9kkIzBkQryYrYGbzA0waCr299MRkDBhVI15NNGekWiHeTRxr6a39naS5fy6XeX AT9Pv9joOgDX2Gg6Zy/ej9wfBbyGwtMGKM4NEGi3ynRBEI8qKiLmDIsSwZL2m2icP1 basUBX/zL+P3Q== From: Arnd Bergmann To: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Arnd Bergmann , Thomas Bogendoerfer , linux-mips@vger.kernel.org, Helge Deller , linux-parisc@vger.kernel.org, "David S. Miller" , Andreas Larsson , sparclinux@vger.kernel.org, Michael Ellerman , Nicholas Piggin , Christophe Leroy , "Naveen N . Rao" , linuxppc-dev@lists.ozlabs.org, Brian Cain , linux-hexagon@vger.kernel.org, Guo Ren , linux-csky@vger.kernel.org, Heiko Carstens , linux-s390@vger.kernel.org, Rich Felker , John Paul Adrian Glaubitz , linux-sh@vger.kernel.org, "H. Peter Anvin" , Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, libc-alpha@sourceware.org, musl@lists.openwall.com Subject: [PATCH v2 00/13] linux system call fixes Date: Mon, 24 Jun 2024 18:36:58 +0200 Message-Id: <20240624163707.299494-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patch=linaro.org@sourceware.org From: Arnd Bergmann This is a minor update to v1 of this series. If there are no new concerns, I would like to send this as a pull request for v6.10-rc6, which is a little late, but these are all bug fixes. Changes since v1 are: - collect acks - minor fixes to the changelog text - drop mips patch that was already merged - drop the time32 patch that caused build failures - fix a kernel/sys_ni.c stub bug that was exposed by the compat_sys_io_pgetevents_time64 change Arnd --- Original series description: I'm working on cleanup series for Linux system call handling, trying to unify some of the architecture specific code there among other things. In the process, I came across a number of bugs that are ABI relevant, so I'm trying to merge these first. I found all of these by inspection, not by running the code, so any extra review would help. I assume some of the issues were already caught by existing LTP tests, while for others we could add a test. Again, I did not check what is already there. The sync_file_range and fadvise64_64 changes on sh, csky and hexagon are likely to also require changes in the libc implementation. Once the patches are reviewed, I plan to merge my changes as bugfixes through the asm-generic tree, but architecture maintainers can also pick them up directly to speed up the bugfix. Cc: linux-arch@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org Cc: Helge Deller Cc: linux-parisc@vger.kernel.org Cc: "David S. Miller" Cc: Andreas Larsson Cc: sparclinux@vger.kernel.org Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Naveen N. Rao Cc: linuxppc-dev@lists.ozlabs.org Cc: Brian Cain Cc: linux-hexagon@vger.kernel.org Cc: Guo Ren Cc: linux-csky@vger.kernel.org Cc: Heiko Carstens Cc: linux-s390@vger.kernel.org Cc: Rich Felker Cc: John Paul Adrian Glaubitz Cc: linux-sh@vger.kernel.org Cc: "H. Peter Anvin" Cc: Alexander Viro Cc: Christian Brauner Cc: linux-fsdevel@vger.kernel.org Cc: libc-alpha@sourceware.org Cc: musl@lists.openwall.com Arnd Bergmann (13): ftruncate: pass a signed offset syscalls: fix compat_sys_io_pgetevents_time64 usage sparc: fix old compat_sys_select() sparc: fix compat recv/recvfrom syscalls parisc: use correct compat recv/recvfrom syscalls parisc: use generic sys_fanotify_mark implementation powerpc: restore some missing spu syscalls sh: rework sync_file_range ABI csky, hexagon: fix broken sys_sync_file_range hexagon: fix fadvise64_64 calling conventions s390: remove native mmap2() syscall syscalls: mmap(): use unsigned offset type consistently linux/syscalls.h: add missing __user annotations arch/arm64/include/asm/unistd32.h | 2 +- arch/csky/include/uapi/asm/unistd.h | 1 + arch/csky/kernel/syscall.c | 2 +- arch/hexagon/include/asm/syscalls.h | 6 + arch/hexagon/include/uapi/asm/unistd.h | 1 + arch/hexagon/kernel/syscalltab.c | 7 + arch/loongarch/kernel/syscall.c | 2 +- arch/microblaze/kernel/sys_microblaze.c | 2 +- arch/mips/kernel/syscalls/syscall_n32.tbl | 2 +- arch/mips/kernel/syscalls/syscall_o32.tbl | 2 +- arch/parisc/Kconfig | 1 + arch/parisc/kernel/sys_parisc32.c | 9 - arch/parisc/kernel/syscalls/syscall.tbl | 6 +- arch/powerpc/kernel/syscalls/syscall.tbl | 6 +- arch/riscv/kernel/sys_riscv.c | 4 +- arch/s390/kernel/syscall.c | 27 --- arch/s390/kernel/syscalls/syscall.tbl | 2 +- arch/sh/kernel/sys_sh32.c | 11 ++ arch/sh/kernel/syscalls/syscall.tbl | 3 +- arch/sparc/kernel/sys32.S | 221 ---------------------- arch/sparc/kernel/syscalls/syscall.tbl | 8 +- arch/x86/entry/syscalls/syscall_32.tbl | 2 +- fs/open.c | 4 +- include/asm-generic/syscalls.h | 2 +- include/linux/compat.h | 2 +- include/linux/syscalls.h | 20 +- include/uapi/asm-generic/unistd.h | 2 +- kernel/sys_ni.c | 2 +- 28 files changed, 67 insertions(+), 292 deletions(-) create mode 100644 arch/hexagon/include/asm/syscalls.h