From: Andi Kleen <ak@linux.intel.com>
To: stefani@seibold.net
Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
x86@kernel.org, tglx@linutronix.de, mingo@redhat.com,
hpa@zytor.com, aarcange@redhat.com, john.stultz@linaro.org,
luto@amacapital.net, xemul@parallels.com, gorcunov@openvz.org,
andriy.shevchenko@linux.intel.com,
Martin.Runge@rohde-schwarz.com, Andreas.Brief@rohde-schwarz.com
Subject: Re: [PATCH v13 8/9] Add 32 bit VDSO time support for 32 bit kernel
Date: Sat, 8 Feb 2014 23:21:23 -0800 [thread overview]
Message-ID: <20140209072123.GA23964@tassilo.jf.intel.com> (raw)
In-Reply-To: <20140209052230.GL12219@tassilo.jf.intel.com>
On Sat, Feb 08, 2014 at 09:22:30PM -0800, Andi Kleen wrote:
> > +notrace static long vdso_fallback_gettime(long clock, struct timespec *ts)
> > +{
> > + long ret;
> > +
> > + asm(
> > + "push %%ebx \n"
> > + "mov %2,%%ebx \n"
> > + "call VDSO32_vsyscall \n"
> > + "pop %%ebx \n"
> > + : "=a" (ret)
> > + : "0" (__NR_clock_gettime), "d" (clock), "c" (ts)
> > + : "memory");
>
> The push/mov/pop could be just replaced with "b"?
Actually thinking about it more you likely did that to avoid errors
with -fPIC right? In this case you still need to supply correct dwarf2
unwind annotations.
Also this change is still needed:
> Also I if this calls syscall.S:__kernel_vsyscall it clobbers more registers
> (ecx at least?) and you need to describe that to gcc with a +
>
> Same in the other sys calls.
>
> > @@ -310,6 +311,11 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
> > unsigned long addr;
> > int ret = 0;
> > bool compat;
> > + struct vm_area_struct *vma;
> > + extern char __vvar_page;
> > +#ifdef CONFIG_HPET_TIMER
> > + extern unsigned long hpet_address;
> > +#endif
>
> Put this into a header.
>
> > +++ b/arch/x86/vdso/vdso32/vclock_gettime.c
> > @@ -0,0 +1,16 @@
> > +#define BUILD_VDSO32
> > +
> > +#ifdef CONFIG_X86_64
> > +
> > +#define _ASM_X86_PAGE_H
> > +
> > +#define __pa(x) 0
> > +#define __va(x) 0
> > +
> > +#undef CONFIG_ILLEGAL_POINTER_VALUE
> > +#define CONFIG_ILLEGAL_POINTER_VALUE 0
>
> This needs some comments.
>
> Why are the __pa/__va defines safe?
>
> The rest of the patchkit looks reasonable to me from a quick read.
> Much better than the first version.
>
> -Andi
>
> --
> ak@linux.intel.com -- Speaking for myself only
--
ak@linux.intel.com -- Speaking for myself only
next prev parent reply other threads:[~2014-02-09 7:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-08 21:29 [PATCH v13 0/9] Add 32 bit VDSO time function support stefani
2014-02-08 21:29 ` [PATCH v13 1/9] Make vsyscall_gtod_data handling x86 generic stefani
2014-02-08 21:29 ` [PATCH v13 2/9] Add new func _install_special_mapping() to mmap.c stefani
2014-02-08 21:29 ` [PATCH v13 3/9] revamp vclock_gettime.c stefani
2014-02-08 21:29 ` [PATCH v13 4/9] vclock_gettime.c __vdso_clock_gettime cleanup stefani
2014-02-08 21:29 ` [PATCH v13 5/9] replace VVAR(vsyscall_gtod_data) by gtod macro stefani
2014-02-08 21:29 ` [PATCH v13 6/9] cleanup __vdso_gettimeofday stefani
2014-02-08 21:29 ` [PATCH v13 7/9] introduce VVAR marco for vdso32 stefani
2014-02-08 21:29 ` [PATCH v13 8/9] Add 32 bit VDSO time support for 32 bit kernel stefani
2014-02-09 5:22 ` Andi Kleen
2014-02-09 7:21 ` Andi Kleen [this message]
2014-02-09 8:15 ` Stefani Seibold
2014-02-09 8:10 ` Stefani Seibold
2014-02-09 10:05 ` Andi Kleen
2014-02-09 10:43 ` Stefani Seibold
2014-02-09 11:45 ` Stefani Seibold
2014-02-09 20:11 ` H. Peter Anvin
2014-02-08 21:29 ` [PATCH v13 9/9] Add 32 bit VDSO time support for 64 " stefani
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=20140209072123.GA23964@tassilo.jf.intel.com \
--to=ak@linux.intel.com \
--cc=Andreas.Brief@rohde-schwarz.com \
--cc=Martin.Runge@rohde-schwarz.com \
--cc=aarcange@redhat.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gorcunov@openvz.org \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@redhat.com \
--cc=stefani@seibold.net \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=xemul@parallels.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