]> granicus.if.org Git - zfs/commit
icp: add no_const for PaX Compat
authorJason Zaman <jason@perfinion.com>
Tue, 9 Aug 2016 16:56:56 +0000 (00:56 +0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 12 Aug 2016 16:51:19 +0000 (09:51 -0700)
commita9947ce77175234fa4e26afc663a75041b37f8f0
tree9e7c336880af9a84143fae46a8a798bcb025ffe0
parent6eb73b00466b4d72c9e0f0df8e000ef68b757c99
icp: add no_const for PaX Compat

The constify plugin will automatically constify a class of types that contain
only function pointers. The icp structs fail to build if this is enabled with
the following error. The no_const attribute makes the plugin skip those
structs.

module/icp/spi/kcf_spi.c: In function ‘copy_ops_vector_v1’:
module/icp/spi/kcf_spi.c:61:16: error: assignment of read-only location ‘*dst_ops->cou.cou_v1.co_control_ops’
  *((dst)->ops) = *((src)->ops);
                ^
module/icp/spi/kcf_spi.c:74:2: note: in expansion of macro ‘KCF_SPI_COPY_OPS’
  KCF_SPI_COPY_OPS(src_ops, dst_ops, co_control_ops);
  ^

Signed-off-by: Jason Zaman <jason@perfinion.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4947
Closes #4962
module/icp/include/sys/crypto/spi.h