diff options
| author | Masami Hiramatsu (Google) <mhiramat@kernel.org> | 2026-09-11 23:13:24 +0900 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-10-06 19:03:06 -0700 |
| commit | 61c473511fcc06c1be009f11cd7b63251f69fe53 (patch) | |
| tree | 6a1d41f36454327205335ad43d6902edfa7f2cba /tools/lib/python | |
| parent | 8ac7e19ab6eade9bf726dcfd3e227e1d2932c541 (diff) | |
| download | linux-next-61c473511fcc06c1be009f11cd7b63251f69fe53.tar.gz linux-next-61c473511fcc06c1be009f11cd7b63251f69fe53.zip | |
bootconfig: skip internal tree sanity checks in kernel
In xbc_verify_tree(), the loop iterating through all nodes to check that
xbc_nodes[i].next < xbc_node_num and xbc_nodes[i].child < xbc_node_num is
a defensive sanity check against implementation regressions (such an
out-of-bounds index cannot be produced by malformed input).
Running this check in the kernel adds unnecessary boot-time overhead.
Split this check out into xbc_sanity_check_tree() for userspace, so that
it continues to run during userspace bootconfig validation (e.g. when
applying or testing bootconfig with tools/bootconfig), but is omitted in
the kernel to speed up initialization.
Link: https://lore.kernel.org/178913600409.248794.12941798680046327623.stgit@devnote2
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reported-by: Sang-Heon Jeon <ekffu200098@gmail.com>
Closes: https://lore.kernel.org/all/20260905141637.1547429-1-ekffu200098@gmail.com/
Reviewed-by: Sang-Heon Jeon <ekffu200098@gmail.com>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
