Return-Path: Received: from mail-qk0-f195.google.com ([209.85.220.195]:35553 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750806AbcHSNUx (ORCPT ); Fri, 19 Aug 2016 09:20:53 -0400 Received: by mail-qk0-f195.google.com with SMTP id o1so4350776qkd.2 for ; Fri, 19 Aug 2016 06:20:52 -0700 (PDT) Subject: Re: [Linux PATCH] fcntl: add new F_OFD_*32 constants and handle them appropriately To: Paul Eggert , Christoph Hellwig References: <1471521804-4291-1-git-send-email-jlayton@redhat.com> <20160818170508.GA897@lst.de> <1471541300.2504.23.camel@redhat.com> <20160818173139.GA1140@lst.de> <20160818174607.GL21655@vapier.lan> <20160818175246.GA1433@lst.de> <01b37ffd-4ec7-ce69-c7e1-891162f3e4d8@cs.ucla.edu> Cc: Jeff Layton , linux-fsdevel@vger.kernel.org, GNU C Library , chrubis@suse.cz From: Zack Weinberg Message-ID: <4fdfd230-3344-1be0-28f2-067b4fee4237@panix.com> Date: Fri, 19 Aug 2016 09:20:50 -0400 MIME-Version: 1.0 In-Reply-To: <01b37ffd-4ec7-ce69-c7e1-891162f3e4d8@cs.ucla.edu> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 08/18/2016 03:36 PM, Paul Eggert wrote: > Zack Weinberg wrote: >> We could change the libc headers used on old-ILP32 ABIs so that >> _FILE_OFFSET_BITS=64 is defined by default (matching the LP64-ABI >> headers). This would break the ABI of every shared library that >> exports a structure (transitively) containing a field of type off_t, >> ino_t, fsblkcnt_t, fsfilcnt_t, or rlim_t. > > As I understand it, most (all important?) such libraries are already > compiled with _FILE_OFFSET_BITS=64 anyway, so their ABIs wouldn't break. I'd feel a lot safer about changing the default if we had some way of tagging object files and shared libraries so that _FILE_OFFSET_BITS=32 and _FILE_OFFSET_BITS=64 code could not be combined. Do we already have that? It seems like something that could probably be done with existing object-annotation goo, if we don't. > How about if we start the transition by deprecating the use of 32-bit > off_t in user or library code on platforms with 32-bit long? The > attached patch plus lots of similar patches, say (this is just a > sketch). Really, it's long since time that file offsets were 64 bits. I'd support this patch (better with __attribute_deprecated_msg__() and an explanation that it's not off_t that's deprecated, it's *32-bit* off_t). zw