From: Stefani Seibold <stefani@seibold.net>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Greg KH <gregkh@linuxfoundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
X86 ML <x86@kernel.org>, Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Andi Kleen <ak@linux.intel.com>,
Andrea Arcangeli <aarcange@redhat.com>,
John Stultz <john.stultz@linaro.org>,
Pavel Emelyanov <xemul@parallels.com>,
Cyrill Gorcunov <gorcunov@openvz.org>,
andriy.shevchenko@linux.intel.com,
Martin.Runge@rohde-schwarz.com, Andreas.Brief@rohde-schwarz.com
Subject: Re: [PATCH 7/8] Add 32 bit VDSO time support for 32 bit kernel
Date: Tue, 04 Feb 2014 07:25:34 +0100 [thread overview]
Message-ID: <1391495134.957.2.camel@wall-e.seibold.net> (raw)
In-Reply-To: <CALCETrXPraCrvUR=L1iw+=dnxDHwf3AM0QMNPtSEf40G+80pPg@mail.gmail.com>
Am Montag, den 03.02.2014, 14:04 -0800 schrieb Andy Lutomirski:
> On Mon, Feb 3, 2014 at 2:01 PM, Stefani Seibold <stefani@seibold.net> wrote:
> > Am Montag, den 03.02.2014, 08:36 -0800 schrieb Andy Lutomirski:
> >> On Sun, Feb 2, 2014 at 11:44 PM, Stefani Seibold <stefani@seibold.net> wrote:
> >> > Am Sonntag, den 02.02.2014, 16:12 -0800 schrieb Andy Lutomirski:
> >> >> On Sun, Feb 2, 2014 at 1:39 PM, Stefani Seibold <stefani@seibold.net> wrote:
> >> >> > Am Sonntag, den 02.02.2014, 08:46 -0800 schrieb Andy Lutomirski:
> >> >> >> On Sun, Feb 2, 2014 at 3:27 AM, <stefani@seibold.net> wrote:
> >> >> >> > From: Stefani Seibold <stefani@seibold.net>
> >> >> >> >
> >> >> >> > This patch add the time support for 32 bit a VDSO to a 32 bit kernel.
> >> >> >>
> >> >> >> [...]
> >> >> >>
> >> >> >> Can you address the review comments from last time around? For
> >> >> >> example, this still seems to have redundant vvar and hpet mappings, it
> >> >> >> doesn't use the VVAR macro, it moves the 32-bit compat vDSO, etc.
> >> >> >>
> >> >> >
> >> >> > I will address the compat VDSO issue.
> >> >> >
> >> >> > But the VVAR macro will be not a part of this patch set. If you depend
> >> >> > on this, feel free to create one. From my point of view this is not
> >> >> > feasible without a macro hacking, because the address accessing the vvar
> >> >> > area differs in kernel and VDSO user mode.
> >> >>
> >> >> Sorry, but "I will make the code messier for no apparent reason and I
> >> >> will not offer to fix it in the same series" gets my NAK.
> >> >>
> >> >> Hint: I'm talking about two or three lines of code in vvar.h.
> >> >>
> >> >
> >> > A hint back: if you threat me with a NAK for a requested code sequence
> >> > which currently no user, this is far away from professional. I am not
> >> > your trainee.
> >> >
> >> > BTW: If it is so easy, send me the two or three lines and i will merge
> >> > it ;-)
> >>
> >> Something to the effect of:
> >>
> >> #elif defined(BUILD_VDSO32)
> >> #define VVAR(name) (*vvar_ ## name)
> >> #endif
> >>
> >> Should do the trick.
> >
> > You are wrong...
> >
> > #ifdef BUILD_VDSO32
> >
> > #define DECLARE_VVAR(offset, type, name) \
> > extern type vvar_ ## name __attribute__((visibility("hidden")));
> >
> > #define VVAR(name) (vvar_ ## name)
> >
> > #else
> >
> > /* Base address of vvars. This is not ABI. */
> > #ifdef CONFIG_X86_64
> > #define VVAR_ADDRESS (-10*1024*1024 - 4096)
> > #else
> > extern char __vvar_page;
> >
> > #define VVAR_ADDRESS (&__vvar_page)
> > #endif
> >
> > This would do the trick!
> >
> > But for 64 bit to 32 bit conversation layer in vclock_gettime.c there is
> > still a
> >
> > struct arch_vsyscall_gtod_data arch_vvar_vsyscall_gtod_data
> > __attribute__((visibility("hidden")));
> > #define gtod (&arch_vvar_vsyscall_gtod_data)
> >
> > needed, because vvar_vsyscall_gtod_data is the 32 bit version, which
> > would result in incorrect access of the struct members. So my code can't
> > use this VVAR macro.
>
> For 32-on-64, I must have read your code wrong. Are you sticking two
> copies of the same struct with different layout into the vvar page?
> If so, wouldn't it be better to only have the variant with a common
> layout and use it for all versions of the vdso?
>
No, only one. But for depend on 32/64 bit the layout differs.
We discuss this topic some days before, so please have a look at the
code and the previous posts.
- Stefani
next prev parent reply other threads:[~2014-02-04 6:25 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-02 11:27 [PATCH 0/8] Add 32 bit VDSO time function support stefani
2014-02-02 11:27 ` [PATCH 1/8] Make vsyscall_gtod_data handling x86 generic stefani
2014-02-02 11:27 ` [PATCH 2/8] Add new func _install_special_mapping() to mmap.c stefani
2014-02-02 11:27 ` [PATCH 3/8] revamp vclock_gettime.c stefani
2014-02-02 16:39 ` Andy Lutomirski
2014-02-02 11:27 ` [PATCH 4/8] vclock_gettime.c __vdso_clock_gettime cleanup stefani
2014-02-02 16:38 ` Andy Lutomirski
2014-02-02 11:27 ` [PATCH 5/8] replace VVAR(vsyscall_gtod_data) by gtod macro stefani
2014-02-02 16:42 ` Andy Lutomirski
2014-02-02 11:27 ` [PATCH 6/8] cleanup __vdso_gettimeofday stefani
2014-02-02 15:43 ` H. Peter Anvin
2014-02-02 16:02 ` Stefani Seibold
2014-02-02 16:37 ` Andy Lutomirski
2014-02-02 11:27 ` [PATCH 7/8] Add 32 bit VDSO time support for 32 bit kernel stefani
2014-02-02 16:46 ` Andy Lutomirski
2014-02-02 21:39 ` Stefani Seibold
2014-02-03 0:12 ` Andy Lutomirski
2014-02-03 7:44 ` Stefani Seibold
2014-02-03 16:36 ` Andy Lutomirski
2014-02-03 22:01 ` Stefani Seibold
2014-02-03 22:04 ` Andy Lutomirski
2014-02-04 6:25 ` Stefani Seibold [this message]
2014-02-02 11:27 ` [PATCH 8/8] 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=1391495134.957.2.camel@wall-e.seibold.net \
--to=stefani@seibold.net \
--cc=Andreas.Brief@rohde-schwarz.com \
--cc=Martin.Runge@rohde-schwarz.com \
--cc=aarcange@redhat.com \
--cc=ak@linux.intel.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=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
Powered by JetHome