From: Arnd Bergmann <arnd@arndb.de>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"open list:BROADCOM NVRAM DRIVER" <linux-mips@vger.kernel.org>,
Paul Burton <paulburton@kernel.org>,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
Christian Brauner <christian.brauner@canonical.com>
Subject: Re: [PATCH] mips: vdso: conditionalize 32-bit time functions on COMPAT_32BIT_TIME
Date: Mon, 30 Dec 2019 16:37:17 +0100 [thread overview]
Message-ID: <CAK8P3a11g-UXcYdudDtp0TWCQAfotpc-63BqYwn-a9LDxV-b+Q@mail.gmail.com> (raw)
In-Reply-To: <CAHmME9o==nBONywVgSjsmjs2H_A8itgmwibqzPmvivcSocKWRQ@mail.gmail.com>
On Mon, Dec 30, 2019 at 3:37 PM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
>
> On Mon, Dec 30, 2019 at 1:34 PM Arnd Bergmann <arnd@arndb.de> wrote:
> >
> > - Why does it crash in the first place rather than returning -ENOSYS?
>
> There's a bit of speculation about this in the original thread that
> prompted this patch (you're CC'd).
>
> >
> > - How does it actually work if you run an application built against
> > an old musl version on a kernel that tries to make this not work?
> > Do you just get a random time (uninitialized user space stack) and
> > work with that without checking the error code?
>
> Actually, your patch fails here. The ts struct remains as it was
> before, filled with garbage. No good. My original patch in this
> thread, though, does result in the correct value being written to ts.
Ok, that is the intended behavior then, clock_gettime() needs
to fail with -EINVAL or -ENOSYS here (depending on the libc
implementation), and of course the data is not updated.
Returning success from clock_gettime() on a kernel with only
time64 support and a libc with only time32 support (or vice
versa) would be a bug.
Arnd
next prev parent reply other threads:[~2019-12-30 15:37 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-23 13:08 vdso-related userspace crashes on 5.5 mips64 Jason A. Donenfeld
2019-12-23 21:44 ` Jason A. Donenfeld
2019-12-23 23:29 ` Paul Burton
2019-12-24 13:37 ` Jason A. Donenfeld
2019-12-30 15:58 ` Arnd Bergmann
2019-12-24 14:19 ` Jason A. Donenfeld
2019-12-24 13:54 ` [PATCH] mips: vdso: conditionalize 32-bit time functions on COMPAT_32BIT_TIME Jason A. Donenfeld
2019-12-30 11:57 ` Arnd Bergmann
2019-12-30 12:26 ` Jason A. Donenfeld
2019-12-30 12:34 ` Arnd Bergmann
2019-12-30 14:37 ` Jason A. Donenfeld
2019-12-30 15:10 ` Jason A. Donenfeld
2019-12-30 15:37 ` Arnd Bergmann [this message]
2019-12-30 15:39 ` Jason A. Donenfeld
2019-12-30 15:47 ` Arnd Bergmann
2019-12-30 15:58 ` Jason A. Donenfeld
2019-12-30 17:33 ` Arnd Bergmann
2019-12-30 21:09 ` Jason A. Donenfeld
2019-12-30 21:42 ` Jason A. Donenfeld
2019-12-31 16:14 ` Jason A. Donenfeld
2020-01-01 4:10 ` Paul Burton
2020-01-01 4:25 ` Paul Burton
2020-01-01 9:47 ` Jason A. Donenfeld
2020-01-01 9:47 ` Jason A. Donenfeld
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=CAK8P3a11g-UXcYdudDtp0TWCQAfotpc-63BqYwn-a9LDxV-b+Q@mail.gmail.com \
--to=arnd@arndb.de \
--cc=Jason@zx2c4.com \
--cc=christian.brauner@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=paulburton@kernel.org \
--cc=vincenzo.frascino@arm.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;
as well as URLs for NNTP newsgroup(s).