Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752419AbcCaHhn (ORCPT ); Thu, 31 Mar 2016 03:37:43 -0400 Received: from szxga04-in.huawei.com ([58.251.152.52]:5016 "EHLO szxga04-in.huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751170AbcCaHhl (ORCPT ); Thu, 31 Mar 2016 03:37:41 -0400 Subject: Re: [RFC5 PATCH v6 00/21] ILP32 for ARM64 To: Arnd Bergmann References: <1452792198-10718-1-git-send-email-ynorov@caviumnetworks.com> <20160329120147.GA3551@yury-N73SV> <56FA816D.60101@huawei.com> <3298847.t7vI4YM3gJ@wuerfel> CC: Yury Norov , , Andreas Schwab , , , , , , "jijun (D)" , , , , , , , , , , Bamvor Zhang Jian , , "Zhangjian (Bamvor)" From: "Zhangjian (Bamvor)" Message-ID: <56FCD358.3030807@huawei.com> Date: Thu, 31 Mar 2016 15:35:52 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <3298847.t7vI4YM3gJ@wuerfel> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.111.72.170] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.56FCD370.0105,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: e75bdbceb8d92e1758f7fafa28b65c6f Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1662 Lines: 51 On 2016/3/29 21:27, Arnd Bergmann wrote: > On Tuesday 29 March 2016 21:21:49 Zhangjian wrote: >>>>> >>>>> Then we could remove the __USE_FILE_OFFSET64 in stat.h and fcnt.h in >>>>> aarch64. And truncate and ftruncate is same as truncate64 and >>>>> ftruncate64. >>>> >>>> I don't know what the glibc developers prefer, but I think the >>>> result needs to be something like that: either __OFF_T_TYPE is >>>> defined as you write above as a 64-bit type, or the user-visible >>>> off_t typedef unconditionally uses __OFF64_T_TYPE rather than >>>> __OFF_T_TYPE. >>>> >>> >>> I'm not the glibc developer as well, but I think it's OK. >> IIUC, it is usually what glibc does. >> If we want to define off_t to 64bit in ilp32, the follow syscall may >> need to define as non-compat too: >> sys_fadvise64 >> sys_sendfile >> sys_sendfile64 >> sys_lseek >> sys_splice >> sys_sync_file_range2 >> sys_truncate >> sys_ftruncate > > I'm not following here. Do you mean in the kernel or in glibc? kernel. > > In the kernel, the list of syscalls is fine, because we already only > provide syscalls passing loff_t as I said, and that is 64-bit. Sorry I am lost here. I understand that the syscall passing loff_t should wrap to 64bit syscall. But if we define off_t as 64bit, then all the offset relative syscall should wrap to 64bit syscall. > > In glibc, I think we need to define fewer entry points, not more. > Instead of having both lseek and lseek64, only one of them should > be provided, and that should always take a 64-bit offset, calling > into the kernel with the _llseek syscall entry. Agree. We should avoid the duplicated definition. Regards Bamvor > > Arnd >