Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken PaseVerifier codepath and add test #20969

Merged
merged 3 commits into from
Jul 20, 2022

Conversation

ajwak
Copy link
Contributor

@ajwak ajwak commented Jul 19, 2022

Problem

The spec was updated to force PasscodeId to be always zero for v1.0, and this was updated in #15924. However, there still exists calls to outdated constructors which include the PasscodeId integer parameter, which causes crashing on execution. Additionally, #20017 enforces initialization of Controller::SetupParams::controllerVendorId, without which causes the CHIPTool android application to crash when commissioning devices.

Change overview

  • Removes PasscodeId field from the corresponding JNI constructor parameter which was missed in the original fix.
  • Initializes SetupParams::controllerVendorId to be VendorId::NotSpecified
  • Includes a new Android instrumentation test to the CHIPTool library for verifying the DeviceController path can successfully computePaseVerifier

Testing

Running CHIPTool android application and run Provision CHIP device with WI-FI and ensure it no longer crashes
Additionally, running the newly added instrumentation test to ensure the codepath modified in this PR doesn’t crash.

@github-actions
Copy link

github-actions bot commented Jul 20, 2022

PR #20969: Size comparison from c732630 to 4b0cbfd

Increases (3 builds for bl602, cyw30739)
platform target config section c732630 4b0cbfd change % change
bl602 lighting-app bl602 (read/write) 1379506 1379514 8 0.0
.text 1050148 1050152 4 0.0
bl602+rpc (read/write) 1424914 1424922 8 0.0
.text 1081804 1081808 4 0.0
cyw30739 lock cyw930739m2evb_01 (read/write) 587454 587462 8 0.0
.app_xip_area 461276 461284 8 0.0
Full report (41 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, p6, telink)
platform target config section c732630 4b0cbfd change % change
bl602 lighting-app bl602 (read/write) 1379506 1379514 8 0.0
.bss 116970 116970 0 0.0
.data 4480 4480 0 0.0
.text 1050148 1050152 4 0.0
bl602+rpc (read/write) 1424914 1424922 8 0.0
.bss 124418 124418 0 0.0
.data 4600 4600 0 0.0
.text 1081804 1081808 4 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 668119 668119 0 0.0
(read/write) 183128 183128 0 0.0
.bss 74140 74140 0 0.0
.data 3356 3356 0 0.0
.rodata 88319 88319 0 0.0
.text 579484 579484 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 633719 633719 0 0.0
(read/write) 157708 157708 0 0.0
.bss 73436 73436 0 0.0
.data 3356 3356 0 0.0
.rodata 77551 77551 0 0.0
.text 555844 555844 0 0.0
lock-ftd LP_CC2652R7 (read only) 671227 671227 0 0.0
(read/write) 170196 170196 0 0.0
.bss 71204 71204 0 0.0
.data 3280 3280 0 0.0
.rodata 76443 76443 0 0.0
.text 594304 594304 0 0.0
lock-mtd LP_CC2652R7 (read only) 653503 653503 0 0.0
(read/write) 183608 183608 0 0.0
.bss 66892 66892 0 0.0
.data 3280 3280 0 0.0
.rodata 101191 101191 0 0.0
.text 551832 551832 0 0.0
pump-app LP_CC2652R7 (read only) 680227 680227 0 0.0
(read/write) 162052 162052 0 0.0
.bss 71292 71292 0 0.0
.data 3280 3280 0 0.0
.rodata 88811 88811 0 0.0
.text 590932 590932 0 0.0
pump-controller-app LP_CC2652R7 (read only) 666003 666003 0 0.0
(read/write) 176396 176396 0 0.0
.bss 71412 71412 0 0.0
.data 3276 3276 0 0.0
.rodata 84675 84675 0 0.0
.text 580848 580848 0 0.0
shell LP_CC2652R7 (read only) 660594 660594 0 0.0
(read/write) 186156 186156 0 0.0
.bss 76444 76444 0 0.0
.data 3360 3360 0 0.0
.rodata 85090 85090 0 0.0
.text 575188 575188 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 581546 581546 0 0.0
.app_xip_area 460096 460096 0 0.0
.bss 64244 64244 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 587454 587462 8 0.0
.app_xip_area 461276 461284 8 0.0
.bss 68972 68972 0 0.0
.data 720 720 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 584910 584910 0 0.0
.app_xip_area 464308 464308 0 0.0
.bss 63452 63452 0 0.0
.data 660 660 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1085936 1085936 0 0.0
.bss 133060 133060 0 0.0
.data 2048 2048 0 0.0
.text 950808 950808 0 0.0
BRD4161A+rpc (read/write) 1140212 1140212 0 0.0
.bss 149732 149732 0 0.0
.data 2260 2260 0 0.0
.text 988196 988196 0 0.0
BRD4161A+rs911x (read/write) 951136 951136 0 0.0
.bss 140776 140776 0 0.0
.data 2048 2048 0 0.0
.text 808292 808292 0 0.0
lock-app BRD4161A+wf200 (read/write) 1127500 1127500 0 0.0
.bss 144152 144152 0 0.0
.data 2056 2056 0 0.0
.text 981272 981272 0 0.0
window-app BRD4161A (read/write) 1079428 1079428 0 0.0
.bss 134532 134532 0 0.0
.data 2076 2076 0 0.0
.text 942800 942800 0 0.0
esp32 all-clusters-app c3devkit (read only) 1021570 1021570 0 0.0
(read/write) 1486106 1486106 0 0.0
.dram0.bss 70088 70088 0 0.0
.dram0.data 14600 14600 0 0.0
.flash.rodata 215976 215976 0 0.0
.flash.text 1021570 1021570 0 0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1075395 1075395 0 0.0
(read/write) 488144 488144 0 0.0
.dram0.bss 75608 75608 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 246396 246396 0 0.0
.flash.text 1070011 1070011 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 660328 660328 0 0.0
.bss 69540 69540 0 0.0
.data 1992 1992 0 0.0
.text 582996 582996 0 0.0
lock k32w061+release (read/write) 687308 687308 0 0.0
.bss 70012 70012 0 0.0
.data 2004 2004 0 0.0
.text 609492 609492 0 0.0
linux all-clusters-app debug (read only) 2976905 2976905 0 0.0
(read/write) 155312 155312 0 0.0
.bss 61824 61824 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 85160 85160 0 0.0
.dynamic 608 608 0 0.0
.got 4568 4568 0 0.0
.init 27 27 0 0.0
.init_array 1064 1064 0 0.0
.rodata 264669 264669 0 0.0
.text 2534258 2534258 0 0.0
all-clusters-minimal-app debug (read only) 2823529 2823529 0 0.0
(read/write) 146984 146984 0 0.0
.bss 61024 61024 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 77720 77720 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1056 1056 0 0.0
.rodata 265661 265661 0 0.0
.text 2382546 2382546 0 0.0
bridge-app debug+rpc (read only) 2323609 2323609 0 0.0
(read/write) 125768 125768 0 0.0
.bss 49088 49088 0 0.0
.data 3824 3824 0 0.0
.data.rel.ro 67096 67096 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 736 736 0 0.0
.rodata 198144 198144 0 0.0
.text 1963442 1963442 0 0.0
chip-tool debug (read only) 10335369 10335369 0 0.0
(read/write) 630888 630888 0 0.0
.bss 24760 24760 0 0.0
.data 3266 3266 0 0.0
.data.rel.ro 596472 596472 0 0.0
.dynamic 608 608 0 0.0
.got 5088 5088 0 0.0
.init 27 27 0 0.0
.init_array 648 648 0 0.0
.rodata 517045 517045 0 0.0
.text 8367108 8367108 0 0.0
chip-tool-ipv6only arm64 (read only) 10072556 10072556 0 0.0
(read/write) 696097 696097 0 0.0
.bss 43073 43073 0 0.0
.data 3304 3304 0 0.0
.data.rel.ro 632128 632128 0 0.0
.dynamic 528 528 0 0.0
.got 13672 13672 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 481084 481084 0 0.0
.text 8008148 8008148 0 0.0
lighting-app debug+rpc (read only) 2561353 2561353 0 0.0
(read/write) 129856 129856 0 0.0
.bss 49664 49664 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 72248 72248 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 824 824 0 0.0
.rodata 213960 213960 0 0.0
.text 2177138 2177138 0 0.0
lock-app debug (read only) 2526265 2526265 0 0.0
(read/write) 124808 124808 0 0.0
.bss 48032 48032 0 0.0
.data 1712 1712 0 0.0
.data.rel.ro 69208 69208 0 0.0
.dynamic 608 608 0 0.0
.got 4424 4424 0 0.0
.init 27 27 0 0.0
.init_array 800 800 0 0.0
.rodata 229000 229000 0 0.0
.text 2131810 2131810 0 0.0
ota-provider-app debug (read only) 2329793 2329793 0 0.0
(read/write) 118608 118608 0 0.0
.bss 47680 47680 0 0.0
.data 1936 1936 0 0.0
.data.rel.ro 63192 63192 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 680 680 0 0.0
.rodata 203736 203736 0 0.0
.text 1962994 1962994 0 0.0
ota-requestor-app debug (read only) 2448393 2448393 0 0.0
(read/write) 125544 125544 0 0.0
.bss 50048 50048 0 0.0
.data 2240 2240 0 0.0
.data.rel.ro 67416 67416 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 736 736 0 0.0
.rodata 207488 207488 0 0.0
.text 2069442 2069442 0 0.0
shell debug (read only) 2563761 2563761 0 0.0
(read/write) 141336 141336 0 0.0
.bss 57608 57608 0 0.0
.data 1248 1248 0 0.0
.data.rel.ro 76792 76792 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 936 936 0 0.0
.rodata 228050 228050 0 0.0
.text 2178322 2178322 0 0.0
thermostat-no-ble arm64 (read only) 2603684 2603684 0 0.0
(read/write) 158641 158641 0 0.0
.bss 65441 65441 0 0.0
.data 1704 1704 0 0.0
.data.rel.ro 83368 83368 0 0.0
.dynamic 528 528 0 0.0
.got 5104 5104 0 0.0
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 165724 165724 0 0.0
.text 2197664 2197664 0 0.0
tv-app debug (read only) 3111905 3111905 0 0.0
(read/write) 256960 256960 0 0.0
.bss 167064 167064 0 0.0
.data 4736 4736 0 0.0
.data.rel.ro 78728 78728 0 0.0
.dynamic 608 608 0 0.0
.got 4848 4848 0 0.0
.init 27 27 0 0.0
.init_array 960 960 0 0.0
.rodata 249504 249504 0 0.0
.text 2674146 2674146 0 0.0
tv-casting-app debug (read only) 5365153 5365153 0 0.0
(read/write) 158264 158264 0 0.0
.bss 51256 51256 0 0.0
.data 2432 2432 0 0.0
.data.rel.ro 98288 98288 0 0.0
.dynamic 608 608 0 0.0
.got 4736 4736 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 333593 333593 0 0.0
.text 4765202 4765202 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2448544 2448544 0 0.0
.bss 213948 213948 0 0.0
.data 5872 5872 0 0.0
.text 1411188 1411188 0 0.0
p6 all-clusters-app default (read only) 882128 882128 0 0.0
(read/write) 1685404 1685404 0 0.0
.bss 148568 148568 0 0.0
.data 2648 2648 0 0.0
.text 1525800 1525800 0 0.0
all-clusters-minimal-app default (read only) 882848 882848 0 0.0
(read/write) 1629516 1629516 0 0.0
.bss 147848 147848 0 0.0
.data 2648 2648 0 0.0
.text 1470632 1470632 0 0.0
light-app default (read only) 891152 891152 0 0.0
(read/write) 1549516 1549516 0 0.0
.bss 139752 139752 0 0.0
.data 2440 2440 0 0.0
.text 1398936 1398936 0 0.0
lock-app default (read only) 891280 891280 0 0.0
(read/write) 1576516 1576516 0 0.0
.bss 139608 139608 0 0.0
.data 2456 2456 0 0.0
.text 1426064 1426064 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 798396 798396 0 0.0
bss 70584 70584 0 0.0
noinit 40416 40416 0 0.0
text 566530 566530 0 0.0
lighting-app tlsr9518adk80d (read/write) 818444 818444 0 0.0
bss 71428 71428 0 0.0
noinit 40416 40416 0 0.0
text 583074 583074 0 0.0

@woody-apple woody-apple merged commit 7fde831 into project-chip:master Jul 20, 2022
github-actions bot pushed a commit that referenced this pull request Jul 20, 2022
* Fix broken PaseVerifier codepath and add test

* fix formatting

* correct indentations and newline
woody-apple added a commit that referenced this pull request Jul 20, 2022
* Fix broken PaseVerifier codepath and add test

* fix formatting

* correct indentations and newline

Co-authored-by: Amon Al-Khatib <[email protected]>
@ajwak ajwak deleted the ajwak-fix branch July 20, 2022 18:22
isiu-apple pushed a commit to isiu-apple/connectedhomeip that referenced this pull request Sep 16, 2022
* Fix broken PaseVerifier codepath and add test

* fix formatting

* correct indentations and newline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants