Skip to content
Snippets Groups Projects
Commit bbee049d authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Alex Williamson
Browse files

kvm/vfio: Constify struct kvm_device_ops


'struct kvm_device_ops' is not modified in this driver.

Constifying this structure moves some data to a read-only section, so
increases overall security, especially when the structure holds some
function pointers.

On a x86_64, with allmodconfig:
Before:
======
   text	   data	    bss	    dec	    hex	filename
   2605	    169	     16	   2790	    ae6	virt/kvm/vfio.o

After:
=====
   text	   data	    bss	    dec	    hex	filename
   2685	     89	     16	   2790	    ae6	virt/kvm/vfio.o

Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/e7361a1bb7defbb0f7056b884e83f8d75ac9fe21.1727517084.git.christophe.jaillet@wanadoo.fr


Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent 81983758
No related branches found
Tags amd-drm-next-5.16-2021-10-14
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment