public inbox for kexec@lists.infradead.org
 help / color / mirror / Atom feed
* [RESEND PATCH] vmcore-dmesg: Understand >= v3.11-rc4 dmesg
@ 2013-09-18 12:21 Lubomir Rintel
  2013-09-19 14:38 ` Dave Young
  0 siblings, 1 reply; 16+ messages in thread
From: Lubomir Rintel @ 2013-09-18 12:21 UTC (permalink / raw)
  To: kexec; +Cc: Joe Perches, Lubomir Rintel, Simon Horman, Vivek Goyal

Symbol name changed with the following commit:
62e32ac printk: rename struct log to struct printk_log

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Cc: Simon Horman <horms@verge.net.au>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
---

I believe this can now be applied, as the change went into 3.11 kernel release.
Thank you!

 vmcore-dmesg/vmcore-dmesg.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c
index 0f477c0..bfc19e9 100644
--- a/vmcore-dmesg/vmcore-dmesg.c
+++ b/vmcore-dmesg/vmcore-dmesg.c
@@ -324,19 +324,27 @@ static void scan_vmcoreinfo(char *start, size_t size)
 			*symbol[i].vaddr = vaddr;
 		}
 
-		/* Check for "SIZE(log)=" */
+		/* Check for "SIZE(printk_log)" or older "SIZE(log)=" */
 		if (memcmp("SIZE(log)=", pos, 10) == 0)
 			log_sz = strtoull(pos + 10, NULL, 10);
+		if (memcmp("SIZE(printk_log)=", pos, 17) == 0)
+			log_sz = strtoull(pos + 17, NULL, 10);
 
 		/* Check for struct log field offsets */
 		if (memcmp("OFFSET(log.ts_nsec)=", pos, 20) == 0)
 			log_offset_ts_nsec = strtoull(pos + 20, NULL, 10);
+		if (memcmp("OFFSET(printk_log.ts_nsec)=", pos, 27) == 0)
+			log_offset_ts_nsec = strtoull(pos + 27, NULL, 10);
 
 		if (memcmp("OFFSET(log.len)=", pos, 16) == 0)
 			log_offset_len = strtoul(pos + 16, NULL, 10);
+		if (memcmp("OFFSET(printk_log.len)=", pos, 23) == 0)
+			log_offset_len = strtoul(pos + 23, NULL, 10);
 
 		if (memcmp("OFFSET(log.text_len)=", pos, 21) == 0)
 			log_offset_text_len = strtoul(pos + 21, NULL, 10);
+		if (memcmp("OFFSET(printk_log.text_len)=", pos, 28) == 0)
+			log_offset_text_len = strtoul(pos + 28, NULL, 10);
 
 		if (last_line)
 			break;
-- 
1.7.1


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [RESEND PATCH] vmcore-dmesg: Understand >= v3.11-rc4 dmesg
  2013-09-18 12:21 [RESEND PATCH] vmcore-dmesg: Understand >= v3.11-rc4 dmesg Lubomir Rintel
@ 2013-09-19 14:38 ` Dave Young
  2013-09-19 14:49   ` [PATCH v2] " Lubomir Rintel
  0 siblings, 1 reply; 16+ messages in thread
From: Dave Young @ 2013-09-19 14:38 UTC (permalink / raw)
  To: Lubomir Rintel; +Cc: Joe Perches, Simon Horman, kexec, Vivek Goyal

On 09/18/13 at 02:21pm, Lubomir Rintel wrote:
> Symbol name changed with the following commit:
> 62e32ac printk: rename struct log to struct printk_log
> 
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> Cc: Simon Horman <horms@verge.net.au>
> Cc: Vivek Goyal <vgoyal@redhat.com>
> Cc: Joe Perches <joe@perches.com>
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> ---
> 
> I believe this can now be applied, as the change went into 3.11 kernel release.
> Thank you!

It works for me, thanks.

But there's still a minor issue, can you also update other
comments besides of SIZEOF(log)? I think it's better to mention that
log has been renamed printk_log since 3.11 kernel.

> 
>  vmcore-dmesg/vmcore-dmesg.c |   10 +++++++++-
>  1 files changed, 9 insertions(+), 1 deletions(-)
> 
> diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c
> index 0f477c0..bfc19e9 100644
> --- a/vmcore-dmesg/vmcore-dmesg.c
> +++ b/vmcore-dmesg/vmcore-dmesg.c
> @@ -324,19 +324,27 @@ static void scan_vmcoreinfo(char *start, size_t size)
>  			*symbol[i].vaddr = vaddr;
>  		}
>  
> -		/* Check for "SIZE(log)=" */
> +		/* Check for "SIZE(printk_log)" or older "SIZE(log)=" */
>  		if (memcmp("SIZE(log)=", pos, 10) == 0)
>  			log_sz = strtoull(pos + 10, NULL, 10);
> +		if (memcmp("SIZE(printk_log)=", pos, 17) == 0)
> +			log_sz = strtoull(pos + 17, NULL, 10);
>  
>  		/* Check for struct log field offsets */
>  		if (memcmp("OFFSET(log.ts_nsec)=", pos, 20) == 0)
>  			log_offset_ts_nsec = strtoull(pos + 20, NULL, 10);
> +		if (memcmp("OFFSET(printk_log.ts_nsec)=", pos, 27) == 0)
> +			log_offset_ts_nsec = strtoull(pos + 27, NULL, 10);
>  
>  		if (memcmp("OFFSET(log.len)=", pos, 16) == 0)
>  			log_offset_len = strtoul(pos + 16, NULL, 10);
> +		if (memcmp("OFFSET(printk_log.len)=", pos, 23) == 0)
> +			log_offset_len = strtoul(pos + 23, NULL, 10);
>  
>  		if (memcmp("OFFSET(log.text_len)=", pos, 21) == 0)
>  			log_offset_text_len = strtoul(pos + 21, NULL, 10);
> +		if (memcmp("OFFSET(printk_log.text_len)=", pos, 28) == 0)
> +			log_offset_text_len = strtoul(pos + 28, NULL, 10);
>  
>  		if (last_line)
>  			break;
> -- 
> 1.7.1
> 
> 
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2] vmcore-dmesg: Understand >= v3.11-rc4 dmesg
  2013-09-19 14:38 ` Dave Young
@ 2013-09-19 14:49   ` Lubomir Rintel
  2013-09-20  1:50     ` Dave Young
                       ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Lubomir Rintel @ 2013-09-19 14:49 UTC (permalink / raw)
  To: kexec; +Cc: Joe Perches, Lubomir Rintel, Simon Horman, Dave Young,
	Vivek Goyal

Symbol name changed with the following commit:
62e32ac printk: rename struct log to struct printk_log

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Cc: Simon Horman <horms@verge.net.au>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Joe Perches <joe@perches.com>
Cc: Dave Young <dyoung@redhat.com>
---

Changes for v2:
  * Clarified printk_log vs. log in some comments.

 vmcore-dmesg/vmcore-dmesg.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c
index 0f477c0..dd222cd 100644
--- a/vmcore-dmesg/vmcore-dmesg.c
+++ b/vmcore-dmesg/vmcore-dmesg.c
@@ -34,10 +34,10 @@ static loff_t logged_chars_vaddr;
 static loff_t log_first_idx_vaddr;
 static loff_t log_next_idx_vaddr;
 
-/* struct log size */
+/* struct printk_log (or older log) size */
 static uint64_t log_sz;
 
-/* struct log field offsets */
+/* struct printk_log (or older log) field offsets */
 static uint64_t log_offset_ts_nsec = UINT64_MAX;
 static uint16_t log_offset_len = UINT16_MAX;
 static uint16_t log_offset_text_len = UINT16_MAX;
@@ -324,19 +324,27 @@ static void scan_vmcoreinfo(char *start, size_t size)
 			*symbol[i].vaddr = vaddr;
 		}
 
-		/* Check for "SIZE(log)=" */
+		/* Check for "SIZE(printk_log)" or older "SIZE(log)=" */
 		if (memcmp("SIZE(log)=", pos, 10) == 0)
 			log_sz = strtoull(pos + 10, NULL, 10);
+		if (memcmp("SIZE(printk_log)=", pos, 17) == 0)
+			log_sz = strtoull(pos + 17, NULL, 10);
 
-		/* Check for struct log field offsets */
+		/* Check for struct printk_log (or older log) field offsets */
 		if (memcmp("OFFSET(log.ts_nsec)=", pos, 20) == 0)
 			log_offset_ts_nsec = strtoull(pos + 20, NULL, 10);
+		if (memcmp("OFFSET(printk_log.ts_nsec)=", pos, 27) == 0)
+			log_offset_ts_nsec = strtoull(pos + 27, NULL, 10);
 
 		if (memcmp("OFFSET(log.len)=", pos, 16) == 0)
 			log_offset_len = strtoul(pos + 16, NULL, 10);
+		if (memcmp("OFFSET(printk_log.len)=", pos, 23) == 0)
+			log_offset_len = strtoul(pos + 23, NULL, 10);
 
 		if (memcmp("OFFSET(log.text_len)=", pos, 21) == 0)
 			log_offset_text_len = strtoul(pos + 21, NULL, 10);
+		if (memcmp("OFFSET(printk_log.text_len)=", pos, 28) == 0)
+			log_offset_text_len = strtoul(pos + 28, NULL, 10);
 
 		if (last_line)
 			break;
-- 
1.7.1


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH v2] vmcore-dmesg: Understand >= v3.11-rc4 dmesg
  2013-09-19 14:49   ` [PATCH v2] " Lubomir Rintel
@ 2013-09-20  1:50     ` Dave Young
  2013-09-20  1:55       ` Joe Perches
  2013-09-23 17:03     ` Vivek Goyal
  2013-10-30  3:12     ` WANG Chao
  2 siblings, 1 reply; 16+ messages in thread
From: Dave Young @ 2013-09-20  1:50 UTC (permalink / raw)
  To: Lubomir Rintel; +Cc: Joe Perches, Simon Horman, kexec, Vivek Goyal

On 09/19/13 at 04:49pm, Lubomir Rintel wrote:
> Symbol name changed with the following commit:
> 62e32ac printk: rename struct log to struct printk_log
> 
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> Cc: Simon Horman <horms@verge.net.au>
> Cc: Vivek Goyal <vgoyal@redhat.com>
> Cc: Joe Perches <joe@perches.com>
> Cc: Dave Young <dyoung@redhat.com>
> ---

Acked-by: Dave Young <dyoung@redhat.com>


> 
> Changes for v2:
>   * Clarified printk_log vs. log in some comments.
> 
>  vmcore-dmesg/vmcore-dmesg.c |   16 ++++++++++++----
>  1 files changed, 12 insertions(+), 4 deletions(-)
> 
> diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c
> index 0f477c0..dd222cd 100644
> --- a/vmcore-dmesg/vmcore-dmesg.c
> +++ b/vmcore-dmesg/vmcore-dmesg.c
> @@ -34,10 +34,10 @@ static loff_t logged_chars_vaddr;
>  static loff_t log_first_idx_vaddr;
>  static loff_t log_next_idx_vaddr;
>  
> -/* struct log size */
> +/* struct printk_log (or older log) size */
>  static uint64_t log_sz;
>  
> -/* struct log field offsets */
> +/* struct printk_log (or older log) field offsets */
>  static uint64_t log_offset_ts_nsec = UINT64_MAX;
>  static uint16_t log_offset_len = UINT16_MAX;
>  static uint16_t log_offset_text_len = UINT16_MAX;
> @@ -324,19 +324,27 @@ static void scan_vmcoreinfo(char *start, size_t size)
>  			*symbol[i].vaddr = vaddr;
>  		}
>  
> -		/* Check for "SIZE(log)=" */
> +		/* Check for "SIZE(printk_log)" or older "SIZE(log)=" */
>  		if (memcmp("SIZE(log)=", pos, 10) == 0)
>  			log_sz = strtoull(pos + 10, NULL, 10);
> +		if (memcmp("SIZE(printk_log)=", pos, 17) == 0)
> +			log_sz = strtoull(pos + 17, NULL, 10);
>  
> -		/* Check for struct log field offsets */
> +		/* Check for struct printk_log (or older log) field offsets */
>  		if (memcmp("OFFSET(log.ts_nsec)=", pos, 20) == 0)
>  			log_offset_ts_nsec = strtoull(pos + 20, NULL, 10);
> +		if (memcmp("OFFSET(printk_log.ts_nsec)=", pos, 27) == 0)
> +			log_offset_ts_nsec = strtoull(pos + 27, NULL, 10);
>  
>  		if (memcmp("OFFSET(log.len)=", pos, 16) == 0)
>  			log_offset_len = strtoul(pos + 16, NULL, 10);
> +		if (memcmp("OFFSET(printk_log.len)=", pos, 23) == 0)
> +			log_offset_len = strtoul(pos + 23, NULL, 10);
>  
>  		if (memcmp("OFFSET(log.text_len)=", pos, 21) == 0)
>  			log_offset_text_len = strtoul(pos + 21, NULL, 10);
> +		if (memcmp("OFFSET(printk_log.text_len)=", pos, 28) == 0)
> +			log_offset_text_len = strtoul(pos + 28, NULL, 10);
>  
>  		if (last_line)
>  			break;
> -- 
> 1.7.1
> 

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2] vmcore-dmesg: Understand >= v3.11-rc4 dmesg
  2013-09-20  1:50     ` Dave Young
@ 2013-09-20  1:55       ` Joe Perches
  2013-09-20  7:40         ` Dave Young
  0 siblings, 1 reply; 16+ messages in thread
From: Joe Perches @ 2013-09-20  1:55 UTC (permalink / raw)
  To: Dave Young; +Cc: Lubomir Rintel, Simon Horman, kexec, Vivek Goyal

On Fri, 2013-09-20 at 09:50 +0800, Dave Young wrote:
> On 09/19/13 at 04:49pm, Lubomir Rintel wrote:
> > Symbol name changed with the following commit:
> > 62e32ac printk: rename struct log to struct printk_log
> > 
> > Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> > Cc: Simon Horman <horms@verge.net.au>
> > Cc: Vivek Goyal <vgoyal@redhat.com>
> > Cc: Joe Perches <joe@perches.com>
> > Cc: Dave Young <dyoung@redhat.com>
> > ---
> 
> Acked-by: Dave Young <dyoung@redhat.com>

It might be nice if there was a reference somewhere in
the linux kernel source tree to whatever it is that this
patch modifies.



_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2] vmcore-dmesg: Understand >= v3.11-rc4 dmesg
  2013-09-20  1:55       ` Joe Perches
@ 2013-09-20  7:40         ` Dave Young
  0 siblings, 0 replies; 16+ messages in thread
From: Dave Young @ 2013-09-20  7:40 UTC (permalink / raw)
  To: Joe Perches; +Cc: Lubomir Rintel, Simon Horman, kexec, Vivek Goyal

On 09/19/13 at 06:55pm, Joe Perches wrote:
> On Fri, 2013-09-20 at 09:50 +0800, Dave Young wrote:
> > On 09/19/13 at 04:49pm, Lubomir Rintel wrote:
> > > Symbol name changed with the following commit:
> > > 62e32ac printk: rename struct log to struct printk_log
> > > 
> > > Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> > > Cc: Simon Horman <horms@verge.net.au>
> > > Cc: Vivek Goyal <vgoyal@redhat.com>
> > > Cc: Joe Perches <joe@perches.com>
> > > Cc: Dave Young <dyoung@redhat.com>
> > > ---
> > 
> > Acked-by: Dave Young <dyoung@redhat.com>
> 
> It might be nice if there was a reference somewhere in
> the linux kernel source tree to whatever it is that this
> patch modifies.
> 

Agree with you, it will be better to add the info in comment. 

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2] vmcore-dmesg: Understand >= v3.11-rc4 dmesg
  2013-09-19 14:49   ` [PATCH v2] " Lubomir Rintel
  2013-09-20  1:50     ` Dave Young
@ 2013-09-23 17:03     ` Vivek Goyal
  2013-10-30  3:12     ` WANG Chao
  2 siblings, 0 replies; 16+ messages in thread
From: Vivek Goyal @ 2013-09-23 17:03 UTC (permalink / raw)
  To: Lubomir Rintel; +Cc: Joe Perches, Dave Young, Simon Horman, kexec

On Thu, Sep 19, 2013 at 04:49:46PM +0200, Lubomir Rintel wrote:
> Symbol name changed with the following commit:
> 62e32ac printk: rename struct log to struct printk_log
> 
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> Cc: Simon Horman <horms@verge.net.au>
> Cc: Vivek Goyal <vgoyal@redhat.com>
> Cc: Joe Perches <joe@perches.com>
> Cc: Dave Young <dyoung@redhat.com>
> ---

Looks good to me. Agreed that let us put kernel verion number in
changelog since this change became effective.

Acked-by: Vivek Goyal <vgoyal@redhat.com>

Vivek

> 
> Changes for v2:
>   * Clarified printk_log vs. log in some comments.
> 
>  vmcore-dmesg/vmcore-dmesg.c |   16 ++++++++++++----
>  1 files changed, 12 insertions(+), 4 deletions(-)
> 
> diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c
> index 0f477c0..dd222cd 100644
> --- a/vmcore-dmesg/vmcore-dmesg.c
> +++ b/vmcore-dmesg/vmcore-dmesg.c
> @@ -34,10 +34,10 @@ static loff_t logged_chars_vaddr;
>  static loff_t log_first_idx_vaddr;
>  static loff_t log_next_idx_vaddr;
>  
> -/* struct log size */
> +/* struct printk_log (or older log) size */
>  static uint64_t log_sz;
>  
> -/* struct log field offsets */
> +/* struct printk_log (or older log) field offsets */
>  static uint64_t log_offset_ts_nsec = UINT64_MAX;
>  static uint16_t log_offset_len = UINT16_MAX;
>  static uint16_t log_offset_text_len = UINT16_MAX;
> @@ -324,19 +324,27 @@ static void scan_vmcoreinfo(char *start, size_t size)
>  			*symbol[i].vaddr = vaddr;
>  		}
>  
> -		/* Check for "SIZE(log)=" */
> +		/* Check for "SIZE(printk_log)" or older "SIZE(log)=" */
>  		if (memcmp("SIZE(log)=", pos, 10) == 0)
>  			log_sz = strtoull(pos + 10, NULL, 10);
> +		if (memcmp("SIZE(printk_log)=", pos, 17) == 0)
> +			log_sz = strtoull(pos + 17, NULL, 10);
>  
> -		/* Check for struct log field offsets */
> +		/* Check for struct printk_log (or older log) field offsets */
>  		if (memcmp("OFFSET(log.ts_nsec)=", pos, 20) == 0)
>  			log_offset_ts_nsec = strtoull(pos + 20, NULL, 10);
> +		if (memcmp("OFFSET(printk_log.ts_nsec)=", pos, 27) == 0)
> +			log_offset_ts_nsec = strtoull(pos + 27, NULL, 10);
>  
>  		if (memcmp("OFFSET(log.len)=", pos, 16) == 0)
>  			log_offset_len = strtoul(pos + 16, NULL, 10);
> +		if (memcmp("OFFSET(printk_log.len)=", pos, 23) == 0)
> +			log_offset_len = strtoul(pos + 23, NULL, 10);
>  
>  		if (memcmp("OFFSET(log.text_len)=", pos, 21) == 0)
>  			log_offset_text_len = strtoul(pos + 21, NULL, 10);
> +		if (memcmp("OFFSET(printk_log.text_len)=", pos, 28) == 0)
> +			log_offset_text_len = strtoul(pos + 28, NULL, 10);
>  
>  		if (last_line)
>  			break;
> -- 
> 1.7.1

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2] vmcore-dmesg: Understand >= v3.11-rc4 dmesg
  2013-09-19 14:49   ` [PATCH v2] " Lubomir Rintel
  2013-09-20  1:50     ` Dave Young
  2013-09-23 17:03     ` Vivek Goyal
@ 2013-10-30  3:12     ` WANG Chao
  2013-10-30 17:06       ` Lubomir Rintel
  2 siblings, 1 reply; 16+ messages in thread
From: WANG Chao @ 2013-10-30  3:12 UTC (permalink / raw)
  To: Lubomir Rintel; +Cc: Joe Perches, Dave Young, Simon Horman, kexec, Vivek Goyal

On 09/19/13 at 04:49pm, Lubomir Rintel wrote:
> Symbol name changed with the following commit:
> 62e32ac printk: rename struct log to struct printk_log
> 
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> Cc: Simon Horman <horms@verge.net.au>
> Cc: Vivek Goyal <vgoyal@redhat.com>
> Cc: Joe Perches <joe@perches.com>
> Cc: Dave Young <dyoung@redhat.com>
> ---

Hi,

vmcore-dmesg is really broken here since 3.11 kernel is released. Are
you going to send an update v3 to address the comments to v2 from Vivek,
Joe and Dave

Thanks
WANG Chao

> 
> Changes for v2:
>   * Clarified printk_log vs. log in some comments.
> 
>  vmcore-dmesg/vmcore-dmesg.c |   16 ++++++++++++----
>  1 files changed, 12 insertions(+), 4 deletions(-)
> 
> diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c
> index 0f477c0..dd222cd 100644
> --- a/vmcore-dmesg/vmcore-dmesg.c
> +++ b/vmcore-dmesg/vmcore-dmesg.c
> @@ -34,10 +34,10 @@ static loff_t logged_chars_vaddr;
>  static loff_t log_first_idx_vaddr;
>  static loff_t log_next_idx_vaddr;
>  
> -/* struct log size */
> +/* struct printk_log (or older log) size */
>  static uint64_t log_sz;
>  
> -/* struct log field offsets */
> +/* struct printk_log (or older log) field offsets */
>  static uint64_t log_offset_ts_nsec = UINT64_MAX;
>  static uint16_t log_offset_len = UINT16_MAX;
>  static uint16_t log_offset_text_len = UINT16_MAX;
> @@ -324,19 +324,27 @@ static void scan_vmcoreinfo(char *start, size_t size)
>  			*symbol[i].vaddr = vaddr;
>  		}
>  
> -		/* Check for "SIZE(log)=" */
> +		/* Check for "SIZE(printk_log)" or older "SIZE(log)=" */
>  		if (memcmp("SIZE(log)=", pos, 10) == 0)
>  			log_sz = strtoull(pos + 10, NULL, 10);
> +		if (memcmp("SIZE(printk_log)=", pos, 17) == 0)
> +			log_sz = strtoull(pos + 17, NULL, 10);
>  
> -		/* Check for struct log field offsets */
> +		/* Check for struct printk_log (or older log) field offsets */
>  		if (memcmp("OFFSET(log.ts_nsec)=", pos, 20) == 0)
>  			log_offset_ts_nsec = strtoull(pos + 20, NULL, 10);
> +		if (memcmp("OFFSET(printk_log.ts_nsec)=", pos, 27) == 0)
> +			log_offset_ts_nsec = strtoull(pos + 27, NULL, 10);
>  
>  		if (memcmp("OFFSET(log.len)=", pos, 16) == 0)
>  			log_offset_len = strtoul(pos + 16, NULL, 10);
> +		if (memcmp("OFFSET(printk_log.len)=", pos, 23) == 0)
> +			log_offset_len = strtoul(pos + 23, NULL, 10);
>  
>  		if (memcmp("OFFSET(log.text_len)=", pos, 21) == 0)
>  			log_offset_text_len = strtoul(pos + 21, NULL, 10);
> +		if (memcmp("OFFSET(printk_log.text_len)=", pos, 28) == 0)
> +			log_offset_text_len = strtoul(pos + 28, NULL, 10);
>  
>  		if (last_line)
>  			break;
> -- 
> 1.7.1
> 
> 
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2] vmcore-dmesg: Understand >= v3.11-rc4 dmesg
  2013-10-30  3:12     ` WANG Chao
@ 2013-10-30 17:06       ` Lubomir Rintel
  2013-10-31  0:34         ` Taras Kondratiuk
  2013-10-31  5:38         ` WANG Chao
  0 siblings, 2 replies; 16+ messages in thread
From: Lubomir Rintel @ 2013-10-30 17:06 UTC (permalink / raw)
  To: WANG Chao; +Cc: Joe Perches, Dave Young, Simon Horman, kexec, Vivek Goyal

Hi,

On Wed, 2013-10-30 at 11:12 +0800, WANG Chao wrote:
> On 09/19/13 at 04:49pm, Lubomir Rintel wrote:
> > Symbol name changed with the following commit:
> > 62e32ac printk: rename struct log to struct printk_log
...
> vmcore-dmesg is really broken here since 3.11 kernel is released. Are
> you going to send an update v3 to address the comments to v2 from Vivek,
> Joe and Dave

I'm not really sure. I thought the suggestions were concerning the Linux
kernel tree, not kexec-tools tree. I might be wrong though, but I'd need
the suggestions to be a bit more specific for me to understand.

Lubo


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2] vmcore-dmesg: Understand >= v3.11-rc4 dmesg
  2013-10-30 17:06       ` Lubomir Rintel
@ 2013-10-31  0:34         ` Taras Kondratiuk
  2013-10-31  5:38         ` WANG Chao
  1 sibling, 0 replies; 16+ messages in thread
From: Taras Kondratiuk @ 2013-10-31  0:34 UTC (permalink / raw)
  To: Lubomir Rintel, WANG Chao
  Cc: Joe Perches, kexec, Simon Horman, Dave Young, Vivek Goyal

On 10/30/2013 10:06 AM, Lubomir Rintel wrote:
> Hi,
> 
> On Wed, 2013-10-30 at 11:12 +0800, WANG Chao wrote:
>> On 09/19/13 at 04:49pm, Lubomir Rintel wrote:
>>> Symbol name changed with the following commit:
>>> 62e32ac printk: rename struct log to struct printk_log
> ...
>> vmcore-dmesg is really broken here since 3.11 kernel is released. Are
>> you going to send an update v3 to address the comments to v2 from Vivek,
>> Joe and Dave
> 
> I'm not really sure. I thought the suggestions were concerning the Linux
> kernel tree, not kexec-tools tree. I might be wrong though, but I'd need
> the suggestions to be a bit more specific for me to understand.
> 

Hi

I've posted a bit different version of fix [1].
Could you please check out that approach?

[1] http://permalink.gmane.org/gmane.linux.kernel.kexec/9522

-- 
Taras Kondratiuk

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2] vmcore-dmesg: Understand >= v3.11-rc4 dmesg
  2013-10-30 17:06       ` Lubomir Rintel
  2013-10-31  0:34         ` Taras Kondratiuk
@ 2013-10-31  5:38         ` WANG Chao
  2013-10-31  6:18           ` WANG Chao
  2013-10-31  6:20           ` Simon Horman
  1 sibling, 2 replies; 16+ messages in thread
From: WANG Chao @ 2013-10-31  5:38 UTC (permalink / raw)
  To: Lubomir Rintel, Simon Horman
  Cc: Joe Perches, Dave Young, Simon Horman, kexec, Vivek Goyal

On 10/30/13 at 06:06pm, Lubomir Rintel wrote:
> Hi,
> 
> On Wed, 2013-10-30 at 11:12 +0800, WANG Chao wrote:
> > On 09/19/13 at 04:49pm, Lubomir Rintel wrote:
> > > Symbol name changed with the following commit:
> > > 62e32ac printk: rename struct log to struct printk_log
> ...
> > vmcore-dmesg is really broken here since 3.11 kernel is released. Are
> > you going to send an update v3 to address the comments to v2 from Vivek,
> > Joe and Dave
> 
> I'm not really sure. I thought the suggestions were concerning the Linux
> kernel tree, not kexec-tools tree. I might be wrong though, but I'd need
> the suggestions to be a bit more specific for me to understand.

That wouldn't be your concern any more. I think your patch is fine.
Thank you for fix.

Hi Simon,

Will you pick up this patch? Vivek and Dave has acked this patch.
And also this patch works for me.

Thanks
WANG Chao

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2] vmcore-dmesg: Understand >= v3.11-rc4 dmesg
  2013-10-31  5:38         ` WANG Chao
@ 2013-10-31  6:18           ` WANG Chao
  2013-10-31  6:20           ` Simon Horman
  1 sibling, 0 replies; 16+ messages in thread
From: WANG Chao @ 2013-10-31  6:18 UTC (permalink / raw)
  To: Lubomir Rintel, Simon Horman; +Cc: Joe Perches, Dave Young, kexec, Vivek Goyal

On 10/31/13 at 01:38pm, WANG Chao wrote:
> On 10/30/13 at 06:06pm, Lubomir Rintel wrote:
> > Hi,
> > 
> > On Wed, 2013-10-30 at 11:12 +0800, WANG Chao wrote:
> > > On 09/19/13 at 04:49pm, Lubomir Rintel wrote:
> > > > Symbol name changed with the following commit:
> > > > 62e32ac printk: rename struct log to struct printk_log
> > ...
> > > vmcore-dmesg is really broken here since 3.11 kernel is released. Are
> > > you going to send an update v3 to address the comments to v2 from Vivek,
> > > Joe and Dave
> > 
> > I'm not really sure. I thought the suggestions were concerning the Linux
> > kernel tree, not kexec-tools tree. I might be wrong though, but I'd need
> > the suggestions to be a bit more specific for me to understand.
> 
> That wouldn't be your concern any more.

Hi, Lubomir,

I'm sorry. I was told that this phrase is not friendly and nearly rude.
By that I realy mean I think your patch has no problem and you don't
need to concern what I brought up in my first email.

I'm not a native speaker and that was not my intention. I should have
choosed my words more carefully. Sorry again.

Thanks
WANG Chao

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2] vmcore-dmesg: Understand >= v3.11-rc4 dmesg
  2013-10-31  5:38         ` WANG Chao
  2013-10-31  6:18           ` WANG Chao
@ 2013-10-31  6:20           ` Simon Horman
  2013-10-31 16:42             ` Taras Kondratiuk
  1 sibling, 1 reply; 16+ messages in thread
From: Simon Horman @ 2013-10-31  6:20 UTC (permalink / raw)
  To: WANG Chao; +Cc: Joe Perches, Lubomir Rintel, Dave Young, kexec, Vivek Goyal

On Thu, Oct 31, 2013 at 01:38:08PM +0800, WANG Chao wrote:
> On 10/30/13 at 06:06pm, Lubomir Rintel wrote:
> > Hi,
> > 
> > On Wed, 2013-10-30 at 11:12 +0800, WANG Chao wrote:
> > > On 09/19/13 at 04:49pm, Lubomir Rintel wrote:
> > > > Symbol name changed with the following commit:
> > > > 62e32ac printk: rename struct log to struct printk_log
> > ...
> > > vmcore-dmesg is really broken here since 3.11 kernel is released. Are
> > > you going to send an update v3 to address the comments to v2 from Vivek,
> > > Joe and Dave
> > 
> > I'm not really sure. I thought the suggestions were concerning the Linux
> > kernel tree, not kexec-tools tree. I might be wrong though, but I'd need
> > the suggestions to be a bit more specific for me to understand.
> 
> That wouldn't be your concern any more. I think your patch is fine.
> Thank you for fix.
> 
> Hi Simon,
> 
> Will you pick up this patch? Vivek and Dave has acked this patch.
> And also this patch works for me.

Sure. Please repost it with the Acks.

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2] vmcore-dmesg: Understand >= v3.11-rc4 dmesg
  2013-10-31  6:20           ` Simon Horman
@ 2013-10-31 16:42             ` Taras Kondratiuk
  2013-11-01  0:32               ` Simon Horman
  2014-05-22 13:51               ` Vivek Goyal
  0 siblings, 2 replies; 16+ messages in thread
From: Taras Kondratiuk @ 2013-10-31 16:42 UTC (permalink / raw)
  To: Simon Horman, WANG Chao
  Cc: Joe Perches, Lubomir Rintel, Dave Young, kexec, Vivek Goyal

On 10/30/2013 11:20 PM, Simon Horman wrote:
> On Thu, Oct 31, 2013 at 01:38:08PM +0800, WANG Chao wrote:
>> On 10/30/13 at 06:06pm, Lubomir Rintel wrote:
>>> Hi,
>>>
>>> On Wed, 2013-10-30 at 11:12 +0800, WANG Chao wrote:
>>>> On 09/19/13 at 04:49pm, Lubomir Rintel wrote:
>>>>> Symbol name changed with the following commit:
>>>>> 62e32ac printk: rename struct log to struct printk_log
>>> ...
>>>> vmcore-dmesg is really broken here since 3.11 kernel is released. Are
>>>> you going to send an update v3 to address the comments to v2 from Vivek,
>>>> Joe and Dave
>>>
>>> I'm not really sure. I thought the suggestions were concerning the Linux
>>> kernel tree, not kexec-tools tree. I might be wrong though, but I'd need
>>> the suggestions to be a bit more specific for me to understand.
>>
>> That wouldn't be your concern any more. I think your patch is fine.
>> Thank you for fix.
>>
>> Hi Simon,
>>
>> Will you pick up this patch? Vivek and Dave has acked this patch.
>> And also this patch works for me.
> 
> Sure. Please repost it with the Acks.

I have concerns about this patch.
There were a lot of hardcoded lenght values in the original code.
Now there are twice as much and we need to keep adding hardcoded
values if any additional parameter should be read of renamed.

Please eveluate this patch [1]. It should remove both:
hardcoded values and duplicated reading for two buffer names.

[1] http://permalink.gmane.org/gmane.linux.kernel.kexec/9522

-- 
Taras Kondratiuk

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2] vmcore-dmesg: Understand >= v3.11-rc4 dmesg
  2013-10-31 16:42             ` Taras Kondratiuk
@ 2013-11-01  0:32               ` Simon Horman
  2014-05-22 13:51               ` Vivek Goyal
  1 sibling, 0 replies; 16+ messages in thread
From: Simon Horman @ 2013-11-01  0:32 UTC (permalink / raw)
  To: Taras Kondratiuk
  Cc: kexec, Lubomir Rintel, Vivek Goyal, Joe Perches, Dave Young,
	WANG Chao

On Thu, Oct 31, 2013 at 09:42:32AM -0700, Taras Kondratiuk wrote:
> On 10/30/2013 11:20 PM, Simon Horman wrote:
> > On Thu, Oct 31, 2013 at 01:38:08PM +0800, WANG Chao wrote:
> >> On 10/30/13 at 06:06pm, Lubomir Rintel wrote:
> >>> Hi,
> >>>
> >>> On Wed, 2013-10-30 at 11:12 +0800, WANG Chao wrote:
> >>>> On 09/19/13 at 04:49pm, Lubomir Rintel wrote:
> >>>>> Symbol name changed with the following commit:
> >>>>> 62e32ac printk: rename struct log to struct printk_log
> >>> ...
> >>>> vmcore-dmesg is really broken here since 3.11 kernel is released. Are
> >>>> you going to send an update v3 to address the comments to v2 from Vivek,
> >>>> Joe and Dave
> >>>
> >>> I'm not really sure. I thought the suggestions were concerning the Linux
> >>> kernel tree, not kexec-tools tree. I might be wrong though, but I'd need
> >>> the suggestions to be a bit more specific for me to understand.
> >>
> >> That wouldn't be your concern any more. I think your patch is fine.
> >> Thank you for fix.
> >>
> >> Hi Simon,
> >>
> >> Will you pick up this patch? Vivek and Dave has acked this patch.
> >> And also this patch works for me.
> > 
> > Sure. Please repost it with the Acks.
> 
> I have concerns about this patch.
> There were a lot of hardcoded lenght values in the original code.
> Now there are twice as much and we need to keep adding hardcoded
> values if any additional parameter should be read of renamed.
> 
> Please eveluate this patch [1]. It should remove both:
> hardcoded values and duplicated reading for two buffer names.
> 
> [1] http://permalink.gmane.org/gmane.linux.kernel.kexec/9522

Please repost the patch.

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2] vmcore-dmesg: Understand >= v3.11-rc4 dmesg
  2013-10-31 16:42             ` Taras Kondratiuk
  2013-11-01  0:32               ` Simon Horman
@ 2014-05-22 13:51               ` Vivek Goyal
  1 sibling, 0 replies; 16+ messages in thread
From: Vivek Goyal @ 2014-05-22 13:51 UTC (permalink / raw)
  To: Taras Kondratiuk
  Cc: kexec, Lubomir Rintel, Simon Horman, Joe Perches, Dave Young,
	WANG Chao

On Thu, Oct 31, 2013 at 09:42:32AM -0700, Taras Kondratiuk wrote:

[..]

This patch has not gone it for quite some time and vmcore-dmesg continues
to fail for me with upstream kernels. So it is time to do something
about it.

> I have concerns about this patch.
> There were a lot of hardcoded lenght values in the original code.

One can easily fix that by using strlen().

> Now there are twice as much and we need to keep adding hardcoded
> values if any additional parameter should be read of renamed.
> 
> Please eveluate this patch [1]. It should remove both:
> hardcoded values and duplicated reading for two buffer names.

I don't like excessive usage of macros. And in your patch you are
using nested marcros.

While it might make look code smaller, readability of code becomes
a problem. 

So I personally like simpler approach. And please use strlen() for
fixing the hardcoding of length issue.

Thanks
Vivek

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2014-05-22 13:51 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-18 12:21 [RESEND PATCH] vmcore-dmesg: Understand >= v3.11-rc4 dmesg Lubomir Rintel
2013-09-19 14:38 ` Dave Young
2013-09-19 14:49   ` [PATCH v2] " Lubomir Rintel
2013-09-20  1:50     ` Dave Young
2013-09-20  1:55       ` Joe Perches
2013-09-20  7:40         ` Dave Young
2013-09-23 17:03     ` Vivek Goyal
2013-10-30  3:12     ` WANG Chao
2013-10-30 17:06       ` Lubomir Rintel
2013-10-31  0:34         ` Taras Kondratiuk
2013-10-31  5:38         ` WANG Chao
2013-10-31  6:18           ` WANG Chao
2013-10-31  6:20           ` Simon Horman
2013-10-31 16:42             ` Taras Kondratiuk
2013-11-01  0:32               ` Simon Horman
2014-05-22 13:51               ` Vivek Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox