All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] include/tst_timer.h: Fix overflows
Date: Mon, 18 Jan 2021 11:42:26 +0100	[thread overview]
Message-ID: <YAVmErn6g+dCfSEr@pevik> (raw)
In-Reply-To: <20210115151936.18809-1-chrubis@suse.cz>

Hi Cyril,

> This fixes overflows in tst_timeval_to_us() and tst_timeval_to_ns() on
> 32bit hardware. We have to cast the tv_sec (ulong) to (long long)
> explicitly otherwise the tv_sec will overflow the multiplication.

> This fixes clock_gettime04 where the overflow corrupted the result from
> gettimeofday() when it was converted from timeval to timespec.

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr

  reply	other threads:[~2021-01-18 10:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-15 15:19 [LTP] [PATCH] include/tst_timer.h: Fix overflows Cyril Hrubis
2021-01-18 10:42 ` Petr Vorel [this message]
2021-01-18 12:21   ` Cyril Hrubis

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=YAVmErn6g+dCfSEr@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.