linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefani Seibold <stefani@seibold.net>
To: Andy Lutomirski <luto@amacapital.net>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
	linux-kernel@vger.kernel.org, x86@kernel.org, tglx@linutronix.de,
	mingo@redhat.com, ak@linux.intel.com, aarcange@redhat.com,
	john.stultz@linaro.org, xemul@parallels.com, gorcunov@openvz.org,
	andriy.shevchenko@linux.intel.com
Subject: Re: [PATCH 6/6] Add 32 bit VDSO support for 32 and 64 bit kernels
Date: Thu, 20 Dec 2012 08:41:34 +0100	[thread overview]
Message-ID: <1355989294.24672.9.camel@wall-e> (raw)
In-Reply-To: <CALCETrX2zAA-X7fjoPNSERq0kVDDY43O_u=Oqjq77_ggf64j9A@mail.gmail.com>

Am Dienstag, den 18.12.2012, 12:37 -0800 schrieb Andy Lutomirski:
> On Tue, Dec 18, 2012 at 12:32 PM, Stefani Seibold <stefani@seibold.net> wrote:
> > Am Dienstag, den 18.12.2012, 10:44 -0800 schrieb H. Peter Anvin:
> >> On 12/18/2012 08:52 AM, Stefani Seibold wrote:
> >> >
> >> > Pardon, i never disregarded nor i have agreed that this is going to be a
> >> > part of the VDSO. I currently have also no idea how to do this and i see
> >> > no need at the moment to do this revamp. The 64 bit VDSO lives since
> >> > more than 6 years with this kind of implementation.
> >> >
> >>
> >> It was part of this discussion thread, about how to best manage the
> >> address space.  Fixed addresses are a major problem, and introducing new
> >> ones are extremely undesirable.
> >>
> >
> > There is no introduce of new fix address. There are still there for
> > x86_64. If this will currently not a major problem on this architecture
> > than it will not for x86_32 too.
> 
> Not necessarily true.  On x86-64 (non-compat) the fixmap address is in
> kernel space (high bit set), so it can't conflict with anything in
> user space.  On true 32-bit mode, the same applies.  In compat mode,
> the fixed address is in *user* space and might conflict with existing
> uses.
> 
> >
> >> Hence I wrote:
> >>
> >> > IMO it seems this is making it way more complicated than it is. Just
> >> > make sure you have a section in the vdso where you can map in a data
> >> > page with the symbols in the right offsets. Extra points for doing
> >> > magic so that it is at the beginning or end, but I think that might
> >> > be harder than necessary.
> >>
> >> Basically, make the vvar and hpet pages part of the vdso page list.
> >> Optionally they can be mapped without the MAYWRITE option -- in fact, we
> >> could easily split the vdso into an executable area which gets MAYWRITE
> >> to be able to set breakpoints and a data area which doesn't -- but that
> >> is a minor tweak IMO.
> >>
> >
> > I see the benefits, but it will not work under all circumstance. The
> > VDSO compat mode for x86_32 requires a fix address and there is no room
> > behind this. So since this must preserved, i see no real gain for this.
> 
> Not true.  It can be mapped with the vdso at a variable address using
> GOTOFF addressing.  See my earlier email with
> __attribute__((visibility("hidden")).
> 
> --Andy

I am not sure that we talking about the same.

In a 32 bit kernel a VDSO can mapped on an fix address VDSO_HIGH_BASE
(kernel parameter vdso32=2 or CONFIG_COMPAT_VDSO), which is 0xffffe000.
There is no available page before nor after this page, so there is no
space for a multi page VDSO.

The only way i see is to do this is a test in the vdso_...() functions
for running on this address and than access the old fixmap addresses for
VVAR and HPET. This can be done for example by a tweaking macro.

If this is okay, i can do it. Otherwise i have no idea how to.

- Stefani



  parent reply	other threads:[~2012-12-20  7:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-18  9:40 [PATCH 0/6] Add 32 bit VDSO time function support stefani
2012-12-18  9:40 ` [PATCH 1/6] Move out seqcount from seqlock.h stefani
2012-12-18  9:40 ` [PATCH 2/6] Make vsyscall_gtod_data handling x86 generic stefani
2012-12-18  9:40 ` [PATCH 3/6] Make vsyscall_gtod_data compatible with 32 bit VDSO stefani
2012-12-18  9:40 ` [PATCH 4/6] Add new base function _install_special_mapping() to mmap.c stefani
2012-12-18  9:40 ` [PATCH 5/6] Cleanup header files to build a proper 32 bit VDSO stefani
2012-12-18  9:40 ` [PATCH 6/6] Add 32 bit VDSO support for 32 and 64 bit kernels stefani
2012-12-18 16:17   ` H. Peter Anvin
2012-12-18 16:52     ` Stefani Seibold
2012-12-18 18:44       ` H. Peter Anvin
2012-12-18 20:32         ` Stefani Seibold
2012-12-18 20:37           ` Andy Lutomirski
2012-12-18 22:24             ` H. Peter Anvin
2012-12-20  7:41             ` Stefani Seibold [this message]
2012-12-20 16:17               ` H. Peter Anvin
2012-12-20 17:53                 ` Stefani Seibold
2012-12-20 18:21                   ` H. Peter Anvin
2012-12-20 18:23                     ` H.J. Lu
2012-12-20 18:35                       ` Roland McGrath
2012-12-20 18:40                         ` H. Peter Anvin

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=1355989294.24672.9.camel@wall-e \
    --to=stefani@seibold.net \
    --cc=aarcange@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=gorcunov@openvz.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;
as well as URLs for NNTP newsgroup(s).