* [PATCH] kho: fix child node parsing for debugfs in/sub_fdts
@ 2026-03-09 3:35 ranxiaokai627
2026-03-09 8:10 ` Mike Rapoport
2026-03-13 10:02 ` Pratyush Yadav
0 siblings, 2 replies; 7+ messages in thread
From: ranxiaokai627 @ 2026-03-09 3:35 UTC (permalink / raw)
To: graf, akpm, rppt, pratyush, pasha.tatashin, jasonmiu
Cc: linux-kernel, kexec, ran.xiaokai, ranxiaokai627
From: Ran Xiaokai <ran.xiaokai@zte.com.cn>
Commit e0c1731f5d57 ("kho: adopt radix tree for preserved memory tracking")
changed KHO_FDT_SUB_TREE_PROP_NAME from "fdt" to "preserved-data". However,
kho debugfs code still hard-coded the "fdt" string when parsing the
device tree, causing the debugfs node /debugfs/kho/in/sub_fdts/
fail to parse child nodes correctly.
Fix this by including the header file and using KHO_FDT_SUB_TREE_PROP_NAME
instead of the hard-coded string.
Fixes: e0c1731f5d57 ("kho: adopt radix tree for preserved memory tracking")
Signed-off-by: Ran Xiaokai <ran.xiaokai@zte.com.cn>
---
kernel/liveupdate/kexec_handover_debugfs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/liveupdate/kexec_handover_debugfs.c b/kernel/liveupdate/kexec_handover_debugfs.c
index 3f395fbd978f..acf368222682 100644
--- a/kernel/liveupdate/kexec_handover_debugfs.c
+++ b/kernel/liveupdate/kexec_handover_debugfs.c
@@ -13,6 +13,7 @@
#include <linux/io.h>
#include <linux/libfdt.h>
#include <linux/mm.h>
+#include <linux/kho/abi/kexec_handover.h>
#include "kexec_handover_internal.h"
static struct dentry *debugfs_root;
@@ -121,7 +122,7 @@ __init void kho_in_debugfs_init(struct kho_debugfs *dbg, const void *fdt)
const char *name = fdt_get_name(fdt, child, NULL);
const u64 *fdt_phys;
- fdt_phys = fdt_getprop(fdt, child, "fdt", &len);
+ fdt_phys = fdt_getprop(fdt, child, KHO_FDT_SUB_TREE_PROP_NAME, &len);
if (!fdt_phys)
continue;
if (len != sizeof(*fdt_phys)) {
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] kho: fix child node parsing for debugfs in/sub_fdts
2026-03-09 3:35 [PATCH] kho: fix child node parsing for debugfs in/sub_fdts ranxiaokai627
@ 2026-03-09 8:10 ` Mike Rapoport
2026-03-13 10:02 ` Pratyush Yadav
1 sibling, 0 replies; 7+ messages in thread
From: Mike Rapoport @ 2026-03-09 8:10 UTC (permalink / raw)
To: ranxiaokai627
Cc: graf, akpm, pratyush, pasha.tatashin, jasonmiu, linux-kernel,
kexec, ran.xiaokai
On Mon, Mar 09, 2026 at 03:35:30AM +0000, ranxiaokai627@163.com wrote:
> From: Ran Xiaokai <ran.xiaokai@zte.com.cn>
>
> Commit e0c1731f5d57 ("kho: adopt radix tree for preserved memory tracking")
> changed KHO_FDT_SUB_TREE_PROP_NAME from "fdt" to "preserved-data". However,
> kho debugfs code still hard-coded the "fdt" string when parsing the
> device tree, causing the debugfs node /debugfs/kho/in/sub_fdts/
> fail to parse child nodes correctly.
>
> Fix this by including the header file and using KHO_FDT_SUB_TREE_PROP_NAME
> instead of the hard-coded string.
>
> Fixes: e0c1731f5d57 ("kho: adopt radix tree for preserved memory tracking")
> Signed-off-by: Ran Xiaokai <ran.xiaokai@zte.com.cn>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
> ---
> kernel/liveupdate/kexec_handover_debugfs.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/liveupdate/kexec_handover_debugfs.c b/kernel/liveupdate/kexec_handover_debugfs.c
> index 3f395fbd978f..acf368222682 100644
> --- a/kernel/liveupdate/kexec_handover_debugfs.c
> +++ b/kernel/liveupdate/kexec_handover_debugfs.c
> @@ -13,6 +13,7 @@
> #include <linux/io.h>
> #include <linux/libfdt.h>
> #include <linux/mm.h>
> +#include <linux/kho/abi/kexec_handover.h>
> #include "kexec_handover_internal.h"
>
> static struct dentry *debugfs_root;
> @@ -121,7 +122,7 @@ __init void kho_in_debugfs_init(struct kho_debugfs *dbg, const void *fdt)
> const char *name = fdt_get_name(fdt, child, NULL);
> const u64 *fdt_phys;
>
> - fdt_phys = fdt_getprop(fdt, child, "fdt", &len);
> + fdt_phys = fdt_getprop(fdt, child, KHO_FDT_SUB_TREE_PROP_NAME, &len);
> if (!fdt_phys)
> continue;
> if (len != sizeof(*fdt_phys)) {
> --
> 2.25.1
>
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] kho: fix child node parsing for debugfs in/sub_fdts
2026-03-09 3:35 [PATCH] kho: fix child node parsing for debugfs in/sub_fdts ranxiaokai627
2026-03-09 8:10 ` Mike Rapoport
@ 2026-03-13 10:02 ` Pratyush Yadav
2026-03-14 22:46 ` Andrew Morton
1 sibling, 1 reply; 7+ messages in thread
From: Pratyush Yadav @ 2026-03-13 10:02 UTC (permalink / raw)
To: ranxiaokai627
Cc: graf, akpm, rppt, pratyush, pasha.tatashin, jasonmiu,
linux-kernel, kexec, ran.xiaokai, Breno Leitao
On Mon, Mar 09 2026, ranxiaokai627@163.com wrote:
> From: Ran Xiaokai <ran.xiaokai@zte.com.cn>
>
> Commit e0c1731f5d57 ("kho: adopt radix tree for preserved memory tracking")
> changed KHO_FDT_SUB_TREE_PROP_NAME from "fdt" to "preserved-data". However,
> kho debugfs code still hard-coded the "fdt" string when parsing the
> device tree, causing the debugfs node /debugfs/kho/in/sub_fdts/
> fail to parse child nodes correctly.
>
> Fix this by including the header file and using KHO_FDT_SUB_TREE_PROP_NAME
> instead of the hard-coded string.
>
> Fixes: e0c1731f5d57 ("kho: adopt radix tree for preserved memory tracking")
> Signed-off-by: Ran Xiaokai <ran.xiaokai@zte.com.cn>
Breno's patch [0] also fixes this, but I'd rather have this go through
hotfixes and get backported to stable, and Breno's series to build on
top of this.
[0] https://lore.kernel.org/linux-mm/20260309-kho-v8-4-c3abcf4ac750@debian.org/
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
> ---
> kernel/liveupdate/kexec_handover_debugfs.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/liveupdate/kexec_handover_debugfs.c b/kernel/liveupdate/kexec_handover_debugfs.c
> index 3f395fbd978f..acf368222682 100644
> --- a/kernel/liveupdate/kexec_handover_debugfs.c
> +++ b/kernel/liveupdate/kexec_handover_debugfs.c
> @@ -13,6 +13,7 @@
> #include <linux/io.h>
> #include <linux/libfdt.h>
> #include <linux/mm.h>
> +#include <linux/kho/abi/kexec_handover.h>
> #include "kexec_handover_internal.h"
>
> static struct dentry *debugfs_root;
> @@ -121,7 +122,7 @@ __init void kho_in_debugfs_init(struct kho_debugfs *dbg, const void *fdt)
> const char *name = fdt_get_name(fdt, child, NULL);
> const u64 *fdt_phys;
>
> - fdt_phys = fdt_getprop(fdt, child, "fdt", &len);
> + fdt_phys = fdt_getprop(fdt, child, KHO_FDT_SUB_TREE_PROP_NAME, &len);
> if (!fdt_phys)
> continue;
> if (len != sizeof(*fdt_phys)) {
--
Regards,
Pratyush Yadav
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] kho: fix child node parsing for debugfs in/sub_fdts
2026-03-13 10:02 ` Pratyush Yadav
@ 2026-03-14 22:46 ` Andrew Morton
2026-03-17 9:09 ` Pratyush Yadav
0 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2026-03-14 22:46 UTC (permalink / raw)
To: Pratyush Yadav
Cc: ranxiaokai627, graf, rppt, pasha.tatashin, jasonmiu, linux-kernel,
kexec, ran.xiaokai, Breno Leitao
On Fri, 13 Mar 2026 10:02:06 +0000 Pratyush Yadav <pratyush@kernel.org> wrote:
> On Mon, Mar 09 2026, ranxiaokai627@163.com wrote:
>
> > From: Ran Xiaokai <ran.xiaokai@zte.com.cn>
> >
> > Commit e0c1731f5d57 ("kho: adopt radix tree for preserved memory tracking")
> > changed KHO_FDT_SUB_TREE_PROP_NAME from "fdt" to "preserved-data". However,
> > kho debugfs code still hard-coded the "fdt" string when parsing the
> > device tree, causing the debugfs node /debugfs/kho/in/sub_fdts/
> > fail to parse child nodes correctly.
> >
> > Fix this by including the header file and using KHO_FDT_SUB_TREE_PROP_NAME
> > instead of the hard-coded string.
> >
> > Fixes: e0c1731f5d57 ("kho: adopt radix tree for preserved memory tracking")
> > Signed-off-by: Ran Xiaokai <ran.xiaokai@zte.com.cn>
>
> Breno's patch [0] also fixes this, but I'd rather have this go through
> hotfixes and get backported to stable, and Breno's series to build on
> top of this.
>
> [0] https://lore.kernel.org/linux-mm/20260309-kho-v8-4-c3abcf4ac750@debian.org/
Confused. This patch (kho: fix child node parsing for debugfs
in/sub_fdts) fixes the mm-unstable patch "kho: adopt radix tree for
preserved memory tracking".
So what are you suggesting be added to -stable?
(Please lay it all out very clearly, idenfifying patches by name!)
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] kho: fix child node parsing for debugfs in/sub_fdts
2026-03-14 22:46 ` Andrew Morton
@ 2026-03-17 9:09 ` Pratyush Yadav
2026-03-17 21:08 ` Andrew Morton
0 siblings, 1 reply; 7+ messages in thread
From: Pratyush Yadav @ 2026-03-17 9:09 UTC (permalink / raw)
To: Andrew Morton
Cc: Pratyush Yadav, ranxiaokai627, graf, rppt, pasha.tatashin,
jasonmiu, linux-kernel, kexec, ran.xiaokai, Breno Leitao
On Sat, Mar 14 2026, Andrew Morton wrote:
> On Fri, 13 Mar 2026 10:02:06 +0000 Pratyush Yadav <pratyush@kernel.org> wrote:
>
>> On Mon, Mar 09 2026, ranxiaokai627@163.com wrote:
>>
>> > From: Ran Xiaokai <ran.xiaokai@zte.com.cn>
>> >
>> > Commit e0c1731f5d57 ("kho: adopt radix tree for preserved memory tracking")
>> > changed KHO_FDT_SUB_TREE_PROP_NAME from "fdt" to "preserved-data". However,
>> > kho debugfs code still hard-coded the "fdt" string when parsing the
>> > device tree, causing the debugfs node /debugfs/kho/in/sub_fdts/
>> > fail to parse child nodes correctly.
>> >
>> > Fix this by including the header file and using KHO_FDT_SUB_TREE_PROP_NAME
>> > instead of the hard-coded string.
>> >
>> > Fixes: e0c1731f5d57 ("kho: adopt radix tree for preserved memory tracking")
>> > Signed-off-by: Ran Xiaokai <ran.xiaokai@zte.com.cn>
>>
>> Breno's patch [0] also fixes this, but I'd rather have this go through
>> hotfixes and get backported to stable, and Breno's series to build on
>> top of this.
>>
>> [0] https://lore.kernel.org/linux-mm/20260309-kho-v8-4-c3abcf4ac750@debian.org/
>
> Confused. This patch (kho: fix child node parsing for debugfs
> in/sub_fdts) fixes the mm-unstable patch "kho: adopt radix tree for
> preserved memory tracking".
>
> So what are you suggesting be added to -stable?
>
> (Please lay it all out very clearly, idenfifying patches by name!)
Sorry, my bad for causing the confusion. I thought the radix tree
patches ("kho: adopt radix tree for preserved memory tracking") already
landed in mainline, but I went and checked and it seems that they
haven't. They are still in mm-unstable. So we should just meld this
patch ("kho: fix child node parsing for debugfs in/sub_fdts") into
("kho: adopt radix tree for preserved memory tracking").
There is nothing that needs to be added to -stable, and there is nothing
that needs to go to hotfixes.
Breno's patch ("kho: fix kho_in_debugfs_init() to handle non-FDT blobs")
also fixes this bug, but then also adds some other changes with it. So
Breno's patch will cause conflicts once applied on top of this patch,
but they should be simple enough to resolve I think.
--
Regards,
Pratyush Yadav
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] kho: fix child node parsing for debugfs in/sub_fdts
2026-03-17 9:09 ` Pratyush Yadav
@ 2026-03-17 21:08 ` Andrew Morton
2026-03-20 10:20 ` Pratyush Yadav
0 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2026-03-17 21:08 UTC (permalink / raw)
To: Pratyush Yadav
Cc: ranxiaokai627, graf, rppt, pasha.tatashin, jasonmiu, linux-kernel,
kexec, ran.xiaokai, Breno Leitao
On Tue, 17 Mar 2026 09:09:36 +0000 Pratyush Yadav <pratyush@kernel.org> wrote:
> On Sat, Mar 14 2026, Andrew Morton wrote:
>
> > On Fri, 13 Mar 2026 10:02:06 +0000 Pratyush Yadav <pratyush@kernel.org> wrote:
> >
> >> On Mon, Mar 09 2026, ranxiaokai627@163.com wrote:
> >>
> >> > From: Ran Xiaokai <ran.xiaokai@zte.com.cn>
> >> >
> >> > Commit e0c1731f5d57 ("kho: adopt radix tree for preserved memory tracking")
> >> > changed KHO_FDT_SUB_TREE_PROP_NAME from "fdt" to "preserved-data". However,
> >> > kho debugfs code still hard-coded the "fdt" string when parsing the
> >> > device tree, causing the debugfs node /debugfs/kho/in/sub_fdts/
> >> > fail to parse child nodes correctly.
> >> >
> >> > Fix this by including the header file and using KHO_FDT_SUB_TREE_PROP_NAME
> >> > instead of the hard-coded string.
> >> >
> >> > Fixes: e0c1731f5d57 ("kho: adopt radix tree for preserved memory tracking")
> >> > Signed-off-by: Ran Xiaokai <ran.xiaokai@zte.com.cn>
> >>
> >> Breno's patch [0] also fixes this, but I'd rather have this go through
> >> hotfixes and get backported to stable, and Breno's series to build on
> >> top of this.
> >>
> >> [0] https://lore.kernel.org/linux-mm/20260309-kho-v8-4-c3abcf4ac750@debian.org/
> >
> > Confused. This patch (kho: fix child node parsing for debugfs
> > in/sub_fdts) fixes the mm-unstable patch "kho: adopt radix tree for
> > preserved memory tracking".
> >
> > So what are you suggesting be added to -stable?
> >
> > (Please lay it all out very clearly, idenfifying patches by name!)
>
> Sorry, my bad for causing the confusion. I thought the radix tree
> patches ("kho: adopt radix tree for preserved memory tracking") already
> landed in mainline, but I went and checked and it seems that they
> haven't. They are still in mm-unstable. So we should just meld this
> patch ("kho: fix child node parsing for debugfs in/sub_fdts") into
> ("kho: adopt radix tree for preserved memory tracking").
OK, that's how we presently have things:
kho-adopt-radix-tree-for-preserved-memory-tracking.patch
kho-adopt-radix-tree-for-preserved-memory-tracking-fix.patch <- "kho: fix child node..."
kho-remove-finalize-state-and-clients.patch
> There is nothing that needs to be added to -stable, and there is nothing
> that needs to go to hotfixes.
Great.
> Breno's patch ("kho: fix kho_in_debugfs_init() to handle non-FDT blobs")
> also fixes this bug, but then also adds some other changes with it. So
> Breno's patch will cause conflicts once applied on top of this patch,
> but they should be simple enough to resolve I think.
OK, let's deal with that when the time comes.
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] kho: fix child node parsing for debugfs in/sub_fdts
2026-03-17 21:08 ` Andrew Morton
@ 2026-03-20 10:20 ` Pratyush Yadav
0 siblings, 0 replies; 7+ messages in thread
From: Pratyush Yadav @ 2026-03-20 10:20 UTC (permalink / raw)
To: Andrew Morton
Cc: Pratyush Yadav, ranxiaokai627, graf, rppt, pasha.tatashin,
jasonmiu, linux-kernel, kexec, ran.xiaokai, Breno Leitao
On Tue, Mar 17 2026, Andrew Morton wrote:
> On Tue, 17 Mar 2026 09:09:36 +0000 Pratyush Yadav <pratyush@kernel.org> wrote:
[...]
>> Sorry, my bad for causing the confusion. I thought the radix tree
>> patches ("kho: adopt radix tree for preserved memory tracking") already
>> landed in mainline, but I went and checked and it seems that they
>> haven't. They are still in mm-unstable. So we should just meld this
>> patch ("kho: fix child node parsing for debugfs in/sub_fdts") into
>> ("kho: adopt radix tree for preserved memory tracking").
>
> OK, that's how we presently have things:
>
> kho-adopt-radix-tree-for-preserved-memory-tracking.patch
> kho-adopt-radix-tree-for-preserved-memory-tracking-fix.patch <- "kho: fix child node..."
> kho-remove-finalize-state-and-clients.patch
LGTM. Thanks!
[...]
--
Regards,
Pratyush Yadav
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-03-20 10:20 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-09 3:35 [PATCH] kho: fix child node parsing for debugfs in/sub_fdts ranxiaokai627
2026-03-09 8:10 ` Mike Rapoport
2026-03-13 10:02 ` Pratyush Yadav
2026-03-14 22:46 ` Andrew Morton
2026-03-17 9:09 ` Pratyush Yadav
2026-03-17 21:08 ` Andrew Morton
2026-03-20 10:20 ` Pratyush Yadav
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox