From patchwork Thu Jun 20 16:23:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13705876 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F39491B3729; Thu, 20 Jun 2024 16:24:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718900685; cv=none; b=XwcINQDMt2ItVPkdi5/poxvSGdy+7kvBkXTSZPsOZoRhzdlDUFUV3jeYgLgaIt0P0jlKV9uAWbc8iJP20k2dARvhceOeXhNjWsLwzIHQat+alufS3RKrUGujr3E/E/dlHUz/TyXqCHTzu4TmqW2vPMcljE9CuvGaeLhoEN9FEj4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718900685; c=relaxed/simple; bh=+a57zGsAJyEAahaUfY2ckDfX8ym58urOnfoM/RSmrcE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=c8Ul2f4UpXKfXfIzsr3ioOnp3UFTEeM9Gg/eC9A1opP5wxVtPP61AZNfYAbg+DJWCN5kk1VM7xHjAWsV2o0UMwv8jmLyxBtYniq3fRm0e8h16956+33fJCvtOW0/hc1LuXX7EozNuSWv9hJAnoDgKByw9F+DOOPPAWt4dIIy4fc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dEQH6j2t; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dEQH6j2t" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10432C4AF0B; Thu, 20 Jun 2024 16:24:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718900684; bh=+a57zGsAJyEAahaUfY2ckDfX8ym58urOnfoM/RSmrcE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dEQH6j2tUvEM6XSIIbcvx0uQwAkrexBIykSIcZUTXPBXVhMpT0EluDNW8uUheYzrr KlLrppZbU7TbVxxzLqfrVqrt1AySyxMJyhjJF9eFP9M1aRYDkW/CChJzE0kYE1G2Af WKAYgwz90Kr0xbqTg53P6Ul1lSqWkBCpFf7jigslVb33ET8939RpRBRdLl9Ew9XvS1 XuGHy2PyH14F7akZ3UPCVznpDjLJJRAGk2n17J/gSUWOGFRs2cJt4tPb0rKEmHl8eB RewUq0kiVkPfTVoLoT3itzbuHuTe4ukcWKAlAXdkC0jsRRMg/Y6t+sVXafud3or+7v 1S7NlICwmq5Ew== 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, ltp@lists.linux.it, stable@vger.kernel.org Subject: [PATCH 10/15] csky, hexagon: fix broken sys_sync_file_range Date: Thu, 20 Jun 2024 18:23:11 +0200 Message-Id: <20240620162316.3674955-11-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240620162316.3674955-1-arnd@kernel.org> References: <20240620162316.3674955-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-parisc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann Both of these architectures require u64 function arguments to be passed in even/odd pairs of registers or stack slots, which in case of sync_file_range would result in a seven-argument system call that is not currently possible. The system call is therefore incompatible with all existing binaries. While it would be possible to implement support for seven arguments like on mips, it seems better to use a six-argument version, either with the normal argument order but misaligned as on most architectures or with the reordered sync_file_range2() calling conventions as on arm and powerpc. Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann Acked-by: Guo Ren --- arch/csky/include/uapi/asm/unistd.h | 1 + arch/hexagon/include/uapi/asm/unistd.h | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/csky/include/uapi/asm/unistd.h b/arch/csky/include/uapi/asm/unistd.h index 7ff6a2466af1..e0594b6370a6 100644 --- a/arch/csky/include/uapi/asm/unistd.h +++ b/arch/csky/include/uapi/asm/unistd.h @@ -6,6 +6,7 @@ #define __ARCH_WANT_SYS_CLONE3 #define __ARCH_WANT_SET_GET_RLIMIT #define __ARCH_WANT_TIME32_SYSCALLS +#define __ARCH_WANT_SYNC_FILE_RANGE2 #include #define __NR_set_thread_area (__NR_arch_specific_syscall + 0) diff --git a/arch/hexagon/include/uapi/asm/unistd.h b/arch/hexagon/include/uapi/asm/unistd.h index 432c4db1b623..21ae22306b5d 100644 --- a/arch/hexagon/include/uapi/asm/unistd.h +++ b/arch/hexagon/include/uapi/asm/unistd.h @@ -36,5 +36,6 @@ #define __ARCH_WANT_SYS_VFORK #define __ARCH_WANT_SYS_FORK #define __ARCH_WANT_TIME32_SYSCALLS +#define __ARCH_WANT_SYNC_FILE_RANGE2 #include