bootconfig: Increase max nodes of bootconfig from 1024 to 8192 for DCC support
Subsystems (2)
PATCH 1/1 bootconfig: Increase max nodes of bootconfig from 1024 to 8192 for DCC support
The Data Capture and Compare(DCC) is a debugging tool that uses the bootconfig for configuring the register values during boot-time. Increase the max nodes supported by bootconfig to cater to the requirements of the Data Capture and Compare Driver.
--- include/linux/bootconfig.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/bootconfig.h +1 -1
@@ -59,7 +59,7 @@ struct xbc_node {/* Maximum size of boot config is 32KB - 1 */ #define XBC_DATA_MAX (XBC_VALUE - 1) -#define XBC_NODE_MAX 1024 +#define XBC_NODE_MAX 8192#define XBC_KEYLEN_MAX 256#define XBC_DEPTH_MAX 16
--
2.7.4
Quoted 4 lines · On Tue, 24 Jan 2023 10:34:42 +0530 Souradeep Chowdhury…
The Data Capture and Compare(DCC) is a debugging tool that uses the bootconfig for configuring the register values during boot-time. Increase the max nodes supported by bootconfig to cater to the requirements of the Data Capture and Compare Driver.
Thanks, this looks good to me :)
Quoted 22 lines
Signed-off-by Souradeep Chowdhury <[email protected]>--- include/linux/bootconfig.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/bootconfig.h +1
-2@@ -59,7 +59,7 @@ struct xbc_node {/* Maximum size of boot config is 32KB - 1 */ #define XBC_DATA_MAX (XBC_VALUE - 1) -#define XBC_NODE_MAX 1024 +#define XBC_NODE_MAX 8192#define XBC_KEYLEN_MAX 256#define XBC_DEPTH_MAX 16 --2.7.4
Signature · 1 line
Masami Hiramatsu (Google) <[email protected]>
Hi everyone,
It looks like this broke the bootconfig tests (tools/bootconfig/test- bootconfig.sh), tested on 6.1.18:
Max node number check
test case 12 (./bootconfig -a ./temp-HCfT.bconf ./initrd-NGHv)... Apply ./temp-HCfT.bconf to ./initrd-NGHv
Number of nodes: 1024
Size: 8110 bytes
Checksum: 599485
\t\t[OK]
test case 13 (./bootconfig -a ./temp-HCfT.bconf ./initrd-NGHv)...
Apply ./temp-HCfT.bconf to ./initrd-NGHv
Number of nodes: 1025
Size: 8118 bytes
Checksum: 600212\t\t[NG]
When I adjust the max node number for the tests to 8192, test case 13 passes, but test case 12 then fails:
Max node number check
test case 12 (./bootconfig -a ./temp-qZHF.bconf ./initrd-0v99)...
Error: Config data is too big.
\t\t[NG]
test case 13 (./bootconfig -a ./temp-qZHF.bconf ./initrd-0v99)...
Error: Config data is too big.
\t\t[OK]
Grs,
Heinz
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Masami Hiramatsu (Google)
maintainerQuoted 1 line · On Sun, 12 Mar 2023 12:49:44 +0100 Heinz Wiesinger <[email protected]> wrote:
Hi everyone,
Oops, thanks for pointing it out. I have to run the test in the test environment...
Quoted 16 lines
It looks like this broke the bootconfig tests (
tools/bootconfig/test-bootconfig.sh), tested on 6.1.18:Max node number check
test case 12 (./bootconfig -a ./temp-HCfT.bconf ./initrd-NGHv)... Apply ./temp-HCfT.bconf to ./initrd-NGHvNumber of nodes: 1024 Size: 8110 bytes Checksum: 599485 \t\t[OK] test case 13 (./bootconfig -a ./temp-HCfT.bconf ./initrd-NGHv)... Apply ./temp-HCfT.bconf to ./initrd-NGHv Number of nodes: 1025 Size: 8118 bytes Checksum: 600212
Quoted 1 line
\t\t[NG]
Yes, it needs to test with 8192 and 8193 nodes. Those are boundary checker.
Thanks!
Quoted 11 lines
When I adjust the max node number for the tests to 8192, test case 13 passes, but test case 12 then fails:
Max node number check
test case 12 (./bootconfig -a ./temp-qZHF.bconf ./initrd-0v99)...
Error: Config data is too big.
\t\t[NG]
test case 13 (./bootconfig -a ./temp-qZHF.bconf ./initrd-0v99)...
Error: Config data is too big.
\t\t[OK]
Ah, it hits the size limitation. :D
Each node consumes "node%d\n" = 6-11 bytes, and 11 bytes*8k = 88k bytes > 32K bytes. So, for making 8k nodes (including delimiter), we need to use 3 random alphabets for node name. (26^3 = 17576)
Let me fix that and thanks for report!
Quoted 3 lines
Grs,
Heinz
Signature · 1 line
Masami Hiramatsu (Google) <[email protected]>