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(-)
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
Hi 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,
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(-)
>
> 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 <[email protected]>
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)
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
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.
>
> https://lore.kernel.org/all/[email protected]/T/#u
>
And I need to catch up on my patchwork inbox.
I'll put this in priority now.
-- Steve
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
>
> commit 30d103f2d460 ("tools/bootconfig: Simplify expression")
Yep, I came up with the same conclusion ;-)
-- Steve
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.
>
> https://lore.kernel.org/all/[email protected]/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 <[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(-)
> >
> > 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 <[email protected]>
--
Masami Hiramatsu <[email protected]>
On Tue, 7 Sep 2021 20:24:00 -0400
Steven Rostedt <[email protected]> wrote:
> 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)
>
> 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/[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,
--
Masami Hiramatsu <[email protected]>
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
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
Hi Steve, Masami,
Steven Rostedt <[email protected]> writes:
> 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
>>
>> 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/