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, 5 Dec 2019 11:27:27 -0800
From:   Yang Shi <yang.shi@...ux.alibaba.com>
To:     Qian Cai <cai@....pw>
Cc:     fabecassis@...dia.com, jhubbard@...dia.com, mhocko@...e.com,
        cl@...ux.com, vbabka@...e.cz, mgorman@...hsingularity.net,
        akpm@...ux-foundation.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [v3 PATCH] mm: move_pages: return valid node id in status if the
 page is already on the target node



On 12/5/19 11:19 AM, Qian Cai wrote:
>
>> On Dec 5, 2019, at 1:54 PM, Yang Shi <yang.shi@...ux.alibaba.com> wrote:
>>
>> This is because the status is not set if the page is already on the
>> target node, but move_pages() should return valid status as long as it
>> succeeds.  The valid status may be errno or node id.
>>
>> We can't simply initialize status array to zero since the pages may be
>> not on node 0.  Fix it by updating status with node id which the page is
>> already on.
> This does not look correct either.
>
> “ENOENT
> No pages were found that require moving. All pages are either already on the target node, not present, had an invalid address or could not be moved because they were mapped by multiple processes.”
>
> move_pages() should return -ENOENT instead.

Yes, we noticed this too. I had a note in v1 and v2 patch, but I forgot 
paste in v3, says:

John noticed another return value inconsistency between the 
implementation and the manpage. The manpage says it should return 
-ENOENT if the page is already on the target node, but it doesn't. It 
looks the original code didn't return -ENOENT either, I'm not sure if 
this is a document issue or not. Anyway this is another issue, once we 
confirm it we can fix it later.

And, Michal also commented to the note:

I do not remember all the details but my recollection is that there were 
several inconsistencies present before I touched the code and I've 
decided to not touch them without a clear usecase.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ