@@ -1125,7 +1125,7 @@ void test_c1() {
1125
1125
1126
1126
int total = 0 ;
1127
1127
int total_not_AutoPatch = 0 ;
1128
-
1128
+ dwt_init ();
1129
1129
profile_add_event ("EV0" );
1130
1130
for (int i = 0 ; i < 1000 ; i ++ )
1131
1131
{
@@ -1187,7 +1187,7 @@ void test_c5() {
1187
1187
1188
1188
int total = 0 ;
1189
1189
int total_not_AutoPatch = 0 ;
1190
-
1190
+ dwt_init ();
1191
1191
profile_add_event ("EV0" );
1192
1192
for (int i = 0 ; i < 1000 ; i ++ )
1193
1193
{
@@ -1215,15 +1215,15 @@ void test_c2() {
1215
1215
/*
1216
1216
zephyr_cve_2020_10021
1217
1217
*/
1218
- // printf("Start the evaluation process!\n");
1218
+ printf ("Start the evaluation process!\n" );
1219
1219
1220
1220
stack_frame sf ;
1221
1221
sf .r0 = 10 ; // n
1222
1222
sf .r1 = 1024 ; // memory_size
1223
1223
uint64_t ret1 = 0 ;
1224
1224
int total = 0 ;
1225
1225
int total_not_AutoPatch = 0 ;
1226
-
1226
+ dwt_init ();
1227
1227
profile_add_event ("EV0" );
1228
1228
for (int i = 0 ; i < 1000 ; i ++ )
1229
1229
{
@@ -1245,15 +1245,6 @@ void test_c2() {
1245
1245
int nanoseconds_cve = (int ) ((cycles2us (total / 1000 ) * 1000 ));
1246
1246
printf ("[cve_2020_10021] AutoPatch overhead cycles: %d , time: %d nanoseconds\n" , total , nanoseconds_cve );
1247
1247
1248
- // uint32_t testcase = 268435456; //Malicious input
1249
- // // uint32_t testcase = 1; //Normal input
1250
- // sf.r0 = testcase;
1251
- // profile_add_event("EV1");
1252
- // profile_start(EV1);
1253
- // ret1 = filter_10062_2(&sf);
1254
- // profile_end(EV1);
1255
- // profile_dump(EV1);
1256
- // printf("Hello, End!\n");
1257
1248
}
1258
1249
1259
1250
void test_c3 () {
@@ -1270,7 +1261,7 @@ void test_c3() {
1270
1261
sf .r0 = 0 ;
1271
1262
int total = 0 ;
1272
1263
int total_not_AutoPatch = 0 ;
1273
-
1264
+ dwt_init ();
1274
1265
profile_add_event ("EV0" );
1275
1266
for (int i = 0 ; i < 1000 ; i ++ )
1276
1267
{
@@ -1348,7 +1339,7 @@ void test_c4(){
1348
1339
1349
1340
int total = 0 ;
1350
1341
int total_not_AutoPatch = 0 ;
1351
-
1342
+ dwt_init ();
1352
1343
profile_add_event ("EV0" );
1353
1344
for (int i = 0 ; i < 1000 ; i ++ )
1354
1345
{
@@ -1421,7 +1412,7 @@ void test_c6() {
1421
1412
1422
1413
int total = 0 ;
1423
1414
int total_not_AutoPatch = 0 ;
1424
-
1415
+ dwt_init ();
1425
1416
profile_add_event ("EV0" );
1426
1417
for (int i = 0 ; i < 1000 ; i ++ )
1427
1418
{
@@ -1462,7 +1453,7 @@ void test_c7() {
1462
1453
1463
1454
int total = 0 ;
1464
1455
int total_not_AutoPatch = 0 ;
1465
-
1456
+ dwt_init ();
1466
1457
profile_add_event ("EV0" );
1467
1458
for (int i = 0 ; i < 1000 ; i ++ )
1468
1459
{
@@ -1523,7 +1514,7 @@ void test_c8() {
1523
1514
1524
1515
int total = 0 ;
1525
1516
int total_not_AutoPatch = 0 ;
1526
-
1517
+ dwt_init ();
1527
1518
profile_add_event ("EV0" );
1528
1519
for (int i = 0 ; i < 1000 ; i ++ )
1529
1520
{
@@ -1568,7 +1559,7 @@ void test_c9() {
1568
1559
1569
1560
int total = 0 ;
1570
1561
int total_not_AutoPatch = 0 ;
1571
-
1562
+ dwt_init ();
1572
1563
profile_add_event ("EV0" );
1573
1564
for (int i = 0 ; i < 1000 ; i ++ )
1574
1565
{
@@ -1624,7 +1615,7 @@ void test_c10() {
1624
1615
1625
1616
int total = 0 ;
1626
1617
int total_not_AutoPatch = 0 ;
1627
-
1618
+ dwt_init ();
1628
1619
profile_add_event ("EV0" );
1629
1620
for (int i = 0 ; i < 1000 ; i ++ )
1630
1621
{
@@ -1679,7 +1670,7 @@ void test_c11() {
1679
1670
1680
1671
int total = 0 ;
1681
1672
int total_not_AutoPatch = 0 ;
1682
-
1673
+ dwt_init ();
1683
1674
profile_add_event ("EV0" );
1684
1675
for (int i = 0 ; i < 1000 ; i ++ )
1685
1676
{
@@ -1739,7 +1730,7 @@ void test_c12() {
1739
1730
1740
1731
int total = 0 ;
1741
1732
int total_not_AutoPatch = 0 ;
1742
-
1733
+ dwt_init ();
1743
1734
profile_add_event ("EV0" );
1744
1735
for (int i = 0 ; i < 1000 ; i ++ )
1745
1736
{
0 commit comments