• Christophe JAILLET's avatar
    ntb: Constify struct bus_type · 35c87cb8
    Christophe JAILLET authored
    'struct bus_type' is not modified in this driver.
    
    Constifying this structure moves some data to a read-only section, so
    increase overall security, especially when the structure holds some
    function pointers.
    
    On a x86_64, with allmodconfig:
    Before:
    ======
       text	   data	    bss	    dec	    hex	filename
      69682	   4593	    152	  74427	  122bb	drivers/ntb/ntb_transport.o
       5847	    448	     32	   6327	   18b7	drivers/ntb/core.o
    
    After:
    =====
       text	   data	    bss	    dec	    hex	filename
      69858	   4433	    152	  74443	  122cb	drivers/ntb/ntb_transport.o
       6007	    288	     32	   6327	   18b7	drivers/ntb/core.o
    Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
    Reviewed-by: default avatarDave Jiang <dave.jiang@intel.com>
    Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
    35c87cb8
core.c 7.72 KB