lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 13 Mar 2008 19:07:27 -0700
From:	"Yinghai Lu" <yhlu.kernel@...il.com>
To:	"KAMEZAWA Hiroyuki" <kamezawa.hiroyu@...fujitsu.com>
Cc:	"Andrew Morton" <akpm@...ux-foundation.org>, mingo@...e.hu,
	clameter@....com, linux-kernel@...r.kernel.org,
	"Andi Kleen" <ak@...e.de>, "Yasunori Goto" <y-goto@...fujitsu.com>
Subject: Re: [PATCH] mm: make free_bootmem to loop bdata_list

On Thu, Mar 13, 2008 at 7:04 PM, KAMEZAWA Hiroyuki
<kamezawa.hiroyu@...fujitsu.com> wrote:
> On Thu, 13 Mar 2008 18:39:34 -0700
>
> "Yinghai Lu" <yhlu.kernel@...il.com> wrote:
>
>  > On Thu, Mar 13, 2008 at 6:39 PM, KAMEZAWA Hiroyuki
>  > <kamezawa.hiroyu@...fujitsu.com> wrote:
>  > > On Thu, 13 Mar 2008 11:53:31 -0700
>  > >  "Yinghai Lu" <yhlu.kernel@...il.com> wrote:
>  > >  > ===================================================================
>  > >  > --- linux-2.6.orig/mm/bootmem.c
>  > >  > +++ linux-2.6/mm/bootmem.c
>  > >  > @@ -427,7 +438,9 @@ int __init reserve_bootmem(unsigned long
>  > >  >
>  > >  >  void __init free_bootmem(unsigned long addr, unsigned long size)
>  > >  >  {
>  > >  > -     free_bootmem_core(NODE_DATA(0)->bdata, addr, size);
>  > >  > +     bootmem_data_t *bdata;
>  > >  > +     list_for_each_entry(bdata, &bdata_list, list)
>  > >  > +             free_bootmem_core(bdata, addr, size);
>  > >  >  }
>  > >
>  > >
>  > >  Just a confirmation.
>  > >  In above loop, boundary check in free_bootmem_core() hits two or more times ?
>  > >  If yes, it's ok.
>  > >  If no, please exit loop at hit.
>  >
>  > yes. need that handle range cross node (RAMDISK case that is end
>  > beyond end_of_ram).
>  >
>  Then, <addr, size> can spread across nodes.
>
>  IMHO, there are *big* memory hole between nodes in some systems.
>  This kind of interface, which allows alloc/free bootmem accross nodes,
>  will see terrible trouble when a programmer assumes  "alloc/free bootmem
>  always return contiguous size of memory" (This is guaranteed now,)
>
>  Does the new allocator (you changed ?) guarantee that returned <address, size>
>  is fully contiguous even if it spreads accross nodes ?
>
>  If no, NACK for this version.

i didn't change alloc_mem, it still get range from one node and continuous.

new free_bootmem could remove the assumpition in
setup_64.c::setup_arch:free_bootmem about node0
                        /* Assumes everything on node 0 */
                        free_bootmem(ramdisk_image, ramdisk_size);
                        printk(KERN_ERR "initrd extends beyond end of memory "
                               "(0x%08lx > 0x%08lx)\ndisabling initrd\n",
                               ramdisk_end, end_of_mem);
                        initrd_start = 0;

YH
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ