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: 806001 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp378477wrt; Thu, 20 Jun 2024 09:26:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWMLDgXKSQtGS6Sz4LAHpAPD8ZjPMo+QNLNMFJP40YZUnfu52Xa7J8KlHqrc3DDFM2g/hu8dckKeUjKYq7eam7d X-Google-Smtp-Source: AGHT+IGeNU3t8w9fUyMLcZs2x8HG9ieHZTWaVzSDboToS0trSw0O/fSlrb5ZHPTanlOPVl66q1oR X-Received: by 2002:a67:ee09:0:b0:48d:a9f2:4803 with SMTP id ada2fe7eead31-48f02b2aaf0mr7829745137.3.1718900773446; Thu, 20 Jun 2024 09:26:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718900773; cv=pass; d=google.com; s=arc-20160816; b=G2LynAXqqqIN20+JCKfDmnmEiniZrdg9c9j+Twz8IQ4lDQBzVenUk21oZhHfGpp4D0 hEOCMw8zRB6ookEpvm9PFJnjUcD6iVyh2/4IVcWyH3ey4kHp0fpgjzvyji9fct7DeUso w1z9UnSv0dHOiL04G+56UV2t4HCWMxVZpF5EhAxYB5aGPO3oYPq7+AQdXcczOzvcTa2r nN9b2DNyGosKnrRWDiXohQqK0zd80G+DpP/hmK4CJOyyRXxsuM8k9QNyxX1PH9NvZ2xU eeoRSqz5SkxYoqpxvVlPSP12aSRm8EyutBe5/DwAb+saaXQSHPfGtj42pSIX3BODVCpN MHJA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=N9/T8M70u7br/0OAbMgQmKNpJnJxFprX6sr02Qo+G48=; fh=z7WBpRnpEcajsi+eCrB9be3IBpnFpuOD2qMP8Shfqmo=; b=i4grdMfJl/oSHGS/INUni80/R1kR7aR0AySEA9PynPHi/nFXz/4elHg320RvymsGgb jT0t0pqCHbXNW/IZ7aFKkVpVFGHdKOeJmGTlzsJVHIaGMzc/NJ1Q3ZvkVnB66o5a1C0F rtr/oxUCYSRKZHXiMCcIeecGgwS0MbgQ9K4p/qP6W2MEwwgDywGxle3G3B5YNRNcZare 1h7ax1ugx9dTFFTIk5m1bUt0H8yoySSlxAvOGfJuhDWQc8r5TwHD0tq5YzSItzYesXqh joUIKPXe00xmyIhMxW0xEfD1iynORvzb/fy1JbcY3Klfz7J7lc6sf3FLatg76ylImUXj Darw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dEQH6j2t; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c 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. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id a1e0cc1a2514c-80f65e59163si376132241.107.2024.06.20.09.26.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 09:26:13 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dEQH6j2t; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c 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 0FBE638930C1 for ; Thu, 20 Jun 2024 16:26:13 +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 6219438930C1 for ; Thu, 20 Jun 2024 16:24:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6219438930C1 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 6219438930C1 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=1718900694; cv=none; b=aGt5f2DgGkDlIcNtjmvgGRfcCC97p2La4piir6aAMeS1/KkZlhoY3zDU0Zfinvp99aujX6Dbqfibc9bZs95u93VRY2wyeMOC42Qf+hsLrCgVfKm4IxURqIwZkuMOfbTz6OpfhBCoS3oJJHuX9tktcTExgGLj9Y8F7NK0Shw8h3Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718900694; c=relaxed/simple; bh=+a57zGsAJyEAahaUfY2ckDfX8ym58urOnfoM/RSmrcE=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=OjygyjHk8oRsJtEwHpCcXXhO4FNKq6+X8otkWxCLqlyluURc2pFgKP4Di12uwFB1rtnXyZwdI8kSgDbsvLZwOQ0lJ3dKgr6q6LMcom07G1l2/PGs9VdmCBzksdc/z/VSkv0EOiHwHPdehLuVac+flbhjAywRQyeM6IQi4T91R5A= 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 7E5E3CE2741; Thu, 20 Jun 2024 16:24:45 +0000 (UTC) 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> MIME-Version: 1.0 X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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 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