From: Thomas Gleixner <tglx@linutronix.de>
To: John Stultz <john.stultz@linaro.org>
Cc: Richard Cochran <richardcochran@gmail.com>,
Sasha Levin <sasha.levin@oracle.com>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] time: verify time values in adjtimex ADJ_SETOFFSET to avoid overflow
Date: Mon, 7 Dec 2015 21:15:45 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.11.1512072106560.3595@nanos> (raw)
In-Reply-To: <CALAqxLU1c+hLHyKMgM4EFaNUN-Y2Kcj6O08DngcSpy1DZ_487Q@mail.gmail.com>
On Mon, 7 Dec 2015, John Stultz wrote:
> On Sun, Dec 6, 2015 at 2:11 PM, Richard Cochran
> <richardcochran@gmail.com> wrote:
> > The overflow is a latent problem, and the patch should:
> >
> > 1. return error in case (txc->time.tv_usec >= USEC_PER_SEC)
> > 2. remove the redundant test in timekeeping_inject_offset.
>
> So we probably want to keep the check in timekeeping_inject_offset()
> since there can be other users as well of that function.
>
> But its probably cleanest to add a check in ntp_validate_timex()
> instead of where this patch does it.
So instead of open coding the checks on both sites, can we please have
an inline function with proper comments why time.tv_sec can be
negative, something like adjtimex_timeval_is_valid() or such.
Thanks,
tglx
next prev parent reply other threads:[~2015-12-07 20:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-04 3:09 Sasha Levin
2015-12-04 20:27 ` John Stultz
2015-12-05 17:10 ` Thomas Gleixner
2015-12-06 0:15 ` Sasha Levin
2015-12-06 9:07 ` Thomas Gleixner
2015-12-06 22:11 ` Richard Cochran
2015-12-07 19:54 ` John Stultz
2015-12-07 20:11 ` [RFC][PATCH -reworked] time: Verify " John Stultz
2015-12-07 20:13 ` John Stultz
2015-12-07 20:16 ` Thomas Gleixner
2015-12-07 20:15 ` Thomas Gleixner [this message]
2015-12-07 20:19 ` [PATCH] time: verify " John Stultz
2015-12-07 20:23 ` John Stultz
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=alpine.DEB.2.11.1512072106560.3595@nanos \
--to=tglx@linutronix.de \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=sasha.levin@oracle.com \
/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®