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

Disallow writes to readonly attributes via AttributeAccessInterface #11942

Merged

Conversation

bzbarsky-apple
Copy link
Contributor

Problem

AttributeAccessInterface allows writes to readonly attributes.

Change overview

Disallow those writes by checking for the "writable" flag up front.

Testing

Caught problems in our existing tests that were doing writes to readonly lists. Fixed by making those lists writable. This last bit required a bunch of changes to avoid codegen spitting out broken code to try and write the lists.

@bzbarsky-apple bzbarsky-apple force-pushed the disallow-write-to-readonly branch from 701de32 to 07aba95 Compare November 17, 2021 20:17
@todo
Copy link

todo bot commented Nov 17, 2021

Refactor WriteSingleClusterData and all dependent functions to take ConcreteAttributePath instead of ClusterInfo

// TODO: Refactor WriteSingleClusterData and all dependent functions to take ConcreteAttributePath instead of ClusterInfo
// as the input argument.
AttributePathParams attributePathParams;
attributePathParams.mEndpointId = aClusterInfo.mEndpointId;
attributePathParams.mClusterId = aClusterInfo.mClusterId;
attributePathParams.mAttributeId = aClusterInfo.mAttributeId;
// Named aPath for now to reduce the amount of code change that needs to
// happen when the above TODO is resolved.
ConcreteAttributePath aPath(aClusterInfo.mEndpointId, aClusterInfo.mClusterId, aClusterInfo.mAttributeId);
const EmberAfAttributeMetadata * attributeMetadata =


This comment was generated by todo based on a TODO comment in 07aba95 in #11942. cc @bzbarsky-apple.

@todo
Copy link

todo bot commented Nov 17, 2021

is resolved.

// happen when the above TODO is resolved.
ConcreteAttributePath aPath(aClusterInfo.mEndpointId, aClusterInfo.mClusterId, aClusterInfo.mAttributeId);
const EmberAfAttributeMetadata * attributeMetadata =
emberAfLocateAttributeMetadata(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId, CLUSTER_MASK_SERVER, 0);
if (attributeMetadata == nullptr)
{
return apWriteHandler->AddStatus(attributePathParams, Protocols::InteractionModel::Status::UnsupportedAttribute);
}
if (attributeMetadata->IsReadOnly())


This comment was generated by todo based on a TODO comment in 07aba95 in #11942. cc @bzbarsky-apple.

@todo
Copy link

todo bot commented Nov 17, 2021

Lists not supported in attribute writes yet. }}

{{! TODO: Lists not supported in attribute writes yet. }}
{{#unless isList}}
JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, write{{asUpperCamelCase name}}Attribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, {{asJniBasicType type false}} value)
{


This comment was generated by todo based on a TODO comment in 07aba95 in #11942. cc @bzbarsky-apple.

@todo
Copy link

todo bot commented Nov 17, 2021

Lists not supported in attribute writes yet. }}

{{! TODO: Lists not supported in attribute writes yet. }}
{{#unless isList}}
public void write{{asUpperCamelCase name}}Attribute(DefaultClusterCallback callback, {{asJavaBasicType type}} value) {
write{{asUpperCamelCase name}}Attribute(chipClusterPtr, callback, value);
}
{{/unless}}
{{/if}}
{{#if isReportableAttribute}}


This comment was generated by todo based on a TODO comment in 07aba95 in #11942. cc @bzbarsky-apple.

@todo
Copy link

todo bot commented Nov 17, 2021

Lists not supported in attribute writes yet. }}

{{! TODO: Lists not supported in attribute writes yet. }}
{{#unless isList}}
private native void write{{asUpperCamelCase name}}Attribute(long chipClusterPtr, DefaultClusterCallback callback, {{asJavaBasicType type}} value);
{{/unless}}
{{/if}}
{{#if isReportableAttribute}}


This comment was generated by todo based on a TODO comment in 07aba95 in #11942. cc @bzbarsky-apple.

@github-actions
Copy link

github-actions bot commented Nov 17, 2021

PR #11942: Size comparison from 494fb9b to 07aba95

Increases (7 builds for k32w, p6, qpg, telink)
platform target config section 494fb9b 07aba95 change % change
k32w lighting-app k32w061+se05x+release (read/write) 705932 705964 32 0.0
.text 621120 621152 32 0.0
lock-app k32w061+debug (read/write) 597372 597404 32 0.0
.text 522080 522112 32 0.0
shell k32w061+debug (read/write) 662700 662732 32 0.0
.text 576312 576344 32 0.0
p6 all-clusters-app default (read/write) 2296552 2296568 16 0.0
.text 1254816 1254832 16 0.0
lock-app default (read/write) 2214024 2214056 32 0.0
.text 1172288 1172320 32 0.0
qpg lighting-app qpg6100+debug (read only) 492800 492816 16 0.0
.text 487480 487496 16 0.0
telink lighting-app tlsr9518adk80d (read/write) 766926 766950 24 0.0
text 532224 532248 24 0.0
Full report (9 builds for k32w, p6, qpg, telink)
platform target config section 494fb9b 07aba95 change % change
k32w lighting-app k32w061+se05x+release (read/write) 705932 705964 32 0.0
.bss 77100 77100 0 0.0
.data 1912 1912 0 0.0
.text 621120 621152 32 0.0
lock-app k32w061+debug (read/write) 597372 597404 32 0.0
.bss 67612 67612 0 0.0
.data 1880 1880 0 0.0
.text 522080 522112 32 0.0
shell k32w061+debug (read/write) 662700 662732 32 0.0
.bss 78740 78740 0 0.0
.data 1848 1848 0 0.0
.text 576312 576344 32 0.0
p6 all-clusters-app default (read/write) 2296552 2296568 16 0.0
.bss 112208 112208 0 0.0
.data 2520 2520 0 0.0
.heap 918616 918616 0 0.0
.text 1254816 1254832 16 0.0
lock-app default (read/write) 2214024 2214056 32 0.0
.bss 100832 100832 0 0.0
.data 2400 2400 0 0.0
.heap 930112 930112 0 0.0
.text 1172288 1172320 32 0.0
qpg lighting-app qpg6100+debug (read only) 492800 492816 16 0.0
(read/write) 114144 114144 0 0.0
.bss 50176 50176 0 0.0
.data 1008 1008 0 0.0
.text 487480 487496 16 0.0
lock-app qpg6100+debug (read only) 467780 467780 0 0.0
(read/write) 114140 114140 0 0.0
.bss 49120 49120 0 0.0
.data 964 964 0 0.0
.text 462460 462460 0 0.0
persistent-storage-app qpg6100+debug (read only) 105408 105408 0 0.0
(read/write) 114142 114142 0 0.0
.bss 8978 8978 0 0.0
.data 272 272 0 0.0
.text 100088 100088 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 766926 766950 24 0.0
bss 79008 79008 0 0.0
noinit 37160 37160 0 0.0
text 532224 532248 24 0.0

@bzbarsky-apple bzbarsky-apple force-pushed the disallow-write-to-readonly branch from 07aba95 to b8e8279 Compare November 17, 2021 20:52
@github-actions
Copy link

github-actions bot commented Nov 17, 2021

PR #11942: Size comparison from 1359f6e to b8e8279

Increases (29 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 1359f6e b8e8279 change % change
efr32 lighting-app BRD4161A (read only) 748512 748544 32 0.0
.text 748504 748536 32 0.0
BRD4161A+rpc (read only) 736044 736076 32 0.0
.text 736036 736068 32 0.0
lock-app BRD4161A (read only) 725584 725616 32 0.0
.text 725576 725608 32 0.0
window-app BRD4161A (read only) 726560 726592 32 0.0
.text 726552 726584 32 0.0
esp32 all-clusters-app c3devkit (read only) 827530 827532 2 0.0
.flash.text 827530 827532 2 0.0
m5stack (read only) 898495 898543 48 0.0
.flash.text 893111 893159 48 0.0
k32w lighting-app k32w061+se05x+release (read/write) 705932 705964 32 0.0
.text 621120 621152 32 0.0
lock-app k32w061+debug (read/write) 597372 597404 32 0.0
.text 522080 522112 32 0.0
shell k32w061+debug (read/write) 662700 662732 32 0.0
.text 576312 576344 32 0.0
linux all-clusters-app debug (read only) 1718665 1718809 144 0.0
.text 1448434 1448578 144 0.0
bridge-app debug+rpc (read only) 1313765 1313909 144 0.0
.text 1104741 1104885 144 0.0
chip-tool debug (read only) 4975181 4975309 128 0.0
.text 4396341 4396469 128 0.0
lighting-app debug+rpc (read only) 1582849 1582977 128 0.0
.text 1318642 1318770 128 0.0
ota-provider-app debug (read only) 1262441 1262585 144 0.0
.text 1051058 1051202 144 0.0
ota-requestor-app debug (read only) 1348113 1348241 128 0.0
.text 1123330 1123458 128 0.0
tv-app debug (read only) 1865521 1865649 128 0.0
.text 1562754 1562882 128 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read/write) 2286616 2286680 64 0.0
.text 1249216 1249280 64 0.0
lighting-app CY8CPROTO_062_4343W+release (read/write) 2272552 2272616 64 0.0
.text 1235152 1235216 64 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 863591 863623 32 0.0
text 581696 581732 36 0.0
nrf52840dk_nrf52840+rpc (read/write) 825991 826023 32 0.0
text 555864 555900 36 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 788634 788666 32 0.0
text 511168 511204 36 0.0
lock-app nrf52840dk_nrf52840 (read/write) 839007 839039 32 0.0
text 561788 561824 36 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 764310 764342 32 0.0
text 491352 491388 36 0.0
pump-app nrf52840dk_nrf52840 (read/write) 845115 845163 48 0.0
text 565972 566008 36 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 838707 838739 32 0.0
text 561408 561444 36 0.0
p6 all-clusters-app default (read/write) 2296552 2296568 16 0.0
.text 1254816 1254832 16 0.0
lock-app default (read/write) 2214024 2214056 32 0.0
.text 1172288 1172320 32 0.0
qpg lighting-app qpg6100+debug (read only) 492800 492816 16 0.0
.text 487480 487496 16 0.0
telink lighting-app tlsr9518adk80d (read/write) 766926 766950 24 0.0
text 532224 532248 24 0.0
Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 1359f6e b8e8279 change % change
efr32 lighting-app BRD4161A (read only) 748512 748544 32 0.0
(read/write) 115476 115476 0 0.0
.bss 113676 113676 0 0.0
.data 1800 1800 0 0.0
.text 748504 748536 32 0.0
BRD4161A+rpc (read only) 736044 736076 32 0.0
(read/write) 132104 132104 0 0.0
.bss 130180 130180 0 0.0
.data 1924 1924 0 0.0
.text 736036 736068 32 0.0
lock-app BRD4161A (read only) 725584 725616 32 0.0
(read/write) 113260 113260 0 0.0
.bss 111500 111500 0 0.0
.data 1756 1756 0 0.0
.text 725576 725608 32 0.0
window-app BRD4161A (read only) 726560 726592 32 0.0
(read/write) 113580 113580 0 0.0
.bss 111820 111820 0 0.0
.data 1760 1760 0 0.0
.text 726552 726584 32 0.0
esp32 all-clusters-app c3devkit (read only) 827530 827532 2 0.0
(read/write) 1220066 1220066 0 0.0
.dram0.bss 56624 56624 0 0.0
.dram0.data 14084 14084 0 0.0
.flash.rodata 164104 164104 0 0.0
.flash.text 827530 827532 2 0.0
.iram0.text 61394 61394 0 0.0
m5stack (read only) 898495 898543 48 0.0
(read/write) 419388 419388 0 0.0
.dram0.bss 61976 61976 0 0.0
.dram0.data 34056 34056 0 0.0
.flash.rodata 192076 192076 0 0.0
.flash.text 893111 893159 48 0.0
.iram0.text 122943 122943 0 0.0
k32w lighting-app k32w061+se05x+release (read/write) 705932 705964 32 0.0
.bss 77100 77100 0 0.0
.data 1912 1912 0 0.0
.text 621120 621152 32 0.0
lock-app k32w061+debug (read/write) 597372 597404 32 0.0
.bss 67612 67612 0 0.0
.data 1880 1880 0 0.0
.text 522080 522112 32 0.0
shell k32w061+debug (read/write) 662700 662732 32 0.0
.bss 78740 78740 0 0.0
.data 1848 1848 0 0.0
.text 576312 576344 32 0.0
linux all-clusters-app debug (read only) 1718665 1718809 144 0.0
(read/write) 126752 126752 0 0.0
.bss 57328 57328 0 0.0
.data 1042 1042 0 0.0
.data.rel.ro 63088 63088 0 0.0
.dynamic 592 592 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 552 552 0 0.0
.rodata 136277 136277 0 0.0
.text 1448434 1448578 144 0.0
bridge-app debug+rpc (read only) 1313765 1313909 144 0.0
(read/write) 76944 76944 0 0.0
.bss 42032 42032 0 0.0
.data 1568 1568 0 0.0
.data.rel.ro 28344 28344 0 0.0
.dynamic 592 592 0 0.0
.got 3984 3984 0 0.0
.init 27 27 0 0.0
.init_array 408 408 0 0.0
.rodata 111620 111620 0 0.0
.text 1104741 1104885 144 0.0
chip-tool debug (read only) 4975181 4975309 128 0.0
(read/write) 166856 166856 0 0.0
.bss 40392 40392 0 0.0
.data 2272 2272 0 0.0
.data.rel.ro 118680 118680 0 0.0
.dynamic 592 592 0 0.0
.got 4416 4416 0 0.0
.init 27 27 0 0.0
.init_array 472 472 0 0.0
.rodata 268330 268330 0 0.0
.text 4396341 4396469 128 0.0
lighting-app debug+rpc (read only) 1582849 1582977 128 0.0
(read/write) 110160 110160 0 0.0
.bss 47696 47696 0 0.0
.data 1234 1234 0 0.0
.data.rel.ro 55904 55904 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 536 536 0 0.0
.rodata 129201 129201 0 0.0
.text 1318642 1318770 128 0.0
ota-provider-app debug (read only) 1262441 1262585 144 0.0
(read/write) 75592 75592 0 0.0
.bss 44640 44640 0 0.0
.data 784 784 0 0.0
.data.rel.ro 25080 25080 0 0.0
.dynamic 592 592 0 0.0
.got 4016 4016 0 0.0
.init 27 27 0 0.0
.init_array 448 448 0 0.0
.rodata 113791 113791 0 0.0
.text 1051058 1051202 144 0.0
ota-requestor-app debug (read only) 1348113 1348241 128 0.0
(read/write) 79328 79328 0 0.0
.bss 47104 47104 0 0.0
.data 848 848 0 0.0
.data.rel.ro 26280 26280 0 0.0
.dynamic 592 592 0 0.0
.got 3992 3992 0 0.0
.init 27 27 0 0.0
.init_array 472 472 0 0.0
.rodata 124808 124808 0 0.0
.text 1123330 1123458 128 0.0
shell debug (read only) 798129 798129 0 0.0
(read/write) 66440 66440 0 0.0
.bss 23944 23944 0 0.0
.data 242 242 0 0.0
.data.rel.ro 37752 37752 0 0.0
.dynamic 592 592 0 0.0
.got 3528 3528 0 0.0
.init 27 27 0 0.0
.init_array 344 344 0 0.0
.rodata 78639 78639 0 0.0
.text 615474 615474 0 0.0
tv-app debug (read only) 1865521 1865649 128 0.0
(read/write) 318904 318904 0 0.0
.bss 250312 250312 0 0.0
.data 2768 2768 0 0.0
.data.rel.ro 60136 60136 0 0.0
.dynamic 592 592 0 0.0
.got 4432 4432 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 157637 157637 0 0.0
.text 1562754 1562882 128 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2286616 2286680 64 0.0
.bss 179220 179220 0 0.0
.data 5216 5216 0 0.0
.heap 852008 852008 0 0.0
.text 1249216 1249280 64 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2272552 2272616 64 0.0
.bss 172084 172084 0 0.0
.data 5576 5576 0 0.0
.heap 858784 858784 0 0.0
.text 1235152 1235216 64 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2248456 2248456 0 0.0
.bss 170972 170972 0 0.0
.data 5568 5568 0 0.0
.heap 859904 859904 0 0.0
.text 1211056 1211056 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139744 1139744 0 0.0
.bss 11752 11752 0 0.0
.data 4368 4368 0 0.0
.heap 1020328 1020328 0 0.0
.text 103128 103128 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2050352 2050352 0 0.0
.bss 156224 156224 0 0.0
.data 4968 4968 0 0.0
.heap 875256 875256 0 0.0
.text 1012952 1012952 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 863591 863623 32 0.0
bss 110496 110496 0 0.0
rodata 95784 95784 0 0.0
text 581696 581732 36 0.0
nrf52840dk_nrf52840+rpc (read/write) 825991 826023 32 0.0
bss 106852 106852 0 0.0
rodata 86968 86968 0 0.0
text 555864 555900 36 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 788634 788666 32 0.0
bss 111872 111872 0 0.0
rodata 91044 91044 0 0.0
text 511168 511204 36 0.0
lock-app nrf52840dk_nrf52840 (read/write) 839007 839039 32 0.0
bss 109520 109520 0 0.0
rodata 92256 92256 0 0.0
text 561788 561824 36 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 764310 764342 32 0.0
bss 110932 110932 0 0.0
rodata 87560 87560 0 0.0
text 491352 491388 36 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 497327 497327 0 0.0
bss 51824 51824 0 0.0
rodata 45780 45780 0 0.0
text 339436 339436 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 845115 845163 48 0.0
bss 109660 109660 0 0.0
rodata 93964 93964 0 0.0
text 565972 566008 36 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 838707 838739 32 0.0
bss 109556 109556 0 0.0
rodata 92212 92212 0 0.0
text 561408 561444 36 0.0
shell nrf52840dk_nrf52840 (read/write) 777795 777795 0 0.0
bss 109068 109068 0 0.0
rodata 73064 73064 0 0.0
text 521068 521068 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 692850 692850 0 0.0
bss 110052 110052 0 0.0
rodata 67708 67708 0 0.0
text 441680 441680 0 0.0
p6 all-clusters-app default (read/write) 2296552 2296568 16 0.0
.bss 112208 112208 0 0.0
.data 2520 2520 0 0.0
.heap 918616 918616 0 0.0
.text 1254816 1254832 16 0.0
lock-app default (read/write) 2214024 2214056 32 0.0
.bss 100832 100832 0 0.0
.data 2400 2400 0 0.0
.heap 930112 930112 0 0.0
.text 1172288 1172320 32 0.0
qpg lighting-app qpg6100+debug (read only) 492800 492816 16 0.0
(read/write) 114144 114144 0 0.0
.bss 50176 50176 0 0.0
.data 1008 1008 0 0.0
.text 487480 487496 16 0.0
lock-app qpg6100+debug (read only) 467780 467780 0 0.0
(read/write) 114140 114140 0 0.0
.bss 49120 49120 0 0.0
.data 964 964 0 0.0
.text 462460 462460 0 0.0
persistent-storage-app qpg6100+debug (read only) 105408 105408 0 0.0
(read/write) 114142 114142 0 0.0
.bss 8978 8978 0 0.0
.data 272 272 0 0.0
.text 100088 100088 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 766926 766950 24 0.0
bss 79008 79008 0 0.0
noinit 37160 37160 0 0.0
text 532224 532248 24 0.0

@bzbarsky-apple
Copy link
Contributor Author

…cepted.

Need to move the IsReadOnly() check higher up the callstack.
@bzbarsky-apple bzbarsky-apple force-pushed the disallow-write-to-readonly branch from b8e8279 to d7448ac Compare November 18, 2021 21:28
@github-actions
Copy link

github-actions bot commented Nov 18, 2021

PR #11942: Size comparison from ef6455d to d7448ac

Increases (6 builds for k32w, p6, telink)
platform target config section ef6455d d7448ac change % change
k32w lighting-app k32w061+se05x+release (read/write) 706840 706872 32 0.0
.text 621964 621996 32 0.0
lock-app k32w061+debug (read/write) 598280 598312 32 0.0
.text 522924 522956 32 0.0
shell k32w061+debug (read/write) 663624 663656 32 0.0
.text 577172 577204 32 0.0
p6 all-clusters-app default (read/write) 2297936 2297968 32 0.0
.text 1256200 1256232 32 0.0
lock-app default (read/write) 2215424 2215456 32 0.0
.text 1173688 1173720 32 0.0
telink lighting-app tlsr9518adk80d (read/write) 767986 768010 24 0.0
text 533170 533194 24 0.0
Full report (9 builds for k32w, p6, qpg, telink)
platform target config section ef6455d d7448ac change % change
k32w lighting-app k32w061+se05x+release (read/write) 706840 706872 32 0.0
.bss 77164 77164 0 0.0
.data 1912 1912 0 0.0
.text 621964 621996 32 0.0
lock-app k32w061+debug (read/write) 598280 598312 32 0.0
.bss 67676 67676 0 0.0
.data 1880 1880 0 0.0
.text 522924 522956 32 0.0
shell k32w061+debug (read/write) 663624 663656 32 0.0
.bss 78804 78804 0 0.0
.data 1848 1848 0 0.0
.text 577172 577204 32 0.0
p6 all-clusters-app default (read/write) 2297936 2297968 32 0.0
.bss 112272 112272 0 0.0
.data 2520 2520 0 0.0
.heap 918552 918552 0 0.0
.text 1256200 1256232 32 0.0
lock-app default (read/write) 2215424 2215456 32 0.0
.bss 100896 100896 0 0.0
.data 2400 2400 0 0.0
.heap 930048 930048 0 0.0
.text 1173688 1173720 32 0.0
qpg lighting-app qpg6100+debug (read only) 493688 493688 0 0.0
(read/write) 114144 114144 0 0.0
.bss 50208 50208 0 0.0
.data 1008 1008 0 0.0
.text 488368 488368 0 0.0
lock-app qpg6100+debug (read only) 468652 468652 0 0.0
(read/write) 114140 114140 0 0.0
.bss 49152 49152 0 0.0
.data 964 964 0 0.0
.text 463332 463332 0 0.0
persistent-storage-app qpg6100+debug (read only) 105408 105408 0 0.0
(read/write) 114142 114142 0 0.0
.bss 8978 8978 0 0.0
.data 272 272 0 0.0
.text 100088 100088 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 767986 768010 24 0.0
bss 79072 79072 0 0.0
noinit 37160 37160 0 0.0
text 533170 533194 24 0.0

@bzbarsky-apple bzbarsky-apple force-pushed the disallow-write-to-readonly branch from d7448ac to e054d94 Compare November 18, 2021 21:55
@github-actions
Copy link

github-actions bot commented Nov 18, 2021

PR #11942: Size comparison from ef6455d to e054d94

Increases (27 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section ef6455d e054d94 change % change
efr32 lighting-app BRD4161A (read only) 749928 749960 32 0.0
.text 749920 749952 32 0.0
BRD4161A+rpc (read only) 737468 737484 16 0.0
.text 737460 737476 16 0.0
lock-app BRD4161A (read only) 726984 727016 32 0.0
.text 726976 727008 32 0.0
window-app BRD4161A (read only) 727968 728000 32 0.0
.text 727960 727992 32 0.0
esp32 all-clusters-app c3devkit (read only) 828536 828538 2 0.0
.flash.text 828536 828538 2 0.0
m5stack (read only) 899555 899595 40 0.0
.flash.text 894171 894211 40 0.0
k32w lighting-app k32w061+se05x+release (read/write) 706840 706872 32 0.0
.text 621964 621996 32 0.0
lock-app k32w061+debug (read/write) 598280 598312 32 0.0
.text 522924 522956 32 0.0
shell k32w061+debug (read/write) 663624 663656 32 0.0
.text 577172 577204 32 0.0
linux all-clusters-app debug (read only) 1726009 1726153 144 0.0
.text 1455394 1455538 144 0.0
bridge-app debug+rpc (read only) 1321037 1321181 144 0.0
.text 1111701 1111845 144 0.0
chip-tool debug (read only) 4985917 4986061 144 0.0
.text 4406949 4407093 144 0.0
lighting-app debug+rpc (read only) 1590161 1590289 128 0.0
.text 1325602 1325730 128 0.0
ota-provider-app debug (read only) 1268601 1268729 128 0.0
.text 1057058 1057186 128 0.0
ota-requestor-app debug (read only) 1354337 1354465 128 0.0
.text 1129394 1129522 128 0.0
tv-app debug (read only) 1872657 1872785 128 0.0
.text 1569634 1569762 128 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2249392 2249456 64 0.0
.text 1211992 1212056 64 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 864563 864595 32 0.0
text 582568 582604 36 0.0
nrf52840dk_nrf52840+rpc (read/write) 826963 826995 32 0.0
text 556736 556772 36 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 789618 789650 32 0.0
text 512040 512076 36 0.0
lock-app nrf52840dk_nrf52840 (read/write) 839995 840027 32 0.0
text 562660 562696 36 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 765282 765330 48 0.0
text 492224 492260 36 0.0
pump-app nrf52840dk_nrf52840 (read/write) 846103 846135 32 0.0
text 566844 566880 36 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 839695 839727 32 0.0
text 562280 562316 36 0.0
p6 all-clusters-app default (read/write) 2297936 2297968 32 0.0
.text 1256200 1256232 32 0.0
lock-app default (read/write) 2215424 2215456 32 0.0
.text 1173688 1173720 32 0.0
telink lighting-app tlsr9518adk80d (read/write) 767986 768010 24 0.0
text 533170 533194 24 0.0
Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section ef6455d e054d94 change % change
efr32 lighting-app BRD4161A (read only) 749928 749960 32 0.0
(read/write) 115540 115540 0 0.0
.bss 113740 113740 0 0.0
.data 1800 1800 0 0.0
.text 749920 749952 32 0.0
BRD4161A+rpc (read only) 737468 737484 16 0.0
(read/write) 132168 132168 0 0.0
.bss 130244 130244 0 0.0
.data 1924 1924 0 0.0
.text 737460 737476 16 0.0
lock-app BRD4161A (read only) 726984 727016 32 0.0
(read/write) 113324 113324 0 0.0
.bss 111564 111564 0 0.0
.data 1756 1756 0 0.0
.text 726976 727008 32 0.0
window-app BRD4161A (read only) 727968 728000 32 0.0
(read/write) 113644 113644 0 0.0
.bss 111884 111884 0 0.0
.data 1760 1760 0 0.0
.text 727960 727992 32 0.0
esp32 all-clusters-app c3devkit (read only) 828536 828538 2 0.0
(read/write) 1220178 1220178 0 0.0
.dram0.bss 56688 56688 0 0.0
.dram0.data 14084 14084 0 0.0
.flash.rodata 164152 164152 0 0.0
.flash.text 828536 828538 2 0.0
.iram0.text 61394 61394 0 0.0
m5stack (read only) 899555 899595 40 0.0
(read/write) 419492 419492 0 0.0
.dram0.bss 62040 62040 0 0.0
.dram0.data 34056 34056 0 0.0
.flash.rodata 192116 192116 0 0.0
.flash.text 894171 894211 40 0.0
.iram0.text 122943 122943 0 0.0
k32w lighting-app k32w061+se05x+release (read/write) 706840 706872 32 0.0
.bss 77164 77164 0 0.0
.data 1912 1912 0 0.0
.text 621964 621996 32 0.0
lock-app k32w061+debug (read/write) 598280 598312 32 0.0
.bss 67676 67676 0 0.0
.data 1880 1880 0 0.0
.text 522924 522956 32 0.0
shell k32w061+debug (read/write) 663624 663656 32 0.0
.bss 78804 78804 0 0.0
.data 1848 1848 0 0.0
.text 577172 577204 32 0.0
linux all-clusters-app debug (read only) 1726009 1726153 144 0.0
(read/write) 126816 126816 0 0.0
.bss 57392 57392 0 0.0
.data 1042 1042 0 0.0
.data.rel.ro 63088 63088 0 0.0
.dynamic 592 592 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 552 552 0 0.0
.rodata 136661 136661 0 0.0
.text 1455394 1455538 144 0.0
bridge-app debug+rpc (read only) 1321037 1321181 144 0.0
(read/write) 77008 77008 0 0.0
.bss 42096 42096 0 0.0
.data 1568 1568 0 0.0
.data.rel.ro 28352 28352 0 0.0
.dynamic 592 592 0 0.0
.got 3984 3984 0 0.0
.init 27 27 0 0.0
.init_array 408 408 0 0.0
.rodata 111932 111932 0 0.0
.text 1111701 1111845 144 0.0
chip-tool debug (read only) 4985917 4986061 144 0.0
(read/write) 166888 166888 0 0.0
.bss 40456 40456 0 0.0
.data 2272 2272 0 0.0
.data.rel.ro 118672 118672 0 0.0
.dynamic 592 592 0 0.0
.got 4416 4416 0 0.0
.init 27 27 0 0.0
.init_array 472 472 0 0.0
.rodata 268458 268458 0 0.0
.text 4406949 4407093 144 0.0
lighting-app debug+rpc (read only) 1590161 1590289 128 0.0
(read/write) 110224 110224 0 0.0
.bss 47760 47760 0 0.0
.data 1234 1234 0 0.0
.data.rel.ro 55920 55920 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 536 536 0 0.0
.rodata 129553 129553 0 0.0
.text 1325602 1325730 128 0.0
ota-provider-app debug (read only) 1268601 1268729 128 0.0
(read/write) 75656 75656 0 0.0
.bss 44704 44704 0 0.0
.data 784 784 0 0.0
.data.rel.ro 25080 25080 0 0.0
.dynamic 592 592 0 0.0
.got 4016 4016 0 0.0
.init 27 27 0 0.0
.init_array 448 448 0 0.0
.rodata 113951 113951 0 0.0
.text 1057058 1057186 128 0.0
ota-requestor-app debug (read only) 1354337 1354465 128 0.0
(read/write) 79392 79392 0 0.0
.bss 47168 47168 0 0.0
.data 848 848 0 0.0
.data.rel.ro 26280 26280 0 0.0
.dynamic 592 592 0 0.0
.got 3992 3992 0 0.0
.init 27 27 0 0.0
.init_array 472 472 0 0.0
.rodata 124968 124968 0 0.0
.text 1129394 1129522 128 0.0
shell debug (read only) 798801 798801 0 0.0
(read/write) 66440 66440 0 0.0
.bss 23944 23944 0 0.0
.data 242 242 0 0.0
.data.rel.ro 37752 37752 0 0.0
.dynamic 592 592 0 0.0
.got 3528 3528 0 0.0
.init 27 27 0 0.0
.init_array 344 344 0 0.0
.rodata 78703 78703 0 0.0
.text 616082 616082 0 0.0
tv-app debug (read only) 1872657 1872785 128 0.0
(read/write) 318968 318968 0 0.0
.bss 250376 250376 0 0.0
.data 2768 2768 0 0.0
.data.rel.ro 60144 60144 0 0.0
.dynamic 592 592 0 0.0
.got 4432 4432 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 157893 157893 0 0.0
.text 1569634 1569762 128 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2287616 2287616 0 0.0
.bss 179284 179284 0 0.0
.data 5216 5216 0 0.0
.heap 851944 851944 0 0.0
.text 1250216 1250216 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2273552 2273552 0 0.0
.bss 172148 172148 0 0.0
.data 5576 5576 0 0.0
.heap 858720 858720 0 0.0
.text 1236152 1236152 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2249392 2249456 64 0.0
.bss 171036 171036 0 0.0
.data 5568 5568 0 0.0
.heap 859840 859840 0 0.0
.text 1211992 1212056 64 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139744 1139744 0 0.0
.bss 11752 11752 0 0.0
.data 4368 4368 0 0.0
.heap 1020328 1020328 0 0.0
.text 103128 103128 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2050480 2050480 0 0.0
.bss 156224 156224 0 0.0
.data 4968 4968 0 0.0
.heap 875256 875256 0 0.0
.text 1013080 1013080 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 864563 864595 32 0.0
bss 110560 110560 0 0.0
rodata 95828 95828 0 0.0
text 582568 582604 36 0.0
nrf52840dk_nrf52840+rpc (read/write) 826963 826995 32 0.0
bss 106916 106916 0 0.0
rodata 87012 87012 0 0.0
text 556736 556772 36 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 789618 789650 32 0.0
bss 111936 111936 0 0.0
rodata 91084 91084 0 0.0
text 512040 512076 36 0.0
lock-app nrf52840dk_nrf52840 (read/write) 839995 840027 32 0.0
bss 109584 109584 0 0.0
rodata 92300 92300 0 0.0
text 562660 562696 36 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 765282 765330 48 0.0
bss 110996 110996 0 0.0
rodata 87604 87604 0 0.0
text 492224 492260 36 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 497327 497327 0 0.0
bss 51824 51824 0 0.0
rodata 45780 45780 0 0.0
text 339436 339436 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 846103 846135 32 0.0
bss 109724 109724 0 0.0
rodata 94008 94008 0 0.0
text 566844 566880 36 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 839695 839727 32 0.0
bss 109620 109620 0 0.0
rodata 92256 92256 0 0.0
text 562280 562316 36 0.0
shell nrf52840dk_nrf52840 (read/write) 777971 777971 0 0.0
bss 109068 109068 0 0.0
rodata 73064 73064 0 0.0
text 521236 521236 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 693026 693026 0 0.0
bss 110052 110052 0 0.0
rodata 67708 67708 0 0.0
text 441848 441848 0 0.0
p6 all-clusters-app default (read/write) 2297936 2297968 32 0.0
.bss 112272 112272 0 0.0
.data 2520 2520 0 0.0
.heap 918552 918552 0 0.0
.text 1256200 1256232 32 0.0
lock-app default (read/write) 2215424 2215456 32 0.0
.bss 100896 100896 0 0.0
.data 2400 2400 0 0.0
.heap 930048 930048 0 0.0
.text 1173688 1173720 32 0.0
qpg lighting-app qpg6100+debug (read only) 493688 493688 0 0.0
(read/write) 114144 114144 0 0.0
.bss 50208 50208 0 0.0
.data 1008 1008 0 0.0
.text 488368 488368 0 0.0
lock-app qpg6100+debug (read only) 468652 468652 0 0.0
(read/write) 114140 114140 0 0.0
.bss 49152 49152 0 0.0
.data 964 964 0 0.0
.text 463332 463332 0 0.0
persistent-storage-app qpg6100+debug (read only) 105408 105408 0 0.0
(read/write) 114142 114142 0 0.0
.bss 8978 8978 0 0.0
.data 272 272 0 0.0
.text 100088 100088 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 767986 768010 24 0.0
bss 79072 79072 0 0.0
noinit 37160 37160 0 0.0
text 533170 533194 24 0.0

@bzbarsky-apple bzbarsky-apple merged commit ebadd33 into project-chip:master Nov 18, 2021
@bzbarsky-apple bzbarsky-apple deleted the disallow-write-to-readonly branch November 18, 2021 23:33
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.

4 participants