Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2768199ybh; Mon, 16 Mar 2020 09:20:06 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvacGShP9uYBnk0F/ZhSt3k0xVWwGGYKWF8hi4OwE1ZdAGPSr1ZXZ3g9drUXpQDANvWT6Nj X-Received: by 2002:aca:54ca:: with SMTP id i193mr211058oib.163.1584375606368; Mon, 16 Mar 2020 09:20:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584375606; cv=none; d=google.com; s=arc-20160816; b=v09EQU5DzhOeRyp/h47JR4F0YjuBR3sV3QYH7qUwktICC/lZVRt4Uj/7Ycfj91aVwS D0z1kY2jZmt9HyGrHGil2i3SKL/dTiTH+fQEmXq5XdiPqH8OU2IFVtd9OLnVH5fxK8ga X1FzbMKj0IYv8XC+55CmjPh2rVwd/USOf8ASb83iW9SjeFUq9tcLnZt3iHKMQ9qKz8XU DszJlDZeedQChz0mKvdKtdqrL3XvpbvkpvK4V7/Q85HMDhZdjHs0fD1xGtjrQC7/bOgW G/Dg4QSUKjmBZJHumcMF7JU6qTQigQYlRuZ4X9ycuxTdp5qfwf4eMg/Twmjf9PYNwV5N fWEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=FGmHo0X0ug88xLxL5VEMvKfeQgO1Bzc/6oEObLpalt0=; b=QOoFT7aBchVs6AtJ77pmFar/ACSTkEkMub3hkbs7kkRYYe4Zz0VftvwKaSDt3U8Xk2 1yjf3K3AQREFVvnETlSn9cn+wq8BJa/YrW63hbvWl3g7Mou7XAP/GnFD0Y77UdLsc9+4 DGbI1sK4BmcXoSx3T26hfWvMQv+6R5GC1BdQ5Sc5zpMVlPtm/k7gv+GYthH3/cY5ajyo /VCiWtWKVKrw6MkpLgWl4pcdkUknsaO4teYoZQIzZ8DCpcUQNzPeje78dBdaQoJkiGwV gB8clkIMWiy/qHd1r/yD6zoxzW2GVJtUmvXh08pijbosUsT6F4I5xlr5Nqn0DVSWFjFV kw6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=SHgvwS9Z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j26si173903otk.227.2020.03.16.09.19.53; Mon, 16 Mar 2020 09:20:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=SHgvwS9Z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732089AbgCPQTK (ORCPT + 99 others); Mon, 16 Mar 2020 12:19:10 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:34903 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732021AbgCPQTK (ORCPT ); Mon, 16 Mar 2020 12:19:10 -0400 Received: by mail-qt1-f194.google.com with SMTP id v15so14702843qto.2 for ; Mon, 16 Mar 2020 09:19:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=FGmHo0X0ug88xLxL5VEMvKfeQgO1Bzc/6oEObLpalt0=; b=SHgvwS9ZQXVqWJj5Zg/whvmP0uVvCvk7nB+wXhoy06AICUCarPw4d95BS7CJvG67UU NX8wP9DEQJ0mgCrwGOWKtNK59MMqvFI00+RHuh0T+yO1RTHxBEtxCbEK2FT8r+V2tB9h Mk1bzFa1SvwjUcS6Q7GSk61qqUhraymSLxN7La1EGmsw+Qxumbbns6Wb1kYMHPlLtkxe 9JEk6yL6bHZszcytqNRZZSfQAp498YTvNeyQjFBVRM6Ckt1osk3zGZvEMoaGp9qkKZvP 0ILeErzkPHYfFxCPj9zcFZL6pVv34cuxBMBtFOMl/RegHfvHd5bpoXm8eLeqMpNhP21R C0Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=FGmHo0X0ug88xLxL5VEMvKfeQgO1Bzc/6oEObLpalt0=; b=RA/7Z7Eth5PRw+RAUcMUoEbb1C/ZEMoo5PGpVHSvxMZjameb0sYTytzRHI+iwzooLw XYwzzKBCkU9yR1YPbgYf0Muye8toR8vH88XcubIZViNINp+xQ/aSvcJayar7nv4WCAq9 +64KNaIke5Z68L0k45BH9Y+Y5T49K18VvKqlua2fYVihkizOjFABDNMg3yezCXCj/122 9k7rbnttfxtW2PgE13LRGt/YeQxw1OEcPhJVLUPDBbYlyBkYunTBz2ErUBmrQdAAzJAl m5Ol5DySATDUgPBQwHf4G2Fb1AL1x4GzwAonoJ5lZGfKawz7nwc1zNd+7HIbdkKs5KNA HAxg== X-Gm-Message-State: ANhLgQ2kFQPDXVIi6aEoZ7k7eBYef+nYsPJXIM325Mp24AO1QCtFLIIQ TW1XwLMhYLba3su+eDRUwmRPYg== X-Received: by 2002:ac8:18f3:: with SMTP id o48mr897399qtk.368.1584375549434; Mon, 16 Mar 2020 09:19:09 -0700 (PDT) Received: from localhost (70.44.39.90.res-cmts.bus.ptd.net. [70.44.39.90]) by smtp.gmail.com with ESMTPSA id y17sm108505qth.59.2020.03.16.09.19.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Mar 2020 09:19:08 -0700 (PDT) Date: Mon, 16 Mar 2020 12:19:07 -0400 From: Johannes Weiner To: Chris Down Cc: Andrew Morton , Tejun Heo , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH 1/2] mm, memcg: Fix corruption on 64-bit divisor in memory.high throttling Message-ID: <20200316161907.GE67986@cmpxchg.org> References: <80780887060514967d414b3cd91f9a316a16ab98.1584036142.git.chris@chrisdown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <80780887060514967d414b3cd91f9a316a16ab98.1584036142.git.chris@chrisdown.name> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 12, 2020 at 06:02:54PM +0000, Chris Down wrote: > 0e4b01df8659 had a bunch of fixups to use the right division method. > However, it seems that after all that it still wasn't right -- div_u64 > takes a 32-bit divisor. > > The headroom is still large (2^32 pages), so on mundane systems you > won't hit this, but this should definitely be fixed. > > Fixes: 0e4b01df8659 ("mm, memcg: throttle allocators when failing reclaim over memory.high") > Reported-by: Johannes Weiner > Signed-off-by: Chris Down > Cc: Andrew Morton > Cc: Tejun Heo > Cc: linux-mm@kvack.org > Cc: cgroups@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Cc: kernel-team@fb.com > Cc: stable@vger.kernel.org # 5.4.x div_u64 versus div64_u64 is really a handgrenade. We just fixed a bunch of those in psi as well. Acked-by: Johannes Weiner