diff options
| author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2026-07-14 10:19:06 +0200 |
|---|---|---|
| committer | Leon Romanovsky <leon@kernel.org> | 2026-07-20 09:00:39 -0400 |
| commit | 1069f1c8213b492e9b05801cc4a3148ea7d8427a (patch) | |
| tree | 056a16c52a55dec2a801d5e659407fc75a026358 /drivers/infiniband/core | |
| parent | 9eab9eb2225912665fbee5fa13925232fd13881a (diff) | |
| download | linux-next-1069f1c8213b492e9b05801cc4a3148ea7d8427a.tar.gz linux-next-1069f1c8213b492e9b05801cc4a3148ea7d8427a.zip | |
RDMA/mlx5: Constify struct ib_frmr_pool_ops and dma_buf_attach_ops
'struct ib_frmr_pool_ops' and 'struct dma_buf_attach_ops' are not modified
in this driver.
Constifying these structures moves some data to a read-only section, so
increases overall security, especially when the structure holds some
function pointers.
While at it, change a '1' into a 'true' into the mlx5_ib_dmabuf_attach_ops
structure. The 'allow_peer2peer' field is a bool and other usages of
'struct dma_buf_attach_ops' prefer using true/false.
On a x86_64, with allmodconfig, as an example:
Before:
======
text data bss dec hex filename
77631 10392 320 88343 15917 drivers/infiniband/hw/mlx5/mr.o
After:
=====
text data bss dec hex filename
77759 10264 320 88343 15917 drivers/infiniband/hw/mlx5/mr.o
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://patch.msgid.link/22f2263c04cc94e242cee712e6e6d82b86ac353d.1784017128.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/core')
0 files changed, 0 insertions, 0 deletions
