diff options
author | Dmitry Kasatkin <dmitry.kasatkin@huawei.com> | 2014-04-17 13:01:40 +0400 |
---|---|---|
committer | Mimi Zohar <zohar@linux.vnet.ibm.com> | 2016-02-19 01:14:28 +0300 |
commit | 11d7646df8e800f434ff710ad6100acbea59068e (patch) | |
tree | 71f8ba704fcde9eb3ea65b4916459dcc3bee2566 /security/integrity/ima/ima.h | |
parent | bc8ca5b92d54f6f005fa73ad546f02fca26ddd85 (diff) | |
download | linux-11d7646df8e800f434ff710ad6100acbea59068e.tar.xz |
ima: provide buffer hash calculation function
This patch provides convenient buffer hash calculation function.
Changelog v3:
- fix while hash calculation - Dmitry
v1:
- rewrite to support loff_t sized buffers - Mimi
(based on Fenguang Wu's testing)
Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@huawei.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Diffstat (limited to 'security/integrity/ima/ima.h')
-rw-r--r-- | security/integrity/ima/ima.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/security/integrity/ima/ima.h b/security/integrity/ima/ima.h index b7e793501bdb..2c5262f2823f 100644 --- a/security/integrity/ima/ima.h +++ b/security/integrity/ima/ima.h @@ -107,6 +107,8 @@ int ima_add_template_entry(struct ima_template_entry *entry, int violation, const char *op, struct inode *inode, const unsigned char *filename); int ima_calc_file_hash(struct file *file, struct ima_digest_data *hash); +int ima_calc_buffer_hash(const void *buf, loff_t len, + struct ima_digest_data *hash); int ima_calc_field_array_hash(struct ima_field_data *field_data, struct ima_template_desc *desc, int num_fields, struct ima_digest_data *hash); |