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: <20190726211952.757a63db5271d516faa7eaac@linux-foundation.org>
Date:   Fri, 26 Jul 2019 21:19:52 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Nathan Chancellor <natechancellor@...il.com>
Cc:     Randy Dunlap <rdunlap@...radead.org>, broonie@...nel.org,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org, linux-next@...r.kernel.org, mhocko@...e.cz,
        mm-commits@...r.kernel.org, sfr@...b.auug.org.au,
        Chris Down <chris@...isdown.name>
Subject: Re: mmotm 2019-07-24-21-39 uploaded (mm/memcontrol)

On Fri, 26 Jul 2019 20:42:05 -0700 Nathan Chancellor <natechancellor@...il.com> wrote:

> > @@ -2414,8 +2414,9 @@ void mem_cgroup_handle_over_high(void)
> >  	 */
> >  	clamped_high = max(high, 1UL);
> >  
> > -	overage = ((u64)(usage - high) << MEMCG_DELAY_PRECISION_SHIFT)
> > -		/ clamped_high;
> > +	overage = (u64)(usage - high) << MEMCG_DELAY_PRECISION_SHIFT;
> > +	do_div(overage, clamped_high);
> > +
> >  	penalty_jiffies = ((u64)overage * overage * HZ)
> >  		>> (MEMCG_DELAY_PRECISION_SHIFT + MEMCG_DELAY_SCALING_SHIFT);
> >  
> > _
> > 
> 
> This causes a build error on arm:
> 

Ah.

It's rather unclear why that u64 cast is there anyway.  We're dealing
with ulongs all over this code.  The below will suffice.

Chris, please take a look?

--- a/mm/memcontrol.c~mm-throttle-allocators-when-failing-reclaim-over-memoryhigh-fix-fix-fix
+++ a/mm/memcontrol.c
@@ -2415,7 +2415,7 @@ void mem_cgroup_handle_over_high(void)
 	clamped_high = max(high, 1UL);
 
 	overage = (u64)(usage - high) << MEMCG_DELAY_PRECISION_SHIFT;
-	do_div(overage, clamped_high);
+	overage /= clamped_high;
 
 	penalty_jiffies = ((u64)overage * overage * HZ)
 		>> (MEMCG_DELAY_PRECISION_SHIFT + MEMCG_DELAY_SCALING_SHIFT);
_

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ