integrity: Remove duplicate pr_fmt definitions
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. With this change, the messages in the following files will be prefixed with 'integrity'. security/integrity/platform_certs/platform_keyring.c security/integrity/platform_certs/load_powerpc.c security/integrity/platform_certs/load_uefi.c security/integrity/iint.c e.g. "integrity: Error adding keys to platform keyring %s\n" And the messages in the following file will be prefixed with 'ima'. security/integrity/ima/ima_mok.c e.g. "ima: Allocating IMA blacklist keyring.\n" For the rest of the files under security/integrity, there will be no change in the message format. Suggested-by: Shuah Khan <skhan@linuxfoundation.org> Suggested-by: Joe Perches <joe@perches.com> Signed-off-by: Tushar Sugandhi <tusharsu@linux.microsoft.com> Reviewed-by: Lakshmi Ramasubramanian <nramas@linux.microsoft.com> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
This commit is contained in:
parent
72ec611c64
commit
555d6d71d5
|
@ -6,8 +6,6 @@
|
|||
* Dmitry Kasatkin <dmitry.kasatkin@intel.com>
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/err.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/slab.h>
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
* Dmitry Kasatkin <dmitry.kasatkin@intel.com>
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/err.h>
|
||||
#include <linux/ratelimit.h>
|
||||
#include <linux/key-type.h>
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
* Using root's kernel master key (kmk), calculate the HMAC
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/export.h>
|
||||
#include <linux/crypto.h>
|
||||
#include <linux/xattr.h>
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
* evm_inode_removexattr, and evm_verifyxattr
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/crypto.h>
|
||||
#include <linux/audit.h>
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
* - Get the key and enable EVM
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/audit.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/init.h>
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
* create or update.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <keys/asymmetric-type.h>
|
||||
#include "ima.h"
|
||||
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
* Calculates md5/sha1 file hash, template hash, boot-aggreate hash
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/moduleparam.h>
|
||||
#include <linux/ratelimit.h>
|
||||
|
|
|
@ -12,8 +12,6 @@
|
|||
* current measurement list and IMA statistics
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/fcntl.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/init.h>
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
* initialization and cleanup functions
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/scatterlist.h>
|
||||
#include <linux/slab.h>
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
* Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
|
||||
* Mimi Zohar <zohar@linux.vnet.ibm.com>
|
||||
*/
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/vmalloc.h>
|
||||
|
|
|
@ -15,8 +15,6 @@
|
|||
* and ima_file_check.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/file.h>
|
||||
#include <linux/binfmts.h>
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
* - initialize default measure policy rules
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/fs.h>
|
||||
|
|
|
@ -15,8 +15,6 @@
|
|||
* ever removed or changed during the boot-cycle.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/rculist.h>
|
||||
#include <linux/slab.h>
|
||||
#include "ima.h"
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
* Enables deferred processing of keys
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/workqueue.h>
|
||||
#include <keys/asymmetric-type.h>
|
||||
#include "ima.h"
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
* Helpers to manage template descriptors.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/rculist.h>
|
||||
#include "ima.h"
|
||||
#include "ima_template_lib.h"
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
* Library of supported template fields.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include "ima_template_lib.h"
|
||||
|
||||
static bool ima_template_hash_algo_allowed(u8 algo)
|
||||
|
|
|
@ -6,6 +6,12 @@
|
|||
* Mimi Zohar <zohar@us.ibm.com>
|
||||
*/
|
||||
|
||||
#ifdef pr_fmt
|
||||
#undef pr_fmt
|
||||
#endif
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/integrity.h>
|
||||
#include <crypto/sha.h>
|
||||
|
|
Loading…
Reference in New Issue