rpma_mr_re...descriptor(3)
π rpma_mr_remote_from_descriptor β bestie edition π
okay so this is a page from the RPMA Programmer's Manual, the rpma_mr_re...descriptor(3) one, and we're gonna make a remote memory region out of a descriptor. yes that's a lot of words. no i will not be normal about it. let's go π¦
β¨ NAME β¨
rpma_mr_remote_from_descriptor β create a memory region from a descriptor
like. the whole vibe is right there in the name bestie. it makes a memory region. from a descriptor. iconic behavior fr fr π
πΈ SYNOPSIS πΈ
#include <librpma.h>
struct rpma_mr_remote;
int rpma_mr_remote_from_descriptor(const void *desc, size_t desc_size,
struct rpma_mr_remote **mr_ptr);
look at her. three params, one return value, zero drama. slay π
π DESCRIPTION π
okay so here's the tea β β rpma_mr_remote_from_descriptor() builds you a remote memory region's structure, and it does it based on the descriptor you hand it. and what is that descriptor? it's a network-transferable description of the memory region that's local to the remote peer. so basically the remote homie sends you a little postcard describing their memory region, and you turn that postcard into a whole usable structure. the way that works?? obsessed ππ
π¨ SECURITY WARNING π¨
bestie. listen to me. do not skip this part. π
so an attacker might modify the serialized remote memory registration configuration while it's being transferred over an unsecured connection (think rdma_cm private data, that kinda thing). and if they do that? it might cause data corruption when writing to a different location. yeah. writing to the WRONG place. absolutely not. π
so the move is: users should avoid using the rpma_conn_get_private_data(3) and rpma_conn_req_get_private_data(3) API calls, and instead they should utilize TLS/SSL connections to transfer all configuration data between peers. protect your data, protect your peace π«Άπ
π« RETURN VALUE π«
rpma_mr_remote_from_descriptor()returns0on success β¨ or a negative error code on failure π- and important bestie: on failure,
rpma_mr_remote_from_descriptor()does not set the*mr_ptrvalue. so don't go reading it. it's giving nothing. leave it alone π ββοΈ
π ERRORS π
rpma_mr_remote_from_descriptor() can fail with the following errors:
RPMA_E_INVALβdescormr_ptrisNULLπ«RPMA_E_INVALβ incompatible descriptor size πRPMA_E_NOSUPPβ the deserialized information does not represent a valid memory region π«RPMA_E_NOMEMβ out of memory π΅
(yes RPMA_E_INVAL shows up twice, that's not a typo, that's just how it is. two different ways to be invalid. she contains multitudes π)
π SEE ALSO π
go read these next, they're all part of the same friend group:
rpma_mr_remote_delete(3)rpma_mr_remote_get_flush_type(3)rpma_mr_remote_get_size(3)rpma_flush(3)rpma_read(3)rpma_write(3)rpma_atomic_write(3)librpma(7)- and of course https://pmem.io/rpma/ π
and that's the whole page bestie!! this one's from the RPMA manual, dated 01 April 2024, and it's literally the rpma_mr_re...descriptor(3) page. mwah. go build something cute with it πβ¨π¦π
π¦ where this page comes from
- ubuntu noble: librpma-dev 1.3.0-2build2 Β· BSD-3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms