LinuxPPC-Dev Archive on
 help / color / Atom feed
From: Michael Ellerman <>
To: Vaibhav Jain <>,
Cc: Vaibhav Jain <>,
	Oliver O'Halloran <>,
	"Aneesh Kumar K . V" <>
Subject: Re: [PATCH] powerpc/papr_scm: Fix an off-by-one check in papr_scm_meta_{get, set}
Date: Sat, 12 Oct 2019 21:00:24 +1100 (AEDT)
Message-ID: <> (raw)
In-Reply-To: <>

On Fri, 2019-09-27 at 06:20:02 UTC, Vaibhav Jain wrote:
> A validation check to prevent out of bounds read/write inside
> functions papr_scm_meta_{get,set}() is off-by-one that prevent reads
> and writes to the last byte of the label area.
> This bug manifests as a failure to probe a dimm when libnvdimm is
> unable to read the entire config-area as advertised by
> ND_CMD_GET_CONFIG_SIZE. This usually happens when there are large
> number of namespaces created in the region backed by the dimm and the
> label-index spans max possible config-area. An error of the form below
> usually reported in the kernel logs:
> [  255.293912] nvdimm: probe of nmem0 failed with error -22
> The patch fixes these validation checks there by letting libnvdimm
> access the entire config-area.
> Fixes: 53e80bd042773('powerpc/nvdimm: Add support for multibyte read/write for metadata')
> Signed-off-by: Vaibhav Jain <>

Applied to powerpc next, thanks.


      parent reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-27  6:20 Vaibhav Jain
2019-09-28 16:00 ` Aneesh Kumar K.V
2019-10-12 10:00 ` Michael Ellerman [this message]

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LinuxPPC-Dev Archive on

Archives are clonable:
	git clone --mirror linuxppc-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linuxppc-dev linuxppc-dev/ \
	public-inbox-index linuxppc-dev

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox