From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: vdso: minor ABI fix for clock_getres
Date: Wed, 25 Feb 2015 16:02:26 +0000 [thread overview]
Message-ID: <20150225160226.GL12377@arm.com> (raw)
In-Reply-To: <1424820067-13112-1-git-send-email-nathan_lynch@mentor.com>
On Tue, Feb 24, 2015 at 11:21:07PM +0000, Nathan Lynch wrote:
> The vdso implementation of clock_getres currently returns 0 (success)
> whenever a null timespec is provided by the caller, regardless of the
> clock id supplied.
>
> This behavior is incorrect. It should fall back to syscall when an
> unrecognized clock id is passed, even when the timespec argument is
> null. This ensures that clock_getres always returns an error for
> invalid clock ids.
>
> Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com>
> ---
> arch/arm64/kernel/vdso/gettimeofday.S | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Acked-by: Will Deacon <will.deacon@arm.com>
Thanks, Nathan.
Will
> diff --git a/arch/arm64/kernel/vdso/gettimeofday.S b/arch/arm64/kernel/vdso/gettimeofday.S
> index fe652ffd34c2..efa79e8d4196 100644
> --- a/arch/arm64/kernel/vdso/gettimeofday.S
> +++ b/arch/arm64/kernel/vdso/gettimeofday.S
> @@ -174,8 +174,6 @@ ENDPROC(__kernel_clock_gettime)
> /* int __kernel_clock_getres(clockid_t clock_id, struct timespec *res); */
> ENTRY(__kernel_clock_getres)
> .cfi_startproc
> - cbz w1, 3f
> -
> cmp w0, #CLOCK_REALTIME
> ccmp w0, #CLOCK_MONOTONIC, #0x4, ne
> b.ne 1f
> @@ -188,6 +186,7 @@ ENTRY(__kernel_clock_getres)
> b.ne 4f
> ldr x2, 6f
> 2:
> + cbz w1, 3f
> stp xzr, x2, [x1]
>
> 3: /* res == NULL. */
> --
> 1.9.3
>
>
next prev parent reply other threads:[~2015-02-25 16:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-24 23:21 [PATCH] arm64: vdso: minor ABI fix for clock_getres Nathan Lynch
2015-02-25 16:02 ` Will Deacon [this message]
2015-02-25 16:14 ` Nathan Lynch
2015-02-25 16:32 ` Will Deacon
2015-02-25 18:33 ` Nathan Lynch
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=20150225160226.GL12377@arm.com \
--to=will.deacon@arm.com \
--cc=linux-arm-kernel@lists.infradead.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).