Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp8716327ybi; Thu, 6 Jun 2019 18:20:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqzaHXvFdSmg0hTSuoQkGLwU60qDqUnpYTnAS7dbHQj9lQdvZcp+PoneZwIYj0/pnTtjEXeT X-Received: by 2002:aa7:9825:: with SMTP id q5mr17952753pfl.140.1559870453467; Thu, 06 Jun 2019 18:20:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559870453; cv=none; d=google.com; s=arc-20160816; b=hB5E66w3oezl1tb2f41N1gxPh2m52R9Cxh7dqmC3RdqeGYbX1X0fB6uLBwkdI+iB14 X+8kigojp0gHTEFDG08lOdWs5eWtQhwOdJmU1qGCDGnJvPtVX+SHB6tG2Eu8TpcoWTGc B3kuZ6KOua8prXFcrg391keLpig64F0rUiKxPZpc4JSdm8z0AyMKjt2XUNJqkWMlyBdN 1OrdkWd1Efdc/GGLJfgwJxsimqiD0KUOZN3aZvGPCoqM5P3gF0gP2d70rp33rQIWaALk 1wnHod9V3sc/z0ZXrjh5hSN+y/970hcw1u4qJUTpgBVXYGRVGLRBK06WbtrF58xZGtln lKKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=EIr4OnOI1xF9wai5ier5nmSpwnMBcVJFFbPwhyrlfw8=; b=hiQlIl/1PZhceVdrs7d6DccxCMtw6XfPS16aTh28WVOmVwTGSCfTHHkVdofwptpnpd WF/gMpMVe34Vkx1nBeArTeBWCPc8U5ldzK5kk59BUxMukI6qKEQOu/P5GF347GekS2qx KIcayu2RqKulHJ89UPceBS7RDU7fDAkWpOYwhl0r0UhfOnBRdYnKu0UHRmI5myM//bmV sth8s/LZlPj/WxOXNR9v7YjccaeL53uZcVnegWY0SwZVbH15GUh7rqbyZMiQ/wsaO0Sh SHjd9cLup5ceuqZvvc8XHoftOKoSuWNnmczFLrELU3bQ1d1ABdkVInIQ9Yeys9h6iks9 nlsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=W6owKkia; 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 5si585523pgt.261.2019.06.06.18.20.36; Thu, 06 Jun 2019 18:20:53 -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=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=W6owKkia; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728529AbfFFWGj (ORCPT + 99 others); Thu, 6 Jun 2019 18:06:39 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:34701 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728066AbfFFWGi (ORCPT ); Thu, 6 Jun 2019 18:06:38 -0400 Received: by mail-ot1-f65.google.com with SMTP id z24so67652oto.1 for ; Thu, 06 Jun 2019 15:06:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EIr4OnOI1xF9wai5ier5nmSpwnMBcVJFFbPwhyrlfw8=; b=W6owKkiaiucLtIk2d/rhThge65YAuZhOXdGbJAq1YJnZeuj3agBqhdzoWw4pAHpEGG yCCRRgubBcq/P+3tO+QxBLrGvQWm34ZFjVhCGGnC25tsI1wz0ookadExgISatwc+xFwx 9F3A1KcbDxhZpKNcMECopMoti2uf29JMv8oNXtACIP4ZdnAKSAeFcKK0Z75QstHVe1Kk FSNS/e4ugOpcEKATo1xHjQe71a839vKxrezJgS4nSTbtKrDnRK96iahNefKSCqeqIl7K GpNADCiQeyijYdm/jA366lM8s7uLcFJlrvqzsE5Q567T+TEojZQ525tKJu3IpPIztD1S rFqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EIr4OnOI1xF9wai5ier5nmSpwnMBcVJFFbPwhyrlfw8=; b=PPdToR9COdZh67ky5ACdzmVBuJabz7ibV2JeCIo/vFMyWLZ95igzlcfx6RAsQDhfyy DZhMQxYWJ2Kr5D2RxbWypEXp0PwVHHaKx19oMAQSWE6KMEnqLkI3J6D7aODmQxRTpXvc 6VhSiU7n9MA8NSmMsaUjKD+2flG3xvhU9tUl6QGIiYerUbXesJ/3t1KQ/RNV3E8JnwRh cfRwFF1zHj31conh0BEC9VTzRK4V4zjMMIh6rIwDyCtSUTVpEM/xlRQ8vqPQreOQynAz CCbYpkyM0c3lWDfmbZYavMrKSVYqGJQFCNZT0KYYpZWTFptVAFZ/KSwYg4Oh5AKxVRvv oYlQ== X-Gm-Message-State: APjAAAURDPFP08GhmjDB7TSozQnz+SSGnlOyKoeqjvLKq1KYEzPY4pqF OLY5UWRGazSTHCSbCTUzx1gNH388Rw3wOmcIU+PNEA== X-Received: by 2002:a9d:7a9a:: with SMTP id l26mr12110810otn.71.1559858798146; Thu, 06 Jun 2019 15:06:38 -0700 (PDT) MIME-Version: 1.0 References: <155977186863.2443951.9036044808311959913.stgit@dwillia2-desk3.amr.corp.intel.com> <155977193862.2443951.10284714500308539570.stgit@dwillia2-desk3.amr.corp.intel.com> <20190606144643.4f3363db9499ebbf8f76e62e@linux-foundation.org> In-Reply-To: <20190606144643.4f3363db9499ebbf8f76e62e@linux-foundation.org> From: Dan Williams Date: Thu, 6 Jun 2019 15:06:26 -0700 Message-ID: Subject: Re: [PATCH v9 11/12] libnvdimm/pfn: Fix fsdax-mode namespace info-block zero-fields To: Andrew Morton Cc: stable , Linux MM , linux-nvdimm , Linux Kernel Mailing List , Oscar Salvador , Michal Hocko Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 6, 2019 at 2:46 PM Andrew Morton wrote: > > On Wed, 05 Jun 2019 14:58:58 -0700 Dan Williams wrote: > > > At namespace creation time there is the potential for the "expected to > > be zero" fields of a 'pfn' info-block to be filled with indeterminate > > data. While the kernel buffer is zeroed on allocation it is immediately > > overwritten by nd_pfn_validate() filling it with the current contents of > > the on-media info-block location. For fields like, 'flags' and the > > 'padding' it potentially means that future implementations can not rely > > on those fields being zero. > > > > In preparation to stop using the 'start_pad' and 'end_trunc' fields for > > section alignment, arrange for fields that are not explicitly > > initialized to be guaranteed zero. Bump the minor version to indicate it > > is safe to assume the 'padding' and 'flags' are zero. Otherwise, this > > corruption is expected to benign since all other critical fields are > > explicitly initialized. > > > > Fixes: 32ab0a3f5170 ("libnvdimm, pmem: 'struct page' for pmem") > > Cc: > > Signed-off-by: Dan Williams > > The cc:stable in [11/12] seems odd. Is this independent of the other > patches? If so, shouldn't it be a standalone thing which can be > prioritized? > The cc: stable is about spreading this new policy to as many kernels as possible not fixing an issue in those kernels. It's not until patch 12 "libnvdimm/pfn: Stop padding pmem namespaces to section alignment" as all previous kernel do initialize all fields. I'd be ok to drop that cc: stable, my concern is distros that somehow pickup and backport patch 12 and miss patch 11.