From: Michael Ellerman <patch-notifications@ellerman•id.au>
To: Vaibhav Jain <vaibhav@linux•ibm.com>, linuxppc-dev@lists•ozlabs.org
Cc: Vaibhav Jain <vaibhav@linux•ibm.com>,
Oliver O'Halloran <oohall@gmail•com>,
"Aneesh Kumar K . V" <aneesh.kumar@linux•ibm.com>
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) [thread overview]
Message-ID: <46r0gX5X2dz9sPJ@ozlabs.org> (raw)
In-Reply-To: <20190927062002.3169-1-vaibhav@linux.ibm.com>
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 <vaibhav@linux•ibm.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/612ee81b9461475b5a5612c2e8d71559dd3c7920
cheers
prev parent reply other threads:[~2019-10-12 10:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-27 6:20 [PATCH] powerpc/papr_scm: Fix an off-by-one check in papr_scm_meta_{get, set} 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 publicly 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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46r0gX5X2dz9sPJ@ozlabs.org \
--to=patch-notifications@ellerman$(echo .)id.au \
--cc=aneesh.kumar@linux$(echo .)ibm.com \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=oohall@gmail$(echo .)com \
--cc=vaibhav@linux$(echo .)ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox