Re: [PATCH v3 3/3] IMA: Add module name and base name prefix to log.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2020-02-11 at 15:14 -0800, Tushar Sugandhi wrote:
> The #define for formatting log messages, pr_fmt, is duplicated in the
> files under security/integrity.
> 
> This change moves the definition to security/integrity/integrity.h and
> removes the duplicate definitions in the other files under
> security/integrity. Also, it adds KBUILD_MODNAME and KBUILD_BASENAME prefix
> to the log messages.
> 
> Signed-off-by: Tushar Sugandhi <tusharsu@xxxxxxxxxxxxxxxxxxx>
> Reviewed-by: Lakshmi Ramasubramanian <nramas@xxxxxxxxxxxxxxxxxxx>
> Suggested-by: Joe Perches <joe@xxxxxxxxxxx>
> Suggested-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>

<snip>

> diff --git a/security/integrity/integrity.h b/security/integrity/integrity.h
> index 73fc286834d7..b1bb4d2263be 100644
> --- a/security/integrity/integrity.h
> +++ b/security/integrity/integrity.h
> @@ -6,6 +6,12 @@
>   * Mimi Zohar <zohar@xxxxxxxxxx>
>   */
>  
> +#ifdef pr_fmt
> +#undef pr_fmt
> +#endif
> +
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " KBUILD_BASENAME ": " fmt
> +
>  #include <linux/types.h>
>  #include <linux/integrity.h>
>  #include <crypto/sha.h>

Joe, Shuah, including the pr_fmt() in integrity/integrity.h not only
affects the integrity directory but everything below it.  Adding
KBUILD_BASENAME to pr_fmt() modifies all of the existing IMA and EVM
kernel messages.  Is that ok or should there be a separate pr_fmt()
for the subdirectories?

thanks,

Mimi




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux Kernel Hardening]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux