Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965024AbbLVVpP (ORCPT ); Tue, 22 Dec 2015 16:45:15 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:53187 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932979AbbLVVpI (ORCPT ); Tue, 22 Dec 2015 16:45:08 -0500 From: Arnd Bergmann To: Catalin Marinas Subject: Re: [PATCH v6 13/20] arm64: ilp32: share aarch32 syscall wrappers to ilp32 Date: Tue, 22 Dec 2015 22:44:14 +0100 User-Agent: KMail/1.12.2 (Linux/3.19.0-27-generic; KDE/4.3.2; x86_64; ; ) Cc: Yury Norov , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, pinskia@gmail.com, Prasun.Kapoor@caviumnetworks.com, schwab@suse.de, broonie@kernel.org, Nathan_Lynch@mentor.com, agraf@suse.de, klimov.linux@gmail.com, jan.dakinevich@gmail.com, ddaney.cavm@gmail.com, bamvor.zhangjian@huawei.com, philipp.tomsich@theobroma-systems.com, joseph@codesourcery.com, christoph.muellner@theobroma-systems.com References: <1450215766-14765-1-git-send-email-ynorov@caviumnetworks.com> <1450215766-14765-14-git-send-email-ynorov@caviumnetworks.com> <20151222122514.GA1302@e104818-lin.cambridge.arm.com> In-Reply-To: <20151222122514.GA1302@e104818-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201512222244.15155.arnd@arndb.de> X-Provags-ID: V03:K0:Kqj+yU3gsAG8xgrSQkC10qSwCzNab8aDxVo5lIMOad2SXWopogB NylZ0g1OEDCNx38955xHcPmAbN/8KPQk+MuMY7dODZ8MXKd+N16418FOOrQWsRddaGTwXjV UciykpppbZylJx1RkGeYgzIxMm19LCvEzNfYLnYRGQtaJoPj3i2a6gWJbAuk11jbwOrH9Xz /1ykmjzllCZ3INcLxETOA== X-UI-Out-Filterresults: notjunk:1;V01:K0:YQtqOxRcW7Y=:XRawTFr4piVKE3TdU8T8NG a9r+5jDUJo47Zy+J8h/HLGjWG8IMwM7ydFiLoz15e/47bDzrRv6Yi1fC2GxgUA2UZrqtNrO9k mcuZl1s6R4axqQXxJM2Z0A8mGgVKGV2J0Ti/g00XK2kGOamROCMjuCbnG4VNTto94lpk8zSxU q4JUEzV/YeqruChiOqFLnVjk5CnoQhrEaVlGMBj9whlrEzJ/c/xYDmMdaTH5Xn+6pLCNA7Mj0 tUWvRiw5Se5xRK1u09+iHHPl1KUoLQ6Ivm2pdlfsDKxILBqN27xqs6TDmGHLfyUm0s1x0+KUC bGNzVAfJUEqr+3kmqv1JiUIcxFK+FxKmVwJU7ZnOxwUUZV0Dk7slGue87xVsItD7+jdt2yU51 I8P1Yo2fEuDVeABTAGMOUc3f5ANZvATfMS7va1rWhlqxQT5FDGZ1mwn+d+KvFvXDxLBw7ePwk haR/+H3US+NSSGrKAHp/2j/3hZpTug359DTHymHhrLu0jp8RZx2sr3VKNWrm0IA9W4EcTY6ZF NSRYF1VCkzcXIYY0bwH63DU5h9/VpSRzwHwR1rUsW47SaErYRr9NfLeLGcHM0VfSDpxwiuXW/ YghKaZQs6oXOpbQ3ATtIVTsmjestqgkSwDr9leFDGRh6lM5R+r6ATb/3E+DhhJnNjkreA17oj D0dMjyuxN3CyrLUcCEaUCxYdGgg/S2oyFj9+Y+v0Jy/Xw1LEV9/RDvhkDIETo+kFkVuxIm29w Ezn1cw+ggi29Y5Cq Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1775 Lines: 41 On Tuesday 22 December 2015, Catalin Marinas wrote: > > + > > +ENTRY(compat_sys_statfs64_wrapper) > > + mov w3, #84 > > + cmp w1, #88 > > + csel w1, w3, w1, eq > > + b compat_sys_statfs64 > > +ENDPROC(compat_sys_statfs64_wrapper) > > + > > +ENTRY(compat_sys_fstatfs64_wrapper) > > + mov w3, #84 > > + cmp w1, #88 > > + csel w1, w3, w1, eq > > + b compat_sys_fstatfs64 > > +ENDPROC(compat_sys_fstatfs64_wrapper) > > I'm not convinced we need these wrappers for ILP32. They've been > introduced on arch/arm many years ago by commit Fixes: 713c481519f1 > ([ARM] 3108/2: old ABI compat: statfs64 and fstatfs64) to deal with user > space passing a size of 88 (the EABI size of struct compat_statfs64 > without the packing and alignment attribute). Since that commit, the > sizeof(struct compat_statfs64) is 84 already. This should be the case > with the new ILP32 exported headers (no backwards compatibility), so > user space should never pass 88 as size. Therefore we could call > compat_sys_(f)statfs64 directly without wrappers. That means we have to set ARCH_PACK_STATFS64 in the arm64 header files though, and propagate the OABI alignment to arm64/ilp32 as well, rather than using the 88-byte version that every other 32-bit architecture except for x86-32 and arm32 has. Another option would be to set "#define __statfs_word __u64" and use the 64-bit statfs call, instead of compat_sys_statfs64, but that in turn requires special-casing statfs in libc. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/