Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp57275ybe; Thu, 12 Sep 2019 15:34:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqz1am5JMmjrMh9xuN5l2qEJGfVUkgR9RJw2ury4cbLXR3127EE2y1e4Q9WYA5wvFAZYkM9H X-Received: by 2002:a50:d556:: with SMTP id f22mr43515559edj.263.1568327697821; Thu, 12 Sep 2019 15:34:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568327697; cv=none; d=google.com; s=arc-20160816; b=wwHZEEgsk9Ebf+CZ5cWiPsvonwvlz3kQvsQW+OsqdWt9xXhpCONN4Ilw1DHSzTrRJg 5trCdKFtCUMcsptVUnHaCUX/GOL/93r4vveQv/pZoT232/C+jKbuRfdNmC0gmekdlkzY C3aQaSLmnJBXZXN0ohNrBsGUyNXkZt6TzP3CkuoncNzFzi/EI9N95Vpi4uuSYzCxD3V7 IIeSNjdJhK8ttmSSxIbzDNofU7DvSOqNuQlgeavJDb7M5PiKD4GMTUuR6kNpDTxi+JIn tbfJvCIRGWwsgVGrd623zcms6Q8Y7LwJDC/reN8k1P9fxeyzaZpbR5pqK+e1/1Rs7nyQ l8CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=NTWV1PHcMEZ2tbHQyGgaAoapUOFSMA5nnel0RfApA0E=; b=dW7Iu9ssG2zU6wpoh6Y1ABM76+l4dlVDJOqvbroq/RucRn7fUaw4twlAwpS0fYPcEl WTyuQFfeauwt1z3ugqeBhsCjptBTOEimn2ImOZaXwRzdh/NIPYA5179e//oKZz8p5NQ/ 8dmow3Az75ZZ6EWnNgTdd6Els71l9sy4Knk8wJREBe3GakWeqd/3ZxMV0rlsG1YbxkQ+ gjsojmi8C0/zHQr+7g0KIenquXK5bN1JM+1ZGwr0CppZ+Po8rK7QNUiB4HSWCvDsLg7U CVgKiGdbK4c3BmCAddzQA3SMJP2zI9d96xiIyNGfV03RkMzwHXty3fOBIdRgqSC8+JTz e0RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b="AcI2st//"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a30si16955522eda.39.2019.09.12.15.34.34; Thu, 12 Sep 2019 15:34:57 -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=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b="AcI2st//"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387430AbfILWDG (ORCPT + 99 others); Thu, 12 Sep 2019 18:03:06 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:46045 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727041AbfILWDG (ORCPT ); Thu, 12 Sep 2019 18:03:06 -0400 Received: by mail-ed1-f67.google.com with SMTP id f19so25268085eds.12 for ; Thu, 12 Sep 2019 15:03:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=NTWV1PHcMEZ2tbHQyGgaAoapUOFSMA5nnel0RfApA0E=; b=AcI2st//s7n3ZrHz8WLwiHbmc2jnUg5v13wcOd1sC2QkwHQZjydvXULqxgf/SF4aIB dclVTAEqacQ5lCUFizMddS/QDH8TFl/+UF7MNgHvCmYDOHXLOxpqedBkBio8uST6MZU9 YBfPB8E8poBlj7f5ytBkyyXHubJmae2jDgUAni+ikEJmRqYL9DrpJfggnFJCnfVNuww+ 8DWqmaAqGzz07AP8SqBFQrhYUKY64+mkFzOTdwpjxoGJgri2iBNVeyjO8Zvx+CVYFf2v UYYlAO66G6T6KooDMFOwk6XKQ2Ftu6WFm2Lb3mDbw8Od+hABeUKpE4sN0bvDRjeFBTUn mmog== 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:user-agent; bh=NTWV1PHcMEZ2tbHQyGgaAoapUOFSMA5nnel0RfApA0E=; b=q1QvX64dFyjwxjrRjV3CRhd3GkCZ8+tjOXfEAQzNb6WkuRUHbgsrGPp+H3FmA7emvq YsvwJGOkkey7vD/mPbpp7u5vxBO7k2oFYO4yQwXZeRj+QFdz5h5iH4dqwzrEaVi3fBsE 8ZxNDQJHn/VVcN0nVqUf2ZwJhq9HuZTSt9ixLabIi+M6pt205UmMh/IUCh3BtzgMPT6F oWMS2LsAZNt1VWa2OeeyRjPQlGXBv9Uq89lwOcu501eyHHYThX4pZNA8L6dR28mxiepP qxSD2wjssmL6UQyWLZu3UJKUJtBSb229PutqB/Ziu0iooAyixJJNxldaJg6RbIrsOoxn iN8g== X-Gm-Message-State: APjAAAUNX2x9DQM4McdDrwL4mOAw2AWXRVpZRK4i9NcupmaVK5F81nlA V8D50jqQfYgv8ItoveZiHWqexdqUm+Wr+Q== X-Received: by 2002:a50:e885:: with SMTP id f5mr43584966edn.163.1568325784405; Thu, 12 Sep 2019 15:03:04 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id y5sm4996612edr.94.2019.09.12.15.03.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Sep 2019 15:03:02 -0700 (PDT) Received: by box.localdomain (Postfix, from userid 1000) id E1E9B100B4A; Fri, 13 Sep 2019 01:03:03 +0300 (+03) Date: Fri, 13 Sep 2019 01:03:03 +0300 From: "Kirill A. Shutemov" To: Yu Zhao Cc: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Tetsuo Handa , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/4] mm: correct mask size for slub page->objects Message-ID: <20190912220303.ijdwnoxiwgv7mmv4@box> References: <20190912004401.jdemtajrspetk3fh@box> <20190912023111.219636-1-yuzhao@google.com> <20190912094035.vkqnj24bwh33yvia@box> <20190912211114.GA146974@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190912211114.GA146974@google.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 12, 2019 at 03:11:14PM -0600, Yu Zhao wrote: > On Thu, Sep 12, 2019 at 12:40:35PM +0300, Kirill A. Shutemov wrote: > > On Wed, Sep 11, 2019 at 08:31:08PM -0600, Yu Zhao wrote: > > > Mask of slub objects per page shouldn't be larger than what > > > page->objects can hold. > > > > > > It requires more than 2^15 objects to hit the problem, and I don't > > > think anybody would. It'd be nice to have the mask fixed, but not > > > really worth cc'ing the stable. > > > > > > Fixes: 50d5c41cd151 ("slub: Do not use frozen page flag but a bit in the page counters") > > > Signed-off-by: Yu Zhao > > > > I don't think the patch fixes anything. > > Technically it does. It makes no sense for a mask to have more bits > than the variable that holds the masked value. I had to look up the > commit history to find out why and go through the code to make sure > it doesn't actually cause any problem. > > My hope is that nobody else would have to go through the same trouble. Just put some comments then. -- Kirill A. Shutemov