linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH] tools/bootconfig: Fix a compilation issue with missing variable
@ 2021-09-07 23:07 Punit Agrawal
  2021-09-08  0:13 ` Masami Hiramatsu
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Punit Agrawal @ 2021-09-07 23:07 UTC (permalink / raw)
  To: mhiramat; +Cc: linux-kernel, Punit Agrawal, Steven Rostedt

While looking to build bootconfig tool in order to debug a kernel boot
time issue I noticed that tool fails to compile. The broken changes
were introduced by commit e5efaeb8a8f5 ("bootconfig: Support mixing a
value and subkeys under a key").

Fix the compile issue by introducing a "ret" variable to track the
return value from xbc_node_compose_key().

Fixes: e5efaeb8a8f5 ("bootconfig: Support mixing a value and subkeys under a key")
Signed-off-by: Punit Agrawal <punitagrawal@gmail.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
---

(Apologies for the resend. I fat-fingered the email address for lkml)

Hi Masami,

I am not sure what went wrong but the patch in the lore link[0]
doesn't match the end result (bad merge?). You may want to recheck the
other changes to make sure it all looks sane.

Regards,
Punit

[0] https://lkml.kernel.org/r/162262194685.264090.7738574774030567419.stgit@devnote2
---
 tools/bootconfig/main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c
index f45fa992e01d..fd67496a947f 100644
--- a/tools/bootconfig/main.c
+++ b/tools/bootconfig/main.c
@@ -111,9 +111,11 @@ static void xbc_show_list(void)
 	char key[XBC_KEYLEN_MAX];
 	struct xbc_node *leaf;
 	const char *val;
+	int ret;
 
 	xbc_for_each_key_value(leaf, val) {
-		if (xbc_node_compose_key(leaf, key, XBC_KEYLEN_MAX) < 0) {
+		ret = xbc_node_compose_key(leaf, key, XBC_KEYLEN_MAX);
+		if (ret < 0) {
 			fprintf(stderr, "Failed to compose key %d\n", ret);
 			break;
 		}
-- 
2.32.0


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

* Re: [RESEND PATCH] tools/bootconfig: Fix a compilation issue with missing variable
  2021-09-07 23:07 [RESEND PATCH] tools/bootconfig: Fix a compilation issue with missing variable Punit Agrawal
@ 2021-09-08  0:13 ` Masami Hiramatsu
  2021-09-08  0:27   ` Steven Rostedt
  2021-09-08  0:34   ` Masami Hiramatsu
  2021-09-08  0:24 ` Steven Rostedt
  2021-09-08  0:44 ` Steven Rostedt
  2 siblings, 2 replies; 9+ messages in thread
From: Masami Hiramatsu @ 2021-09-08  0:13 UTC (permalink / raw)
  To: Punit Agrawal; +Cc: linux-kernel, Steven Rostedt

Hi Punit,

This has been fixed by Julio's patch and we are waiting for merge.

https://lore.kernel.org/all/20210831033256.5973-1-jcfaracco@gmail.com/T/#u

Thank you,

On Wed,  8 Sep 2021 08:07:10 +0900
Punit Agrawal <punitagrawal@gmail.com> wrote:

> While looking to build bootconfig tool in order to debug a kernel boot
> time issue I noticed that tool fails to compile. The broken changes
> were introduced by commit e5efaeb8a8f5 ("bootconfig: Support mixing a
> value and subkeys under a key").
> 
> Fix the compile issue by introducing a "ret" variable to track the
> return value from xbc_node_compose_key().
> 
> Fixes: e5efaeb8a8f5 ("bootconfig: Support mixing a value and subkeys under a key")
> Signed-off-by: Punit Agrawal <punitagrawal@gmail.com>
> Cc: Masami Hiramatsu <mhiramat@kernel.org>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> ---
> 
> (Apologies for the resend. I fat-fingered the email address for lkml)
> 
> Hi Masami,
> 
> I am not sure what went wrong but the patch in the lore link[0]
> doesn't match the end result (bad merge?). You may want to recheck the
> other changes to make sure it all looks sane.
> 
> Regards,
> Punit
> 
> [0] https://lkml.kernel.org/r/162262194685.264090.7738574774030567419.stgit@devnote2
> ---
>  tools/bootconfig/main.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c
> index f45fa992e01d..fd67496a947f 100644
> --- a/tools/bootconfig/main.c
> +++ b/tools/bootconfig/main.c
> @@ -111,9 +111,11 @@ static void xbc_show_list(void)
>  	char key[XBC_KEYLEN_MAX];
>  	struct xbc_node *leaf;
>  	const char *val;
> +	int ret;
>  
>  	xbc_for_each_key_value(leaf, val) {
> -		if (xbc_node_compose_key(leaf, key, XBC_KEYLEN_MAX) < 0) {
> +		ret = xbc_node_compose_key(leaf, key, XBC_KEYLEN_MAX);
> +		if (ret < 0) {
>  			fprintf(stderr, "Failed to compose key %d\n", ret);
>  			break;
>  		}
> -- 
> 2.32.0
> 


-- 
Masami Hiramatsu <mhiramat@kernel.org>

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

* Re: [RESEND PATCH] tools/bootconfig: Fix a compilation issue with missing variable
  2021-09-07 23:07 [RESEND PATCH] tools/bootconfig: Fix a compilation issue with missing variable Punit Agrawal
  2021-09-08  0:13 ` Masami Hiramatsu
@ 2021-09-08  0:24 ` Steven Rostedt
  2021-09-08  0:41   ` Masami Hiramatsu
  2021-09-08  0:44 ` Steven Rostedt
  2 siblings, 1 reply; 9+ messages in thread
From: Steven Rostedt @ 2021-09-08  0:24 UTC (permalink / raw)
  To: Punit Agrawal; +Cc: mhiramat, linux-kernel

On Wed,  8 Sep 2021 08:07:10 +0900
Punit Agrawal <punitagrawal@gmail.com> wrote:

> While looking to build bootconfig tool in order to debug a kernel boot
> time issue I noticed that tool fails to compile. The broken changes
> were introduced by commit e5efaeb8a8f5 ("bootconfig: Support mixing a
> value and subkeys under a key").
> 
> Fix the compile issue by introducing a "ret" variable to track the
> return value from xbc_node_compose_key().
> 
> Fixes: e5efaeb8a8f5 ("bootconfig: Support mixing a value and subkeys under a key")
> Signed-off-by: Punit Agrawal <punitagrawal@gmail.com>
> Cc: Masami Hiramatsu <mhiramat@kernel.org>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> ---
> 
> (Apologies for the resend. I fat-fingered the email address for lkml)

And I'm resending my reply to have it recorded as well.

> 
> Hi Masami,
> 
> I am not sure what went wrong but the patch in the lore link[0]
> doesn't match the end result (bad merge?). You may want to recheck the
> other changes to make sure it all looks sane.


Thanks for reporting this. This is strange. Especially since it's all
scripts that are used to import these.

I do remember doing a rebase to fix some issues in another unrelated
patch. I wonder if I accidentally messed this up during that rebase :-/

I'll have to investigate this.

I'll checkout the tree before the affected patch, and reapply the
changes from my scripts to see if it wasn't my script that broke.

Again, thanks for reporting this!

-- Steve



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

* Re: [RESEND PATCH] tools/bootconfig: Fix a compilation issue with missing variable
  2021-09-08  0:13 ` Masami Hiramatsu
@ 2021-09-08  0:27   ` Steven Rostedt
  2021-09-08  0:34   ` Masami Hiramatsu
  1 sibling, 0 replies; 9+ messages in thread
From: Steven Rostedt @ 2021-09-08  0:27 UTC (permalink / raw)
  To: Masami Hiramatsu; +Cc: Punit Agrawal, linux-kernel

On Wed, 8 Sep 2021 09:13:46 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:

> Hi Punit,
> 
> This has been fixed by Julio's patch and we are waiting for merge.
> 
> https://lore.kernel.org/all/20210831033256.5973-1-jcfaracco@gmail.com/T/#u
> 

And I need to catch up on my patchwork inbox.

I'll put this in priority now.

-- Steve

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

* Re: [RESEND PATCH] tools/bootconfig: Fix a compilation issue with missing variable
  2021-09-08  0:13 ` Masami Hiramatsu
  2021-09-08  0:27   ` Steven Rostedt
@ 2021-09-08  0:34   ` Masami Hiramatsu
  1 sibling, 0 replies; 9+ messages in thread
From: Masami Hiramatsu @ 2021-09-08  0:34 UTC (permalink / raw)
  To: Masami Hiramatsu; +Cc: Punit Agrawal, linux-kernel, Steven Rostedt

On Wed, 8 Sep 2021 09:13:46 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:

> Hi Punit,
> 
> This has been fixed by Julio's patch and we are waiting for merge.
> 
> https://lore.kernel.org/all/20210831033256.5973-1-jcfaracco@gmail.com/T/#u

Sorry, I missed thank you message on my previous message.
That's my bad point...

Anyway thanks for the report!


> 
> Thank you,
> 
> On Wed,  8 Sep 2021 08:07:10 +0900
> Punit Agrawal <punitagrawal@gmail.com> wrote:
> 
> > While looking to build bootconfig tool in order to debug a kernel boot
> > time issue I noticed that tool fails to compile. The broken changes
> > were introduced by commit e5efaeb8a8f5 ("bootconfig: Support mixing a
> > value and subkeys under a key").
> > 
> > Fix the compile issue by introducing a "ret" variable to track the
> > return value from xbc_node_compose_key().
> > 
> > Fixes: e5efaeb8a8f5 ("bootconfig: Support mixing a value and subkeys under a key")
> > Signed-off-by: Punit Agrawal <punitagrawal@gmail.com>
> > Cc: Masami Hiramatsu <mhiramat@kernel.org>
> > Cc: Steven Rostedt <rostedt@goodmis.org>
> > ---
> > 
> > (Apologies for the resend. I fat-fingered the email address for lkml)
> > 
> > Hi Masami,
> > 
> > I am not sure what went wrong but the patch in the lore link[0]
> > doesn't match the end result (bad merge?). You may want to recheck the
> > other changes to make sure it all looks sane.
> > 
> > Regards,
> > Punit
> > 
> > [0] https://lkml.kernel.org/r/162262194685.264090.7738574774030567419.stgit@devnote2
> > ---
> >  tools/bootconfig/main.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c
> > index f45fa992e01d..fd67496a947f 100644
> > --- a/tools/bootconfig/main.c
> > +++ b/tools/bootconfig/main.c
> > @@ -111,9 +111,11 @@ static void xbc_show_list(void)
> >  	char key[XBC_KEYLEN_MAX];
> >  	struct xbc_node *leaf;
> >  	const char *val;
> > +	int ret;
> >  
> >  	xbc_for_each_key_value(leaf, val) {
> > -		if (xbc_node_compose_key(leaf, key, XBC_KEYLEN_MAX) < 0) {
> > +		ret = xbc_node_compose_key(leaf, key, XBC_KEYLEN_MAX);
> > +		if (ret < 0) {
> >  			fprintf(stderr, "Failed to compose key %d\n", ret);
> >  			break;
> >  		}
> > -- 
> > 2.32.0
> > 
> 
> 
> -- 
> Masami Hiramatsu <mhiramat@kernel.org>


-- 
Masami Hiramatsu <mhiramat@kernel.org>

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

* Re: [RESEND PATCH] tools/bootconfig: Fix a compilation issue with missing variable
  2021-09-08  0:24 ` Steven Rostedt
@ 2021-09-08  0:41   ` Masami Hiramatsu
  2021-09-08  0:45     ` Steven Rostedt
  0 siblings, 1 reply; 9+ messages in thread
From: Masami Hiramatsu @ 2021-09-08  0:41 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Punit Agrawal, mhiramat, linux-kernel

On Tue, 7 Sep 2021 20:24:00 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> On Wed,  8 Sep 2021 08:07:10 +0900
> Punit Agrawal <punitagrawal@gmail.com> wrote:
> 
> > While looking to build bootconfig tool in order to debug a kernel boot
> > time issue I noticed that tool fails to compile. The broken changes
> > were introduced by commit e5efaeb8a8f5 ("bootconfig: Support mixing a
> > value and subkeys under a key").
> > 
> > Fix the compile issue by introducing a "ret" variable to track the
> > return value from xbc_node_compose_key().
> > 
> > Fixes: e5efaeb8a8f5 ("bootconfig: Support mixing a value and subkeys under a key")
> > Signed-off-by: Punit Agrawal <punitagrawal@gmail.com>
> > Cc: Masami Hiramatsu <mhiramat@kernel.org>
> > Cc: Steven Rostedt <rostedt@goodmis.org>
> > ---
> > 
> > (Apologies for the resend. I fat-fingered the email address for lkml)
> 
> And I'm resending my reply to have it recorded as well.
> 
> > 
> > Hi Masami,
> > 
> > I am not sure what went wrong but the patch in the lore link[0]
> > doesn't match the end result (bad merge?). You may want to recheck the
> > other changes to make sure it all looks sane.
> 
> 
> Thanks for reporting this. This is strange. Especially since it's all
> scripts that are used to import these.
> 
> I do remember doing a rebase to fix some issues in another unrelated
> patch. I wonder if I accidentally messed this up during that rebase :-/
> 
> I'll have to investigate this.
> 
> I'll checkout the tree before the affected patch, and reapply the
> changes from my scripts to see if it wasn't my script that broke.
> 
> Again, thanks for reporting this!

Hi Steve,

I've investigated that why this happens here.

https://lore.kernel.org/all/20210831033256.5973-1-jcfaracco@gmail.com/T/#m52f43f6deb874ee726b10ce25ba53e44697a275a

This seems a timing issue. I acked a "simplify" patch April, and
the I wrongly worked on the linus tree for "mixing a value and subkeys"
and send it to you June. At last, those 2 conflicted on your branch and
your merge script might just merge it.
Actually, what Punit and Julio did is reverting 

commit 30d103f2d460 ("tools/bootconfig: Simplify expression")

Thank you,

-- 
Masami Hiramatsu <mhiramat@kernel.org>

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

* Re: [RESEND PATCH] tools/bootconfig: Fix a compilation issue with missing variable
  2021-09-07 23:07 [RESEND PATCH] tools/bootconfig: Fix a compilation issue with missing variable Punit Agrawal
  2021-09-08  0:13 ` Masami Hiramatsu
  2021-09-08  0:24 ` Steven Rostedt
@ 2021-09-08  0:44 ` Steven Rostedt
  2 siblings, 0 replies; 9+ messages in thread
From: Steven Rostedt @ 2021-09-08  0:44 UTC (permalink / raw)
  To: Punit Agrawal; +Cc: mhiramat, linux-kernel

On Wed,  8 Sep 2021 08:07:10 +0900
Punit Agrawal <punitagrawal@gmail.com> wrote:

> While looking to build bootconfig tool in order to debug a kernel boot
> time issue I noticed that tool fails to compile. The broken changes
> were introduced by commit e5efaeb8a8f5 ("bootconfig: Support mixing a
> value and subkeys under a key").
> 
> Fix the compile issue by introducing a "ret" variable to track the
> return value from xbc_node_compose_key().
> 
> Fixes: e5efaeb8a8f5 ("bootconfig: Support mixing a value and subkeys under a key")
> Signed-off-by: Punit Agrawal <punitagrawal@gmail.com>
> Cc: Masami Hiramatsu <mhiramat@kernel.org>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> ---
> 
> (Apologies for the resend. I fat-fingered the email address for lkml)
> 
> Hi Masami,
> 
> I am not sure what went wrong but the patch in the lore link[0]
> doesn't match the end result (bad merge?). You may want to recheck the
> other changes to make sure it all looks sane.
> 
> Regards,
> Punit
> 
> [0] https://lkml.kernel.org/r/162262194685.264090.7738574774030567419.stgit@devnote2

OK, I looked into this deeper, and found it to be a merge conflict bug.

Although I test the bootconfig kernel side, I didn't test the
bootconfig tools side (need to update my tests)

I applied

   https://lkml.kernel.org/r/20210414134647.1870-1-zuoqilin1@163.com

first, and then applied this patch, and made the (incorrect) updates.

I didn't test the tools build (which I need to update), and that's the
cause of the bug.

Thanks for the report.

-- Steve



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

* Re: [RESEND PATCH] tools/bootconfig: Fix a compilation issue with missing variable
  2021-09-08  0:41   ` Masami Hiramatsu
@ 2021-09-08  0:45     ` Steven Rostedt
  2021-09-09  8:31       ` Punit Agrawal
  0 siblings, 1 reply; 9+ messages in thread
From: Steven Rostedt @ 2021-09-08  0:45 UTC (permalink / raw)
  To: Masami Hiramatsu; +Cc: Punit Agrawal, linux-kernel

On Wed, 8 Sep 2021 09:41:45 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:

> Hi Steve,
> 
> I've investigated that why this happens here.
> 
> https://lore.kernel.org/all/20210831033256.5973-1-jcfaracco@gmail.com/T/#m52f43f6deb874ee726b10ce25ba53e44697a275a
> 
> This seems a timing issue. I acked a "simplify" patch April, and
> the I wrongly worked on the linus tree for "mixing a value and subkeys"
> and send it to you June. At last, those 2 conflicted on your branch and
> your merge script might just merge it.
> Actually, what Punit and Julio did is reverting 
> 
> commit 30d103f2d460 ("tools/bootconfig: Simplify expression")

Yep, I came up with the same conclusion ;-)

-- Steve

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

* Re: [RESEND PATCH] tools/bootconfig: Fix a compilation issue with missing variable
  2021-09-08  0:45     ` Steven Rostedt
@ 2021-09-09  8:31       ` Punit Agrawal
  0 siblings, 0 replies; 9+ messages in thread
From: Punit Agrawal @ 2021-09-09  8:31 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Masami Hiramatsu, linux-kernel

Hi Steve, Masami,

Steven Rostedt <rostedt@goodmis.org> writes:

> On Wed, 8 Sep 2021 09:41:45 +0900
> Masami Hiramatsu <mhiramat@kernel.org> wrote:
>
>> Hi Steve,
>> 
>> I've investigated that why this happens here.
>> 
>> https://lore.kernel.org/all/20210831033256.5973-1-jcfaracco@gmail.com/T/#m52f43f6deb874ee726b10ce25ba53e44697a275a
>> 
>> This seems a timing issue. I acked a "simplify" patch April, and
>> the I wrongly worked on the linus tree for "mixing a value and subkeys"
>> and send it to you June. At last, those 2 conflicted on your branch and
>> your merge script might just merge it.
>> Actually, what Punit and Julio did is reverting 
>> 
>> commit 30d103f2d460 ("tools/bootconfig: Simplify expression")
>
> Yep, I came up with the same conclusion ;-)

Thanks for the quick response and looking into the underlying
cause. Looks like it's all sorted now.

If only I could as quickly get to the bottom of the network issue that
triggered this [0]!

Thanks,
Punit

[0] https://lore.kernel.org/all/CAGb2v67Duk_56fOKVwZsYn2HKJ99o8WJ+d4jetD2UjDsAt9BcA@mail.gmail.com/

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

end of thread, other threads:[~2021-09-09  8:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-07 23:07 [RESEND PATCH] tools/bootconfig: Fix a compilation issue with missing variable Punit Agrawal
2021-09-08  0:13 ` Masami Hiramatsu
2021-09-08  0:27   ` Steven Rostedt
2021-09-08  0:34   ` Masami Hiramatsu
2021-09-08  0:24 ` Steven Rostedt
2021-09-08  0:41   ` Masami Hiramatsu
2021-09-08  0:45     ` Steven Rostedt
2021-09-09  8:31       ` Punit Agrawal
2021-09-08  0:44 ` Steven Rostedt

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).