From mboxrd@z Thu Jan 1 00:00:00 1970 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 755BB194A50; Wed, 3 Jul 2024 11:11:54 +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=1720005114; cv=none; b=hRO7w2ZWQh9HosytLkThJQafoAVg2L8L0L2Z+WsBsV7Vp8/98+RTfq/AG9rkxw1oaDFZf0LUUQWlfMfUmMsOVUCS3EafpJpAHn8/lRVFugzof0/sfLhyo8iqiTn7QF+1tmZKaBMia2CBfXYk4XqbtfEEE5qhdNO5sJJWt4YmNHk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720005114; c=relaxed/simple; bh=CnyfphxRfkrQKMsc5FxcvGPkFWjcbOFFE4ClLDtzpJc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KgFZwWL0VfiqDBmBxAMGPSeIRTim1oyiNNfWLmqR62kqriV9Ar8xDVUCM5+4FAkmSTHpcHFT0JPGzGBE5xVu1BQ8QA2zcc22yoh/6xzEk1jOM4b+bBg0m1EkU8zDHR3XfSWO7b7eRfNT3DVO04WmFS+TkdM7NOj0eTB4bsSPENw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=IrA2pNaZ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="IrA2pNaZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F11C0C2BD10; Wed, 3 Jul 2024 11:11:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1720005114; bh=CnyfphxRfkrQKMsc5FxcvGPkFWjcbOFFE4ClLDtzpJc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IrA2pNaZNMgvg/vtup14X9qUoAAWHpWj1FdYCI9QLjSimvfPJAYuhrXg5rcoFHmKh 36jW9rwrE+M+Lv7Q7vd0YkOw2uLlo410Dtf1dsL/dzl7o5+Hm8uzrzakvKyT763uLv JDBR76EiNFq+bwDOt6n8E5ZFuTg0lfbdx0zeU6QE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Guo Ren , Arnd Bergmann Subject: [PATCH 5.10 266/290] csky, hexagon: fix broken sys_sync_file_range Date: Wed, 3 Jul 2024 12:40:47 +0200 Message-ID: <20240703102914.190476503@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240703102904.170852981@linuxfoundation.org> References: <20240703102904.170852981@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann commit 3339b99ef6fe38dac43b534cba3a8a0e29fb2eff upstream. 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 Acked-by: Guo Ren Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman --- arch/csky/include/uapi/asm/unistd.h | 1 + arch/hexagon/include/uapi/asm/unistd.h | 1 + 2 files changed, 2 insertions(+) --- a/arch/csky/include/uapi/asm/unistd.h +++ b/arch/csky/include/uapi/asm/unistd.h @@ -7,6 +7,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) --- 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