Re: [PATCH v6 05/27] x86, 64bit: clear ident mapping when kernel is above 512G
On Sun, Dec 16, 2012 at 9:49 AM, Borislav Petkov wrote: > On Thu, Dec 13, 2012 at 02:01:59PM -0800, Yinghai Lu wrote: >> After following patch: >> x86, 64bit: Set extra ident mapping for whole kernel range >> >> We have extra ident mapping for kernel that is loaded above 1G. > > What? > > /me looks at next patch > > Aaah, the *next* patch adds an extra ident mapping. Why don't you say > so? > >> So need to clear extra pgd entry when kernel is loaded above 512g. > > Why then isn't that patch following the next patch instead of coming > before it? make the transition smooth. zap_ident is after setting in head_64.S anyway the whole zap_ident get deleted and we don't need this patch anymore. Yinghai -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v6 05/27] x86, 64bit: clear ident mapping when kernel is above 512G
On Sun, Dec 16, 2012 at 9:49 AM, Borislav Petkov b...@alien8.de wrote: On Thu, Dec 13, 2012 at 02:01:59PM -0800, Yinghai Lu wrote: After following patch: x86, 64bit: Set extra ident mapping for whole kernel range We have extra ident mapping for kernel that is loaded above 1G. What? /me looks at next patch Aaah, the *next* patch adds an extra ident mapping. Why don't you say so? So need to clear extra pgd entry when kernel is loaded above 512g. Why then isn't that patch following the next patch instead of coming before it? make the transition smooth. zap_ident is after setting in head_64.S anyway the whole zap_ident get deleted and we don't need this patch anymore. Yinghai -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v6 05/27] x86, 64bit: clear ident mapping when kernel is above 512G
On Sun, Dec 16, 2012 at 9:49 AM, Borislav Petkov wrote: > On Thu, Dec 13, 2012 at 02:01:59PM -0800, Yinghai Lu wrote: >> After following patch: >> x86, 64bit: Set extra ident mapping for whole kernel range >> >> We have extra ident mapping for kernel that is loaded above 1G. > > What? > > /me looks at next patch > > Aaah, the *next* patch adds an extra ident mapping. Why don't you say > so? > >> So need to clear extra pgd entry when kernel is loaded above 512g. > > Why then isn't that patch following the next patch instead of coming > before it? > thanks a lot for checking the patch. this patch is obsolete by #PF handler version. so if possible, you can check my for-x86-boot branch instead. http://git.kernel.org/?p=linux/kernel/git/yinghai/linux-yinghai.git;a=shortlog;h=refs/heads/for-x86-boot git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for-x86-boot will repost them after HPA is ok with my changes to his #PF handler patch. Thanks Yinghai -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v6 05/27] x86, 64bit: clear ident mapping when kernel is above 512G
On Thu, Dec 13, 2012 at 02:01:59PM -0800, Yinghai Lu wrote: > After following patch: > x86, 64bit: Set extra ident mapping for whole kernel range > > We have extra ident mapping for kernel that is loaded above 1G. What? /me looks at next patch Aaah, the *next* patch adds an extra ident mapping. Why don't you say so? > So need to clear extra pgd entry when kernel is loaded above 512g. Why then isn't that patch following the next patch instead of coming before it? -- Regards/Gruss, Boris. Sent from a fat crate under my desk. Formatting is fine. -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v6 05/27] x86, 64bit: clear ident mapping when kernel is above 512G
On Thu, Dec 13, 2012 at 02:01:59PM -0800, Yinghai Lu wrote: After following patch: x86, 64bit: Set extra ident mapping for whole kernel range We have extra ident mapping for kernel that is loaded above 1G. What? /me looks at next patch Aaah, the *next* patch adds an extra ident mapping. Why don't you say so? So need to clear extra pgd entry when kernel is loaded above 512g. Why then isn't that patch following the next patch instead of coming before it? -- Regards/Gruss, Boris. Sent from a fat crate under my desk. Formatting is fine. -- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v6 05/27] x86, 64bit: clear ident mapping when kernel is above 512G
On Sun, Dec 16, 2012 at 9:49 AM, Borislav Petkov b...@alien8.de wrote: On Thu, Dec 13, 2012 at 02:01:59PM -0800, Yinghai Lu wrote: After following patch: x86, 64bit: Set extra ident mapping for whole kernel range We have extra ident mapping for kernel that is loaded above 1G. What? /me looks at next patch Aaah, the *next* patch adds an extra ident mapping. Why don't you say so? So need to clear extra pgd entry when kernel is loaded above 512g. Why then isn't that patch following the next patch instead of coming before it? thanks a lot for checking the patch. this patch is obsolete by #PF handler version. so if possible, you can check my for-x86-boot branch instead. http://git.kernel.org/?p=linux/kernel/git/yinghai/linux-yinghai.git;a=shortlog;h=refs/heads/for-x86-boot git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for-x86-boot will repost them after HPA is ok with my changes to his #PF handler patch. Thanks Yinghai -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v6 05/27] x86, 64bit: clear ident mapping when kernel is above 512G
After following patch: x86, 64bit: Set extra ident mapping for whole kernel range We have extra ident mapping for kernel that is loaded above 1G. So need to clear extra pgd entry when kernel is loaded above 512g. Signed-off-by: Yinghai Lu --- arch/x86/kernel/head64.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index 037df57..3ef9ce6 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c @@ -29,7 +29,17 @@ static void __init zap_identity_mappings(void) { pgd_t *pgd = pgd_offset_k(0UL); + unsigned long pa_text = __pa_symbol(_text); + unsigned long pa_end = __pa_symbol(_end); + pgd_clear(pgd); + + /* When kernel is loaded above 512G */ + if (pa_text >= PGDIR_SIZE) + pgd_clear(pgd + pgd_index(pa_text)); + if (pa_end - 1 >= PGDIR_SIZE) + pgd_clear(pgd + pgd_index(pa_end - 1)); + __flush_tlb_all(); } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v6 05/27] x86, 64bit: clear ident mapping when kernel is above 512G
After following patch: x86, 64bit: Set extra ident mapping for whole kernel range We have extra ident mapping for kernel that is loaded above 1G. So need to clear extra pgd entry when kernel is loaded above 512g. Signed-off-by: Yinghai Lu ying...@kernel.org --- arch/x86/kernel/head64.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index 037df57..3ef9ce6 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c @@ -29,7 +29,17 @@ static void __init zap_identity_mappings(void) { pgd_t *pgd = pgd_offset_k(0UL); + unsigned long pa_text = __pa_symbol(_text); + unsigned long pa_end = __pa_symbol(_end); + pgd_clear(pgd); + + /* When kernel is loaded above 512G */ + if (pa_text = PGDIR_SIZE) + pgd_clear(pgd + pgd_index(pa_text)); + if (pa_end - 1 = PGDIR_SIZE) + pgd_clear(pgd + pgd_index(pa_end - 1)); + __flush_tlb_all(); } -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/