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: <20100729100626.945da6e1.kamezawa.hiroyu@jp.fujitsu.com>
Date:	Thu, 29 Jul 2010 10:06:26 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Ondrej Zary <linux@...nbow-software.org>
Cc:	"Rafael J. Wysocki" <rjw@...k.pl>,
	Kernel development list <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Balbir Singh <balbir@...ibm.com>
Subject: Re: Memory corruption during hibernation since 2.6.31

On Wed, 28 Jul 2010 23:38:09 +0200
Ondrej Zary <linux@...nbow-software.org> wrote:

> On Wednesday 28 July 2010 23:34:07 Rafael J. Wysocki wrote:
> > On Wednesday, July 28, 2010, Ondrej Zary wrote:
> > > Hello,
> > > after very long bisection, I finally found what's causing memory
> > > corruption during hibernation on my machine sice 2.6.31:
> > > https://bugzilla.kernel.org/show_bug.cgi?id=15753
> > >
> > > It's commit c9e444103b5e7a5a3519f9913f59767f92e33baf (mm: reuse unused
> > > swap entry if necessary).
> > >
> > > I don't know anything about swapping in Linux so I don't have a clue
> > > what's wrong with that commit.
> >
> > Thanks for bisecting!
> >
> > This looks rather serious.  I'd be grateful from any clues from the mm guys
> > involved (CCed).
> >
> > Do you use s2disk or the built-in hibernation code?
> 
> I use built-in code (echo disk >/sys/power/state). The machine has 256MB RAM 
> and 256MB swap partition.
> 

I don't know much about hibernation but it seems my code break something, sorry.

The commit does
	if swap_map[] shows that there is only SwapCache, no real swap users,
	try to reuse it by detaching a page from SwapCache.
 
In usual cases,

	lock_page(page):
	add_to_swap(page); // assign swap offset and mark as SwapCache
	try_to_unmap();    // swap's usage count +1 (swap_duplicate())
	unlock_page(page);

Then, SwapCache will not be reused in usual cases.

What code should I look into ? kernel/power/swap.c ??

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