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] [day] [month] [year] [list]
Message-ID: <20171102055019.GA26929@bbox>
Date:   Thu, 2 Nov 2017 14:50:19 +0900
From:   Minchan Kim <minchan@...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,
        Huang Ying <huang.ying.caritas@...il.com>,
        Tim Chen <tim.c.chen@...ux.intel.com>,
        Michal Hocko <mhocko@...e.com>, stable@...r.kernel.org,
        Christian Kujau <lists@...dbynature.de>
Subject: Re: [PATCH -mm -V3] mm, swap: Fix false error message in
 __swp_swapcount()

On Thu, Nov 02, 2017 at 01:42:25PM +0800, Huang, Ying wrote:
> From: Huang Ying <huang.ying.caritas@...il.com>
> 
> When a page fault occurs for a swap entry, the physical swap readahead
> (not the 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 relys on the __swp_swapcount() and
> swapcache_prepare() to check it.  Although __swp_swapcount() checks
> for the swap entry passed in, it will complain with the error message
> as follow for the expected invalid swap entry.  This may make the end
> users confused.
> 
>   swap_info_get: Bad swap offset entry 0200f8a7
> 
> To fix the false error message, the swap entry checking is added in
> swapin_readahead() to avoid to pass the out-of-bound swap entries and
> the swap entry reserved for the swap header to __swp_swapcount() and
> swapcache_prepare().
> 
> Cc: Tim Chen <tim.c.chen@...ux.intel.com>
> Cc: Michal Hocko <mhocko@...e.com>
> Cc: <stable@...r.kernel.org> # 4.11-4.13
> Fixes: e8c26ab60598 ("mm/swap: skip readahead for unreferenced swap slots")
> Reported-by: Christian Kujau <lists@...dbynature.de>
> Suggested-by: Minchan Kim <minchan@...nel.org>
> Signed-off-by: "Huang, Ying" <ying.huang@...el.com>
Acked-by: Minchan Kim <minchan@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ