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] [day] [month] [year] [list]
Message-ID: <DCEVDXL7WZYH.320PPWEYJI0NN@google.com>
Date: Fri, 29 Aug 2025 11:20:36 +0000
From: Brendan Jackman <jackmanb@...gle.com>
To: Vlastimil Babka <vbabka@...e.cz>, Andrew Morton <akpm@...ux-foundation.org>
Cc: Suren Baghdasaryan <surenb@...gle.com>, Michal Hocko <mhocko@...e.com>, 
	Johannes Weiner <hannes@...xchg.org>, Zi Yan <ziy@...dia.com>, <linux-mm@...ck.org>, 
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm/page_alloc: Harmonize should_compact_retry() type

On Thu Aug 28, 2025 at 6:31 PM UTC, Vlastimil Babka wrote:
> On 8/27/25 17:30, Brendan Jackman wrote:
>> On Wed Aug 27, 2025 at 2:13 AM UTC, Andrew Morton wrote:
>>> On Tue, 26 Aug 2025 14:06:54 +0000 Brendan Jackman <jackmanb@...gle.com> wrote:
>>>
>>>> Currently order is signed in one version of the function and unsigned in
>>>> the other. Tidy that up.
>>>> 
>>>> In page_alloc.c, order is unsigned in the vast majority of cases. But,
>>>> there is a cluster of exceptions in compaction-related code (probably
>>>> stemming from the fact that compact_control.order is signed). So, prefer
>>>> local consistency and make this one signed too.
>>>> 
>>>
>>> grumble, pet peeve.  Negative orders make no sense.  Can we make
>>> cc->order unsigned in order (heh) to make everything nice?
>> 
>> I think we can't "just" do that:
>
> That part should be easy to convert to a compact_control flag.
> Zi's point about going negative seems like more prone to overlook some case.
> But worth trying and the cleanups I'd say.

OK, I can take a look next week. From a quick glance it does seem to be
worth having a sniff, there could be bugs in there where code is
expecting non-negative and doing stuff like using it as a shift index,
in cases where it can actually be negative.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ