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: <20171024153037.gjemriarubzoqai5@dhcp22.suse.cz>
Date:   Tue, 24 Oct 2017 17:30:37 +0200
From:   Michal Hocko <mhocko@...nel.org>
To:     "Huang, Ying" <ying.huang@...el.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org,
        Tim Chen <tim.c.chen@...ux.intel.com>,
        Minchan Kim <minchan@...nel.org>, stable@...r.kernel.org,
        Christian Kujau <lists@...dbynature.de>
Subject: Re: [PATCH -mm] mm, swap: Fix false error message in
 __swp_swapcount()

On Tue 24-10-17 23:15:32, Huang, Ying wrote:
> Hi, Michal,
> 
> Michal Hocko <mhocko@...nel.org> writes:
> 
> > On Tue 24-10-17 10:47:00, Huang, Ying wrote:
> >> From: Ying Huang <ying.huang@...el.com>
> >> 
> >> __swp_swapcount() is used in __read_swap_cache_async().  Where the
> >> invalid swap entry (offset > max) may be supplied during swap
> >> readahead.  But __swp_swapcount() will print error message for these
> >> expected invalid swap entry as below, which will make the users
> >> confusing.
> >   ^^
> > confused... And I have to admit this changelog has left me confused as
> > well. What is an invalid swap entry in the readahead? Ohh, let me
> > re-real Fixes: commit. It didn't really help "We can avoid needlessly
> > allocating page for swap slots that are not used by anyone.  No pages
> > have to be read in for these slots."
> >
> > Could you be more specific about when and how this happens please?
> 
> Sorry for confusing.
> 
> When page fault occurs for a swap entry, the original swap readahead
> (not new VMA base swap readahead) may readahead several swap entries
> after the fault swap entry.  The readahead algorithm calculates some of
> the swap entries to readahead via increasing the offset of the fault
> swap entry without checking whether they are beyond the end of the swap
> device and it rely on the __swp_swapcount() and swapcache_prepare() to
> check it.  Although __swp_swapcount() checks for the swap entry passed
> in, it will complain with error message for the expected invalid swap
> entry.  This makes the end user confusing.
> 
> Is this a little clearer.

yes, this makes more sense (modulo the same typo ;)). Can you make this
information into the changelog please? Thanks.
-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ