Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1631011
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [Y2038] [PATCH v5 2/5] vfs: Add checks for filesystem timestamp limits |
| Date | 2017-04-25 23:30 +0200 |
| Message-ID | <tAgc2-1z6-21@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <tubf3-5sB-1@gated-at.bofh.it> <tAeDf-up-9@gated-at.bofh.it> <tAeWC-Q9-31@gated-at.bofh.it> <tAfpE-11t-11@gated-at.bofh.it> <tAfpE-11t-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Apr 25, 2017 at 10:35 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> On Tue, Apr 25, 2017 at 1:31 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>>
>> Would it be ok to have a simple way of removing the time_t definition (e.g.
>> by passing '-DREQUIRE_TIME64' to the compiler, but without the Kconfig
>> option? That way, someone who wants to ship a product can at least
>> find the obvious dependencies on stuff that remains broken.
>
> How would you find them?
>
> People don't necessarily use "time_t". They might use "int" or whatever.
My main approach has been:
* Assume that all of the time_t based interfaces are broken on 32-bit systems
(some are not, but almost all are)
* For each interface that exposes a time_t to other files, introduce a
replacement interface that is known to work
* Change users of the old interface over to the new one, one at a time,
while manually reviewing all other code this interacts with.
Note that the vast majority of all the in-kernel uses of time_t variables
actually use timespec or timeval structures because they require
sub-second resolution, so we already know that they cannot
accidentally get assigned to 'int'. Also, we typically replace them with
ktime_t for efficiency. In case we replace a timespec with timespec64,
we do have to be careful to ensure that no code just treats the
tv_sec member as 'int' or 'long' though.
Arnd
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v5 2/5] vfs: Add checks for filesystem timestamp limits Arnd Bergmann <arnd@arndb.de> - 2017-04-25 21:50 +0200
Re: [PATCH v5 2/5] vfs: Add checks for filesystem timestamp limits Linus Torvalds <torvalds@linux-foundation.org> - 2017-04-25 22:10 +0200
Re: [Y2038] [PATCH v5 2/5] vfs: Add checks for filesystem timestamp limits Linus Torvalds <torvalds@linux-foundation.org> - 2017-04-25 22:40 +0200
Re: [Y2038] [PATCH v5 2/5] vfs: Add checks for filesystem timestamp limits Arnd Bergmann <arnd@arndb.de> - 2017-04-25 23:30 +0200
Re: [Y2038] [PATCH v5 2/5] vfs: Add checks for filesystem timestamp limits Arnd Bergmann <arnd@arndb.de> - 2017-04-25 22:40 +0200
csiph-web