public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] PATCH: Fix for 4KB kernel corruption
@ 2001-11-16  2:05 Siddha, Suresh B
  2001-11-16  2:05 ` Siddha, Suresh B
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Siddha, Suresh B @ 2001-11-16  2:05 UTC (permalink / raw)
  To: linux-ia64

Hi,

4KB page size kernel is broken on Lion with 8GB memory. ia64_boot_param
structure was getting corrupted. Appended patch fixes this problem.

PAGE_ALIGN is required because: rsvd_region[i].end need not be page aligned
and in the next iteration of the for loop this can potentially become
bootmap_start. This can lead to corruption of rsvd_region[i] as
init_bootmem() takes the pfn of bootmap_start and initialises the bootmem.

Thanks,
Suresh

diff -u linux-2.4.14/arch/ia64/kernel/setup.c~
linux-2.4.14/arch/ia64/kernel/setup.c
--- linux-2.4.14/arch/ia64/kernel/setup.c~      Thu Nov 15 16:27:23 2001
+++ linux-2.4.14/arch/ia64/kernel/setup.c       Thu Nov 15 16:28:01 2001
@@ -175,7 +175,7 @@
                /* nothing more available in this segment */
                if (range_end = end) return 0;
 
-               free_start = rsvd_region[i].end;
+               free_start = PAGE_ALIGN(rsvd_region[i].end);
        }
        return 0;
 }


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Linux-ia64] PATCH: Fix for 4KB kernel corruption
  2001-11-16  2:05 [Linux-ia64] PATCH: Fix for 4KB kernel corruption Siddha, Suresh B
@ 2001-11-16  2:05 ` Siddha, Suresh B
  2001-11-16 10:24 ` Philippe Gramoullé
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Siddha, Suresh B @ 2001-11-16  2:05 UTC (permalink / raw)
  To: linux-ia64

Hi,

4KB page size kernel is broken on Lion with 8GB memory. ia64_boot_param
structure was getting corrupted. Appended patch fixes this problem.

PAGE_ALIGN is required because: rsvd_region[i].end need not be page aligned
and in the next iteration of the for loop this can potentially become
bootmap_start. This can lead to corruption of rsvd_region[i] as
init_bootmem() takes the pfn of bootmap_start and initialises the bootmem.

Thanks,
Suresh

diff -u linux-2.4.14/arch/ia64/kernel/setup.c~
linux-2.4.14/arch/ia64/kernel/setup.c
--- linux-2.4.14/arch/ia64/kernel/setup.c~      Thu Nov 15 16:27:23 2001
+++ linux-2.4.14/arch/ia64/kernel/setup.c       Thu Nov 15 16:28:01 2001
@@ -175,7 +175,7 @@
                /* nothing more available in this segment */
                if (range_end = end) return 0;
 
-               free_start = rsvd_region[i].end;
+               free_start = PAGE_ALIGN(rsvd_region[i].end);
        }
        return 0;
 }


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Linux-ia64] PATCH: Fix for 4KB kernel corruption
  2001-11-16  2:05 [Linux-ia64] PATCH: Fix for 4KB kernel corruption Siddha, Suresh B
  2001-11-16  2:05 ` Siddha, Suresh B
@ 2001-11-16 10:24 ` Philippe Gramoullé
  2001-11-16 18:44 ` Siddha, Suresh B
  2001-11-19 21:40 ` David Mosberger
  3 siblings, 0 replies; 5+ messages in thread
From: Philippe Gramoullé @ 2001-11-16 10:24 UTC (permalink / raw)
  To: linux-ia64

Hi Siddha,

Can this corruption happen with on lion with 4Go of memory also ?

Thanks,

Philippe.

"Siddha, Suresh B" wrote:
> 
> Hi,
> 
> 4KB page size kernel is broken on Lion with 8GB memory. ia64_boot_param
> structure was getting corrupted. Appended patch fixes this problem.
> 
> PAGE_ALIGN is required because: rsvd_region[i].end need not be page aligned
> and in the next iteration of the for loop this can potentially become
> bootmap_start. This can lead to corruption of rsvd_region[i] as
> init_bootmem() takes the pfn of bootmap_start and initialises the bootmem.
> 
> Thanks,
> Suresh
> 
> diff -u linux-2.4.14/arch/ia64/kernel/setup.c~
> linux-2.4.14/arch/ia64/kernel/setup.c
> --- linux-2.4.14/arch/ia64/kernel/setup.c~      Thu Nov 15 16:27:23 2001
> +++ linux-2.4.14/arch/ia64/kernel/setup.c       Thu Nov 15 16:28:01 2001
> @@ -175,7 +175,7 @@
>                 /* nothing more available in this segment */
>                 if (range_end = end) return 0;
> 
> -               free_start = rsvd_region[i].end;
> +               free_start = PAGE_ALIGN(rsvd_region[i].end);
>         }
>         return 0;
>  }
> 
> _______________________________________________
> Linux-IA64 mailing list
> Linux-IA64@linuxia64.org
> http://lists.linuxia64.org/lists/listinfo/linux-ia64


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [Linux-ia64] PATCH: Fix for 4KB kernel corruption
  2001-11-16  2:05 [Linux-ia64] PATCH: Fix for 4KB kernel corruption Siddha, Suresh B
  2001-11-16  2:05 ` Siddha, Suresh B
  2001-11-16 10:24 ` Philippe Gramoullé
@ 2001-11-16 18:44 ` Siddha, Suresh B
  2001-11-19 21:40 ` David Mosberger
  3 siblings, 0 replies; 5+ messages in thread
From: Siddha, Suresh B @ 2001-11-16 18:44 UTC (permalink / raw)
  To: linux-ia64

Hi Philippe,

You may or mayn't see this problem. It depends up on the EFI memory map. In
our case, it is so happening that bootmap is allocated from the end of one
of the reserved regions and corrupting that reserved region.

Thanks,
Suresh

> -----Original Message-----
> From: Philippe Gramoullé [mailto:philippe.gramoulle@mmania.com]
> Sent: Friday, November 16, 2001 2:24 AM
> To: Siddha, Suresh B
> Cc: linux-ia64@linuxia64.org
> Subject: Re: [Linux-ia64] PATCH: Fix for 4KB kernel corruption
> 
> 
> 
> Hi Siddha,
> 
> Can this corruption happen with on lion with 4Go of memory also ?
> 
> Thanks,
> 
> Philippe.
> 
> "Siddha, Suresh B" wrote:
> > 
> > Hi,
> > 
> > 4KB page size kernel is broken on Lion with 8GB memory. 
> ia64_boot_param
> > structure was getting corrupted. Appended patch fixes this problem.
> > 
> > PAGE_ALIGN is required because: rsvd_region[i].end need not 
> be page aligned
> > and in the next iteration of the for loop this can 
> potentially become
> > bootmap_start. This can lead to corruption of rsvd_region[i] as
> > init_bootmem() takes the pfn of bootmap_start and 
> initialises the bootmem.
> > 
> > Thanks,
> > Suresh
> > 
> > diff -u linux-2.4.14/arch/ia64/kernel/setup.c~
> > linux-2.4.14/arch/ia64/kernel/setup.c
> > --- linux-2.4.14/arch/ia64/kernel/setup.c~      Thu Nov 15 
> 16:27:23 2001
> > +++ linux-2.4.14/arch/ia64/kernel/setup.c       Thu Nov 15 
> 16:28:01 2001
> > @@ -175,7 +175,7 @@
> >                 /* nothing more available in this segment */
> >                 if (range_end == end) return 0;
> > 
> > -               free_start = rsvd_region[i].end;
> > +               free_start = PAGE_ALIGN(rsvd_region[i].end);
> >         }
> >         return 0;
> >  }
> > 
> > _______________________________________________
> > Linux-IA64 mailing list
> > Linux-IA64@linuxia64.org
> > http://lists.linuxia64.org/lists/listinfo/linux-ia64
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Linux-ia64] PATCH: Fix for 4KB kernel corruption
  2001-11-16  2:05 [Linux-ia64] PATCH: Fix for 4KB kernel corruption Siddha, Suresh B
                   ` (2 preceding siblings ...)
  2001-11-16 18:44 ` Siddha, Suresh B
@ 2001-11-19 21:40 ` David Mosberger
  3 siblings, 0 replies; 5+ messages in thread
From: David Mosberger @ 2001-11-19 21:40 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Thu, 15 Nov 2001 18:05:47 -0800, "Siddha, Suresh B" <suresh.b.siddha@intel.com> said:

  Suresh> Hi, 4KB page size kernel is broken on Lion with 8GB
  Suresh> memory. ia64_boot_param structure was getting
  Suresh> corrupted. Appended patch fixes this problem.

Thanks I applied the patch and also make sure the end address is page
aligned.  It's not strictly needed, but it's cleaner that way (since
the bootmap size is measured as a page count).

	--david


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-11-19 21:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-16  2:05 [Linux-ia64] PATCH: Fix for 4KB kernel corruption Siddha, Suresh B
2001-11-16  2:05 ` Siddha, Suresh B
2001-11-16 10:24 ` Philippe Gramoullé
2001-11-16 18:44 ` Siddha, Suresh B
2001-11-19 21:40 ` David Mosberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox