* [RFC PATCH v2 09/13] nvme: Check the DSM range buffer against PAGE_SIZE_MIN
[not found] <20261202031647.1690622-1-ericcurtin17@gmail.com>
@ 2026-12-02 3:16 ` Eric Curtin
2026-12-03 3:17 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Eric Curtin @ 2026-12-02 3:16 UTC (permalink / raw)
To: linux-kernel
Cc: Ryan Roberts, Keith Busch, Jens Axboe, Christoph Hellwig,
Sagi Grimberg, linux-nvme
From: Ryan Roberts <ryan.roberts@arm.com>
The BUILD_BUG_ON() in nvme_init_ctrl() verifies that the discard page
can hold NVME_DSM_MAX_RANGES DSM ranges. PAGE_SIZE is not a compile-time
constant with arm64 boot-time page size selection, so compare against
PAGE_SIZE_MIN, the smallest page size that can be in use.
Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
Signed-off-by: Eric Curtin <eric.curtin@docker.com>
---
drivers/nvme/host/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index f43582e5f6c4..8cf78eff9cff 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -5295,7 +5295,7 @@ int nvme_init_ctrl(struct nvme_ctrl *ctrl, struct device *dev,
ctrl->io_timeout = NVME_IO_TIMEOUT;
BUILD_BUG_ON(NVME_DSM_MAX_RANGES * sizeof(struct nvme_dsm_range) >
- PAGE_SIZE);
+ PAGE_SIZE_MIN);
ctrl->discard_page = alloc_page(GFP_KERNEL | __GFP_ZERO);
if (!ctrl->discard_page) {
ret = -ENOMEM;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC PATCH v2 09/13] nvme: Check the DSM range buffer against PAGE_SIZE_MIN
2026-12-02 3:16 ` [RFC PATCH v2 09/13] nvme: Check the DSM range buffer against PAGE_SIZE_MIN Eric Curtin
@ 2026-12-03 3:17 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-12-03 3:17 UTC (permalink / raw)
To: Eric Curtin; +Cc: linux-nvme
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] nvme: undeclared PAGE_SIZE_MIN in nvme_init_ctrl() causes build
failure
--
commit 9c7e9e9075d6fda20403c65db3c4db9a9e5c437e
Author: Ryan Roberts <ryan.roberts@arm.com>
nvme: Check the DSM range buffer against PAGE_SIZE_MIN
This commit updates the BUILD_BUG_ON() check in nvme_init_ctrl() to
compare the DSM range buffer size against PAGE_SIZE_MIN instead of
PAGE_SIZE.
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index f43582e5f6c4a..8cf78eff9cff3 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -5295,7 +5295,7 @@ int nvme_init_ctrl(struct nvme_ctrl *ctrl, struct device *dev,
> ctrl->io_timeout = NVME_IO_TIMEOUT;
>
> BUILD_BUG_ON(NVME_DSM_MAX_RANGES * sizeof(struct nvme_dsm_range) >
> - PAGE_SIZE);
> + PAGE_SIZE_MIN);
[Severity: High]
Is a prerequisite patch defining PAGE_SIZE_MIN missing from this series?
PAGE_SIZE_MIN is not defined in include/vdso/page.h or anywhere else in
the kernel tree, so compiling drivers/nvme/host/core.c fails with an
undeclared identifier error.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261202031647.1690622-1-ericcurtin17@gmail.com?part=9
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-03 3:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20261202031647.1690622-1-ericcurtin17@gmail.com>
2026-12-02 3:16 ` [RFC PATCH v2 09/13] nvme: Check the DSM range buffer against PAGE_SIZE_MIN Eric Curtin
2026-12-03 3:17 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox