diff options
author | Roberto Sassu <roberto.sassu@huawei.com> | 2021-05-28 10:38:06 +0300 |
---|---|---|
committer | Mimi Zohar <zohar@linux.ibm.com> | 2021-06-01 22:17:30 +0300 |
commit | cde1391a0b4014b0e8fc09cd316272f478b54c0f (patch) | |
tree | 9598df4210cc423975fbf550b991dea99d6dd167 /security/integrity/ima/ima_template_lib.h | |
parent | 5a25d8ceb8611c06797b74e22d04af2b9fefd130 (diff) | |
download | linux-cde1391a0b4014b0e8fc09cd316272f478b54c0f.tar.xz |
ima: Add ima_show_template_uint() template library function
This patch introduces the new function ima_show_template_uint(). This can
be used for showing integers of different sizes in ASCII format. The
function ima_show_template_data_ascii() automatically determines how to
print a stored integer by checking the integer size.
If integers have been written in canonical format,
ima_show_template_data_ascii() calls the appropriate leXX_to_cpu() function
to correctly display the value.
Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Diffstat (limited to 'security/integrity/ima/ima_template_lib.h')
-rw-r--r-- | security/integrity/ima/ima_template_lib.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/security/integrity/ima/ima_template_lib.h b/security/integrity/ima/ima_template_lib.h index f4b2a2056d1d..54b67c80b315 100644 --- a/security/integrity/ima/ima_template_lib.h +++ b/security/integrity/ima/ima_template_lib.h @@ -27,6 +27,8 @@ void ima_show_template_sig(struct seq_file *m, enum ima_show_type show, struct ima_field_data *field_data); void ima_show_template_buf(struct seq_file *m, enum ima_show_type show, struct ima_field_data *field_data); +void ima_show_template_uint(struct seq_file *m, enum ima_show_type show, + struct ima_field_data *field_data); int ima_parse_buf(void *bufstartp, void *bufendp, void **bufcurp, int maxfields, struct ima_field_data *fields, int *curfields, unsigned long *len_mask, int enforce_mask, char *bufname); |