From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753226AbcELMyD (ORCPT ); Thu, 12 May 2016 08:54:03 -0400 Received: from szxga04-in.huawei.com ([58.251.152.52]:57150 "EHLO szxga04-in.huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753127AbcELMx7 (ORCPT ); Thu, 12 May 2016 08:53:59 -0400 Subject: Re: [PATCH 20/25] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it To: Yury Norov References: <1459894127-17698-1-git-send-email-ynorov@caviumnetworks.com> <573305A8.50406@huawei.com> <5733149C.4030903@huawei.com> <5250356.myv9GIZ34h@wuerfel> <5733FC71.8070101@huawei.com> <20160512082427.GA1587@yury-N73SV> CC: Arnd Bergmann , , , Andrew Pinski , , , Hanjun Guo , , , , "jijun (D)" , , , , , , , , , Andrew Pinski , , , "Zhangjian (Bamvor)" From: "Zhangjian (Bamvor)" Message-ID: <57347C9E.7010708@huawei.com> Date: Thu, 12 May 2016 20:52:46 +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: <20160512082427.GA1587@yury-N73SV> 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.0A090201.57347CBD.00B3,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: fe9236ba55a761b39752749db82a3467 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 2016/5/12 16:24, Yury Norov wrote: > On Thu, May 12, 2016 at 11:45:53AM +0800, Zhangjian (Bamvor) wrote: > > [...] > >>> Hmm, that is indeed tricky. I think COMPAT_SYSCALL_WRAP4 rightfully >>> refuses the loff_t argument here, as the common case is that this is >>> not possible. >> It works if I apply the following patch, I defined the wrong `__TYPE_IS_xxx` >> yesterday. Should we merge this into ILP32 series or send the compat.h >> and syscalls.h individually? The current series of ILP32 is a little bit >> long and hard to review. >> diff --git a/include/linux/compat.h b/include/linux/compat.h >> index ba6ebe0..22a9565 100644 >> --- a/include/linux/compat.h >> +++ b/include/linux/compat.h >> @@ -747,7 +747,8 @@ asmlinkage long compat_sys_fanotify_mark(int, unsigned int, __u32, __u32, >> #ifndef __SC_COMPAT_CAST >> #define __SC_COMPAT_CAST(t, a) ({ \ >> BUILD_BUG_ON((sizeof(t) > 4) && !__TYPE_IS_L(t) && \ >> - !__TYPE_IS_UL(t) && !__TYPE_IS_PTR(t)); \ >> + !__TYPE_IS_UL(t) && !__TYPE_IS_PTR(t) && \ >> + !__TYPE_IS_LOFFT(t)); \ > > I think it's wrong, as loff_t is 64-bit in 32-bit userspace, and this > will clear meaningful data in top halve. Yes. It is my fault. The original thoughts is clear the up 32bit for size_t. How should we skip the loff_t? Regards Bamvor