From: Segher Boessenkool <segher@kernel.crashing.org>
To: tony@bakeyournoodle.com (Tony Breeds)
Cc: LinuxPPC-dev <linuxppc-dev@ozlabs.org>,
Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH] Fix VDSO gettimeofday() when called with NULL struct timeval.
Date: Mon, 25 Jun 2007 15:35:51 +0200 [thread overview]
Message-ID: <757f020b834543583be36b73b932da3e@kernel.crashing.org> (raw)
In-Reply-To: <20070625105836.GE9768@bakeyournoodle.com>
> It'd be nice if this made it into 2.6.22, esp. now that more
> distros are shipping glibc's that will use the VDSO.
Yeah. Not really vital though, no sane program would call
gettimeofday() with a NULL timeval (since that doesn't do
anything). Or did you find such a program (other than a
testsuite)?
> +++ working/arch/powerpc/kernel/vdso32/gettimeofday.S 2007-06-25
> 19:40:34.000000000 +1000
> @@ -32,8 +32,10 @@ V_FUNCTION_BEGIN(__kernel_gettimeofday)
> mr r11,r4 /* r11 saves tz */
> bl __get_datapage@local /* get data page */
> mr r9, r3 /* datapage ptr in r9 */
> + cmpli cr0,r10,0 /* check if tv is NULL */
cmplwi r10,0
cmpli with two or three arguments is not an existing PowerPC
instruction. Also, don't write cr0 if you don't do the same
in the accompanying branch insn, it only confuses things.
> + beq 1f
> bl __do_get_xsec@local /* get xsec from tb & kernel */
> - bne- 2f /* out of line -> do syscall */
> + bne- 3f /* out of line -> do syscall */
No need to renumber the labels. Either pick a higher
number for your new label (nothing says they need to be
in order); or reuse some other number (both your new and
the original 1: can be 1: without any problem, these are
local labels after all); or you can use 0: since that's
a valid local label as well.
Segher
next prev parent reply other threads:[~2007-06-25 13:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-25 10:58 [PATCH] Fix VDSO gettimeofday() when called with NULL struct timeval Tony Breeds
2007-06-25 12:39 ` Benjamin Herrenschmidt
2007-06-25 23:37 ` Tony Breeds
2007-06-25 13:35 ` Segher Boessenkool [this message]
2007-06-25 23:39 ` Tony Breeds
2007-06-25 23:50 ` [PATCH v2] " Tony Breeds
2007-06-26 1:55 ` Benjamin Herrenschmidt
2007-06-26 7:55 ` Segher Boessenkool
2007-06-29 20:39 ` Will Schmidt
2007-06-29 20:49 ` [PATCH v2.1 ] " Will Schmidt
2007-06-29 22:45 ` Segher Boessenkool
2007-07-02 23:20 ` Tony Breeds
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=757f020b834543583be36b73b932da3e@kernel.crashing.org \
--to=segher@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=tony@bakeyournoodle.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).