Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755104AbbLVMZW (ORCPT ); Tue, 22 Dec 2015 07:25:22 -0500 Received: from foss.arm.com ([217.140.101.70]:53478 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754152AbbLVMZV (ORCPT ); Tue, 22 Dec 2015 07:25:21 -0500 Date: Tue, 22 Dec 2015 12:25:15 +0000 From: Catalin Marinas To: Yury Norov Cc: arnd@arndb.de, 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 Subject: Re: [PATCH v6 13/20] arm64: ilp32: share aarch32 syscall wrappers to ilp32 Message-ID: <20151222122514.GA1302@e104818-lin.cambridge.arm.com> References: <1450215766-14765-1-git-send-email-ynorov@caviumnetworks.com> <1450215766-14765-14-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1450215766-14765-14-git-send-email-ynorov@caviumnetworks.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1699 Lines: 47 On Wed, Dec 16, 2015 at 12:42:39AM +0300, Yury Norov wrote: > statfs64, fstat64 and mmap_pgoff has wrappers that needed both by aarch32 and > ilp32 to workaround some issues. Here we create common file to share aarch32 > workarounds to with ilp32 code. [...] > --- /dev/null > +++ b/arch/arm64/kernel/entry32-common.S > @@ -0,0 +1,37 @@ > +#include > +#include > + > +#include > +#include > +#include > +#include > + > +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. -- Catalin -- 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/