[PATCH] fallocate: pass off_t in register pair correctly for 64-bit off_t
Mike Frysinger
vapier@gentoo.org
Fri Jun 24 16:15:00 GMT 2016
On 24 Jun 2016 11:52, Yury Norov wrote:
> On Fri, Jun 24, 2016 at 04:30:23AM -0400, Mike Frysinger wrote:
> > On 24 Jun 2016 08:43, Yury Norov wrote:
> > > sysdeps/unix/sysv/linux/fallocate.c contains wide-spreaded hack for creating
> > > register pair from 32-bit signed value:
> > > LONG_LONG_PAIR (val >> 31, val)
> > >
> > > It works well for off_t if it is 32-bit lenght. Modern ABIs requres 64-bit off_t,
> > > so this hack doesn't work for them. In this patch, fallocate handler is taken from
> > > fallocate64.c, depending on __OFF_T_MATCHES_OFF64_T.
> >
> > what ABIs exactly are you referring to ?
>
> AARCH64/ILP32. It would be any modern 32-bit API, as off_t should be
> 64-bit for them
ignoring ILP32 ABIs (which are running on native 64-bit hardware and have
full access to the 64-bit registers), no new 32-bit port is being defined
with 64-bit off_t types. they follow existing style where LFS is used.
whether we want to change all 32-bit ports to be LFS-enabled by default is
a different question ... we'd still want them to be consistent.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160624/90f86d1f/attachment.sig>
More information about the Libc-alpha
mailing list