[PATCH v1 4/7] net/rds: use GFP_HIGHUSER_KASAN for message pages
Jeff Xu
jeffxu at chromium.org
Mon Nov 16 15:06:24 PST 2026
RDS allocates the pages that carry message payload with GFP_HIGHUSER:
the receive fragments in rds_ib_recv_refill_one() and the send payload
in rds_message_copy_from_user(). The kernel fills and drains them
through copy_page_from_iter(), copy_page_to_iter() and kmap_atomic(),
and they are not mapped into userspace.
Allocate them with GFP_HIGHUSER_KASAN, so that they keep their KASAN
tagging when GFP_HIGHUSER starts to skip it later in this series.
No functional change: GFP_HIGHUSER_KASAN has the same value as
GFP_HIGHUSER at this point. Build tested only.
Assisted-by: LLM
Cc: Allison Henderson <achender at kernel.org>
Cc: "David S. Miller" <davem at davemloft.net>
Cc: Eric Dumazet <edumazet at kernel.org>
Cc: Jakub Kicinski <kuba at kernel.org>
Cc: Paolo Abeni <pabeni at redhat.com>
Cc: Simon Horman <horms at kernel.org>
Cc: netdev at vger.kernel.org
Cc: linux-rdma at vger.kernel.org
Cc: rds-devel at oss.oracle.com
Signed-off-by: Jeff Xu <jeffxu at chromium.org>
---
net/rds/ib_recv.c | 2 +-
net/rds/message.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c
index aa50b85b0f99..907bf2977583 100644
--- a/net/rds/ib_recv.c
+++ b/net/rds/ib_recv.c
@@ -316,7 +316,7 @@ static int rds_ib_recv_refill_one(struct rds_connection *conn,
if (gfp & __GFP_DIRECT_RECLAIM) {
slab_mask = GFP_KERNEL;
- page_mask = GFP_HIGHUSER;
+ page_mask = GFP_HIGHUSER_KASAN;
}
if (!ic->i_cache_incs.ready)
diff --git a/net/rds/message.c b/net/rds/message.c
index 47d5e9ab9b10..80171ae2f40e 100644
--- a/net/rds/message.c
+++ b/net/rds/message.c
@@ -515,7 +515,7 @@ int rds_message_copy_from_user(struct rds_message *rm, struct iov_iter *from,
while (iov_iter_count(from)) {
if (!sg_page(sg)) {
ret = rds_page_remainder_alloc(sg, iov_iter_count(from),
- GFP_HIGHUSER);
+ GFP_HIGHUSER_KASAN);
if (ret)
return ret;
rm->data.op_nents++;
--
2.56.0.611.g1030f0b940-goog
More information about the kexec
mailing list