mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
RDMA/irdma: Use robust input copy helpers
Replace the use of ib_copy_from_udata() with ib_copy_validate_udata_in() where applicable. For each modified call site, the last argument of ib_copy_validate_udata_in() was determined by taking the last member of the ABI struct as per its original definition (i.e., when it was first committed). Some methods like irdma_create_cq required special care because the last member of the current ABI def is beyond that of the legacy i40iw's ABI def which we need to remain compatible with. In some other cases like modify_qp, the legacy i40iw provider never provided any udata at all so the validation is only performed if inlen > 0. irdma_create_qp is more challenging because the legacy ABI was actually larger but the additional fields were never used, and even worse, never initialized in the provider. This will be handled in a followup commit. Signed-off-by: Jacob Moroni <jmoroni@google.com> Link: https://patch.msgid.link/20260713171257.3131493-4-jmoroni@google.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
parent
91a74a2386
commit
aa5967095c
1 changed files with 34 additions and 45 deletions
Loading…
Add table
Add a link
Reference in a new issue