tools/bootconfig: Fix a compilation issue with missing variable
PATCH RESEND 1/1 tools/bootconfig: Fix a compilation issue with missing variable
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().
---
(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(-)
tools/bootconfig/main.c +3 -1
@@ -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 ; }
Signature · 1 line
2.32.0
Masami Hiramatsu
maintainerHi Punit,
This has been fixed by Julio's patch and we are waiting for merge.
https://lore.kernel.org/all/[email protected]/T/#u
Thank you,
Quoted 50 lines · On Wed, 8 Sep 2021 08:07:10 +0900 Punit Agrawal <[email protected]> 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 <[email protected]>Cc Masami Hiramatsu <[email protected]>Cc Steven Rostedt <[email protected]>---
(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(-)tools/bootconfig/main.c +3
-1@@ -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 ; }Signature · 1 line
2.32.0
Signature · 1 line
Masami Hiramatsu <[email protected]>
Quoted 6 lines · On Wed, 8 Sep 2021 09:13:46 +0900 Masami Hiramatsu <[email protected]> wrote:
Hi Punit,
This has been fixed by Julio's patch and we are waiting for merge.
And I need to catch up on my patchwork inbox.
I'll put this in priority now.
-- Steve
Masami Hiramatsu
maintainerQuoted 5 lines · On Wed, 8 Sep 2021 09:13:46 +0900 Masami Hiramatsu <[email protected]> wrote:
Hi Punit,
This has been fixed by Julio's patch and we are waiting for merge.
Sorry, I missed thank you message on my previous message. That's my bad point...
Anyway thanks for the report!
Quoted 60 lines
Thank you,
Quoted 50 lines · On Wed, 8 Sep 2021 08:07:10 +0900 Punit Agrawal <[email protected]> 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 <[email protected]>Cc Masami Hiramatsu <[email protected]>Cc Steven Rostedt <[email protected]>---
(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(-)tools/bootconfig/main.c +3
-1@@ -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 ; }Signature · 1 line
2.32.0Signature · 1 line
Masami Hiramatsu <[email protected]>
Signature · 1 line
Masami Hiramatsu <[email protected]>
Quoted 8 lines · On Wed, 8 Sep 2021 08:07:10 +0900 Punit Agrawal <[email protected]> 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().
Quoted 7 lines
Fixes e5efaeb8a8f5 ("bootconfig: Support mixing a value and subkeys under a key")Signed-off-by Punit Agrawal <[email protected]>Cc Masami Hiramatsu <[email protected]>Cc Steven Rostedt <[email protected]>---
(Apologies for the resend. I fat-fingered the email address for lkml)
And I'm resending my reply to have it recorded as well.
Quoted 6 lines
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
Masami Hiramatsu
maintainerQuoted 35 lines · On Tue, 7 Sep 2021 20:24:00 -0400 Steven Rostedt <[email protected]> wrote:
Quoted 8 lines · On Wed, 8 Sep 2021 08:07:10 +0900 Punit Agrawal <[email protected]> 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().Quoted 7 lines
Fixes e5efaeb8a8f5 ("bootconfig: Support mixing a value and subkeys under a key")Signed-off-by Punit Agrawal <[email protected]>Cc Masami Hiramatsu <[email protected]>Cc Steven Rostedt <[email protected]>---
(Apologies for the resend. I fat-fingered the email address for lkml)
And I'm resending my reply to have it recorded as well.
Quoted 6 lines
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 :-/
Quoted 6 lines
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/[email protected]/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,
Signature · 1 line
Masami Hiramatsu <[email protected]>
Quoted 6 lines · On Wed, 8 Sep 2021 09:41:45 +0900 Masami Hiramatsu <[email protected]> wrote:
Hi Steve,
I've investigated that why this happens here.
https://lore.kernel.org/all/[email protected]/T/#m52f43f6deb874ee726b10ce25ba53e44697a275a
Quoted 7 lines
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 revertingcommit
30d103f2d460("tools/bootconfig: Simplify expression")
Yep, I came up with the same conclusion ;-)
-- Steve
Hi Steve, Masami,
Quoted 15 lines · Steven Rostedt
Quoted 12 lines · On Wed, 8 Sep 2021 09:41:45 +0900 Masami Hiramatsu <[email protected]> wrote:
Hi Steve,
I've investigated that why this happens here.
https://lore.kernel.org/all/[email protected]/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
Quoted 3 lines
Quoted 1 line
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/
Quoted 18 lines · On Wed, 8 Sep 2021 08:07:10 +0900 Punit Agrawal <[email protected]> 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 <[email protected]>Cc Masami Hiramatsu <[email protected]>Cc Steven Rostedt <[email protected]>---
(Apologies for the resend. I fat-fingered the email address for lkml)
Hi Masami,
Quoted 8 lines
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/[email protected]
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