mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefani Seibold <stefani@seibold.net>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	x86@kernel.org, mingo@redhat.com, hpa@zytor.com,
	ak@linux.intel.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] x86, vdso32: fix out of memory handling setup vDSO
Date: Thu, 20 Mar 2014 12:38:14 +0100	[thread overview]
Message-ID: <1395315494.1127.3.camel@vger.seibold.net> (raw)
In-Reply-To: <alpine.DEB.2.02.1403201039400.18573@ionos.tec.linutronix.de>

Am Donnerstag, den 20.03.2014, 10:53 +0100 schrieb Thomas Gleixner:
> On Thu, 20 Mar 2014, Stefani Seibold wrote:
> 
> > This patch add a correct out of memory handling for setup a 32 bit vDSO.
> > 
> > The patch is against tip commit 4e40112c4ff6a577dd06d92b2a54cdf06265bf74
> > 
> > Signed-off-by: Stefani Seibold <stefani@seibold.net>
> > ---
> >  arch/x86/vdso/vdso32-setup.c | 17 ++++++++++++++++-
> >  1 file changed, 16 insertions(+), 1 deletion(-)
> > 
> > diff --git a/arch/x86/vdso/vdso32-setup.c b/arch/x86/vdso/vdso32-setup.c
> > index 0bc363a..e1171c2 100644
> > --- a/arch/x86/vdso/vdso32-setup.c
> > +++ b/arch/x86/vdso/vdso32-setup.c
> > @@ -134,8 +134,14 @@ int __init sysenter_setup(void)
> >  	}
> >  
> >  	vdso32_size = (vdso_len + PAGE_SIZE - 1) / PAGE_SIZE;
> > -	vdso32_pages = kmalloc(sizeof(*vdso32_pages) * vdso32_size, GFP_ATOMIC); 
> > +
> > +	vdso32_pages = kmalloc(sizeof(*vdso32_pages) * vdso32_size, GFP_ATOMIC);
> 
> Why is this GFP_ATOMIC and not GFP_ATOMIC ?
> 
> That code is called either from identify_boot_cpu(), where GFP_KERNEL
> is perfectly valid and from subsys_initcall(sysenter_setup) which is
> way late in the boot process where GFP_KERNEL is the RightThing.
> 
> Aside of that, why do we need to call it early for X86_32 and late for
> X86_64?
> 
> We need the vdso before we head off to user space, but not in the
> early boot process.
> 

All complains are design decisions not made by me. I will send a patch
for the GFP_ATOMIC thing. For the other one it would be the best to ask
Andy for the reason.

- Stefani




  parent reply	other threads:[~2014-03-20 11:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-20  7:45 Stefani Seibold
2014-03-20  9:53 ` Thomas Gleixner
2014-03-20 10:49   ` Thomas Gleixner
2014-03-20 11:38   ` Stefani Seibold [this message]
2014-03-20 12:30     ` Thomas Gleixner
2014-03-20 15:02       ` Andy Lutomirski
2014-03-20 15:15         ` Thomas Gleixner
2014-03-20 15:18           ` Andy Lutomirski
2014-03-20 15:59             ` H. Peter Anvin
2014-03-20 16:56               ` Andy Lutomirski
2014-03-20 17:06                 ` H. Peter Anvin
2014-03-20 22:01                 ` [PATCH] x86: Load the 32-bit vdso in place, just like the 64-bit vdsos Andy Lutomirski
2014-03-20 22:30                   ` [tip:x86/vdso] " tip-bot for Andy Lutomirski

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=1395315494.1127.3.camel@vger.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

all inboxes | Powered by JetHome®