RDMA/rxe: Remove error/warning messages from packet receiver path
Subsystems (2)
PATCH 1/1 RDMA/rxe: Remove error/warning messages from packet receiver path
Incoming packets to rxe are passed from UDP layer using an encapsulation socket. If there are any clients reachable to a node, they can invoke the encapsulation handler arbitrarily by sending malicious or irrelevant packets. This can potentially cause a message overflow and a subsequent slowdown on the node.
--- drivers/infiniband/sw/rxe/rxe_icrc.c | 12 +-- drivers/infiniband/sw/rxe/rxe_net.c | 1 - drivers/infiniband/sw/rxe/rxe_recv.c | 106 +++++++-------------------- 3 files changed, 28 insertions(+), 91 deletions(-)
drivers/infiniband/sw/rxe/rxe_icrc.c +1 -11
@@ -151,18 +151,8 @@ int rxe_icrc_check(struct sk_buff *skb, struct rxe_pkt_info *pkt) payload_size(pkt) + bth_pad(pkt)); icrc = ~icrc; -if (unlikely (icrc != pkt_icrc)) { -if (skb->protocol ==htons (ETH_P_IPV6 )) -pr_warn_ratelimited ("bad ICRC from %pI6c\n" , - &ipv6_hdr (skb)->saddr); -else if (skb->protocol ==htons (ETH_P_IP )) -pr_warn_ratelimited ("bad ICRC from %pI4\n" , - &ip_hdr (skb)->saddr); -else -pr_warn_ratelimited ("bad ICRC from unknown\n" ); - +if (unlikely (icrc != pkt_icrc))return -EINVAL ; - }return 0 ; }
drivers/infiniband/sw/rxe/rxe_net.c +0 -1
@@ -145,7 +145,6 @@ static int rxe_udp_encap_recv(struct sock *sk, struct sk_buff *skb) goto drop;if (skb_linearize (skb)) { -pr_err ("skb_linearize failed\n" );ib_device_put (&rxe->ib_dev); goto drop; }
drivers/infiniband/sw/rxe/rxe_recv.c +27 -79
200 lines not on this page · raw message
Signature · 1 line
2.31.1
Leon Romanovsky
AppliedQuoted 8 lines · Daisuke Matsuda
Incoming packets to rxe are passed from UDP layer using an encapsulation socket. If there are any clients reachable to a node, they can invoke the encapsulation handler arbitrarily by sending malicious or irrelevant packets. This can potentially cause a message overflow and a subsequent slowdown on the node.
[...]
Applied, thanks!
[1/1] RDMA/rxe: Remove error/warning messages from packet receiver path
https://git.kernel.org/rdma/rdma/c/8ad891ed435ba2
Best regards,
Signature · 1 line
Leon Romanovsky <[email protected]>