public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Yinghai Lu <yinghai@kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] x86, realmode: set real_mode permissions early
Date: Thu, 27 Dec 2012 19:22:32 +0100	[thread overview]
Message-ID: <20121227182232.GA10054@x1.alien8.de> (raw)

> commit 77e277cb85290a183bbc1995a1cd839b1c216f25
> Subject: [PATCH] x86, realmode: set real_mode permissions early
> Author: Yinghai Lu <yinghai@kernel.org>
> Date:   Mon Dec 24 18:00:21 2012 -0800
> 
>     x86, realmode: set real_mode permissions early
>     
>     We need to set trampoline code to EXEC early before we do smp
>     AP bootings.
>     
>     Found the problem after switching to #PF handler set page table,
>     and we do not set initial kernel low mapping with EXEC anymore.
>     
>     Change to use early_initcall instead that will make sure tramopline
>     will have EXEC set.
>     
>     Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> 
> diff --git a/arch/x86/realmode/init.c b/arch/x86/realmode/init.c
> index 80450261215c..0b7e840ad4d4 100644
> --- a/arch/x86/realmode/init.c
> +++ b/arch/x86/realmode/init.c
> @@ -111,5 +111,4 @@ static int __init set_real_mode_permissions(void)
>  
>  	return 0;
>  }
> -
> -arch_initcall(set_real_mode_permissions);
> +early_initcall(set_real_mode_permissions);

I'm looking at this patch in the -v8 branch: you need to update the
comment above that function to say that trampoline code needs to be
marked X now earlier.

Thanks.

-- 
Regards/Gruss,
Boris.

             reply	other threads:[~2012-12-27 18:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-27 18:22 Borislav Petkov [this message]
2012-12-27 23:56 ` [PATCH] x86, realmode: set real_mode permissions early Yinghai Lu
2012-12-28  0:01   ` H. Peter Anvin
2012-12-28  0:57     ` Yinghai Lu
2012-12-28  1:09       ` 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=20121227182232.GA10054@x1.alien8.de \
    --to=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yinghai@kernel.org \
    /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