Skip to contentSkip to conversation

fix x86-32 early fixmap initialization.

PATCH In review Eric W. Biederman 3 participants 4 messages Dec 2, 2007 – Dec 4, 2007 1 message not in the archive x86

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 fix x86-32 early fixmap initialization.

Quoted 7 lines · [email protected] writes:

hello,

i've just noticed that the chunk in i386/kernel/head.S ended up in a weird place, namely, it's not going to be executed as it's just after a 'jmp 3f' and before startup_32_smp, probably not what you intended. on a sidenote, the whole thing can be done in a single insn, like:

Quoted 5 lines

movl $(swapper_pg_pmd - __PAGE_OFFSET + 0x067), (swapper_pg_dir - __PAGE_OFFSET+ 4092)

PS: your email address [email protected] in the commit seems to be wrong as well.

Yes. YH refresh one of my old patches and apparently got my email address wrong.

Thanks for the reminder I thought we had fixed this problem a while ago.

---

arch/x86/kernel/head_32.S +6 -6
index 374b7ec..ac0637a 100644
@@ -193,6 +193,12 @@ default_entry:
 	jb 10b
 	movl %edi,(init_pg_tables_end - __PAGE_OFFSET)
 
+	/* Do an early initialization of the fixmap area */
+	movl $(swapper_pg_dir - __PAGE_OFFSET), %edx
+	movl $(swapper_pg_pmd - __PAGE_OFFSET), %eax
+	addl $0x007, %eax			/* 0x007 = PRESENT+RW+USER */
+	movl %eax, 4092(%edx)
+
 	xorl %ebx,%ebx				/* This is the boot CPU (BSP) */
 	jmp 3f
 /*
@@ -208,12 +214,6 @@ default_entry:
 .section .init.text,"ax",@progbits
 #endif
 
-	/* Do an early initialization of the fixmap area */
-	movl $(swapper_pg_dir - __PAGE_OFFSET), %edx
-	movl $(swapper_pg_pmd - __PAGE_OFFSET), %eax
-	addl $0x007, %eax			/* 0x007 = PRESENT+RW+USER */
-	movl %eax, 4092(%edx)
-
 #ifdef CONFIG_SMP
 ENTRY(startup_32_smp)
 	cld
#2 lore raw
Quoted 13 lines · Eric W. Biederman
Quoted 10 lines · [email protected] writes:

hello,

i've just noticed that the chunk in i386/kernel/head.S ended up in a weird place, namely, it's not going to be executed as it's just after a 'jmp 3f' and before startup_32_smp, probably not what you intended. on a sidenote, the whole thing can be done in a single insn, like:

movl $(swapper_pg_pmd - __PAGE_OFFSET + 0x067), (swapper_pg_dir - __PAGE_OFFSET+ 4092)

Quoted 7 lines
Quoted 2 lines

PS: your email address [email protected] in the commit seems to be wrong as well.

Yes. YH refresh one of my old patches and apparently got my email address wrong.

Thanks for the reminder I thought we had fixed this problem a while ago.

i sent fix to andrew and andi. but it seems they missed it.

BTW: how about your head32.c patch series.

YH

#3 lore raw
Quoted 17 lines · Yinghai Lu
Quoted 16 lines · Eric W. Biederman
Quoted 12 lines · [email protected] writes:

hello,

i've just noticed that the chunk in i386/kernel/head.S ended up in a weird place, namely, it's not going to be executed as it's just after a 'jmp 3f' and before startup_32_smp, probably not what you intended. on a sidenote, the whole thing can be done in a single insn, like:

movl $(swapper_pg_pmd - __PAGE_OFFSET + 0x067), (swapper_pg_dir - __PAGE_OFFSET+ 4092)

PS: your email address [email protected] in the commit seems to be wrong as well.

Quoted 6 lines
Quoted 4 lines

Yes. YH refresh one of my old patches and apparently got my email address wrong.

Thanks for the reminder I thought we had fixed this problem a while ago.

i sent fix to andrew and andi. but it seems they missed it.

Well hopefully the new arch/x86 maintainers can pick up a simple bug fix. Hopefully this code has not bit-rotted yet.

Quoted 1 line

BTW: how about your head32.c patch series.

I think it is a wonderful idea ;)

Right now I'm buried in the namespace work.

I am seeing my todo list shrink visibly on that day by day, but it is still a mighty list.

Hopefully that list will won't include any patches that just need refreshing and merging by the time 2.6.25 rolls around...

Eric

#4 lore raw
In reply to Yinghai Lu
Quoted 17 lines · Yinghai Lu
Quoted 16 lines · Eric W. Biederman
Quoted 12 lines · [email protected] writes:

hello,

i've just noticed that the chunk in i386/kernel/head.S ended up in a weird place, namely, it's not going to be executed as it's just after a 'jmp 3f' and before startup_32_smp, probably not what you intended. on a sidenote, the whole thing can be done in a single insn, like:

movl $(swapper_pg_pmd - __PAGE_OFFSET + 0x067), (swapper_pg_dir - __PAGE_OFFSET+ 4092)

PS: your email address [email protected] in the commit seems to be wrong as well.

Quoted 7 lines
Quoted 5 lines

Yes. YH refresh one of my old patches and apparently got my email address wrong.

Thanks for the reminder I thought we had fixed this problem a while ago.

i sent fix to andrew and andi. but it seems they missed it.

ok, this one is now upstream, it's in -rc4:

------------->
commit 17d57a9206b4de6ad082ac9f2d2346985abbd2aa
Author: Eric W. Biederman <[email protected]>
Date: Sat Dec 1 18:34:06 2007 -0700

x86: fix x86-32 early fixmap initialization.

[email protected] writes: