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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20131008130853.96139b79a0a4d3aaacc79ed2@linux-foundation.org>
Date:	Tue, 8 Oct 2013 13:08:53 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Krzysztof Kozlowski <k.kozlowski@...sung.com>
Cc:	linux-mm@...ck.org, Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	linux-kernel@...r.kernel.org, Shaohua Li <shli@...ionio.com>,
	Minchan Kim <minchan@...nel.org>
Subject: Re: [PATCH] frontswap: enable call to invalidate area on swapoff

On Tue, 08 Oct 2013 10:13:20 +0200 Krzysztof Kozlowski <k.kozlowski@...sung.com> wrote:

> On pon, 2013-10-07 at 15:03 -0700, Andrew Morton wrote:
> > On Mon, 07 Oct 2013 17:25:41 +0200 Krzysztof Kozlowski <k.kozlowski@...sung.com> wrote:
> > 
> > > During swapoff the frontswap_map was NULL-ified before calling
> > > frontswap_invalidate_area(). However the frontswap_invalidate_area()
> > > exits early if frontswap_map is NULL. Invalidate was never called during
> > > swapoff.
> > > 
> > > This patch moves frontswap_map_set() in swapoff just after calling
> > > frontswap_invalidate_area() so outside of locks
> > > (swap_lock and swap_info_struct->lock). This shouldn't be a problem as
> > > during swapon the frontswap_map_set() is called also outside of any
> > > locks.
> > > 
> > 
> > Ahem.  So there's a bunch of code in __frontswap_invalidate_area()
> > which hasn't ever been executed and nobody noticed it.  So perhaps that
> > code isn't actually needed?
> > 
> > More seriously, this patch looks like it enables code which hasn't been
> > used or tested before.  How well tested was this?
> > 
> > Are there any runtime-visible effects from this change?
> 
> I tested zswap on x86 and x86-64 and there was no difference. This is
> good as there shouldn't be visible anything because swapoff is unusing
> all pages anyway:
> 	try_to_unuse(type, false, 0); /* force all pages to be unused */
> 
> I haven't tested other frontswap users.

So is that code in __frontswap_invalidate_area() unneeded?
--
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