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]
Message-ID: <CALZtONDH1naq7uKOfcqCz+5bREYYd3A5-DN72wJ5TOpZEcaygw@mail.gmail.com>
Date:	Thu, 21 Nov 2013 17:18:21 -0500
From:	Dan Streetman <ddstreet@...e.org>
To:	Weijie Yang <weijie.yang.kh@...il.com>
Cc:	Seth Jennings <sjennings@...iantweb.net>, linux-mm@...ck.org,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Bob Liu <bob.liu@...cle.com>, Minchan Kim <minchan@...nel.org>,
	Weijie Yang <weijie.yang@...sung.com>
Subject: Re: [PATCH] mm/zswap: don't allow entry eviction if in use by load

On Thu, Nov 21, 2013 at 4:44 PM, Dan Streetman <ddstreet@...e.org> wrote:
> On Wed, Nov 20, 2013 at 8:59 PM, Weijie Yang <weijie.yang.kh@...il.com> wrote:
>> Hello Dan
>>
>> On Thu, Nov 21, 2013 at 3:48 AM, Dan Streetman <ddstreet@...e.org> wrote:
>>> The changes in commit 0ab0abcf511545d1fddbe72a36b3ca73388ac937
>>> introduce a bug in writeback, if an entry is in use by load
>>> it will be evicted anyway, which isn't correct (technically,
>>> the code currently in zbud doesn't actually care much what the
>>> zswap evict function returns, but that could change).
>>
>> Thanks for your work. Howerver it is not a bug.
>>
>> I have thought about this situation, and it will never happen.
>> If entry is being loaded, its corresponding page must be in swapcache
>> so zswap_get_swap_cache_page() will return ZSWAP_SWAPCACHE_EXIST
>
>
> Can I also ask why you do a rb_search instead of just checking the
> entry->refcount?  Doing the search is going to take longer than just
> checking the refcount; is there some case where the entry will not be
> in the rb but will have a nonzero refcount?

Never mind; I realized the entry will have been free'd once it's
refcount is 0 so that can't be checked.
--
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