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: <Y+sTFqwMNAjDvxw3@casper.infradead.org>
Date:   Tue, 14 Feb 2023 04:50:30 +0000
From:   Matthew Wilcox <willy@...radead.org>
To:     Baolin Wang <baolin.wang@...ux.alibaba.com>
Cc:     akpm@...ux-foundation.org, torvalds@...ux-foundation.org,
        sj@...nel.org, hannes@...xchg.org, mhocko@...nel.org,
        roman.gushchin@...ux.dev, shakeelb@...gle.com,
        muchun.song@...ux.dev, damon@...ts.linux.dev,
        cgroups@...r.kernel.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/3] Some cleanups for page isolation

On Tue, Feb 14, 2023 at 11:18:05AM +0800, Baolin Wang wrote:
> The page isolation functions did not return a boolean to indicate
> success or not, instead it will return a negative error when failed
> to isolate a page. So it's better to check the negative error explicitly
> for isolation to make the code more clear per Linus's suggestion in [1].

Only one caller of isolate_lru_page() or folio_isolate_lru() actually
uses the errno.  And the errno can only be 0 or -EBUSY.  It'd be
better to change the three functions to return bool and fix
add_page_for_migration() to set the errno to -EBUSY itself.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ