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

[msg] Consolidate use of SetSecurityFlags. #10921

Merged
merged 2 commits into from
Oct 27, 2021

Conversation

turon
Copy link
Contributor

@turon turon commented Oct 25, 2021

Problem

Setting raw mSecFlags in Decode without also updating mSessionType may lead to invalid internal state.

Change overview

Consolidate setting of SecurityFlags and Session Type with SetSecurityFlags() method.

Also flatten SuccessOrExit calls in MessageHeader.cpp.

Testing

CI unit suite.

@turon turon force-pushed the msg/nonce branch 2 times, most recently from e0332d9 to f1506d3 Compare October 25, 2021 19:43
@turon turon changed the title [msg] Correct nonce to match spec. [msg] Consolidate use of SetSecurityFlags. Oct 25, 2021
@github-actions
Copy link

github-actions bot commented Oct 25, 2021

PR #10921: Size comparison from 66f4ec6 to cfe2451

8 builds (for k32w, p6, qpg, telink)
platform target config section 66f4ec6 cfe2451 change % change
k32w lock-app k32w061+debug .bss 69196 69196 0 0.0
.data 1864 1864 0 0.0
.text 515140 515140 0 0.0
shell k32w061+debug .bss 63256 63256 0 0.0
.data 672 672 0 0.0
.text 359572 359572 0 0.0
lighting-app k32w061+se05x+release .bss 78712 78712 0 0.0
.data 1900 1900 0 0.0
.text 613776 613776 0 0.0
p6 lock-app default .bss 67176 67176 0 0.0
.data 2416 2416 0 0.0
.heap 963752 963752 0 0.0
.text 1126040 1126072 32 0.0
qpg lighting-app qpg6100+debug .bss 52416 52416 0 0.0
.data 1000 1000 0 0.0
.text 485044 485044 0 0.0
lock-app qpg6100+debug .bss 51360 51360 0 0.0
.data 956 956 0 0.0
.text 461264 461264 0 0.0
persistent-storage-app qpg6100+debug .bss 27752 27752 0 0.0
.data 372 372 0 0.0
.text 149900 149900 0 0.0
telink lighting-app tlsr9518adk80d bss 69940 69940 0 0.0
noinit 33216 33216 0 0.0
text 457672 457672 0 0.0
12 builds (for efr32, linux)
platform target config section 66f4ec6 cfe2451 change % change
efr32 lighting-app BRD4161A .bss 113684 113684 0 0.0
.data 1752 1752 0 0.0
.text 735768 735800 32 0.0
lock-app BRD4161A .bss 111540 111540 0 0.0
.data 1712 1712 0 0.0
.text 715032 715064 32 0.0
window-app BRD4161A .bss 111852 111852 0 0.0
.data 1716 1716 0 0.0
.text 715828 715860 32 0.0
lighting-app BRD4161A+rpc .bss 130188 130188 0 0.0
.data 1852 1852 0 0.0
.text 723184 723216 32 0.0
linux all-clusters-app debug .bss 50160 50160 0 0.0
.data 978 978 0 0.0
.data.rel.ro 60640 60640 0 0.0
.dynamic 592 592 0 0.0
.got 4088 4088 0 0.0
.init 27 27 0 0.0
.init_array 512 512 0 0.0
.rodata 134517 134517 0 0.0
.text 1353986 1354082 96 0.0
chip-tool debug .bss 17680 17680 0 0.0
.data 1584 1584 0 0.0
.data.rel.ro 94624 94624 0 0.0
.dynamic 592 592 0 0.0
.got 4368 4368 0 0.0
.init 27 27 0 0.0
.init_array 416 416 0 0.0
.rodata 207396 207396 0 0.0
.text 3624229 3624309 80 0.0
ota-provider-app debug .bss 37440 37440 0 0.0
.data 752 752 0 0.0
.data.rel.ro 24488 24488 0 0.0
.dynamic 592 592 0 0.0
.got 4016 4016 0 0.0
.init 27 27 0 0.0
.init_array 440 440 0 0.0
.rodata 110344 110344 0 0.0
.text 1023698 1023778 80 0.0
ota-requestor-app debug .bss 205696 205696 0 0.0
.data 752 752 0 0.0
.data.rel.ro 25832 25832 0 0.0
.dynamic 592 592 0 0.0
.got 4144 4144 0 0.0
.init 27 27 0 0.0
.init_array 512 512 0 0.0
.rodata 128424 128424 0 0.0
.text 1142130 1142210 80 0.0
shell debug .bss 16136 16136 0 0.0
.data 242 242 0 0.0
.data.rel.ro 36496 36496 0 0.0
.dynamic 592 592 0 0.0
.got 3528 3528 0 0.0
.init 27 27 0 0.0
.init_array 336 336 0 0.0
.rodata 76495 76495 0 0.0
.text 599602 599682 80 0.0
tv-app debug .bss 215536 215536 0 0.0
.data 2032 2032 0 0.0
.data.rel.ro 57424 57424 0 0.0
.dynamic 592 592 0 0.0
.got 4408 4408 0 0.0
.init 27 27 0 0.0
.init_array 608 608 0 0.0
.rodata 152072 152072 0 0.0
.text 1454322 1454402 80 0.0
bridge-app debug+rpc .bss 51856 51856 0 0.0
.data 976 976 0 0.0
.data.rel.ro 27112 27112 0 0.0
.dynamic 592 592 0 0.0
.got 3952 3952 0 0.0
.init 27 27 0 0.0
.init_array 400 400 0 0.0
.rodata 109740 109740 0 0.0
.text 1064261 1064357 96 0.0
lighting-app debug+rpc .bss 41176 41176 0 0.0
.data 1106 1106 0 0.0
.data.rel.ro 53808 53808 0 0.0
.dynamic 608 608 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 528 528 0 0.0
.rodata 126897 126897 0 0.0
.text 1262162 1262242 80 0.0
4 builds (for mbed)
platform target config section 66f4ec6 cfe2451 change % change
mbed all-clusters-app CY8CPROTO_062_4343W+release .bss 179596 179596 0 0.0
.data 5192 5192 0 0.0
.heap 851656 851656 0 0.0
.text 1251216 1252360 1144 0.1
lighting-app CY8CPROTO_062_4343W+release .bss 171060 171060 0 0.0
.data 5464 5464 0 0.0
.heap 859920 859920 0 0.0
.text 1219256 1220464 1208 0.1
lock-app CY8CPROTO_062_4343W+release .bss 169980 169980 0 0.0
.data 5432 5432 0 0.0
.heap 861032 861032 0 0.0
.text 1197280 1198424 1144 0.1
pigweed-app CY8CPROTO_062_4343W+release .bss 11760 11760 0 0.0
.data 4360 4360 0 0.0
.heap 1020328 1020328 0 0.0
.text 103064 103064 0 0.0
12 builds (for esp32, nrfconnect)
platform target config section 66f4ec6 cfe2451 change % change
esp32 all-clusters-app c3devkit .dram0.bss 58232 58232 0 0.0
.dram0.data 16464 16464 0 0.0
.flash.rodata 198048 198048 0 0.0
.flash.text 874382 874382 0 0.0
.iram0.text 57564 57564 0 0.0
m5stack .dram0.bss 60736 60736 0 0.0
.dram0.data 32084 32084 0 0.0
.flash.rodata 206808 206808 0 0.0
.flash.text 905539 905451 -88 -0.0
.iram0.text 125115 125115 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 bss 112136 112136 0 0.0
rodata 97100 97100 0 0.0
text 577204 577204 0 0.0
lock-app nrf52840dk_nrf52840 bss 111208 111208 0 0.0
rodata 93500 93500 0 0.0
text 558764 558764 0 0.0
pigweed-app nrf52840dk_nrf52840 bss 51824 51824 0 0.0
rodata 45776 45776 0 0.0
text 339456 339456 0 0.0
pump-app nrf52840dk_nrf52840 bss 111308 111308 0 0.0
rodata 94700 94700 0 0.0
text 561868 561868 0 0.0
pump-controller-app nrf52840dk_nrf52840 bss 111204 111204 0 0.0
rodata 93476 93476 0 0.0
text 558508 558508 0 0.0
shell nrf52840dk_nrf52840 bss 109072 109072 0 0.0
rodata 72536 72536 0 0.0
text 520324 520324 0 0.0
lighting-app nrf52840dk_nrf52840+rpc bss 108376 108376 0 0.0
rodata 87876 87876 0 0.0
text 550396 550396 0 0.0
nrf5340dk_nrf5340_cpuapp bss 113508 113508 0 0.0
rodata 92340 92340 0 0.0
text 506676 506676 0 0.0
lock-app nrf5340dk_nrf5340_cpuapp bss 112580 112580 0 0.0
rodata 88760 88760 0 0.0
text 488228 488228 0 0.0
shell nrf5340dk_nrf5340_cpuapp bss 110056 110056 0 0.0
rodata 67180 67180 0 0.0
text 440936 440936 0 0.0

@pullapprove pullapprove bot requested a review from selissia October 26, 2021 18:58
@woody-apple woody-apple merged commit 623d8eb into project-chip:master Oct 27, 2021
JasonLiuZhuoCheng pushed a commit to JasonLiuZhuoCheng/connectedhomeip that referenced this pull request Oct 28, 2021
* [msg] Utilize new SetMessageFlags() and SetSecurityFlags() methods.

* [msg] Flatten SuccessOrExit calls in MessageHeader.cpp.
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.

5 participants