mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefani Seibold <stefani@seibold.net>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Fengguang Wu <fengguang.wu@intel.com>,
	"H. Peter Anvin" <hpa@linux.intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [x86, vdso] BUG: unable to handle kernel paging request at d34bd000
Date: Fri, 07 Mar 2014 22:53:40 +0100	[thread overview]
Message-ID: <1394229220.20013.13.camel@wall-e.seibold.net> (raw)
In-Reply-To: <CALCETrVCwZWvd78urw+O4zD3PoNZTQxg8FMzTrUi4+5w9rC5=A@mail.gmail.com>


Am Freitag, den 07.03.2014, 10:56 -0800 schrieb Andy Lutomirski:
> On Thu, Mar 6, 2014 at 11:21 PM, Stefani Seibold <stefani@seibold.net> wrote:
> > Hi Fengguang,
> >
> > i have build a kernel with the config, but my kvm is unable to start it.
> > I will try to find a way to test your kernek config.
> >
> > One thing is the crash point:
> >
> > The function sysenter_setup was modified by Andy, maybe he has an idea
> > what fails.
> 
> *sigh*
> 
> My host kernel is currently fscked up and won't run KVM.  Also, I want
> to confirm that I'm reproducing exactly what you're seeing, and I
> think it depends on the toolchain.  Can you (Fenguang) do:
> 
> $ ls -l arch/x86/vdso/vdso32*.so
> -rwxrwxr-x. 1 luto luto 4096 Mar  7 10:19 arch/x86/vdso/vdso32-int80.so
> -rwxrwxr-x. 1 luto luto 4116 Mar  7 10:19 arch/x86/vdso/vdso32-sysenter.so
> 
> (Of course, triggering this depends on which image gets selected.)
> 

Yes, that what i also figured out. There are two culprits:
CONFIG_OPTIMIZE_INLINING and CONFIG_X86_PPRO_FENCE. Each of them
increase the size of the code by about 500 bytes.

When i add to file arch/x86/vdso/vdso32/vclock_gettime.c

#undef CONFIG_OPTIMIZE_INLINING
#undef CONFIG_X86_PPRO_FENCE

this will solve the issue.

> Note that we have a .so file that exceeds 4k, i.e. one page.  Then
> read the relevant code and wonder what everyone was smoking when they
> wrote it.  There are so many buffer overflows, screwed up
> initializations, unnecessary and incorrect copies, etc, that I don't
> even want to speculate on what the first failure will be when the
> image is bigger than a page.
>

Right. So the above one will not really solve it. At least when
__vdso_getcpu() code will also become a part of the 32 bit VDSO.
 
> It's easy enough to fix, but someone should figure out what the impact
> will be on the compat vdso case.
> 
> I wonder how hard it would be to change the compat vdso do be a dummy
> image a la the x86_64 fake vsyscall page so that old code can keep
> working (maybe with a performance hit) and new code can use a sane
> image.
> 

That is exactly what i wrote one week ago:

Move the VDSO code before the VDSO compat fixmap area and create a kind
of helper VDSO for the VDSO compat fixmap page, which only calls the
real VDSO. But this would result in a performance regression for the
VDSO compat mode.

- Stefani



  reply	other threads:[~2014-03-07 21:53 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-07  1:38 Fengguang Wu
2014-03-07  1:48 ` [x86, vdso] BUG: unable to handle kernel paging request at 91c24000 Fengguang Wu
2014-03-07  7:21 ` [x86, vdso] BUG: unable to handle kernel paging request at d34bd000 Stefani Seibold
2014-03-07 18:56   ` Andy Lutomirski
2014-03-07 21:53     ` Stefani Seibold [this message]
2014-03-07 23:07       ` Andy Lutomirski
2014-03-09  8:47         ` Stefani Seibold
2014-03-10  0:16           ` H. Peter Anvin
2014-03-10  3:18             ` Andy Lutomirski
2014-03-10  4:46               ` Andy Lutomirski
2014-03-10 14:59                 ` H. Peter Anvin
     [not found]                   ` <CA+55aFwKpBybz9S9A=+tcr1BbdzAbagL30Br2cak2GrdPH=hhA@mail.gmail.com>
2014-03-10 17:12                     ` Andy Lutomirski
2014-03-10 17:24                       ` H. Peter Anvin
2014-03-10 17:31                         ` Andy Lutomirski
2014-03-10 17:38                           ` H. Peter Anvin
2014-03-10 17:46                             ` Andy Lutomirski
2014-03-10 17:48                               ` H. Peter Anvin
2014-03-10 17:52                                 ` Andy Lutomirski
2014-03-10 17:58                                   ` H. Peter Anvin
2014-03-10 18:10                                     ` Andy Lutomirski
2014-03-10 17:49                               ` H. Peter Anvin
2014-03-10 20:03                       ` Stefani Seibold
2014-03-10 20:06                         ` H. Peter Anvin
2014-03-10 20:19                           ` Linus Torvalds
2014-03-10 21:20                             ` Linus Torvalds
2014-03-10 21:43                               ` Andy Lutomirski
2014-03-10 21:51                               ` Dave Jones
2014-03-10 22:59                                 ` H. Peter Anvin
2014-03-10 23:32                                   ` [PATCH] x86: Remove CONFIG_X86_OOSTORE Dave Jones
2014-03-11 10:11                               ` [x86, vdso] BUG: unable to handle kernel paging request at d34bd000 Ingo Molnar
2014-03-10 21:25                             ` stefani
2014-03-10 21:39                               ` Linus Torvalds
2014-03-10 21:53                                 ` stefani
2014-03-10 22:03                                   ` Andy Lutomirski
2014-03-10 22:36                                     ` Andy Lutomirski
2014-03-10 23:02                                 ` H. Peter Anvin
2014-03-10 21:29                           ` stefani
2014-03-11  6:02                             ` H. Peter Anvin
2014-03-07  8:47 ` Stefani Seibold
2014-03-07  9:15   ` Fengguang Wu
2014-03-07  9:57     ` Stefani Seibold
2014-03-07 10:21       ` Fengguang Wu
2014-03-07 16:06         ` Stefani Seibold
2014-03-07 23:12           ` H. Peter Anvin
2014-03-07 10:36       ` Fengguang Wu
2014-03-07 23:44       ` Fengguang Wu
2014-03-09  8:08         ` Stefani Seibold
2014-03-10  0:00           ` H. Peter Anvin
2014-03-10 19:41             ` Greg Kroah-Hartman

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=1394229220.20013.13.camel@wall-e.seibold.net \
    --to=stefani@seibold.net \
    --cc=fengguang.wu@intel.com \
    --cc=hpa@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    /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