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] [thread-next>] [day] [month] [year] [list]
Message-Id: <20081028093224.a0de9f64.kamezawa.hiroyu@jp.fujitsu.com>
Date:	Tue, 28 Oct 2008 09:32:24 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Gerald Schaefer <gerald.schaefer@...ibm.com>
Cc:	Dave Hansen <dave@...ux.vnet.ibm.com>, akpm@...ux-foundation.org,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	schwidefsky@...ibm.com, heiko.carstens@...ibm.com,
	y-goto@...fujitsu.com
Subject: Re: [PATCH] memory hotplug: fix page_zone() calculation in
 test_pages_isolated()

On Mon, 27 Oct 2008 18:59:29 +0100
Gerald Schaefer <gerald.schaefer@...ibm.com> wrote:
> Instead of using pfn_to_page() you could also have just called
> > __first_valid_page() again.  But, that would have duplicated a bit of
> > work, even though not much in practice because the caches are still hot.
> > 
> > Technically, you wouldn't even need to check the return from
> > __first_valid_page() since you know it has a valid result because you
> > made the exact same call a moment before.
> > 
> > Anyway, can you remove the !page check, fix up the changelog and resend?
> 
> Calling __first_valid_page() again might be a good idea. Thinking about it
> now, I guess there is still a problem left with my patch, but for reasons
> other than what you said :) If the loop is completed with page == NULL,
> we will return -EBUSY with the new patch. But there may have been valid
> pages before, and only some memory hole at the end. In this case, returning
> -EBUSY would probably be wrong.
> 
> Kamezawa, this loop/function was added by you, what do you think?
> 

I think there is a bug, as you wrote.
But
 - "pfn" and "end_pfn" (and pfn in the middle of them) can be in different zone on strange machine.

Now: test_pages_isolated() is called in following sequence.
  
  check_page_isolated()
     walk_memory_resource()			# read resource range and get start/end of pfn
         -> chcek_page_isolated_cb()
		-> test_page_isolated().

I think all pages within [start, end) passed to test_pages_isolated() should be in the same zone.

please change this to
  check_page_isolated()
     walk_memory_resource()
         -> check_page_isolated_cb()
                 -> walk_page_range_in_same_zone()  # get page range in the same zone.
                        -> test_page_isolated().

Could you try ?

Thanks,
-Kame
 

--
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