From: Andy Lutomirski <luto@kernel.org>
To: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: linux-arch <linux-arch@vger.kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-mips@vger.kernel.org,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>, Paul Burton <paul.burton@mips.com>,
Thomas Gleixner <tglx@linutronix.de>,
Mark Salyzyn <salyzyn@android.com>,
Dmitry Safonov <0x7f454c46@gmail.com>,
Andrew Lutomirski <luto@kernel.org>
Subject: Re: [PATCH 4/7] lib: vdso: Remove VDSO_HAS_32BIT_FALLBACK
Date: Thu, 29 Aug 2019 08:25:02 -0700 [thread overview]
Message-ID: <CALCETrVprrrR3TSVSAnHfLW4HDQG=gcVrdjmsk6ss6Z3+vKOBg@mail.gmail.com> (raw)
In-Reply-To: <20190829111843.41003-5-vincenzo.frascino@arm.com>
On Thu, Aug 29, 2019 at 4:19 AM Vincenzo Frascino
<vincenzo.frascino@arm.com> wrote:
>
> VDSO_HAS_32BIT_FALLBACK was introduced to address a regression which
> caused seccomp to deny access to the applications to clock_gettime64()
> and clock_getres64() because they are not enabled in the existing
> filters.
>
> The purpose of VDSO_HAS_32BIT_FALLBACK was to simplify the conditional
> implementation of __cvdso_clock_get*time32() variants.
>
> Now that all the architectures that support the generic vDSO library
> have been converted to support the 32 bit fallbacks the conditional
> can be removed.
>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> CC: Andy Lutomirski <luto@kernel.org>
> References: c60a32ea4f45 ("lib/vdso/32: Provide legacy syscall fallbacks")
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> ---
> lib/vdso/gettimeofday.c | 10 ----------
> 1 file changed, 10 deletions(-)
>
> diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
> index a86e89e6dedc..2c4b311c226d 100644
> --- a/lib/vdso/gettimeofday.c
> +++ b/lib/vdso/gettimeofday.c
> @@ -126,13 +126,8 @@ __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res)
>
> ret = __cvdso_clock_gettime_common(clock, &ts);
>
> -#ifdef VDSO_HAS_32BIT_FALLBACK
> if (unlikely(ret))
> return clock_gettime32_fallback(clock, res);
> -#else
> - if (unlikely(ret))
> - ret = clock_gettime_fallback(clock, &ts);
> -#endif
>
> if (likely(!ret)) {
> res->tv_sec = ts.tv_sec;
I think you could have a little follow-up patch to remove the if
statement -- by the time you get here, it's guaranteed that ret == 0.
--Andy
next prev parent reply other threads:[~2019-08-29 15:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-29 11:18 [PATCH 0/7] vdso: Complete the conversion to 32bit syscalls Vincenzo Frascino
2019-08-29 11:18 ` [PATCH 1/7] arm64: compat: vdso: Expose BUILD_VDSO32 Vincenzo Frascino
2019-08-30 12:13 ` Catalin Marinas
2019-08-29 11:18 ` [PATCH 2/7] lib: vdso: Build 32 bit specific functions in the right context Vincenzo Frascino
2019-08-29 15:23 ` Andy Lutomirski
2019-08-29 15:48 ` Vincenzo Frascino
2019-08-29 11:18 ` [PATCH 3/7] mips: compat: vdso: Use legacy syscalls as fallback Vincenzo Frascino
2019-08-29 11:18 ` [PATCH 4/7] lib: vdso: Remove VDSO_HAS_32BIT_FALLBACK Vincenzo Frascino
2019-08-29 15:25 ` Andy Lutomirski [this message]
2019-08-29 15:51 ` Vincenzo Frascino
2019-08-29 11:18 ` [PATCH 5/7] arm64: compat: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK Vincenzo Frascino
2019-08-29 12:21 ` Thomas Gleixner
2019-08-29 15:52 ` Vincenzo Frascino
2019-08-30 12:13 ` Catalin Marinas
2019-08-29 11:18 ` [PATCH 6/7] mips: " Vincenzo Frascino
2019-08-29 11:18 ` [PATCH 7/7] x86: " Vincenzo Frascino
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='CALCETrVprrrR3TSVSAnHfLW4HDQG=gcVrdjmsk6ss6Z3+vKOBg@mail.gmail.com' \
--to=luto@kernel.org \
--cc=0x7f454c46@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=paul.burton@mips.com \
--cc=salyzyn@android.com \
--cc=tglx@linutronix.de \
--cc=vincenzo.frascino@arm.com \
--cc=will@kernel.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).