From: Arnd Bergmann <arnd@arndb.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: y2038@lists.linaro.org, baolin.wang@linaro.org,
albert.aribaud@3adev.fr, John Stultz <john.stultz@linaro.org>,
bamvor.zhangjian@linaro.org, ruchandani.tina@gmail.com,
"linux-api@vger.kernel.org" <linux-api@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
libc-alpha@sourceware.org,
Linux-Arch <linux-arch@vger.kernel.org>,
Manfred Spraul <manfred@colorfullife.com>,
Michael Kerrisk <mtk.manpages@gmail.com>
Subject: Re: [PATCH 2/9] y2038: asm-generic: extend sysvipc data structures
Date: Thu, 21 May 2015 16:52:31 +0200 [thread overview]
Message-ID: <2463292.dEmUgCQccn@wuerfel> (raw)
In-Reply-To: <CAMuHMdUtJ2x+axBLj5qdsRwod=XdRkmeYJm1N7H5V_CXLo5J0g@mail.gmail.com>
On Thursday 21 May 2015 10:56:34 Geert Uytterhoeven wrote:
> > + * value using
> > + *
> > + * user_semid_ds.sem_otime = kernel_semid64_ds.sem_otime +
> > + * (long long)(kernel_semid64_ds.sem_otime_high << 32)
>
> The cast to "long long" should be inside the parentheses, to promote the
> (32-bit) sem_otime_high to a first 64-bit integer first.
> Else it will be shifted into oblivion (oh no, C undefined behavior).
>
>
Fixed now to say
* user_semid_ds.sem_otime = kernel_semid64_ds.sem_otime +
* ((long long)kernel_semid64_ds.sem_otime_high << 32)
Thanks!
Arnd
next prev parent reply other threads:[~2015-05-21 14:52 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-20 15:07 [PATCH 0/9] converting system calls to 64-bit time_t, part 2 Arnd Bergmann
2015-05-20 15:07 ` Arnd Bergmann
2015-05-20 15:07 ` [PATCH 1/9] y2038: remove unneeded ipc uapi header files Arnd Bergmann
2015-05-20 15:07 ` Arnd Bergmann
[not found] ` <1432134445-804487-2-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>
2015-05-20 15:12 ` Arnd Bergmann
2015-05-20 15:12 ` Arnd Bergmann
2015-05-20 15:07 ` [PATCH 2/9] y2038: asm-generic: extend sysvipc data structures Arnd Bergmann
2015-05-20 15:07 ` Arnd Bergmann
2015-05-21 8:56 ` Geert Uytterhoeven
2015-05-21 14:52 ` Arnd Bergmann [this message]
2015-05-20 15:07 ` [PATCH 3/9] y2038: mips: " Arnd Bergmann
2015-05-20 15:07 ` [PATCH 4/9] y2038: x86: " Arnd Bergmann
2015-05-20 15:07 ` Arnd Bergmann
2015-05-20 15:07 ` [PATCH 5/9] y2038: parisc: " Arnd Bergmann
2015-05-20 15:07 ` Arnd Bergmann
2015-05-20 15:07 ` [PATCH 6/9] y2038: sparc: " Arnd Bergmann
2015-05-20 15:07 ` Arnd Bergmann
2015-05-20 15:07 ` [PATCH 7/9] y2038: powerpc: " Arnd Bergmann
2015-05-20 15:07 ` Arnd Bergmann
2015-05-20 15:07 ` [PATCH 8/9] y2038: xtensa: " Arnd Bergmann
2015-05-20 15:07 ` Arnd Bergmann
2015-05-20 15:07 ` [PATCH 9/9] y2038: ipc: report long times to user space Arnd Bergmann
2015-05-20 15:07 ` Arnd Bergmann
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=2463292.dEmUgCQccn@wuerfel \
--to=arnd@arndb.de \
--cc=albert.aribaud@3adev.fr \
--cc=bamvor.zhangjian@linaro.org \
--cc=baolin.wang@linaro.org \
--cc=geert@linux-m68k.org \
--cc=john.stultz@linaro.org \
--cc=libc-alpha@sourceware.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--cc=mtk.manpages@gmail.com \
--cc=ruchandani.tina@gmail.com \
--cc=y2038@lists.linaro.org \
/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;
as well as URLs for NNTP newsgroup(s).