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] [thread-next>] [day] [month] [year] [list]
Message-ID: <ac59714d-74d6-820c-37ea-5bf62cfc33a8@rasmusvillemoes.dk>
Date:   Fri, 26 Jul 2019 11:36:08 +0200
From:   Rasmus Villemoes <linux@...musvillemoes.dk>
To:     Pengfei Li <lpf.vector@...il.com>, akpm@...ux-foundation.org
Cc:     mgorman@...hsingularity.net, mhocko@...e.com, vbabka@...e.cz,
        cai@....pw, aryabinin@...tuozzo.com, osalvador@...e.de,
        rostedt@...dmis.org, mingo@...hat.com,
        pavel.tatashin@...rosoft.com, rppt@...ux.ibm.com,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH 02/10] mm/page_alloc: use unsigned int for "order" in
 __rmqueue_fallback()

On 25/07/2019 20.42, Pengfei Li wrote:
> Because "order" will never be negative in __rmqueue_fallback(),
> so just make "order" unsigned int.
> And modify trace_mm_page_alloc_extfrag() accordingly.
> 

> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 75c18f4fd66a..1432cbcd87cd 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -2631,8 +2631,8 @@ static bool unreserve_highatomic_pageblock(const struct alloc_context *ac,
>   * condition simpler.
>   */
>  static __always_inline bool
> -__rmqueue_fallback(struct zone *zone, int order, int start_migratetype,
> -						unsigned int alloc_flags)
> +__rmqueue_fallback(struct zone *zone, unsigned int order,
> +		int start_migratetype, unsigned int alloc_flags)
>  {

Please read the last paragraph of the comment above this function, run
git blame to figure out when that was introduced, and then read the full
commit description. Here be dragons. At the very least, this patch is
wrong in that it makes that comment inaccurate.

Rasmus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ