digsig: remove include for linux/config.h in digsig.c

Remove inclusion of deleted header linux/config.h from digsig.c.

Signed-off-by: Rupert Muchembled <rupert@rmuch.net>
digsig: fix digsig_sem definition in digsig.c

Replace use of removed macro DECLARE_MUTEX with DEFINE_SEMAPHORE for
digsig_sem definition in digsig.c.

Signed-off-by: Rupert Muchembled <rupert@rmuch.net>
digsig: remove registration as secondary security module

The kernel no longer supports registering a secondary security module.
This patch removes a mod_reg_security() call from digsig_init_module().

Signed-off-by: Rupert Muchembled <rupert@rmuch.net>
digsig: rename file_mmap in digsig_security_ops

security_operations member file_mmap has been renamed to mmap_file.
This patch updates digsig_security_ops to use the new name.

Signed-off-by: Rupert Muchembled <rupert@rmuch.net>
digsig: mpi: remove redefinition of krealloc()

krealloc() is declared in linux/slab.h, so there is no need for this
header to reimplement it.

Signed-off-by: Rupert Muchembled <rupert@rmuch.net>
digsig: fix digsig_inode_permission() signature

Type signature for security_operations member inode_permission has
changed. Removed parameter nd.

Signed-off-by: Rupert Muchembled <rupert@rmuch.net>
digsig: delete digsig_exit_module()

Function digsig_exit_module() may be deleted, since this module will
not be unloaded.

Signed-off-by: Rupert Muchembled <rupert@rmuch.net>
digsig: remove include for linux/config.h in dsi_sysfs.c

Remove inclusion of deleted header linux/config.h from dsi_sysfs.c.

Signed-off-by: Rupert Muchembled <rupert@rmuch.net>
digsig: fix incorrect format specifier in digsig_revoked_store()

Fix use of incorrect format specifier for size_t type in debug message
in digsig_revoked_store().

Signed-off-by: Rupert Muchembled <rupert@rmuch.net>
digsig: replace call to kobject_register()

Replace call to removed function kobject_register() with
kobject_init_and_add() in dsi_sysfs.c.

Signed-off-by: Rupert Muchembled <rupert@rmuch.net>
digsig: replace calls to kobject_unregister()

Replace calls to deleted function kobject_unregister() with
kobject_del() in dsi_sysfs.c.

Signed-off-by: Rupert Muchembled <rupert@rmuch.net>
digsig: replace call to long_log2() with ilog2()

Replace a call to renamed function long_log2() with ilog2() from
linux/log2.h, in digsig_init_caching().

Signed-off-by: Rupert Muchembled <rupert@rmuch.net>
digsig: replace use of write_tryseqlock() in digsig_cache_signature()

Replace use of removed function write_tryseqlock() with spin_trylock()
and write_seqcount_begin() in digsig_cache_signature().

Signed-off-by: Rupert Muchembled <rupert@rmuch.net>
digsig: replace manual spinlock definition with DEFINE_SPINLOCK()

Replace a manual spinlock definition using a removed macro constant
with DEFINE_SPINLOCK().

Signed-off-by: Rupert Muchembled <rupert@rmuch.net>
digsig: add old crypto header

This patch adds the old Scatterlist Cryptographic API so that the
module may build.

This patch should be reviewed at a later date and reimplemented more
elegantly, using the modern API.

Signed-off-by: Rupert Muchembled <rupert@rmuch.net>
digsig: use sg_set_page() in digsig_sha1_update()

Use sg_set_page() instead of manual struct field assignment in
digsig_sha1_update().

Signed-off-by: Rupert Muchembled <rupert@rmuch.net>
digsig: replace asm/scatterlist.h inclusion

Replace inclusion of asm/scatterlist.h with linux/scatterlist.h in
dsi_sig_verify.h.

Signed-off-by: Rupert Muchembled <rupert@rmuch.net>
digsig: remove duplicate inclusion in digsig.c

Remove duplicate inclusion of linux/security.h from digsig.c.

Signed-off-by: Rupert Muchembled <rupert@rmuch.net>
digsig: fix include in digsig.c

Change asm/uaccess.h to linux/uaccess.h in digsig.c

Signed-off-by: Rupert Muchembled <rupert@rmuch.net>
digsig: replace uses of gcc specific __FUNCTION__

Use __func__ over gcc specific __FUNCTION__ in digsig.c.

Signed-off-by: Rupert Muchembled <rupert@rmuch.net>