[blktests] nvme/077: Add ANA log page information leak test
Shin'ichiro Kawasaki
shinichiro.kawasaki at wdc.com
Tue Nov 17 17:05:54 PST 2026
On Nov 16, 2026 / 11:13, Jesse Taube wrote:
> On Thu, Nov 12, 2026 at 5:36 AM Shin'ichiro Kawasaki
> <shinichiro.kawasaki at wdc.com> wrote:
> >
> > On Nov 04, 2026 / 12:38, Jesse Taube wrote:
> > > Regression test for reading memory contents beyond valid data when
> > > reading ANA log page. The NVMe target must zero-fill the ANA log page
> > > response buffer beyond the valid data so that stale kernel memory is
> > > not leaked to the host.
> > >
> > > The helper program (nvme-ana-log), requests the ANA log page,
> > > parses the response header to find where valid data ends, and checks
> > > that every trailing byte is zero. The check is repeated 64 times because
> > > leaked data may incidentally be zeroed.
> > >
> > > Co-Authored-By: Claude Opus 4.6 <noreply at anthropic.com>
> > > Signed-off-by: Jesse Taube <jtaubepe at redhat.com>
> > > ---
> > > This test is meant to test:
> > > Lore Link: https://lore.kernel.org/linux-nvme/20261104172833.161567-1-emilne@redhat.com/
> >
> > Thank you for the patch. I ran the new test case on the v7.4-rc2 kernel and
> > confirmed it passes. When I reverted the kernel commit 29b8758b470 (" nvmet:
> > don't return memory contents beyond valid data when reading ANA log page"),
> > the test case failed. Looks working well.
> >
> > Overall, this blktests patch looks good. I have three minor comments below:
> >
> > 1) src/.gitignore should have "/nvme-ana-log".
> > 2) it's the better to note about the kernel commit in the commit log and
> > the test case comment
> > 3) I think "--port 0" option of _nvme_connect_subsys call in test() is not
> > required
> >
> > Jesee, if you are fine, I will make ammendments based on the comments above
> > and apply this patch. Or you can respin the patch. Please let me know your
> > preference.
>
> Sorry I seem to have missed this. Yes it would be great if you could
> make those fixes.
> It will be faster than resubmitting and waiting for a review again.
Okay, I have merged it. Now the test case has the number nvme/080. Thanks!
Of note is that I also dropped the tag "Co-Authored-By: Claude Opus 4.6
<noreply at anthropic.com>" because a mail to the e-mail address was not delivered
properly.
More information about the Linux-nvme
mailing list