On Wed, 2022-11-30 at 09:07 +0100, Alexander Kanavin wrote:
> > > > On Tue, 29 Nov 2022 at 16:45, Stephen Jolley
> > > > <sjolley.yp...@gmail.com> wrote:
> > > > > > > > We’d welcome a proposal/series on how to move forward with
> > > > > > > > the Y2038 work for 32 bit platforms.
> > > > 
> > > > I have the following proposal:
> > > > 
> > > > 1. A branch is made where:
> > > > a. "-D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64" is enabled globally.
> > > > b. qemu is always started with "-rtc base=2040-01-01", simulating
> > > > Y2038 actually occurring.
> > > > c. an additional runtime test verifies that both RTC clock and system
> > > > clock report 2040.
> > > > 
> > > > 2. This branch is run through a-full on the autobuilder. Any
> > > > uncovered
> > > > issues are filed as bugs.

Your email prompted me to check my own software (Dropbear) and it showed a
few y2038 issues to fix. Those bugs wouldn't be noticed from a quick test -
it "only" prevented auth and idle timeouts from occurring.

gcc and clang are able to flag truncated conversions for 64-bit time_t with 
-Wconversion, but that's very noisy. Comparing that against a 32-bit time_t
build, however, gives a pretty clean list of code that needs attention.

As an experiment I've built OpenBMC with and without 64-bit time_t,
https://github.com/mkj/yocto-y2038 has the results and a description. There
are a mix of false positives (particularly tv_usec/tv_nsec), but also some
real-looking things. As an example, busybox using a uint32_t to copy a dhcpd
lease expiry.

I'm not sure the best way to use these logs - they need manual review.
Expanding the list of packages should be easy, but there will be more that
need manual intervention to get rid of -Werror.

Cheers,
Matt




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#174229): 
https://lists.openembedded.org/g/openembedded-core/message/174229
Mute This Topic: https://lists.openembedded.org/mt/95354043/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to