From: Richard Cochran <richardcochran@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: "Dalmas, Marcelo (GE Vernova)" <marcelo.dalmas@ge.com>,
"jstultz@google.com" <jstultz@google.com>,
"sboyd@kernel.org" <sboyd@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ntp: fix bug in adjtimex reading time offset
Date: Wed, 27 Nov 2024 08:05:14 -0800 [thread overview]
Message-ID: <Z0dDOje96uI_t9sd@hoboy.vegasvil.org> (raw)
In-Reply-To: <87zflkydgp.ffs@tglx>
On Wed, Nov 27, 2024 at 03:10:30PM +0100, Thomas Gleixner wrote:
> On Mon, Nov 25 2024 at 12:16, Marcelo Dalmas wrote:
> > Due to an unsigned cast, adjtimex returns wrong offest when using ADJ_MICRO and the offset is negative.
> > In this case a small negative offset return approximately 4.29 seconds (~ 2^32/1000 milliseconds).
>
> Nice find.
How did this slip in? Git blame tells:
commit ead25417f82ed7f8a21da4dcefc768169f7da884
Author: Deepa Dinamani <deepa.kernel@gmail.com>
Date: Mon Jul 2 22:44:21 2018 -0700
timex: use __kernel_timex internally
struct timex is not y2038 safe.
Replace all uses of timex with y2038 safe __kernel_timex.
...
The patch was generated by the following coccinelle script:
...
So I guess combining random other manual fixes into a patch that
claims to be generated is a bad idea?
Thanks,
Richard
next prev parent reply other threads:[~2024-11-27 16:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-25 12:16 Dalmas, Marcelo (GE Vernova)
2024-11-27 14:10 ` Thomas Gleixner
2024-11-27 16:05 ` Richard Cochran [this message]
2024-11-27 17:35 ` Thomas Gleixner
2024-11-27 17:39 ` Thomas Gleixner
2024-11-28 10:54 ` Thomas Gleixner
2024-11-27 17:33 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z0dDOje96uI_t9sd@hoboy.vegasvil.org \
--to=richardcochran@gmail.com \
--cc=jstultz@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.dalmas@ge.com \
--cc=sboyd@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®