Skip to content
This repository was archived by the owner on Sep 1, 2022. It is now read-only.

Commit 938a3cb

Browse files
committed
Step 2-3
1 parent 4b7ff47 commit 938a3cb

File tree

3 files changed

+119
-1
lines changed

3 files changed

+119
-1
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* @kind problem
3+
*/
4+
5+
import cpp
6+
7+
from Macro m, MacroInvocation mi
8+
where mi.getMacro() = m and m.getName().regexpMatch("ntoh(s|ll?)")
9+
select mi.getExpr(), "Invoking a macro reading from the network"

courses/cpp/uboot/image/config/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"12_memcpy_definitions.ql": "step-12.csv",
77
"13_macro_definitions.ql": "step-13.csv",
88
"21_memcpy_calls.ql": "step-21.csv",
9-
"22_macro_invocations.ql": "step-22.csv"
9+
"22_macro_invocations.ql": "step-22.csv",
10+
"23_macro_expressions.ql": "step_23.csv"
1011
}
1112
}
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
"col0","URL for col0","col1"
2+
"... ? ... : ...","file:///opt/src/cmd/net.c:307:10:307:34","Invoking a macro reading from the network"
3+
"... ? ... : ...","file:///opt/src/cmd/net.c:314:42:314:63","Invoking a macro reading from the network"
4+
"... ? ... : ...","file:///opt/src/cmd/pxe.c:344:27:344:46","Invoking a macro reading from the network"
5+
"... ? ... : ...","file:///opt/src/drivers/net/sandbox-raw.c:47:7:47:28","Invoking a macro reading from the network"
6+
"... ? ... : ...","file:///opt/src/drivers/net/sandbox.c:123:6:123:27","Invoking a macro reading from the network"
7+
"... ? ... : ...","file:///opt/src/drivers/net/sandbox.c:66:6:66:27","Invoking a macro reading from the network"
8+
"... ? ... : ...","file:///opt/src/drivers/net/sandbox.c:71:6:71:22","Invoking a macro reading from the network"
9+
"... ? ... : ...","file:///opt/src/lib/efi_loader/efi_net.c:497:12:497:37","Invoking a macro reading from the network"
10+
"... ? ... : ...","file:///opt/src/lib/efi_loader/efi_net.c:500:13:500:55","Invoking a macro reading from the network"
11+
"... ? ... : ...","file:///opt/src/net/arp.c:146:6:146:23","Invoking a macro reading from the network"
12+
"... ? ... : ...","file:///opt/src/net/arp.c:148:6:148:23","Invoking a macro reading from the network"
13+
"... ? ... : ...","file:///opt/src/net/arp.c:161:10:161:26","Invoking a macro reading from the network"
14+
"... ? ... : ...","file:///opt/src/net/arp.c:232:3:233:26","Invoking a macro reading from the network"
15+
"... ? ... : ...","file:///opt/src/net/bootp.c:482:13:482:35","Invoking a macro reading from the network"
16+
"... ? ... : ...","file:///opt/src/net/bootp.c:493:13:493:38","Invoking a macro reading from the network"
17+
"... ? ... : ...","file:///opt/src/net/cdp.c:282:10:282:21","Invoking a macro reading from the network"
18+
"... ? ... : ...","file:///opt/src/net/cdp.c:283:10:283:21","Invoking a macro reading from the network"
19+
"... ? ... : ...","file:///opt/src/net/cdp.c:322:12:322:21","Invoking a macro reading from the network"
20+
"... ? ... : ...","file:///opt/src/net/dns.c:124:6:124:28","Invoking a macro reading from the network"
21+
"... ? ... : ...","file:///opt/src/net/fastboot.c:274:15:274:31","Invoking a macro reading from the network"
22+
"... ? ... : ...","file:///opt/src/net/link_local.c:250:2:252:23","Invoking a macro reading from the network"
23+
"... ? ... : ...","file:///opt/src/net/link_local.c:250:2:252:23","Invoking a macro reading from the network"
24+
"... ? ... : ...","file:///opt/src/net/link_local.c:109:7:109:22","Invoking a macro reading from the network"
25+
"... ? ... : ...","file:///opt/src/net/net.c:1586:6:1586:13","Invoking a macro reading from the network"
26+
"... ? ... : ...","file:///opt/src/net/net.c:1575:13:1575:27","Invoking a macro reading from the network"
27+
"... ? ... : ...","file:///opt/src/net/net.c:1458:12:1458:32","Invoking a macro reading from the network"
28+
"... ? ... : ...","file:///opt/src/net/net.c:1432:13:1432:31","Invoking a macro reading from the network"
29+
"... ? ... : ...","file:///opt/src/net/net.c:1419:13:1419:31","Invoking a macro reading from the network"
30+
"... ? ... : ...","file:///opt/src/net/net.c:1106:13:1106:31","Invoking a macro reading from the network"
31+
"... ? ... : ...","file:///opt/src/net/net.c:1109:14:1109:35","Invoking a macro reading from the network"
32+
"... ? ... : ...","file:///opt/src/net/net.c:1113:14:1113:34","Invoking a macro reading from the network"
33+
"... ? ... : ...","file:///opt/src/net/net.c:1121:15:1121:35","Invoking a macro reading from the network"
34+
"... ? ... : ...","file:///opt/src/net/net.c:1141:8:1141:26","Invoking a macro reading from the network"
35+
"... ? ... : ...","file:///opt/src/net/net.c:1148:9:1148:27","Invoking a macro reading from the network"
36+
"... ? ... : ...","file:///opt/src/net/net.c:1150:15:1150:34","Invoking a macro reading from the network"
37+
"... ? ... : ...","file:///opt/src/net/net.c:1192:13:1192:29","Invoking a macro reading from the network"
38+
"... ? ... : ...","file:///opt/src/net/net.c:1193:4:1193:53","Invoking a macro reading from the network"
39+
"... ? ... : ...","file:///opt/src/net/net.c:1196:9:1196:25","Invoking a macro reading from the network"
40+
"... ? ... : ...","file:///opt/src/net/net.c:1266:13:1266:30","Invoking a macro reading from the network"
41+
"... ? ... : ...","file:///opt/src/net/net.c:1267:13:1267:36","Invoking a macro reading from the network"
42+
"... ? ... : ...","file:///opt/src/net/net.c:1268:13:1268:36","Invoking a macro reading from the network"
43+
"... ? ... : ...","file:///opt/src/net/net.c:1269:13:1269:36","Invoking a macro reading from the network"
44+
"... ? ... : ...","file:///opt/src/net/net.c:1270:13:1270:36","Invoking a macro reading from the network"
45+
"... ? ... : ...","file:///opt/src/net/net.c:1272:13:1272:30","Invoking a macro reading from the network"
46+
"... ? ... : ...","file:///opt/src/net/net.c:1279:13:1279:26","Invoking a macro reading from the network"
47+
"... ? ... : ...","file:///opt/src/net/net.c:1295:18:1295:36","Invoking a macro reading from the network"
48+
"... ? ... : ...","file:///opt/src/net/net.c:1304:5:1304:22","Invoking a macro reading from the network"
49+
"... ? ... : ...","file:///opt/src/net/net.c:1305:5:1305:22","Invoking a macro reading from the network"
50+
"... ? ... : ...","file:///opt/src/net/net.c:1306:5:1306:22","Invoking a macro reading from the network"
51+
"... ? ... : ...","file:///opt/src/net/net.c:1312:11:1312:28","Invoking a macro reading from the network"
52+
"... ? ... : ...","file:///opt/src/net/net.c:1314:11:1314:28","Invoking a macro reading from the network"
53+
"... ? ... : ...","file:///opt/src/net/net.c:1315:11:1315:28","Invoking a macro reading from the network"
54+
"... ? ... : ...","file:///opt/src/net/net.c:1064:10:1064:27","Invoking a macro reading from the network"
55+
"... ? ... : ...","file:///opt/src/net/net.c:1065:10:1065:27","Invoking a macro reading from the network"
56+
"... ? ... : ...","file:///opt/src/net/net.c:1066:10:1066:27","Invoking a macro reading from the network"
57+
"... ? ... : ...","file:///opt/src/net/net.c:1021:15:1021:31","Invoking a macro reading from the network"
58+
"... ? ... : ...","file:///opt/src/net/net.c:906:15:906:31","Invoking a macro reading from the network"
59+
"... ? ... : ...","file:///opt/src/net/net.c:913:8:913:24","Invoking a macro reading from the network"
60+
"... ? ... : ...","file:///opt/src/net/nfs.c:665:6:665:30","Invoking a macro reading from the network"
61+
"... ? ... : ...","file:///opt/src/net/nfs.c:667:11:667:35","Invoking a macro reading from the network"
62+
"... ? ... : ...","file:///opt/src/net/nfs.c:678:11:678:40","Invoking a macro reading from the network"
63+
"... ? ... : ...","file:///opt/src/net/nfs.c:688:10:688:40","Invoking a macro reading from the network"
64+
"... ? ... : ...","file:///opt/src/net/nfs.c:695:10:695:59","Invoking a macro reading from the network"
65+
"... ? ... : ...","file:///opt/src/net/nfs.c:618:6:618:30","Invoking a macro reading from the network"
66+
"... ? ... : ...","file:///opt/src/net/nfs.c:620:11:620:35","Invoking a macro reading from the network"
67+
"... ? ... : ...","file:///opt/src/net/nfs.c:635:9:635:58","Invoking a macro reading from the network"
68+
"... ? ... : ...","file:///opt/src/net/nfs.c:582:6:582:19","Invoking a macro reading from the network"
69+
"... ? ... : ...","file:///opt/src/net/nfs.c:519:6:519:30","Invoking a macro reading from the network"
70+
"... ? ... : ...","file:///opt/src/net/nfs.c:521:11:521:35","Invoking a macro reading from the network"
71+
"... ? ... : ...","file:///opt/src/net/nfs.c:528:11:528:40","Invoking a macro reading from the network"
72+
"... ? ... : ...","file:///opt/src/net/nfs.c:533:12:533:41","Invoking a macro reading from the network"
73+
"... ? ... : ...","file:///opt/src/net/nfs.c:536:5:540:41","Invoking a macro reading from the network"
74+
"... ? ... : ...","file:///opt/src/net/nfs.c:536:5:540:41","Invoking a macro reading from the network"
75+
"... ? ... : ...","file:///opt/src/net/nfs.c:548:5:552:41","Invoking a macro reading from the network"
76+
"... ? ... : ...","file:///opt/src/net/nfs.c:548:5:552:41","Invoking a macro reading from the network"
77+
"... ? ... : ...","file:///opt/src/net/nfs.c:561:4:562:40","Invoking a macro reading from the network"
78+
"... ? ... : ...","file:///opt/src/net/nfs.c:571:20:571:49","Invoking a macro reading from the network"
79+
"... ? ... : ...","file:///opt/src/net/nfs.c:495:6:495:30","Invoking a macro reading from the network"
80+
"... ? ... : ...","file:///opt/src/net/nfs.c:497:11:497:35","Invoking a macro reading from the network"
81+
"... ? ... : ...","file:///opt/src/net/nfs.c:469:6:469:30","Invoking a macro reading from the network"
82+
"... ? ... : ...","file:///opt/src/net/nfs.c:471:11:471:35","Invoking a macro reading from the network"
83+
"... ? ... : ...","file:///opt/src/net/nfs.c:439:6:439:30","Invoking a macro reading from the network"
84+
"... ? ... : ...","file:///opt/src/net/nfs.c:441:11:441:35","Invoking a macro reading from the network"
85+
"... ? ... : ...","file:///opt/src/net/nfs.c:451:27:451:56","Invoking a macro reading from the network"
86+
"... ? ... : ...","file:///opt/src/net/nfs.c:454:21:454:50","Invoking a macro reading from the network"
87+
"... ? ... : ...","file:///opt/src/net/rarp.c:38:7:38:23","Invoking a macro reading from the network"
88+
"... ? ... : ...","file:///opt/src/net/rarp.c:39:7:39:24","Invoking a macro reading from the network"
89+
"... ? ... : ...","file:///opt/src/net/rarp.c:40:7:40:24","Invoking a macro reading from the network"
90+
"... ? ... : ...","file:///opt/src/net/sntp.c:72:12:72:25","Invoking a macro reading from the network"
91+
"... ? ... : ...","file:///opt/src/net/tftp.c:435:10:435:21","Invoking a macro reading from the network"
92+
"... ? ... : ...","file:///opt/src/net/tftp.c:449:17:449:25","Invoking a macro reading from the network"
93+
"... ? ... : ...","file:///opt/src/net/tftp.c:515:20:515:40","Invoking a macro reading from the network"
94+
"... ? ... : ...","file:///opt/src/net/tftp.c:566:19:566:39","Invoking a macro reading from the network"
95+
"... ? ... : ...","file:///opt/src/net/tftp.c:568:11:568:31","Invoking a macro reading from the network"
96+
"... ? ... : ...","file:///opt/src/test/dm/eth.c:397:6:397:27","Invoking a macro reading from the network"
97+
"... ? ... : ...","file:///opt/src/test/dm/eth.c:398:6:398:22","Invoking a macro reading from the network"
98+
"... ? ... : ...","file:///opt/src/test/dm/eth.c:357:6:357:27","Invoking a macro reading from the network"
99+
"... ? ... : ...","file:///opt/src/test/dm/eth.c:312:6:312:27","Invoking a macro reading from the network"
100+
"... ? ... : ...","file:///opt/src/test/dm/eth.c:313:6:313:22","Invoking a macro reading from the network"
101+
"... ? ... : ...","file:///opt/src/test/dm/eth.c:271:6:271:27","Invoking a macro reading from the network"
102+
"... ? ... : ...","file:///opt/src/test/dm/eth.c:276:6:276:22","Invoking a macro reading from the network"
103+
"call to __bswap_16","file:///opt/src/tools/mxsimage.c:1717:4:1717:36","Invoking a macro reading from the network"
104+
"call to __bswap_16","file:///opt/src/tools/mxsimage.c:1718:4:1718:36","Invoking a macro reading from the network"
105+
"call to __bswap_16","file:///opt/src/tools/mxsimage.c:1719:4:1719:39","Invoking a macro reading from the network"
106+
"call to __bswap_16","file:///opt/src/tools/mxsimage.c:1721:4:1721:38","Invoking a macro reading from the network"
107+
"call to __bswap_16","file:///opt/src/tools/mxsimage.c:1722:4:1722:38","Invoking a macro reading from the network"
108+
"call to __bswap_16","file:///opt/src/tools/mxsimage.c:1723:4:1723:41","Invoking a macro reading from the network"

0 commit comments

Comments
 (0)