RPMA_PEER_CFG_FROM_DESCRIPTOR(3)

πŸ“¦
version 1.3.0 Β· 3 versions
, in ubuntu noble

✨ rpma_peer_cfg_from_descriptor ✨

okay bestie, welcome to the RPMA Programmer's Manual πŸ’– this one's a lil cutie with a big ol' security warning attached, so like, stay with me.


πŸŽ€ NAME πŸŽ€

rpma_peer_cfg_from_descriptor β€” the glow-up that turns a descriptor into a peer cfg πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <librpma.h>

struct rpma_peer_cfg;
int rpma_peer_cfg_from_descriptor(const void *desc, size_t desc_size,
                struct rpma_peer_cfg **pcfg_ptr);

🌸 DESCRIPTION 🌸

so basically, rpma_peer_cfg_from_descriptor() creates a peer configuration object, and it builds it from the descriptor. that's it. that's the whole job. iconic behavior honestly πŸ’…


🚨 SECURITY WARNING 🚨

no cap, this part is serious. read it twice, bestie.

an attacker might modify the serialized remote node configuration while it's being transferred over an unsecured connection (think e.g. rdma_cm private data). and if they do, that might cause different remote persistency method selections. 😭

the most dangerous situation is switching from the GPSPM mode to the APM one. πŸ’€

so here's the vibe check: users should avoid using the rpma_conn_get_private_data(3) and rpma_conn_req_get_private_data(3) API calls, and they should utilize TLS/SSL connections to transfer all configuration data between peers instead. periodt. 🫢


⭐ RETURN VALUE ⭐

rpma_peer_cfg_from_descriptor() returns 0 on success, or a negative error code on failure. and important: on failure it does not set the *pcfg_ptr value. like, not even a little. πŸ™ˆ


πŸ’œ ERRORS πŸ’œ

rpma_peer_cfg_from_descriptor() can fail with the following errors:

  • RPMA_E_INVAL β€” desc or pcfg_ptr are NULL πŸ“
  • RPMA_E_NOMEM β€” out of memory 😭

🌈 SEE ALSO 🌈


and that's the whole page, bestie!! this one's from the RPMA manual, dated 01 April 2024, and it was giving major main character energy the entire time ✨ slay, go configure those peers responsibly πŸ‘‘πŸ’…

πŸ“¦ where this page comes from