* can queue_virt_boundary() exceed PAGE_SIZE?
@ 2022-12-10 18:41 Al Viro
2022-12-12 8:58 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Al Viro @ 2022-12-10 18:41 UTC (permalink / raw
To: linux-block
I'd always assumed that to be impossible, but...
drivers/infiniband/ulp/srp/ib_srp.c:add_target_store()
target_host->virt_boundary_mask = ~srp_dev->mr_page_mask;
and
/*
* Use the smallest page size supported by the HCA, down to a
* minimum of 4096 bytes. We're unlikely to build large sglists
* out of smaller entries.
*/
mr_page_shift = max(12, ffs(attr->page_size_cap) - 1);
srp_dev->mr_page_size = 1 << mr_page_shift;
srp_dev->mr_page_mask = ~((u64) srp_dev->mr_page_size - 1);
and it looks like some drivers have ->page_size_cap come from the hardware.
Can it actually end up with ->virt_boundary_mask greater than PAGE_SIZE
and if it does, how could things like bio_copy_user_iov() possibly
work? page_alloc() won't give us alignment better than PAGE_SIZE,
after all...
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: can queue_virt_boundary() exceed PAGE_SIZE?
2022-12-10 18:41 can queue_virt_boundary() exceed PAGE_SIZE? Al Viro
@ 2022-12-12 8:58 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2022-12-12 8:58 UTC (permalink / raw
To: Al Viro; +Cc: linux-block
On Sat, Dec 10, 2022 at 06:41:00PM +0000, Al Viro wrote:
> I'd always assumed that to be impossible, but...
I think that's everyones assumptions, so we'd better reject setting
too large masks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-12-12 8:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-10 18:41 can queue_virt_boundary() exceed PAGE_SIZE? Al Viro
2022-12-12 8:58 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).