]> Gentwo Git Trees - linux/.git/commit
RDMA/hfi1: Constify struct mmu_rb_ops
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 24 Jun 2024 20:13:27 +0000 (22:13 +0200)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 26 Jun 2024 13:53:29 +0000 (10:53 -0300)
commit5a905e33b266f504e0b290055125e5002635e2e6
tree9013cce2bcd9ddb51f8fc0842eabf2f036f1c51b
parent4adcaf969d77d3d3aa3871bbadc196258a38aec6
RDMA/hfi1: Constify struct mmu_rb_ops

'struct mmu_rb_ops' is not modified in this driver.

Constifying this structure moves some data to a read-only section, so
increase overall security.

On a x86_64, with allmodconfig, as an example:
Before:
======
   text    data     bss     dec     hex filename
  10879     164       0   11043    2b23 drivers/infiniband/hw/hfi1/pin_system.o

After:
=====
   text    data     bss     dec     hex filename
  10907     140       0   11047    2b27 drivers/infiniband/hw/hfi1/pin_system.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/b826dd05eefa5f4d6a7a1b4d191eaf37c714ed04.1719259997.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/hfi1/mmu_rb.c
drivers/infiniband/hw/hfi1/mmu_rb.h
drivers/infiniband/hw/hfi1/pin_system.c