x86, realmode: set real_mode permissions early
PATCH 1/1 x86, realmode: set real_mode permissions early
Quoted 23 lines
commit
77e277cb85290a183bbc1995a1cd839b1c216f25
Subject: [PATCH] x86, realmode: setreal_modepermissions early
Author: Yinghai Lu <[email protected]>
Date: Mon Dec 24 18:00:21 2012 -0800x86, realmode: set
real_modepermissions earlyWe 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_initcallinstead that will make sure tramopline will have EXEC set.Signed-off-by Yinghai Lu <[email protected]>arch/x86/realmode/init.c +0
-0
arch/x86/realmode/init.c static int __init set_real_mode_permissions(void) · line 114
Quoted 6 lines
arch/x86/realmode/init.c +1
-2@@ -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.
Signature · 2 lines
Regards/Gruss, Boris.
Quoted 24 lines · Borislav Petkov
Quoted 24 lines
commit
77e277cb85290a183bbc1995a1cd839b1c216f25
Subject: [PATCH] x86, realmode: setreal_modepermissions early
Author: Yinghai Lu <[email protected]>
Date: Mon Dec 24 18:00:21 2012 -0800x86, realmode: set
real_modepermissions earlyWe 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_initcallinstead that will make sure tramopline will have EXEC set.Signed-off-by Yinghai Lu <[email protected]>arch/x86/realmode/init.c +0
-0@@ -111,5 +111,4 @@ static int __init set_real_mode_permissions(void)
Quoted 9 lines
arch/x86/realmode/init.c static int __init set_real_mode_permissions(void) · line 114
Quoted 5 lines
arch/x86/realmode/init.c +1
-2return 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
Quoted 9 lines · Yinghai Lu
Quoted 4 lines
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?
It would be good to note why the early_initcall is the right phase.
-hpa
Signature · 2 lines
H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.
Quoted 8 lines · H. Peter Anvin
Quoted 7 lines · Yinghai Lu
Quoted 5 lines
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.
Quoted 7 lines
Quoted 4 lines
Not sure if we really need to add such comment in the code.
Peter, what is your idea about this?
It would be good to note why the
early_initcallis the right phase.
How about:
---
Trampoline will be executed by APs with SMP,
So we need to set it EXEC in do_pre_smp_initcalls and it is early_initcall.
---
Seems ok.
Quoted 24 lines · Yinghai Lu
Quoted 8 lines · H. Peter Anvin
Quoted 7 lines · Yinghai Lu
Quoted 5 lines
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.
Quoted 7 lines
Quoted 4 lines
Not sure if we really need to add such comment in the code.
Peter, what is your idea about this?
It would be good to note why the
early_initcallis the right phase.How about:
---
Trampoline will be executed by APs with SMP,
So we need to set it EXEC indo_pre_smp_initcallsand it isearly_initcall.
---
Signature · 1 line
Sent from my mobile phone. Please excuse brevity and lack of formatting.