From: Al Viro <viro@zeniv.linux.org.uk>
To: linux-block@vger.kernel.org
Subject: can queue_virt_boundary() exceed PAGE_SIZE?
Date: Sat, 10 Dec 2022 18:41:00 +0000 [thread overview]
Message-ID: <Y5TSvDH3kadijZhT@ZenIV> (raw)
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...
next reply other threads:[~2022-12-10 18:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-10 18:41 Al Viro [this message]
2022-12-12 8:58 ` can queue_virt_boundary() exceed PAGE_SIZE? Christoph Hellwig
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=Y5TSvDH3kadijZhT@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=linux-block@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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