Re: [PATCH] blkdev: Annotate struct request_queue with __counted_by_ptr

From: Daniel Wagner

Date: Thu Feb 19 2026 - 12:24:27 EST


On Thu, Feb 19, 2026 at 09:02:12AM -0800, Bill Wendling wrote:
> It's normally fine to change the queue count just as long as either
> (1) the pointer to the queues is also reallocated, or (2) the count
> never goes over the original allocated value. (The second one is more
> difficult to check, of course.) The bounds safety features that Apple
> developed, and which are slowly being sent upstream, enforces (1).
>
> I'll run the other tests, but I'm not familiar with the blktests (I
> downloaded them but haven't looked too deeply into them). Do you have
> some pointers on how to run them with a newly built kernel?

blktests has feature detection and every tests figures out, if it can
run or not. It will print some info when it's not possible.

The block test suite has at least a couple related tests:

./check block/029 block/040

This suite wants null_blk driver.

And for nvme/048 the fabrics parts needs to be used:

NVMET_TRTYPES="tcp" ./check nvme/048

and the nvme-fabrics part nvme-tcp and nvmet-tcp.

If you need the exact config option I can compile you a list.