[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201512222244.15155.arnd@arndb.de>
Date: Tue, 22 Dec 2015 22:44:14 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Catalin Marinas <catalin.marinas@....com>
Cc: Yury Norov <ynorov@...iumnetworks.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
pinskia@...il.com, Prasun.Kapoor@...iumnetworks.com,
schwab@...e.de, broonie@...nel.org, Nathan_Lynch@...tor.com,
agraf@...e.de, klimov.linux@...il.com, jan.dakinevich@...il.com,
ddaney.cavm@...il.com, bamvor.zhangjian@...wei.com,
philipp.tomsich@...obroma-systems.com, joseph@...esourcery.com,
christoph.muellner@...obroma-systems.com
Subject: Re: [PATCH v6 13/20] arm64: ilp32: share aarch32 syscall wrappers to ilp32
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists