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]
Date:   Thu, 16 Mar 2017 14:51:54 +0900
From:   Minchan Kim <minchan@...nel.org>
To:     Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        kernel-team@....com, Johannes Weiner <hannes@...xchg.org>,
        Michal Hocko <mhocko@...e.com>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Anshuman Khandual <khandual@...ux.vnet.ibm.com>
Subject: Re: [PATCH v2 10/10] mm: remove SWAP_[SUCCESS|AGAIN|FAIL]

On Thu, Mar 16, 2017 at 02:44:30PM +0900, Sergey Senozhatsky wrote:
> On (03/16/17 14:33), Minchan Kim wrote:
> [..]
> > "There is no user for it"
> > 
> > I was liar so need to be a honest guy.
> 
> ha-ha-ha. I didn't say that :)
> 
> [..]
> > @@ -1414,7 +1414,7 @@ static bool try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
> >  			 */
> >  			if (unlikely(PageSwapBacked(page) != PageSwapCache(page))) {
> >  				WARN_ON_ONCE(1);
> > -				ret = SWAP_FAIL;
> > +				ret = false;
> >  				page_vma_mapped_walk_done(&pvmw);
> >  				break;
> >  			}
> 
> 
> one thing to notice here is that 'ret = false' and 'ret = SWAP_FAIL'
> are not the same and must produce different results. `ret' is bool
> and SWAP_FAIL was 2. it's return 1 vs return 0, isn't it? so was
> there a bug before?

No, it was not a bug. Just my patchset changed return value meaning.
Look at this.
https://marc.info/?l=linux-mm&m=148955552314806&w=2

So, false means SWAP_FAIL(ie., stop rmap scanning and bail out) now.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ