[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE9FiQXpAB_AFtHF_NN7yr2iP2OOLgMir8MNvYUUc15k83_3zg@mail.gmail.com>
Date: Thu, 27 Dec 2012 15:56:42 -0800
From: Yinghai Lu <yinghai@...nel.org>
To: Borislav Petkov <bp@...en8.de>, Yinghai Lu <yinghai@...nel.org>,
"H. Peter Anvin" <hpa@...or.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86, realmode: set real_mode permissions early
On Thu, Dec 27, 2012 at 10:22 AM, Borislav Petkov <bp@...en8.de> wrote:
>> commit 77e277cb85290a183bbc1995a1cd839b1c216f25
>> Subject: [PATCH] x86, realmode: set real_mode permissions early
>> Author: Yinghai Lu <yinghai@...nel.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@...nel.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.
Not sure if we really need to add such comment in the code.
Peter, what is your idea about this?
Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists