LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] ima: Fix pr_fmt() redefinition
@ 2018-05-17 10:47 Petr Vorel
2018-05-17 12:04 ` Mimi Zohar
0 siblings, 1 reply; 3+ messages in thread
From: Petr Vorel @ 2018-05-17 10:47 UTC (permalink / raw)
To: linux-integrity
Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Petr Vorel,
Mimi Zohar
Previous definition was too late and caused problems in powerpc allyesconfig:
security/integrity/ima/ima_kexec.c:18:0: warning: "pr_fmt" redefined
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
In file included from include/linux/kernel.h:14:0,
from include/asm-generic/bug.h:18,
from arch/powerpc/include/asm/bug.h:128,
from include/linux/bug.h:5,
from include/linux/seq_file.h:7,
from security/integrity/ima/ima_kexec.c:13:
include/linux/printk.h:288:0: note: this is the location of the previous definition
#define pr_fmt(fmt) fmt
Fixes: 3dea0d93d257 ("ima: Unify logging")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
security/integrity/ima/ima_kexec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/security/integrity/ima/ima_kexec.c b/security/integrity/ima/ima_kexec.c
index db0de585f6c0..16bd18747cfa 100644
--- a/security/integrity/ima/ima_kexec.c
+++ b/security/integrity/ima/ima_kexec.c
@@ -10,13 +10,13 @@
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/seq_file.h>
#include <linux/vmalloc.h>
#include <linux/kexec.h>
#include "ima.h"
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
#ifdef CONFIG_IMA_KEXEC
static int ima_dump_measurement_list(unsigned long *buffer_size, void **buffer,
unsigned long segment_size)
--
2.16.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ima: Fix pr_fmt() redefinition
2018-05-17 10:47 [PATCH] ima: Fix pr_fmt() redefinition Petr Vorel
@ 2018-05-17 12:04 ` Mimi Zohar
2018-05-17 12:17 ` Petr Vorel
0 siblings, 1 reply; 3+ messages in thread
From: Mimi Zohar @ 2018-05-17 12:04 UTC (permalink / raw)
To: Petr Vorel, linux-integrity
Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Stephen Rothwell
Hi Petr,
On Thu, 2018-05-17 at 12:47 +0200, Petr Vorel wrote:
> Previous definition was too late and caused problems in powerpc allyesconfig:
> security/integrity/ima/ima_kexec.c:18:0: warning: "pr_fmt" redefined
> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>
> In file included from include/linux/kernel.h:14:0,
> from include/asm-generic/bug.h:18,
> from arch/powerpc/include/asm/bug.h:128,
> from include/linux/bug.h:5,
> from include/linux/seq_file.h:7,
> from security/integrity/ima/ima_kexec.c:13:
> include/linux/printk.h:288:0: note: this is the location of the previous definition
> #define pr_fmt(fmt) fmt
>
> Fixes: 3dea0d93d257 ("ima: Unify logging")
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
As the original patch hasn't been upstreamed yet, I'll squash this fix
with the original patch.
thanks!
Mimi
> ---
> security/integrity/ima/ima_kexec.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/security/integrity/ima/ima_kexec.c b/security/integrity/ima/ima_kexec.c
> index db0de585f6c0..16bd18747cfa 100644
> --- a/security/integrity/ima/ima_kexec.c
> +++ b/security/integrity/ima/ima_kexec.c
> @@ -10,13 +10,13 @@
> * the Free Software Foundation; either version 2 of the License, or
> * (at your option) any later version.
> */
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
> #include <linux/seq_file.h>
> #include <linux/vmalloc.h>
> #include <linux/kexec.h>
> #include "ima.h"
>
> -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> -
> #ifdef CONFIG_IMA_KEXEC
> static int ima_dump_measurement_list(unsigned long *buffer_size, void **buffer,
> unsigned long segment_size)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ima: Fix pr_fmt() redefinition
2018-05-17 12:04 ` Mimi Zohar
@ 2018-05-17 12:17 ` Petr Vorel
0 siblings, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2018-05-17 12:17 UTC (permalink / raw)
To: Mimi Zohar
Cc: linux-integrity, Linux-Next Mailing List,
Linux Kernel Mailing List, Stephen Rothwell
Hi Mimi,
> On Thu, 2018-05-17 at 12:47 +0200, Petr Vorel wrote:
> > Previous definition was too late and caused problems in powerpc allyesconfig:
> > security/integrity/ima/ima_kexec.c:18:0: warning: "pr_fmt" redefined
> > #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> > In file included from include/linux/kernel.h:14:0,
> > from include/asm-generic/bug.h:18,
> > from arch/powerpc/include/asm/bug.h:128,
> > from include/linux/bug.h:5,
> > from include/linux/seq_file.h:7,
> > from security/integrity/ima/ima_kexec.c:13:
> > include/linux/printk.h:288:0: note: this is the location of the previous definition
> > #define pr_fmt(fmt) fmt
> > Fixes: 3dea0d93d257 ("ima: Unify logging")
> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> As the original patch hasn't been upstreamed yet, I'll squash this fix
> with the original patch.
Make sense, thanks!
> thanks!
> Mimi
Kind regards,
Petr
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-17 12:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-17 10:47 [PATCH] ima: Fix pr_fmt() redefinition Petr Vorel
2018-05-17 12:04 ` Mimi Zohar
2018-05-17 12:17 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).