Re: [PATCH v2 2/6] ima: Simplify policy_func_show.

2017-06-15 Thread Mimi Zohar
On Wed, 2017-06-07 at 22:49 -0300, Thiago Jung Bauermann wrote: > If the func_tokens array uses the same indices as enum ima_hooks, > policy_func_show can be a lot simpler, and the func_* enum becomes > unnecessary. > > Also, if we use the same macro trick used by kernel_read_file_id_str we can >

[PATCH v2 2/6] ima: Simplify policy_func_show.

2017-06-07 Thread Thiago Jung Bauermann
If the func_tokens array uses the same indices as enum ima_hooks, policy_func_show can be a lot simpler, and the func_* enum becomes unnecessary. Also, if we use the same macro trick used by kernel_read_file_id_str we can use one hooks list for both the enum and the string array, making sure they