Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1223555 > unrolled thread

[PATCH] kexec: Add prefix "kexec" to output message

Started byMinfei Huang <mnfhuang@gmail.com>
First post2015-09-13 09:20 +0200
Last post2015-09-15 05:10 +0200
Articles 5 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] kexec: Add prefix "kexec" to output message Minfei Huang <mnfhuang@gmail.com> - 2015-09-13 09:20 +0200
    Re: [PATCH] kexec: Add prefix "kexec" to output message ebiederm@xmission.com (Eric W. Biederman) - 2015-09-13 19:10 +0200
      Re: [PATCH] kexec: Add prefix "kexec" to output message Minfei Huang <mnfhuang@gmail.com> - 2015-09-14 10:00 +0200
        Re: [PATCH] kexec: Add prefix "kexec" to output message Dave Young <dyoung@redhat.com> - 2015-09-14 10:50 +0200
          Re: [PATCH] kexec: Add prefix "kexec" to output message Minfei Huang <mnfhuang@gmail.com> - 2015-09-15 05:10 +0200

#1223555 — [PATCH] kexec: Add prefix "kexec" to output message

FromMinfei Huang <mnfhuang@gmail.com>
Date2015-09-13 09:20 +0200
Subject[PATCH] kexec: Add prefix "kexec" to output message
Message-ID<q89JT-Gz-7@gated-at.bofh.it>
kexec output message misses the prefix "kexec", when Dave Young split
the kexec code. To keep the same format, add the prefix "kexec" to
output message.

Following is the format of output message now.
[  140.290795] SYSC_kexec_load: hello, world

Ideally, the format of output message likes below.
[  140.291534] kexec: sanity_check_segment_list: hello, world

Signed-off-by: Minfei Huang <mnfhuang@gmail.com>
---
 kernel/kexec.c      | 2 ++
 kernel/kexec_file.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/kernel/kexec.c b/kernel/kexec.c
index 4c5edc3..15351ba 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -6,6 +6,8 @@
  * Version 2.  See the file COPYING for more details.
  */
 
+#define pr_fmt(fmt)	"kexec: " fmt
+
 #include <linux/capability.h>
 #include <linux/mm.h>
 #include <linux/file.h>
diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
index 6a9a3f2..b1ad01b 100644
--- a/kernel/kexec_file.c
+++ b/kernel/kexec_file.c
@@ -9,6 +9,8 @@
  * Version 2.  See the file COPYING for more details.
  */
 
+#define pr_fmt(fmt)	"kexec: " fmt
+
 #include <linux/capability.h>
 #include <linux/mm.h>
 #include <linux/file.h>
-- 
2.4.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1223726

Fromebiederm@xmission.com (Eric W. Biederman)
Date2015-09-13 19:10 +0200
Message-ID<q8iWS-5rM-5@gated-at.bofh.it>
In reply to#1223555
Minfei Huang <mnfhuang@gmail.com> writes:

> kexec output message misses the prefix "kexec", when Dave Young split
> the kexec code. To keep the same format, add the prefix "kexec" to
> output message.

What of kexec_core? What of the messages that already have a prefix?

Eric

> Following is the format of output message now.
> [  140.290795] SYSC_kexec_load: hello, world
>
> Ideally, the format of output message likes below.
> [  140.291534] kexec: sanity_check_segment_list: hello, world
>
> Signed-off-by: Minfei Huang <mnfhuang@gmail.com>
> ---
>  kernel/kexec.c      | 2 ++
>  kernel/kexec_file.c | 2 ++
>  2 files changed, 4 insertions(+)
>
> diff --git a/kernel/kexec.c b/kernel/kexec.c
> index 4c5edc3..15351ba 100644
> --- a/kernel/kexec.c
> +++ b/kernel/kexec.c
> @@ -6,6 +6,8 @@
>   * Version 2.  See the file COPYING for more details.
>   */
>  
> +#define pr_fmt(fmt)	"kexec: " fmt
> +
>  #include <linux/capability.h>
>  #include <linux/mm.h>
>  #include <linux/file.h>
> diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
> index 6a9a3f2..b1ad01b 100644
> --- a/kernel/kexec_file.c
> +++ b/kernel/kexec_file.c
> @@ -9,6 +9,8 @@
>   * Version 2.  See the file COPYING for more details.
>   */
>  
> +#define pr_fmt(fmt)	"kexec: " fmt
> +
>  #include <linux/capability.h>
>  #include <linux/mm.h>
>  #include <linux/file.h>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1223894

FromMinfei Huang <mnfhuang@gmail.com>
Date2015-09-14 10:00 +0200
Message-ID<q8wQb-8mm-19@gated-at.bofh.it>
In reply to#1223726
On 09/13/15 at 11:52am, Eric W. Biederman wrote:
> Minfei Huang <mnfhuang@gmail.com> writes:
> 
> > kexec output message misses the prefix "kexec", when Dave Young split
> > the kexec code. To keep the same format, add the prefix "kexec" to
> > output message.
> 
> What of kexec_core? What of the messages that already have a prefix?
> 

Hi, Eric.

Last commit(2965fa), Dave Young (dyoung@redhatcom) split the previous
kernel/kexec.c into three pieces(kexec_core.c, kexec_file.c, kexec.c).
The common functions used by both kexec and kexec_file are placed in
file kernel/kexec_core.c.

The format of the output message likes "kexec: SYSC_kexec_load: hello,
world" previously. Due to the missing prefix "kexec", now it like
"SYSC_kexec_load: hello, world".

Dave Young misses the Macro pr_fmt to define the prefix output message
in file kexec.c and kexec_file.c. I think the previous Macro was moved
into the file kexec_core.c when Dave did the splitting.

Thanks
Minfei

> > Following is the format of output message now.
> > [  140.290795] SYSC_kexec_load: hello, world
> >
> > Ideally, the format of output message likes below.
> > [  140.291534] kexec: sanity_check_segment_list: hello, world
> >
> > Signed-off-by: Minfei Huang <mnfhuang@gmail.com>
> > ---
> >  kernel/kexec.c      | 2 ++
> >  kernel/kexec_file.c | 2 ++
> >  2 files changed, 4 insertions(+)
> >
> > diff --git a/kernel/kexec.c b/kernel/kexec.c
> > index 4c5edc3..15351ba 100644
> > --- a/kernel/kexec.c
> > +++ b/kernel/kexec.c
> > @@ -6,6 +6,8 @@
> >   * Version 2.  See the file COPYING for more details.
> >   */
> >  
> > +#define pr_fmt(fmt)	"kexec: " fmt
> > +
> >  #include <linux/capability.h>
> >  #include <linux/mm.h>
> >  #include <linux/file.h>
> > diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
> > index 6a9a3f2..b1ad01b 100644
> > --- a/kernel/kexec_file.c
> > +++ b/kernel/kexec_file.c
> > @@ -9,6 +9,8 @@
> >   * Version 2.  See the file COPYING for more details.
> >   */
> >  
> > +#define pr_fmt(fmt)	"kexec: " fmt
> > +
> >  #include <linux/capability.h>
> >  #include <linux/mm.h>
> >  #include <linux/file.h>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1223935

FromDave Young <dyoung@redhat.com>
Date2015-09-14 10:50 +0200
Message-ID<q8xCz-14B-27@gated-at.bofh.it>
In reply to#1223894
On 09/14/15 at 03:50pm, Minfei Huang wrote:
> On 09/13/15 at 11:52am, Eric W. Biederman wrote:
> > Minfei Huang <mnfhuang@gmail.com> writes:
> > 
> > > kexec output message misses the prefix "kexec", when Dave Young split
> > > the kexec code. To keep the same format, add the prefix "kexec" to
> > > output message.
> > 
> > What of kexec_core? What of the messages that already have a prefix?
> > 
> 
> Hi, Eric.
> 
> Last commit(2965fa), Dave Young (dyoung@redhatcom) split the previous
> kernel/kexec.c into three pieces(kexec_core.c, kexec_file.c, kexec.c).
> The common functions used by both kexec and kexec_file are placed in
> file kernel/kexec_core.c.
> 
> The format of the output message likes "kexec: SYSC_kexec_load: hello,
> world" previously. Due to the missing prefix "kexec", now it like
> "SYSC_kexec_load: hello, world".
> 
> Dave Young misses the Macro pr_fmt to define the prefix output message
> in file kexec.c and kexec_file.c. I think the previous Macro was moved
> into the file kexec_core.c when Dave did the splitting.

I'm not sure it is proper to add prefix "kexec: " in all kexec*.c, so
only keep it in kexec_core.c.

There's already printks with prefix like "Kexec:", "crashkernel:" and
other strings. Adding another prefix before them looks odd. So either remove 
the prefix in kexec_core, or remove other prefixes already exists in kexec*.c
I would prefix to remove the "kexec:" prefix in kexec_core.c

> 
> Thanks
> Minfei
> 
> > > Following is the format of output message now.
> > > [  140.290795] SYSC_kexec_load: hello, world
> > >
> > > Ideally, the format of output message likes below.
> > > [  140.291534] kexec: sanity_check_segment_list: hello, world
> > >
> > > Signed-off-by: Minfei Huang <mnfhuang@gmail.com>
> > > ---
> > >  kernel/kexec.c      | 2 ++
> > >  kernel/kexec_file.c | 2 ++
> > >  2 files changed, 4 insertions(+)
> > >
> > > diff --git a/kernel/kexec.c b/kernel/kexec.c
> > > index 4c5edc3..15351ba 100644
> > > --- a/kernel/kexec.c
> > > +++ b/kernel/kexec.c
> > > @@ -6,6 +6,8 @@
> > >   * Version 2.  See the file COPYING for more details.
> > >   */
> > >  
> > > +#define pr_fmt(fmt)	"kexec: " fmt
> > > +
> > >  #include <linux/capability.h>
> > >  #include <linux/mm.h>
> > >  #include <linux/file.h>
> > > diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
> > > index 6a9a3f2..b1ad01b 100644
> > > --- a/kernel/kexec_file.c
> > > +++ b/kernel/kexec_file.c
> > > @@ -9,6 +9,8 @@
> > >   * Version 2.  See the file COPYING for more details.
> > >   */
> > >  
> > > +#define pr_fmt(fmt)	"kexec: " fmt
> > > +
> > >  #include <linux/capability.h>
> > >  #include <linux/mm.h>
> > >  #include <linux/file.h>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1224612

FromMinfei Huang <mnfhuang@gmail.com>
Date2015-09-15 05:10 +0200
Message-ID<q8ON4-GN-3@gated-at.bofh.it>
In reply to#1223935
On 09/14/15 at 04:44pm, Dave Young wrote:
> On 09/14/15 at 03:50pm, Minfei Huang wrote:
> > On 09/13/15 at 11:52am, Eric W. Biederman wrote:
> > > Minfei Huang <mnfhuang@gmail.com> writes:
> > > 
> > > > kexec output message misses the prefix "kexec", when Dave Young split
> > > > the kexec code. To keep the same format, add the prefix "kexec" to
> > > > output message.
> > > 
> > > What of kexec_core? What of the messages that already have a prefix?
> > > 
> > 
> > Hi, Eric.
> > 
> > Last commit(2965fa), Dave Young (dyoung@redhatcom) split the previous
> > kernel/kexec.c into three pieces(kexec_core.c, kexec_file.c, kexec.c).
> > The common functions used by both kexec and kexec_file are placed in
> > file kernel/kexec_core.c.
> > 
> > The format of the output message likes "kexec: SYSC_kexec_load: hello,
> > world" previously. Due to the missing prefix "kexec", now it like
> > "SYSC_kexec_load: hello, world".
> > 
> > Dave Young misses the Macro pr_fmt to define the prefix output message
> > in file kexec.c and kexec_file.c. I think the previous Macro was moved
> > into the file kexec_core.c when Dave did the splitting.
> 
> I'm not sure it is proper to add prefix "kexec: " in all kexec*.c, so
> only keep it in kexec_core.c.
> 
> There's already printks with prefix like "Kexec:", "crashkernel:" and
> other strings. Adding another prefix before them looks odd. So either remove 
> the prefix in kexec_core, or remove other prefixes already exists in kexec*.c
> I would prefix to remove the "kexec:" prefix in kexec_core.c

Hi, Dave.

How about removing all of the prefix "crashkernel" in kexec_core. Thus
we can be consistent with the output message prefix "kexec".

Thanks
Minfei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web