Skip to contentSkip to conversation

2.6.10-rc1-mm3

PATCH In review Andi Kleen 2 participants 6 messages Nov 5, 2004 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

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

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

Andi Kleen

author
#2 lore raw
Quoted 6 lines · Con Kolivas

It's life Jim but not as we know it...

This happened during modprobe of alsa modules. Keyboard still alive, everything else dead; not even sysrq would do anything, netconsole had no output, luckily this made it to syslog:

I just tested modprobing of alsa (snd_intel8x0) and it works for me. Also vmalloc must work at least to some point.

Can you confirm it's really caused by 4level by reverting all the 4level-* patches from broken out?

-Andi

#3 lore raw
Quoted 11 lines · Andi Kleen
Quoted 6 lines · Con Kolivas

It's life Jim but not as we know it...

This happened during modprobe of alsa modules. Keyboard still alive, everything else dead; not even sysrq would do anything, netconsole had no output, luckily this made it to syslog:

Quoted 4 lines

I just tested modprobing of alsa (snd_intel8x0) and it works for me. Also vmalloc must work at least to some point.

Can you confirm it's really caused by 4level by reverting all the 4level-* patches from broken out?

I dont recall blaming 4level. When I get a chance I'll try.

Cheers,
Con

author
#4 lore raw
Quoted 12 lines · Con Kolivas
Quoted 11 lines · Andi Kleen
Quoted 6 lines · Con Kolivas

It's life Jim but not as we know it...

This happened during modprobe of alsa modules. Keyboard still alive, everything else dead; not even sysrq would do anything, netconsole had no output, luckily this made it to syslog:

Quoted 7 lines
Quoted 5 lines

I just tested modprobing of alsa (snd_intel8x0) and it works for me. Also vmalloc must work at least to some point.

Can you confirm it's really caused by 4level by reverting all the 4level-* patches from broken out?

I dont recall blaming 4level. When I get a chance I'll try.

I can reproduce it now using a forced big vmalloc. It's probably 4level. Debugging...

-Andi

author
#5 lore raw

PATCH 1/1 Fix for vmalloc problem was Re: 2.6.10-rc1-mm3

In reply to Con Kolivas
Quoted 12 lines · Con Kolivas
Quoted 11 lines · Andi Kleen
Quoted 6 lines · Con Kolivas

It's life Jim but not as we know it...

This happened during modprobe of alsa modules. Keyboard still alive, everything else dead; not even sysrq would do anything, netconsole had no output, luckily this made it to syslog:

Quoted 7 lines
Quoted 5 lines

I just tested modprobing of alsa (snd_intel8x0) and it works for me. Also vmalloc must work at least to some point.

Can you confirm it's really caused by 4level by reverting all the 4level-* patches from broken out?

I dont recall blaming 4level. When I get a chance I'll try.

This patch should fix it. Can you please test? Thanks.

-Andi

Fix silly typo in mm/vmalloc.c and some minor cleanups.

mm/vmalloc.c renamed from mm/vmalloc.c-o +3 -4
diff -up linux-2.6.10rc1-mm3/mm/vmalloc.c-o linux-2.6.10rc1-mm3/mm/vmalloc.c
@@ -98,7 +98,6 @@ static void unmap_area_pgd(pml4_t *pml4,
 	}
 
 	pgd = pml4_pgd_offset_k(pml4, address);
-	address &= ~PML4_MASK;
 	end = address + size;
 
 	do {
@@ -114,8 +113,8 @@ static int map_area_pte(pte_t *pte, unsi
 {
 	unsigned long end;
 
-	address &= ~PMD_MASK;
 	end = address + size;
+	address &= ~PMD_MASK;
 	if (end > PMD_SIZE)
 		end = PMD_SIZE;
 
@@ -187,7 +186,7 @@ void unmap_vm_area(struct vm_struct *are
 	flush_cache_vunmap(address, end);
 	for (i = pml4_index(address); i <= pml4_index(end-1); i++) {
 		next = (address + PML4_SIZE) & PML4_MASK;
-		if (next <= address || next > end)
+		if (next < address || next > end)
 			next = end;
 		unmap_area_pgd(pml4, address, next - address);
 		address = next;
@@ -213,7 +212,7 @@ int map_vm_area(struct vm_struct *area, 
 			err = -ENOMEM;
 			break;
 		}
-		next = (address + PGDIR_SIZE) & PGDIR_MASK;
+		next = (address + PML4_SIZE) & PML4_MASK;
 		if (next < address || next > end)
 			next = end;
 		if (map_area_pgd(pgd, address, next, prot, pages)) {
#6 lore raw

Re: [PATCH] Fix for vmalloc problem was Re: 2.6.10-rc1-mm3

Quoted 21 lines · Andi Kleen
Quoted 19 lines · Con Kolivas
Quoted 16 lines · Andi Kleen
Quoted 6 lines · Con Kolivas

It's life Jim but not as we know it...

This happened during modprobe of alsa modules. Keyboard still alive, everything else dead; not even sysrq would do anything, netconsole had no output, luckily this made it to syslog:

I just tested modprobing of alsa (snd_intel8x0) and it works for me. Also vmalloc must work at least to some point.

Can you confirm it's really caused by 4level by reverting all the 4level-* patches from broken out?

Quoted 8 lines
Quoted 1 line

I dont recall blaming 4level. When I get a chance I'll try.

This patch should fix it. Can you please test? Thanks.

-Andi

Fix silly typo in mm/vmalloc.c and some minor cleanups.

Boots fine now thanks.

Con

author
#7 lore raw

Re: [PATCH] Fix for vmalloc problem was Re: 2.6.10-rc1-mm3

Quoted 26 lines · Con Kolivas
Quoted 25 lines · Andi Kleen
Quoted 21 lines · Con Kolivas
Quoted 12 lines · Andi Kleen
Quoted 6 lines · Con Kolivas

It's life Jim but not as we know it...

This happened during modprobe of alsa modules. Keyboard still alive, everything else dead; not even sysrq would do anything, netconsole had no output, luckily this made it to syslog:

Quoted 5 lines

I just tested modprobing of alsa (snd_intel8x0) and it works for me. Also vmalloc must work at least to some point.

Can you confirm it's really caused by 4level by reverting all the 4level-* patches from broken out?

I dont recall blaming 4level. When I get a chance I'll try.

Quoted 7 lines
Quoted 5 lines

This patch should fix it. Can you please test? Thanks.

-Andi

Fix silly typo in mm/vmalloc.c and some minor cleanups.

Boots fine now thanks.

It broke x86-64 unfortunately. This version should be better and is simpler. Andrew, if you applied the previous version please replace with this one.

-Andi

Fix vmalloc overflow with 4levels.

mm/vmalloc.c renamed from mm/vmalloc.c-o +1 -1
diff -up linux-2.6.10rc1-mm3/mm/vmalloc.c-o linux-2.6.10rc1-mm3/mm/vmalloc.c
@@ -213,7 +213,7 @@ int map_vm_area(struct vm_struct *area, 
 			err = -ENOMEM;
 			break;
 		}
-		next = (address + PGDIR_SIZE) & PGDIR_MASK;
+		next = (address + PML4_SIZE) & PML4_MASK;
 		if (next < address || next > end)
 			next = end;
 		if (map_area_pgd(pgd, address, next, prot, pages)) {