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

Move ring buffer bound check early #4514

Merged
merged 4 commits into from
Nov 10, 2022
Merged

Conversation

jumaffre
Copy link
Contributor

Because the enclave logger makes use of the ring buffer, we cannot log an error before we've checked that the ring buffer bounds are not in enclave memory so this PR moves the is_outside_enclave check early.

src/enclave/main.cpp Outdated Show resolved Hide resolved
@ccf-bot
Copy link
Collaborator

ccf-bot commented Nov 10, 2022

toctou_logging@53663 aka 20221110.12 vs main ewma over 20 builds from 53390 to 53659

Click to see table

main

build_id build_number Commit latency factor tpcc_virtual_cft^ ls_virtual_cft^ ls_jwt_virtual_cft^ ls_js_virtual_cft^ ls_full_js_virtual_cft^ ls_js_jwt_virtual_cft^ tpcc_sgx_cft^ tpcc_sgx_cft_mem hist_sgx_cft^ ls_sgx_cft^ ls_sgx_cft_mem ls_jwt_sgx_cft^ ls_jwt_sgx_cft_mem ls_js_sgx_cft^ ls_js_sgx_cft_mem ls_full_js_sgx_cft^ ls_full_js_sgx_cft_mem ls_js_jwt_sgx_cft^ ls_js_jwt_sgx_cft_mem RB put (/s)^ CHAMP put (/s)^ RB get (/s)^ CHAMP get (/s)^
53390 20221107.2 0.759251 17295.8 47887.7 12456.9 4568.97 3560.26 3409.62 6286.65 8.27106e+07 22188.9 16624.9 1.50774e+07 5775.98 1.53396e+07 2103.34 9.04813e+06 1711.39 8.52384e+06 1631.4 7.73741e+06 837487 1.18031e+06 8.15189e+06 3.10421e+07
53405 20221107.8 0.781129 17149.5 48191.2 12388.6 4576.77 3577.68 3387.94 6317.08 8.24484e+07 20796.3 16627.4 1.50774e+07 6041.32 1.50774e+07 2076.62 8.78598e+06 1701.61 8.52384e+06 1653.67 7.99955e+06 833000 1.17969e+06 8.17095e+06 3.05704e+07
53416 20221107.12 0.772202 17318.1 47740.2 12528.6 4337.25 3621.02 3426.42 6330.51 8.27106e+07 22713.9 16477.7 1.50774e+07 5854.66 1.53396e+07 2081.46 8.78598e+06 1700.08 8.78598e+06 1633.92 7.99955e+06 839010 1.18213e+06 8.15686e+06 3.15121e+07
53442 20221108.4 0.756406 17736.1 45670.7 12601.9 4565.98 3670.75 3469.09 6303.29 8.29727e+07 31763.2 16635.9 1.50774e+07 5936.74 1.45532e+07 2060.31 8.52384e+06 1701.77 8.78598e+06 1648.45 7.99955e+06 831886 1.17899e+06 8.15433e+06 3.14405e+07
53452 20221108.7 0.769887 17470.9 45700.8 12432.6 4404.12 3735.5 3407.19 6313.17 8.24484e+07 20601.9 16491.3 1.50774e+07 5943.39 1.50774e+07 2082.65 9.04813e+06 1701.15 8.78598e+06 1637.51 7.73741e+06 830094 1.18552e+06 8.14693e+06 3.12247e+07
53465 20221108.12 0.790981 17198.9 47895.6 12693.2 4584.77 3680.07 3431.66 6365.92 8.27106e+07 27647.5 16435.9 1.50774e+07 5812.96 1.53396e+07 2065.27 8.52384e+06 1711.3 8.52384e+06 1651.58 7.99955e+06 833884 1.17972e+06 8.1367e+06 3.05795e+07
53470 20221108.14 0.773097 17362.3 47922.1 12525.4 4358.37 3673.01 3459.28 6328.26 8.27106e+07 25896.6 16438.8 1.50774e+07 5811.75 1.50774e+07 2081.28 9.04813e+06 1715.32 8.78598e+06 1623.88 7.73741e+06 836262 1.18142e+06 8.02338e+06 3.13952e+07
53480 20221108.19 0.806148 17330 47824.5 12627.1 4560.06 3570.67 3458.83 6327.02 8.21863e+07 27467.5 16268.6 1.50774e+07 5794.79 1.45532e+07 2072.02 9.31027e+06 1697.36 9.04813e+06 1626.14 7.99955e+06 837092 1.17571e+06 8.15034e+06 3.07272e+07
53481 20221108.20 0.786426 17466.7 47907 12175.4 4649.57 3529.51 3317.68 6359.84 8.27106e+07 20791.9 16616.6 1.50774e+07 5882.08 1.45532e+07 2063.12 8.78598e+06 1681.13 8.52384e+06 1607.3 7.73741e+06 839116 1.17831e+06 8.15501e+06 3.12209e+07
53502 20221108.29 0.761655 17141.5 45648.4 12325.9 4636.39 3642.13 3364.08 6326.5 8.27106e+07 24617.3 16617.3 1.50774e+07 5883.54 1.50774e+07 2065.78 8.52384e+06 1690.79 8.78598e+06 1652.6 8.2617e+06 830735 1.18175e+06 8.17447e+06 3.11365e+07
53508 20221108.32 0.762627 16966.3 43869.5 12436 4424.66 3664.47 3484.68 6265.48 8.21863e+07 25151.1 16557.7 1.53396e+07 5842.72 1.50774e+07 2061.05 9.04813e+06 1705.13 8.52384e+06 1642.2 7.99955e+06 836603 1.17655e+06 8.15572e+06 3.11133e+07
53513 20221108.34 0.786755 17310.7 43673.3 12643.5 4646.99 3676.45 3436.22 6394.17 8.27106e+07 23992.5 16533.1 1.53396e+07 5873.09 1.50774e+07 2067.06 8.78598e+06 1711.4 8.2617e+06 1647.28 7.99955e+06 834238 1.17278e+06 8.15361e+06 3.07854e+07
53521 20221109.2 0.764383 17735 48050.4 12532.4 4656.16 3537.36 3479.74 6432.8 8.29727e+07 27350.6 16549.9 1.50774e+07 6070.54 1.50774e+07 2067.58 8.52384e+06 1703.68 8.52384e+06 1645.38 8.2617e+06 836068 1.17548e+06 8.15244e+06 3.14448e+07
53550 20221109.13 0.769667 17155.1 47802.7 12658.1 4337.36 3657.4 3403.27 6394 8.27106e+07 29215.6 16652.5 1.53396e+07 5837.13 1.45532e+07 2072.2 8.78598e+06 1705.47 8.78598e+06 1647.33 8.2617e+06 826162 1.18352e+06 8.15553e+06 3.08192e+07
53561 20221109.17 0.788453 17165.3 43425 12259.2 4484.74 3369.8 3326.12 6372.96 8.27106e+07 23578.7 16620.5 1.50774e+07 5836.21 1.4291e+07 2072.17 8.78598e+06 1703.81 8.78598e+06 1652.05 7.99955e+06 837683 1.18278e+06 8.15517e+06 3.07803e+07
53580 20221109.24 0.772983 17458.2 45743.3 12510.5 4659.2 3658.68 3315.6 6414.96 8.19242e+07 26871.6 16548.7 1.50774e+07 5885.77 1.50774e+07 2065.99 8.52384e+06 1706.54 8.78598e+06 1646.16 8.2617e+06 824208 1.17922e+06 8.17196e+06 3.1172e+07
53604 20221109.30 0.78045 17248.2 45651.7 12513.2 4427.78 3669.12 3360.7 6270.52 8.24484e+07 23672.4 16594 1.50774e+07 5851.11 1.50774e+07 2072.2 8.52384e+06 1708.98 8.52384e+06 1623.08 7.73741e+06 833187 1.17373e+06 8.15134e+06 3.08063e+07
53628 20221109.37 0.776591 17404.9 47988.2 12451.6 4362.4 3565.64 3373.53 6393.77 8.24484e+07 28391.9 16403.2 1.50774e+07 5878.42 1.53396e+07 2064.37 9.04813e+06 1686.75 8.78598e+06 1618.8 7.99955e+06 815684 1.17882e+06 8.17444e+06 3.13644e+07
53632 20221110.2 0.777388 17504.4 45752.7 12504.7 4600.09 3675.48 3491.29 6318.96 8.27106e+07 22077.1 16640.2 1.50774e+07 5912.9 1.45532e+07 2068.76 8.78598e+06 1699.44 8.78598e+06 1649.07 8.2617e+06 832913 1.17843e+06 8.13431e+06 3.08648e+07
53659 20221110.11 0.772763 17255.1 43716 12567.5 4370.61 3613.23 3383.8 6346.72 8.27106e+07 21697.7 16556.6 1.50774e+07 5895.94 1.50774e+07 2068.35 8.52384e+06 1708.74 8.78598e+06 1647.29 7.99955e+06 808821 1.17851e+06 8.1358e+06 3.08508e+07

toctou_logging

build_id build_number Commit latency factor tpcc_sgx_cft^ tpcc_sgx_cft_mem tpcc_virtual_cft^ ls_virtual_cft^ ls_sgx_cft^ ls_sgx_cft_mem ls_jwt_virtual_cft^ ls_jwt_sgx_cft^ ls_jwt_sgx_cft_mem ls_js_virtual_cft^ ls_full_js_virtual_cft^ ls_js_sgx_cft^ ls_js_sgx_cft_mem ls_js_jwt_virtual_cft^ ls_full_js_sgx_cft^ ls_full_js_sgx_cft_mem ls_js_jwt_sgx_cft^ ls_js_jwt_sgx_cft_mem hist_sgx_cft^ RB put (/s)^ CHAMP put (/s)^ RB get (/s)^ CHAMP get (/s)^
53647 20221110.6 0.76843 6326.21 8.24484e+07 17272.5 45192.3 16556.1 1.50774e+07 12258.2 5811.84 1.50774e+07 4542.67 3711.94 2071.75 8.52384e+06 3458.64 1710.96 8.78598e+06 1622.25 8.2617e+06 24672.8 841306 1.18259e+06 8.16978e+06 3.07993e+07
53651 20221110.8 0.775624 6360.12 8.27106e+07 17505.8 47869.4 16458.1 1.50774e+07 13950.6 5866.05 1.48153e+07 4551.07 3709.08 2064.71 9.04813e+06 3507.99 1691.23 8.78598e+06 1629.02 7.73741e+06 25550.8 838204 1.17685e+06 8.15442e+06 3.07988e+07
53663 20221110.12 0.780996 6376.06 8.24484e+07 17137.7 47889.4 16623 1.50774e+07 12700.1 5859.94 1.45532e+07 4421.77 3514.3 2067.52 8.78598e+06 3369.34 1710.39 8.52384e+06 1645.93 7.73741e+06 22859.5 828508 1.17406e+06 8.15293e+06 3.0916e+07

images

@jumaffre jumaffre marked this pull request as ready for review November 10, 2022 10:27
@jumaffre jumaffre requested a review from a team as a code owner November 10, 2022 10:27
@jumaffre jumaffre added auto-backport Automatically backport this PR to LTS branch 2.x-todo PRs which should be backported to 2.x 3.x-todo PRs which should be backported to 3.x labels Nov 10, 2022
@achamayou achamayou merged commit 6c7d2ee into microsoft:main Nov 10, 2022
github-actions bot pushed a commit that referenced this pull request Nov 10, 2022
@github-actions github-actions bot added the backported This PR was successfully backported to LTS branch label Nov 10, 2022
@github-actions
Copy link

💔 Some backports could not be created

Status Branch Result
release/2.x Backport failed because of merge conflicts
release/3.x

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

backport --pr 4514

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x-todo PRs which should be backported to 2.x 3.x-todo PRs which should be backported to 3.x auto-backport Automatically backport this PR to LTS branch backported This PR was successfully backported to LTS branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants