From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-f71.google.com (mail-io1-f71.google.com [209.85.166.71]) by kanga.kvack.org (Postfix) with ESMTP id 0683D6B026B for ; Mon, 15 Oct 2018 14:44:48 -0400 (EDT) Received: by mail-io1-f71.google.com with SMTP id z9-v6so17014747iog.18 for ; Mon, 15 Oct 2018 11:44:48 -0700 (PDT) Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id p184-v6sor5121597iod.17.2018.10.15.11.44.47 for (Google Transport Security); Mon, 15 Oct 2018 11:44:47 -0700 (PDT) Date: Mon, 15 Oct 2018 12:44:43 -0600 From: Yu Zhao Subject: Re: [PATCH] mm: detect numbers of vmstat keys/values mismatch Message-ID: <20181015184443.GA175390@google.com> References: <20181015183841.114341-1-yuzhao@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Jann Horn Cc: Andrew Morton , Michal Hocko , jack@suse.cz, David Rientjes , kemi.wang@intel.com, Greg Kroah-Hartman , Steven Rostedt , guro@fb.com, Kees Cook , Andrey Ryabinin , bigeasy@linutronix.de, kernel list , Linux-MM On Mon, Oct 15, 2018 at 08:41:52PM +0200, Jann Horn wrote: > On Mon, Oct 15, 2018 at 8:38 PM Yu Zhao wrote: > > There were mismatches between number of vmstat keys and number of > > vmstat values. They were fixed recently by: > > commit 58bc4c34d249 ("mm/vmstat.c: skip NR_TLB_REMOTE_FLUSH* properly") > > commit 28e2c4bb99aa ("mm/vmstat.c: fix outdated vmstat_text") > > > > Add a BUILD_BUG_ON to detect such mismatch and hopefully prevent > > it from happening again. > > A BUILD_BUG_ON() like this is already in the mm tree: > https://ozlabs.org/~akpm/mmotm/broken-out/mm-vmstat-assert-that-vmstat_text-is-in-sync-with-stat_items_size.patch My bad! Didn't notice this. Please disregard this patch.