ima: Add ima_show_template_uint() template library function
authorRoberto Sassu <roberto.sassu@huawei.com>
Fri, 28 May 2021 07:38:06 +0000 (09:38 +0200)
committerMimi Zohar <zohar@linux.ibm.com>
Tue, 1 Jun 2021 19:17:30 +0000 (15:17 -0400)
commitcde1391a0b4014b0e8fc09cd316272f478b54c0f
tree9598df4210cc423975fbf550b991dea99d6dd167
parent5a25d8ceb8611c06797b74e22d04af2b9fefd130
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>
security/integrity/ima/ima_template_lib.c
security/integrity/ima/ima_template_lib.h