linux/security/integrity/ima
Roberto Sassu ce5bb5a86e ima: Return int in the functions to measure a buffer
ima_measure_critical_data() and process_buffer_measurement() currently
don't return a result as, unlike appraisal-related functions, the result is
not used by callers to deny an operation. Measurement-related functions
instead rely on the audit subsystem to notify the system administrator when
an error occurs.

However, ima_measure_critical_data() and process_buffer_measurement() are a
special case, as these are the only functions that can return a buffer
measurement (for files, there is ima_file_hash()). In a subsequent patch,
they will be modified to return the calculated digest.

In preparation to return the result of the digest calculation, this patch
modifies the return type from void to int, and returns 0 if the buffer has
been successfully measured, a negative value otherwise.

Given that the result of the measurement is still not necessary, this patch
does not modify the behavior of existing callers by processing the returned
value. For those, the return value is ignored.

Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Reviewed-by: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
Acked-by: Paul Moore <paul@paul-moore.com> (for the SELinux bits)
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2021-07-23 09:27:02 -04:00
..
ima_api.c idmapped-mounts-v5.12 2021-02-23 13:39:45 -08:00
ima_appraise.c ima: differentiate between EVM failures in the audit log 2021-06-10 16:36:41 -04:00
ima_asymmetric_keys.c ima: Include header defining ima_post_key_create_or_update() 2021-06-08 16:29:10 -04:00
ima_crypto.c ima/evm: Fix type mismatch 2021-06-08 16:29:10 -04:00
ima_efi.c ima: generalize x86/EFI arch glue for other EFI architectures 2020-11-06 07:40:42 +01:00
ima_fs.c ima/evm: Fix type mismatch 2021-06-08 16:29:10 -04:00
ima_init.c evm: Load EVM key in ima_load_x509() to avoid appraisal 2021-05-21 12:47:04 -04:00
ima_kexec.c ima: Fix warning: no previous prototype for function 'ima_add_kexec_buffer' 2021-06-11 11:27:03 -04:00
ima_main.c ima: Return int in the functions to measure a buffer 2021-07-23 09:27:02 -04:00
ima_modsig.c ima: Move comprehensive rule validation checks out of the token parser 2020-07-20 13:28:15 -04:00
ima_mok.c IMA: remove -Wmissing-prototypes warning 2021-07-23 08:05:06 -04:00
ima_policy.c ima: Fix fall-through warnings for Clang 2021-04-20 16:54:14 -04:00
ima_queue_keys.c idmapped-mounts-v5.12 2021-02-23 13:39:45 -08:00
ima_queue.c IMA: support for duplicate measurement records 2021-06-11 12:54:13 -04:00
ima_template_lib.c ima: Fix fall-through warning for Clang 2021-06-08 23:33:48 -04:00
ima_template_lib.h ima: Define new template fields xattrnames, xattrlengths and xattrvalues 2021-06-02 18:56:13 -04:00
ima_template.c ima: Set correct casting types 2021-06-08 16:29:10 -04:00
ima.h ima: Return int in the functions to measure a buffer 2021-07-23 09:27:02 -04:00
Kconfig IMA: support for duplicate measurement records 2021-06-11 12:54:13 -04:00
Makefile ima: generalize x86/EFI arch glue for other EFI architectures 2020-11-06 07:40:42 +01:00