Compare commits
828 Commits
Author | SHA1 | Date | |
---|---|---|---|
b13da8675c | |||
2e2cd52e24 | |||
9ff5dbe36d | |||
2063341fef | |||
c10dd66fb7 | |||
3c5dbffe61 | |||
649fe41781 | |||
2ee98e5030 | |||
98313939b3 | |||
8b1f878809 | |||
1124db4483 | |||
e2040dede4 | |||
45365df082 | |||
8663bfb907 | |||
959dc8b32b | |||
e0fc01c0ef | |||
75c3844167 | |||
34878f17b9 | |||
be73ca4bae | |||
d1dfcc533e | |||
d5152aae15 | |||
779a28e117 | |||
86477a6228 | |||
cb93e85828 | |||
55be4cb0ed | |||
d4499fa508 | |||
d901c7c922 | |||
3115a96587 | |||
5a2a54591d | |||
cdee133cfb | |||
ef3fc7ebb7 | |||
f7a65e0c7d | |||
bf4e76e4e7 | |||
ad4277214e | |||
3c356c40e4 | |||
0a8dd6a68c | |||
fe871501ff | |||
41d647ce67 | |||
a0795c594a | |||
3fac547ab0 | |||
0a9cd4bf2e | |||
8b7be09c7b | |||
76be950a1d | |||
9152bd86b5 | |||
ca2bf7c9e9 | |||
e72b9262eb | |||
3fb78d7305 | |||
41e15ecd44 | |||
5679fad7a0 | |||
e64a2e8db5 | |||
d57f262ce5 | |||
ada8aeb715 | |||
e4863d412d | |||
373220061a | |||
791e45ec4f | |||
7c3e4edd3b | |||
4912e5b208 | |||
6919e370f9 | |||
6b39e463b6 | |||
3dd797830d | |||
ee7912c0ca | |||
eac07b2bd6 | |||
36f594a305 | |||
ced31982a4 | |||
215b7bb38d | |||
84ecd63651 | |||
f18b0ae42c | |||
e2de9acdbc | |||
16d336702f | |||
1538b9dff3 | |||
e257082643 | |||
90bcf10061 | |||
11defb56a4 | |||
653b9a6f95 | |||
fb39d06748 | |||
0503b69486 | |||
0f774151a4 | |||
d30a9bf779 | |||
768d7cb78f | |||
cdd27d2088 | |||
ff96efe158 | |||
ce616808a6 | |||
e95caf5505 | |||
600457fa9d | |||
a286680b04 | |||
601a324df2 | |||
c119a6da7c | |||
34a920baad | |||
a8f0442fd7 | |||
ae663f17fe | |||
e752ef61c3 | |||
92ac6131a1 | |||
ff9f61dce9 | |||
84e3de2018 | |||
801d42d947 | |||
23287f11fe | |||
2acabfe47a | |||
3127a6a275 | |||
17a2ba8415 | |||
297f570c2d | |||
0fbbe358ee | |||
426b63f3fa | |||
1ccc55eed2 | |||
b00f54e881 | |||
7ba63db908 | |||
589e3285d5 | |||
5882b169a0 | |||
71a69a36f8 | |||
f2d80518f7 | |||
b58f75c5d4 | |||
2dd365f912 | |||
d6ea0d0204 | |||
cae1252903 | |||
9eeb033ea6 | |||
326b98927a | |||
4580f749b7 | |||
c4cf9213a8 | |||
b0b3f55b3b | |||
ab7c67df8d | |||
f73c5cfd75 | |||
2ca8e63ed0 | |||
8cc252e1fc | |||
a4ef4a796e | |||
6e0b6a6665 | |||
f0026a3818 | |||
52e3c75a1c | |||
32e813144c | |||
54f2397c84 | |||
2add5258ec | |||
232d8c6c12 | |||
038222965a | |||
a91068aec4 | |||
a864a32a76 | |||
22894ccff6 | |||
a7aed4a57d | |||
277fec6316 | |||
e9c702f9ad | |||
5a25466437 | |||
f91679316b | |||
835fb3c5f2 | |||
19de67d239 | |||
885a97ec42 | |||
8990b601c2 | |||
4e29ada846 | |||
b5db9917f3 | |||
c9000d43bd | |||
3b4612b3ac | |||
762b155643 | |||
3fb2f299d2 | |||
825acc827e | |||
ac300dd2d9 | |||
5477470e9c | |||
b6351bc2ce | |||
a1e94e9c7a | |||
50b50e78f6 | |||
8aab60e8d3 | |||
a2c0cbc0d6 | |||
89636759d7 | |||
7fa3d78319 | |||
e625443bb5 | |||
1d5bb61c49 | |||
11aa97bfba | |||
9cd050573c | |||
9050affe7c | |||
9cbb1861ec | |||
248f17d57f | |||
79cef3f3ff | |||
b2d117f249 | |||
b816b59203 | |||
7e5cd0e72b | |||
276839aec6 | |||
d69c27760c | |||
9f8b29f1cd | |||
0eda4a0a4b | |||
44cb9c8356 | |||
7372d4a900 | |||
bbb1fa0c5f | |||
94f801f14d | |||
6666c28424 | |||
53ec9ab555 | |||
db28c91159 | |||
26102a5a87 | |||
b19829eaf4 | |||
4ee3e80cb1 | |||
0601cf5939 | |||
27cc81d61f | |||
121e148978 | |||
1049a1dae9 | |||
3ccde53d7f | |||
570314dd90 | |||
697ca3e41f | |||
f8b6389263 | |||
a8bf674039 | |||
569dc792d5 | |||
00785bf73a | |||
9ec1fb02ef | |||
a3c2e4e20b | |||
9af28a4d13 | |||
bd43e0954b | |||
a940d1a60f | |||
1cb75579e1 | |||
50cba466e5 | |||
405279fa77 | |||
aff8528b22 | |||
91b63a91ae | |||
fdcaa2fa42 | |||
d4e4e873ee | |||
fae76db73b | |||
93e2dfe0e5 | |||
4f486f8207 | |||
1575c3115a | |||
38392acb35 | |||
7f83dba279 | |||
1c3c1ae44e | |||
3f8d42d94f | |||
61b2e2199f | |||
033c9cfc13 | |||
16300524f2 | |||
e86ff37e3f | |||
66834ea9a7 | |||
7f1742631f | |||
7ac5286986 | |||
c322fba197 | |||
10350d5eb0 | |||
98f8b95b0f | |||
1007f7a276 | |||
ef54d3d838 | |||
96512c4d78 | |||
c96d9f17b1 | |||
cdf05fb392 | |||
0aa9cf807e | |||
3106adf4af | |||
4e80a2087d | |||
ce27e2acf4 | |||
0544f49daf | |||
bf20786de2 | |||
78b02c928a | |||
5e4019c3bc | |||
956e3a34a3 | |||
daa81a8612 | |||
cce907a428 | |||
fc543e0637 | |||
3b213e9074 | |||
e0c3675c37 | |||
1b7b6b9002 | |||
17ec19d2a9 | |||
a8631ca4bc | |||
4d5523527b | |||
23cbf90c18 | |||
aa350a2b97 | |||
4d9a785bfd | |||
857398e779 | |||
0868093228 | |||
5691f4e23a | |||
5ff0633279 | |||
2808523085 | |||
ef0d6e4699 | |||
d7f98585ef | |||
657ab73f3a | |||
aa5e08eac5 | |||
b89258dcdd | |||
8dbcedef30 | |||
6f3abb076c | |||
c9e380bb6c | |||
6f6d3e4c60 | |||
cc6ef2f922 | |||
831feaf212 | |||
a011ab10af | |||
30d13975a4 | |||
c15071b535 | |||
5d0e737d00 | |||
4c7a353896 | |||
f070096094 | |||
173164923e | |||
edfeca944a | |||
5615c15036 | |||
d4bb4510ba | |||
2b60571d86 | |||
8bb5c14488 | |||
dc788de4e0 | |||
50d25d1a60 | |||
826dd22e46 | |||
5607a0e2b0 | |||
f806439e29 | |||
b6b3dc4361 | |||
fde482b82e | |||
5c252f970d | |||
399fceeb06 | |||
c239ebc31b | |||
6c9c122799 | |||
274348cbac | |||
89d8c578e7 | |||
d9d92cf220 | |||
2aa03c2af6 | |||
dd3548a691 | |||
00265afe4a | |||
fd4d4edd2b | |||
464566440a | |||
4b6d304c80 | |||
ac68c7db14 | |||
a06073fbbb | |||
fa66f3f700 | |||
8afd294eb3 | |||
c6d15a9b0d | |||
b0499e6d42 | |||
2b5a0ea7db | |||
c30f689384 | |||
e68e2a84b0 | |||
73be1d7e2e | |||
4d7b7b18bd | |||
d51642053d | |||
1eef9d28c7 | |||
859c3074a6 | |||
bb33a401ee | |||
f249e065a8 | |||
bf3a69ac75 | |||
000fdc4b89 | |||
605a705a63 | |||
c298e50d2a | |||
552888b1ac | |||
6a360e2f3e | |||
874caabc0f | |||
6caa97f543 | |||
0c6f755525 | |||
5451e9ffa6 | |||
8e4c657a9d | |||
b3d82da686 | |||
a2485b86e7 | |||
e42dac4361 | |||
42cbea6627 | |||
df5c46896b | |||
cabcca717a | |||
201fd3c185 | |||
1fe5d9bed5 | |||
6452c4deeb | |||
dfff7d5571 | |||
fc346f1d91 | |||
29107a40e9 | |||
ed256d30ee | |||
4cb2d29f2f | |||
0547dc1ad5 | |||
ae39bba347 | |||
832fd63fc4 | |||
f73dcf3c21 | |||
f0ba3723f5 | |||
ee75f4e926 | |||
0fcb3efcf3 | |||
c121227125 | |||
faf03528c2 | |||
f958b3ce5b | |||
6f4ecb2add | |||
2dd34a4da7 | |||
73e9623acf | |||
ea01cb0e5b | |||
f55ef46feb | |||
2fc39d0a4c | |||
3a838cd31a | |||
76d4eee640 | |||
a3f44329a5 | |||
6dc96f5c75 | |||
9b96cd97af | |||
8ed741fc59 | |||
3dac7272e8 | |||
34283c2f82 | |||
54c7792bfd | |||
9555f21588 | |||
ab28d7f1e5 | |||
5aff0e3c6e | |||
d679dcd6aa | |||
a2633e4a59 | |||
a3da3c32c1 | |||
f91def0384 | |||
cdeb5dda0a | |||
9beaf2c3d3 | |||
c26d031c1f | |||
5c20f4aac4 | |||
427e7431ba | |||
51694267bd | |||
52fe35f262 | |||
a2002a648e | |||
997f49f190 | |||
f91c9fe814 | |||
45ed340016 | |||
701792d70c | |||
11abfb422a | |||
05ac490cc7 | |||
1ac436f4c3 | |||
ade6eef6dd | |||
58d8f96c25 | |||
cec2dc2ab5 | |||
8c9dc258e0 | |||
2ecb0a0467 | |||
6be0d91285 | |||
5be0a95d8e | |||
6be94f1772 | |||
3304d82108 | |||
dcc9b9cdb2 | |||
3c8b673408 | |||
9936b91d9f | |||
2432f78415 | |||
635638feb3 | |||
39c77d45d0 | |||
3cfe169f37 | |||
01e9ac81c4 | |||
d872902009 | |||
d945e74377 | |||
ec8f783356 | |||
9f2980bd2c | |||
c422618120 | |||
1c599b4f3d | |||
07586a5b64 | |||
54e164f630 | |||
aad1e4a0bb | |||
d454dac0dc | |||
ad53524377 | |||
50e267c420 | |||
4399fa976a | |||
c84536f975 | |||
6602da1b90 | |||
922712f8ff | |||
d4d5aaa560 | |||
a938b441d6 | |||
c1271b7341 | |||
827b170b72 | |||
447bdc55bf | |||
7b3b12b793 | |||
f3b5837608 | |||
7e6f0b7b0c | |||
0b98d8213e | |||
1aa0697738 | |||
0bf550423c | |||
7491519823 | |||
70864ce6e0 | |||
5f6a839d23 | |||
0aaa6976dd | |||
f6c14637a3 | |||
2f948b9231 | |||
37c4d4bcfc | |||
88017cbae8 | |||
0c836eb060 | |||
634a6a55e8 | |||
7910ac9638 | |||
d5b9c75d61 | |||
cba0d84def | |||
151d1d158c | |||
acdb08613e | |||
6daba2ec29 | |||
994afa8b71 | |||
e4997ecb89 | |||
5532ac185b | |||
3317da7a3a | |||
702c5c29a1 | |||
0bb5372ddd | |||
c06335cdd4 | |||
e0bf512cfc | |||
10922d3112 | |||
c8af54e328 | |||
6b7ad9947b | |||
aeff861218 | |||
1d82c0f8c0 | |||
2c9464c5a3 | |||
9eb38322fb | |||
9e8b95977d | |||
43017ef466 | |||
52b85c6fdf | |||
03d65a05b9 | |||
ead746af18 | |||
6931903807 | |||
76b57d67f0 | |||
841744c4c9 | |||
2a914e6c1f | |||
c4e428bd22 | |||
75cfe3346b | |||
a082fe833e | |||
79dca294d1 | |||
95308d89ce | |||
f860e8c3e0 | |||
57506ae00f | |||
8f73dc556e | |||
1658e9d4c6 | |||
622af42dc3 | |||
9cb6e03d4f | |||
f1d0729f17 | |||
05a3b0b518 | |||
081b2a821b | |||
0323fa3217 | |||
b299b3e611 | |||
5df31f90ec | |||
24eb02da83 | |||
98a93b46fd | |||
13c467bf69 | |||
35126cda20 | |||
695545a8b3 | |||
e061d67dff | |||
c93f39ca5b | |||
1d886734c7 | |||
a00648aa2b | |||
f8d3d18f39 | |||
5e33997559 | |||
5d2293dea6 | |||
f793bda073 | |||
b5b750b289 | |||
d3fc04ebdf | |||
916b0c3594 | |||
a507a0bb77 | |||
98b944bb66 | |||
fdd97aac53 | |||
62218efa6c | |||
64ac9ee785 | |||
015aee943e | |||
6ed2a84aab | |||
48dd98ba81 | |||
fd992caa81 | |||
3d6436d7cb | |||
06c8831cf4 | |||
5ca0852f5f | |||
3fb04c6aec | |||
d6fd023b17 | |||
64de69186e | |||
c1c3fed7c9 | |||
cdf0885fe0 | |||
48252db2a2 | |||
a1a42e1f0d | |||
7497b1c700 | |||
3815851894 | |||
9c260b9e87 | |||
0277a64986 | |||
2b50662498 | |||
26690859f6 | |||
19bd947891 | |||
3e22464ec7 | |||
0302a3186e | |||
56b7651212 | |||
34ccf12e07 | |||
0a37603ef6 | |||
9a4eb55465 | |||
ad7f4354d5 | |||
d6ee2bba25 | |||
8e1f1e7a92 | |||
88cac72e95 | |||
108d574c54 | |||
920b4d5114 | |||
41c468b26c | |||
5732d38e1a | |||
0cffca31df | |||
951f1b1163 | |||
3fa672fa7a | |||
7b0ae21f5c | |||
aece0f417f | |||
f84b99b353 | |||
73d66c84d5 | |||
e3645be4d6 | |||
f3a326c85b | |||
3b31d33ada | |||
dad07434a8 | |||
b61f3251c0 | |||
73acaec01e | |||
d71973c31f | |||
6a1632c7e1 | |||
5fbb3d299d | |||
714d68127a | |||
d44a77ca58 | |||
44ffbf0adc | |||
030b61c92f | |||
a980c9ebbd | |||
b0c4a35ac1 | |||
a49ba91595 | |||
63c27873b6 | |||
8b0f48ee06 | |||
3f86e786f1 | |||
ebdf6914f1 | |||
2119f8d6b0 | |||
6e6c11d9dd | |||
d212c95b84 | |||
f0fb4e9de4 | |||
eabfa5e9e0 | |||
79fb93a7c6 | |||
06934669ea | |||
ab648c804c | |||
e0916b6dc3 | |||
e1fec334db | |||
c1a0b67db5 | |||
7082acc0e3 | |||
7bce0e9fd4 | |||
27aaa29d73 | |||
66db159f7e | |||
9f294b39f5 | |||
ee70a1baac | |||
5cf68f97d5 | |||
04ec08ab62 | |||
820adffcd9 | |||
7b6d66f215 | |||
4503da0816 | |||
7211bdb982 | |||
6fdb10455a | |||
ba63d8a166 | |||
cce5aaef1e | |||
7fa26e1712 | |||
f5278a7d94 | |||
db098f9a3d | |||
f3228d3268 | |||
e8f36ec0c5 | |||
a606d3a74a | |||
55334effed | |||
a2402cea20 | |||
54a4a1a918 | |||
1929c2216a | |||
2c871eb566 | |||
b93991d381 | |||
11f7093560 | |||
cfa1b17619 | |||
dbb76606dc | |||
5af0e0dab8 | |||
e32f7eeefc | |||
ec3761429e | |||
aefb09b9cc | |||
db27247d84 | |||
81b63834dd | |||
ee9e7a7e5b | |||
906dc4aaa1 | |||
340909fd00 | |||
fd5195dccd | |||
abde34546d | |||
46b89571f5 | |||
4cb1124902 | |||
01bb1d206a | |||
3b3fd71546 | |||
f8b50ef4ea | |||
51330fd434 | |||
e87379b820 | |||
0cda3e0823 | |||
632cc8a697 | |||
5cc7036061 | |||
074c630705 | |||
0c5b09c658 | |||
a392aaa796 | |||
aa95ec7648 | |||
0400e2ca7d | |||
68beed808a | |||
91eb1eddb0 | |||
212a444bdc | |||
0918a4c3a2 | |||
b9bac78553 | |||
99f41c592d | |||
48ba1de869 | |||
e9bfa4e406 | |||
ac563cff02 | |||
fe1a225459 | |||
24f6345505 | |||
c7cd262a06 | |||
1caf9f296b | |||
8870b9e831 | |||
38ce2658cd | |||
43e85a6648 | |||
eb5b530be3 | |||
6cb1ced84f | |||
1ae660572f | |||
1bc727fc2f | |||
ecc9fc1e49 | |||
61bf3050f3 | |||
7f6f692916 | |||
07eb711ec6 | |||
7e8314eb34 | |||
378a47e80a | |||
3138893026 | |||
adffd04424 | |||
961a541ab4 | |||
06847fe282 | |||
84de545d73 | |||
083123860b | |||
a92ba46c55 | |||
f6c70f9f19 | |||
3351924396 | |||
047c42e7c8 | |||
7b93574bc7 | |||
f4b7ac23b9 | |||
0797de9efe | |||
6d995ae68b | |||
ee7d47f4d6 | |||
e3ed9f557c | |||
9b95549a25 | |||
ed292f62d6 | |||
460c6253c4 | |||
851ac444f4 | |||
ea7adc3c4f | |||
06d0a0eaa3 | |||
af0d956078 | |||
b5d7a0b7cf | |||
b177783770 | |||
60d5765b5a | |||
e0a886d378 | |||
a46700d697 | |||
746d6eb2e2 | |||
416896888d | |||
f7352b73a2 | |||
1b03fa4ab8 | |||
79582ae9af | |||
ef62ce49a1 | |||
1b36107cc2 | |||
df00cad32e | |||
afcbaaf050 | |||
25463ec93e | |||
2fdb64efd6 | |||
7890a1e208 | |||
88d0a427ed | |||
2b962b26a0 | |||
724c623596 | |||
596c63dead | |||
5ff4be2bd2 | |||
0c766339fe | |||
6f9aefde21 | |||
8bb9f473e4 | |||
243e1a909c | |||
100a7f2f8d | |||
680d0e960c | |||
db4ef238bd | |||
ca7c8952ea | |||
2909c7c1d8 | |||
e31e2c0e57 | |||
80b49fb4dc | |||
9c3f5daa16 | |||
6d68e0d4dd | |||
788e5f37d3 | |||
3b9e6a34b8 | |||
78b0755828 | |||
c47beb7091 | |||
a7857e50e4 | |||
c965bec3a1 | |||
d02a91dd2c | |||
110da33aff | |||
606d4b2d54 | |||
ebeae24de4 | |||
3e0e10532d | |||
a3e1ad344b | |||
bfa22a596f | |||
b80894cf07 | |||
ae914db459 | |||
e2ea606a60 | |||
730c49fb2a | |||
b4a32f9e57 | |||
fcfdf89b8e | |||
79396167dd | |||
39888f9358 | |||
5670786bcd | |||
50608a4098 | |||
e7d3d645ae | |||
27a1a3f3eb | |||
6fc53380c6 | |||
a7c4ee41ff | |||
c778f7aff6 | |||
a27c47b2c4 | |||
1aae061d4d | |||
1d81b3b35f | |||
cbb95b6c6a | |||
c4da489a74 | |||
788939b4a7 | |||
b685f90eb7 | |||
b2dd46398f | |||
031fc80059 | |||
3cac5ddd01 | |||
5f5fd0d6e2 | |||
bce8163937 | |||
b53f546d3e | |||
d8f673568b | |||
714a162048 | |||
ae5feb49c2 | |||
aa0c46ffed | |||
3dfed0ef4e | |||
a48bbc70e8 | |||
1a6470fc80 | |||
4b69c4736c | |||
daa04830aa | |||
23a51410ba | |||
7af5e6593f | |||
7e2fe5029a | |||
18cac625e5 | |||
472ce30535 | |||
aaa7a77b5f | |||
8e982692d4 | |||
7c6e8f1490 | |||
e4e9df2259 | |||
559ec3e06d | |||
c65e6b9989 | |||
ad109aba29 | |||
67ee3d6184 | |||
a9147beeb0 | |||
468dccf59d | |||
3fb84bfc79 | |||
0bc735e5aa | |||
6a2f43ce64 | |||
38d854e425 | |||
e3dfc5901f | |||
09dee9ab25 | |||
5179183b49 | |||
deb3bce1a2 | |||
60d7ec80d9 | |||
c61dd7f4d2 | |||
f2107d57e4 | |||
abfc0a6d59 | |||
8d92151c66 | |||
aebfe832b8 | |||
90a65a4aab | |||
42ceb0fd7f | |||
18907920bb | |||
7b1401e965 | |||
3c8149a0f2 | |||
08601fdc68 | |||
f4001a3d12 | |||
8d3743868e | |||
c416ff5ffa | |||
09fc30c4c7 | |||
8df052e2ae | |||
79bbee8368 | |||
884e1e930b | |||
4f328761f3 | |||
c4fdce5cea | |||
b9bc216fdd | |||
2ddb73ddd3 | |||
c9251518b0 | |||
795795ae99 | |||
bbfeea269e | |||
6d3162acf1 | |||
8ff8ada6ee | |||
a290710b1b | |||
f915f220c0 | |||
469fd109cd | |||
1b2500c6bf | |||
1514448dad |
3
.gitignore
vendored
3
.gitignore
vendored
@ -24,6 +24,7 @@
|
||||
/configure
|
||||
/depcomp
|
||||
/install-sh
|
||||
/ioctl_iocdef.[ih]
|
||||
/ioctl_redefs[12].h
|
||||
/ioctlent[012].h
|
||||
/ioctls_all[012].h
|
||||
@ -49,6 +50,7 @@
|
||||
/native_printer_decls.h
|
||||
/native_printer_defs.h
|
||||
/printers.h
|
||||
/scno.h
|
||||
/sen.h
|
||||
/stamp-h1
|
||||
/strace
|
||||
@ -57,6 +59,7 @@
|
||||
/strace.dsc
|
||||
/strace.spec
|
||||
/sys_func.h
|
||||
/syscallent.i
|
||||
/test-driver
|
||||
/tests-m32
|
||||
/tests-mx32
|
||||
|
4
.mailmap
4
.mailmap
@ -1,7 +1,11 @@
|
||||
# Map git author names and email addresses to canonical/preferred form.
|
||||
<ak@linux.intel.com> <ak@suse.de>
|
||||
<chenjingpiao@gmail.com> <chenjingpiao@foxmail.com>
|
||||
<dgilbert@redhat.com> <dave@treblig.org>
|
||||
<holger@freyther.de> <zecke@selfish.org>
|
||||
<kirill@shutemov.name> <kirill.shutemov@linux.intel.com>
|
||||
<schwab@linux-m68k.org> <schwab@redhat.com>
|
||||
<schwab@linux-m68k.org> <schwab@suse.de>
|
||||
<thomas.de.schampheleire@gmail.com> <thomas.de_schampheleire@nokia.com>
|
||||
<vda.linux@googlemail.com> <dvlasenk@redhat.com>
|
||||
Eugene Syromyatnikov <evgsyr@gmail.com>
|
||||
|
10
.travis.yml
10
.travis.yml
@ -6,8 +6,6 @@ before_install: ./travis-install.sh
|
||||
|
||||
script: ./travis-build.sh
|
||||
|
||||
after_success: ./travis-success.sh
|
||||
|
||||
sudo: required
|
||||
|
||||
git:
|
||||
@ -23,7 +21,6 @@ matrix:
|
||||
- compiler: gcc
|
||||
env:
|
||||
- TARGET=x86_64
|
||||
- COVERAGE=true
|
||||
- compiler: gcc
|
||||
env:
|
||||
- TARGET=x32
|
||||
@ -39,3 +36,10 @@ matrix:
|
||||
- compiler: clang-3.6
|
||||
env:
|
||||
- TARGET=x86
|
||||
- compiler: musl-gcc
|
||||
env:
|
||||
- TARGET=x86
|
||||
- compiler: gcc
|
||||
env:
|
||||
- TARGET=x86_64
|
||||
- CHECK=coverage
|
||||
|
1
COPYING
1
COPYING
@ -4,6 +4,7 @@ Copyright (c) 1993 Ulrich Pegelow <pegelow@moorea.uni-muenster.de>
|
||||
Copyright (c) 1995, 1996 Michael Elizabeth Chastain <mec@duracef.shout.net>
|
||||
Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
|
||||
Copyright (C) 1998-2001 Wichert Akkerman <wakkerma@deephackmode.org>
|
||||
Copyright (C) 2001-2017 The strace developers.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
157
Makefile.am
157
Makefile.am
@ -53,6 +53,9 @@ AM_CPPFLAGS = -I$(builddir)/$(OS)/$(ARCH) \
|
||||
-I$(builddir) \
|
||||
-I$(srcdir)
|
||||
|
||||
AM_CFLAGS_FOR_BUILD = $(WARN_CFLAGS_FOR_BUILD)
|
||||
AM_CPPFLAGS_FOR_BUILD = $(AM_CPPFLAGS)
|
||||
|
||||
include xlat/Makemodule.am
|
||||
|
||||
strace_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
@ -73,6 +76,7 @@ libstrace_a_SOURCES = \
|
||||
sync_file_range.c \
|
||||
sync_file_range2.c \
|
||||
upeek.c \
|
||||
upoke.c \
|
||||
# end of libstrace_a_SOURCES
|
||||
|
||||
strace_SOURCES = \
|
||||
@ -97,12 +101,12 @@ strace_SOURCES = \
|
||||
desc.c \
|
||||
dirent.c \
|
||||
dirent64.c \
|
||||
dm.c \
|
||||
empty.h \
|
||||
epoll.c \
|
||||
evdev.c \
|
||||
eventfd.c \
|
||||
execve.c \
|
||||
exit.c \
|
||||
fadvise.c \
|
||||
fallocate.c \
|
||||
fanotify.c \
|
||||
@ -112,8 +116,9 @@ strace_SOURCES = \
|
||||
fetch_struct_flock.c \
|
||||
fetch_struct_mmsghdr.c \
|
||||
fetch_struct_msghdr.c \
|
||||
fetch_struct_stat.c \
|
||||
fetch_struct_stat64.c \
|
||||
fetch_struct_statfs.c \
|
||||
file.c \
|
||||
file_handle.c \
|
||||
file_ioctl.c \
|
||||
fs_x_ioctl.c \
|
||||
@ -147,6 +152,7 @@ strace_SOURCES = \
|
||||
link.c \
|
||||
linux/asm_stat.h \
|
||||
linux/x32/asm_stat.h \
|
||||
linux/x86_64/asm_stat.h \
|
||||
lookup_dcookie.c \
|
||||
loop.c \
|
||||
lseek.c \
|
||||
@ -164,29 +170,38 @@ strace_SOURCES = \
|
||||
native_defs.h \
|
||||
net.c \
|
||||
netlink.c \
|
||||
nsig.h \
|
||||
numa.c \
|
||||
oldstat.c \
|
||||
open.c \
|
||||
or1k_atomic.c \
|
||||
pathtrace.c \
|
||||
perf.c \
|
||||
perf_event_struct.h \
|
||||
personality.c \
|
||||
pkeys.c \
|
||||
poll.c \
|
||||
prctl.c \
|
||||
print_dev_t.c \
|
||||
print_mq_attr.c \
|
||||
print_msgbuf.c \
|
||||
print_sg_req_info.c \
|
||||
print_sigevent.c \
|
||||
print_statfs.c \
|
||||
print_struct_stat.c \
|
||||
print_time.c \
|
||||
print_timespec.c \
|
||||
print_timeval.c \
|
||||
print_timex.c \
|
||||
printmode.c \
|
||||
printrusage.c \
|
||||
printsiginfo.c \
|
||||
printsiginfo.h \
|
||||
printstat.h \
|
||||
process.c \
|
||||
process_vm.c \
|
||||
ptp.c \
|
||||
ptrace.h \
|
||||
qualify.c \
|
||||
quota.c \
|
||||
readahead.c \
|
||||
readlink.c \
|
||||
@ -200,6 +215,8 @@ strace_SOURCES = \
|
||||
seccomp.c \
|
||||
seccomp_fprog.h \
|
||||
sendfile.c \
|
||||
sg_io_v3.c \
|
||||
sg_io_v4.c \
|
||||
sigaltstack.c \
|
||||
sigevent.h \
|
||||
signal.c \
|
||||
@ -209,12 +226,16 @@ strace_SOURCES = \
|
||||
sockaddr.c \
|
||||
socketutils.c \
|
||||
sram_alloc.c \
|
||||
stat.c \
|
||||
stat.h \
|
||||
stat64.c \
|
||||
statfs.c \
|
||||
statfs.h \
|
||||
strace.c \
|
||||
swapon.c \
|
||||
syscall.c \
|
||||
sysctl.c \
|
||||
sysent.h \
|
||||
sysinfo.c \
|
||||
syslog.c \
|
||||
sysmips.c \
|
||||
@ -229,11 +250,11 @@ strace_SOURCES = \
|
||||
umount.c \
|
||||
uname.c \
|
||||
userfaultfd.c \
|
||||
ustat.c \
|
||||
util.c \
|
||||
utime.c \
|
||||
utimes.c \
|
||||
v4l2.c \
|
||||
vsprintf.c \
|
||||
wait.c \
|
||||
xattr.c \
|
||||
xlat.h \
|
||||
@ -250,7 +271,7 @@ endif
|
||||
@CODE_COVERAGE_RULES@
|
||||
CODE_COVERAGE_BRANCH_COVERAGE = 1
|
||||
CODE_COVERAGE_GENHTML_OPTIONS = $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) \
|
||||
--prefix $(shell realpath -Ls $(abs_top_srcdir)/..)
|
||||
--prefix $(shell cd $(abs_top_srcdir)/.. && pwd || echo .)
|
||||
CODE_COVERAGE_IGNORE_PATTERN = '/usr/include/*'
|
||||
strace_CPPFLAGS += $(CODE_COVERAGE_CPPFLAGS)
|
||||
strace_CFLAGS += $(CODE_COVERAGE_CFLAGS)
|
||||
@ -283,8 +304,10 @@ EXTRA_DIST = \
|
||||
debian/watch \
|
||||
errnoent.sh \
|
||||
generate_sen.sh \
|
||||
ioctl_iocdef.c \
|
||||
ioctlsort.c \
|
||||
linux/32/ioctls_inc.h \
|
||||
linux/32/ioctls_inc_align16.h \
|
||||
linux/32/ioctls_inc_align32.h \
|
||||
linux/32/ioctls_inc_align64.h \
|
||||
linux/32/syscallent.h \
|
||||
@ -301,6 +324,8 @@ EXTRA_DIST = \
|
||||
linux/aarch64/ioctls_arch1.h \
|
||||
linux/aarch64/ioctls_inc0.h \
|
||||
linux/aarch64/ioctls_inc1.h \
|
||||
linux/aarch64/set_error.c \
|
||||
linux/aarch64/set_scno.c \
|
||||
linux/aarch64/signalent1.h \
|
||||
linux/aarch64/syscallent.h \
|
||||
linux/aarch64/syscallent1.h \
|
||||
@ -315,6 +340,8 @@ EXTRA_DIST = \
|
||||
linux/alpha/get_syscall_result.c\
|
||||
linux/alpha/ioctls_arch0.h \
|
||||
linux/alpha/ioctls_inc0.h \
|
||||
linux/alpha/set_error.c \
|
||||
linux/alpha/set_scno.c \
|
||||
linux/alpha/signalent.h \
|
||||
linux/alpha/syscallent.h \
|
||||
linux/alpha/userent.h \
|
||||
@ -324,6 +351,8 @@ EXTRA_DIST = \
|
||||
linux/arc/get_syscall_args.c \
|
||||
linux/arc/ioctls_arch0.h \
|
||||
linux/arc/ioctls_inc0.h \
|
||||
linux/arc/set_error.c \
|
||||
linux/arc/set_scno.c \
|
||||
linux/arc/syscallent.h \
|
||||
linux/arch_regs.h \
|
||||
linux/arch_sigreturn.c \
|
||||
@ -335,6 +364,8 @@ EXTRA_DIST = \
|
||||
linux/arm/get_syscall_args.c \
|
||||
linux/arm/ioctls_arch0.h \
|
||||
linux/arm/ioctls_inc0.h \
|
||||
linux/arm/set_error.c \
|
||||
linux/arm/set_scno.c \
|
||||
linux/arm/syscallent.h \
|
||||
linux/arm/userent.h \
|
||||
linux/avr32/arch_regs.c \
|
||||
@ -343,6 +374,8 @@ EXTRA_DIST = \
|
||||
linux/avr32/get_syscall_args.c \
|
||||
linux/avr32/ioctls_arch0.h \
|
||||
linux/avr32/ioctls_inc0.h \
|
||||
linux/avr32/set_error.c \
|
||||
linux/avr32/set_scno.c \
|
||||
linux/avr32/syscallent.h \
|
||||
linux/avr32/userent.h \
|
||||
linux/bfin/arch_regs.c \
|
||||
@ -352,6 +385,8 @@ EXTRA_DIST = \
|
||||
linux/bfin/get_syscall_result.c \
|
||||
linux/bfin/ioctls_arch0.h \
|
||||
linux/bfin/ioctls_inc0.h \
|
||||
linux/bfin/set_error.c \
|
||||
linux/bfin/set_scno.c \
|
||||
linux/bfin/syscallent.h \
|
||||
linux/bfin/userent.h \
|
||||
linux/crisv10/arch_regs.c \
|
||||
@ -360,6 +395,9 @@ EXTRA_DIST = \
|
||||
linux/crisv10/get_scno.c \
|
||||
linux/crisv10/get_syscall_args.c \
|
||||
linux/crisv10/get_syscall_result.c \
|
||||
linux/crisv10/set_error.c \
|
||||
linux/crisv10/set_scno.c \
|
||||
linux/crisv10/syscallent.h \
|
||||
linux/crisv10/userent.h \
|
||||
linux/crisv32/arch_regs.c \
|
||||
linux/crisv32/arch_sigreturn.c \
|
||||
@ -367,9 +405,13 @@ EXTRA_DIST = \
|
||||
linux/crisv32/get_scno.c \
|
||||
linux/crisv32/get_syscall_args.c \
|
||||
linux/crisv32/get_syscall_result.c \
|
||||
linux/crisv32/set_error.c \
|
||||
linux/crisv32/set_scno.c \
|
||||
linux/crisv32/syscallent.h \
|
||||
linux/crisv32/userent.h \
|
||||
linux/dummy.h \
|
||||
linux/errnoent.h \
|
||||
linux/getregs_old.h \
|
||||
linux/hppa/arch_regs.c \
|
||||
linux/hppa/arch_regs.h \
|
||||
linux/hppa/errnoent.h \
|
||||
@ -379,6 +421,8 @@ EXTRA_DIST = \
|
||||
linux/hppa/get_syscall_result.c \
|
||||
linux/hppa/ioctls_arch0.h \
|
||||
linux/hppa/ioctls_inc0.h \
|
||||
linux/hppa/set_error.c \
|
||||
linux/hppa/set_scno.c \
|
||||
linux/hppa/signalent.h \
|
||||
linux/hppa/syscallent.h \
|
||||
linux/i386/arch_regs.c \
|
||||
@ -389,6 +433,8 @@ EXTRA_DIST = \
|
||||
linux/i386/get_syscall_args.c \
|
||||
linux/i386/ioctls_arch0.h \
|
||||
linux/i386/ioctls_inc0.h \
|
||||
linux/i386/set_error.c \
|
||||
linux/i386/set_scno.c \
|
||||
linux/i386/syscallent.h \
|
||||
linux/i386/userent.h \
|
||||
linux/i386/userent0.h \
|
||||
@ -401,17 +447,21 @@ EXTRA_DIST = \
|
||||
linux/ia64/get_syscall_args.c \
|
||||
linux/ia64/ioctls_arch0.h \
|
||||
linux/ia64/ioctls_inc0.h \
|
||||
linux/ia64/set_error.c \
|
||||
linux/ia64/set_scno.c \
|
||||
linux/ia64/syscallent.h \
|
||||
linux/ia64/userent.h \
|
||||
linux/inet_diag.h \
|
||||
linux/m68k/arch_regs.c \
|
||||
linux/m68k/arch_regs.h \
|
||||
linux/m68k/arch_sigreturn.c \
|
||||
linux/m68k/get_error.c \
|
||||
linux/m68k/get_scno.c \
|
||||
linux/m68k/get_syscall_args.c \
|
||||
linux/m68k/get_syscall_result.c \
|
||||
linux/m68k/ioctls_arch0.h \
|
||||
linux/m68k/ioctls_inc0.h \
|
||||
linux/m68k/set_error.c \
|
||||
linux/m68k/set_scno.c \
|
||||
linux/m68k/syscallent.h \
|
||||
linux/m68k/userent.h \
|
||||
linux/metag/arch_regs.c \
|
||||
@ -420,6 +470,8 @@ EXTRA_DIST = \
|
||||
linux/metag/get_syscall_args.c \
|
||||
linux/metag/ioctls_arch0.h \
|
||||
linux/metag/ioctls_inc0.h \
|
||||
linux/metag/set_error.c \
|
||||
linux/metag/set_scno.c \
|
||||
linux/metag/syscallent.h \
|
||||
linux/microblaze/arch_regs.c \
|
||||
linux/microblaze/arch_sigreturn.c \
|
||||
@ -429,6 +481,8 @@ EXTRA_DIST = \
|
||||
linux/microblaze/get_syscall_result.c \
|
||||
linux/microblaze/ioctls_arch0.h \
|
||||
linux/microblaze/ioctls_inc0.h \
|
||||
linux/microblaze/set_error.c \
|
||||
linux/microblaze/set_scno.c \
|
||||
linux/microblaze/syscallent.h \
|
||||
linux/microblaze/userent.h \
|
||||
linux/mips/arch_getrval2.c \
|
||||
@ -442,6 +496,8 @@ EXTRA_DIST = \
|
||||
linux/mips/get_syscall_args.c \
|
||||
linux/mips/ioctls_arch0.h \
|
||||
linux/mips/ioctls_inc0.h \
|
||||
linux/mips/set_error.c \
|
||||
linux/mips/set_scno.c \
|
||||
linux/mips/signalent.h \
|
||||
linux/mips/syscallent-compat.h \
|
||||
linux/mips/syscallent-n32.h \
|
||||
@ -457,6 +513,8 @@ EXTRA_DIST = \
|
||||
linux/nios2/get_syscall_args.c \
|
||||
linux/nios2/ioctls_arch0.h \
|
||||
linux/nios2/ioctls_inc0.h \
|
||||
linux/nios2/set_error.c \
|
||||
linux/nios2/set_scno.c \
|
||||
linux/nios2/syscallent.h \
|
||||
linux/or1k/arch_regs.c \
|
||||
linux/or1k/get_error.c \
|
||||
@ -464,6 +522,8 @@ EXTRA_DIST = \
|
||||
linux/or1k/get_syscall_args.c \
|
||||
linux/or1k/ioctls_arch0.h \
|
||||
linux/or1k/ioctls_inc0.h \
|
||||
linux/or1k/set_error.c \
|
||||
linux/or1k/set_scno.c \
|
||||
linux/or1k/syscallent.h \
|
||||
linux/or1k/userent.h \
|
||||
linux/personality.h \
|
||||
@ -475,8 +535,11 @@ EXTRA_DIST = \
|
||||
linux/powerpc/get_scno.c \
|
||||
linux/powerpc/get_syscall_args.c \
|
||||
linux/powerpc/getregs_old.c \
|
||||
linux/powerpc/getregs_old.h \
|
||||
linux/powerpc/ioctls_arch0.h \
|
||||
linux/powerpc/ioctls_inc0.h \
|
||||
linux/powerpc/set_error.c \
|
||||
linux/powerpc/set_scno.c \
|
||||
linux/powerpc/syscallent.h \
|
||||
linux/powerpc/userent.h \
|
||||
linux/powerpc64/arch_regs.c \
|
||||
@ -488,15 +551,32 @@ EXTRA_DIST = \
|
||||
linux/powerpc64/get_scno.c \
|
||||
linux/powerpc64/get_syscall_args.c \
|
||||
linux/powerpc64/getregs_old.c \
|
||||
linux/powerpc64/getregs_old.h \
|
||||
linux/powerpc64/ioctls_arch0.h \
|
||||
linux/powerpc64/ioctls_arch1.h \
|
||||
linux/powerpc64/ioctls_inc0.h \
|
||||
linux/powerpc64/ioctls_inc1.h \
|
||||
linux/powerpc64/set_error.c \
|
||||
linux/powerpc64/set_scno.c \
|
||||
linux/powerpc64/signalent1.h \
|
||||
linux/powerpc64/syscallent.h \
|
||||
linux/powerpc64/syscallent1.h \
|
||||
linux/powerpc64/userent.h \
|
||||
linux/ptp_clock.h \
|
||||
linux/riscv/arch_regs.c \
|
||||
linux/riscv/errnoent1.h \
|
||||
linux/riscv/get_error.c \
|
||||
linux/riscv/get_scno.c \
|
||||
linux/riscv/get_syscall_args.c \
|
||||
linux/riscv/ioctls_arch0.h \
|
||||
linux/riscv/ioctls_arch1.h \
|
||||
linux/riscv/ioctls_inc0.h \
|
||||
linux/riscv/ioctls_inc1.h \
|
||||
linux/riscv/set_error.c \
|
||||
linux/riscv/set_scno.c \
|
||||
linux/riscv/signalent1.h \
|
||||
linux/riscv/syscallent.h \
|
||||
linux/riscv/syscallent1.h \
|
||||
linux/s390/arch_regs.c \
|
||||
linux/s390/arch_regs.h \
|
||||
linux/s390/arch_sigreturn.c \
|
||||
@ -505,6 +585,8 @@ EXTRA_DIST = \
|
||||
linux/s390/get_syscall_args.c \
|
||||
linux/s390/ioctls_arch0.h \
|
||||
linux/s390/ioctls_inc0.h \
|
||||
linux/s390/set_error.c \
|
||||
linux/s390/set_scno.c \
|
||||
linux/s390/syscallent.h \
|
||||
linux/s390/userent.h \
|
||||
linux/s390/userent0.h \
|
||||
@ -517,6 +599,8 @@ EXTRA_DIST = \
|
||||
linux/s390x/get_syscall_args.c \
|
||||
linux/s390x/ioctls_arch0.h \
|
||||
linux/s390x/ioctls_inc0.h \
|
||||
linux/s390x/set_error.c \
|
||||
linux/s390x/set_scno.c \
|
||||
linux/s390x/syscallent.h \
|
||||
linux/s390x/userent.h \
|
||||
linux/sh/arch_getrval2.c \
|
||||
@ -527,6 +611,8 @@ EXTRA_DIST = \
|
||||
linux/sh/get_syscall_result.c \
|
||||
linux/sh/ioctls_arch0.h \
|
||||
linux/sh/ioctls_inc0.h \
|
||||
linux/sh/set_error.c \
|
||||
linux/sh/set_scno.c \
|
||||
linux/sh/syscallent.h \
|
||||
linux/sh/userent.h \
|
||||
linux/sh/userent0.h \
|
||||
@ -538,6 +624,8 @@ EXTRA_DIST = \
|
||||
linux/sh64/get_syscall_result.c \
|
||||
linux/sh64/ioctls_arch0.h \
|
||||
linux/sh64/ioctls_inc0.h \
|
||||
linux/sh64/set_error.c \
|
||||
linux/sh64/set_scno.c \
|
||||
linux/sh64/syscallent.h \
|
||||
linux/sh64/userent.h \
|
||||
linux/signalent.h \
|
||||
@ -553,6 +641,8 @@ EXTRA_DIST = \
|
||||
linux/sparc/get_syscall_args.c \
|
||||
linux/sparc/ioctls_arch0.h \
|
||||
linux/sparc/ioctls_inc0.h \
|
||||
linux/sparc/set_error.c \
|
||||
linux/sparc/set_scno.c \
|
||||
linux/sparc/signalent.h \
|
||||
linux/sparc/syscallent.h \
|
||||
linux/sparc/userent.h \
|
||||
@ -569,6 +659,8 @@ EXTRA_DIST = \
|
||||
linux/sparc64/ioctls_arch1.h \
|
||||
linux/sparc64/ioctls_inc0.h \
|
||||
linux/sparc64/ioctls_inc1.h \
|
||||
linux/sparc64/set_error.c \
|
||||
linux/sparc64/set_scno.c \
|
||||
linux/sparc64/signalent.h \
|
||||
linux/sparc64/signalent1.h \
|
||||
linux/sparc64/syscallent.h \
|
||||
@ -587,6 +679,8 @@ EXTRA_DIST = \
|
||||
linux/tile/ioctls_arch1.h \
|
||||
linux/tile/ioctls_inc0.h \
|
||||
linux/tile/ioctls_inc1.h \
|
||||
linux/tile/set_error.c \
|
||||
linux/tile/set_scno.c \
|
||||
linux/tile/signalent1.h \
|
||||
linux/tile/syscallent.h \
|
||||
linux/tile/syscallent1.h \
|
||||
@ -606,6 +700,8 @@ EXTRA_DIST = \
|
||||
linux/x32/ioctls_arch1.h \
|
||||
linux/x32/ioctls_inc0.h \
|
||||
linux/x32/ioctls_inc1.h \
|
||||
linux/x32/set_error.c \
|
||||
linux/x32/set_scno.c \
|
||||
linux/x32/signalent1.h \
|
||||
linux/x32/syscallent.h \
|
||||
linux/x32/syscallent1.h \
|
||||
@ -620,12 +716,15 @@ EXTRA_DIST = \
|
||||
linux/x86_64/get_scno.c \
|
||||
linux/x86_64/get_syscall_args.c \
|
||||
linux/x86_64/getregs_old.c \
|
||||
linux/x86_64/getregs_old.h \
|
||||
linux/x86_64/ioctls_arch0.h \
|
||||
linux/x86_64/ioctls_arch1.h \
|
||||
linux/x86_64/ioctls_arch2.h \
|
||||
linux/x86_64/ioctls_inc0.h \
|
||||
linux/x86_64/ioctls_inc1.h \
|
||||
linux/x86_64/ioctls_inc2.h \
|
||||
linux/x86_64/set_error.c \
|
||||
linux/x86_64/set_scno.c \
|
||||
linux/x86_64/signalent1.h \
|
||||
linux/x86_64/signalent2.h \
|
||||
linux/x86_64/syscallent.h \
|
||||
@ -639,6 +738,8 @@ EXTRA_DIST = \
|
||||
linux/xtensa/get_syscall_result.c \
|
||||
linux/xtensa/ioctls_arch0.h \
|
||||
linux/xtensa/ioctls_inc0.h \
|
||||
linux/xtensa/set_error.c \
|
||||
linux/xtensa/set_scno.c \
|
||||
linux/xtensa/syscallent.h \
|
||||
linux/xtensa/userent.h \
|
||||
maint/ioctls_gen.sh \
|
||||
@ -649,6 +750,7 @@ EXTRA_DIST = \
|
||||
mpers.sh \
|
||||
mpers_test.sh \
|
||||
mpers_xlat.h \
|
||||
scno.head \
|
||||
signalent.sh \
|
||||
strace-graph \
|
||||
strace-log-merge \
|
||||
@ -659,6 +761,9 @@ EXTRA_DIST = \
|
||||
xlat/gen.sh \
|
||||
xlate.el
|
||||
|
||||
.PHONY: check-valgrind-local
|
||||
check-valgrind-local:
|
||||
|
||||
.PHONY: srpm
|
||||
srpm: dist-xz
|
||||
rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
|
||||
@ -702,9 +807,9 @@ news-check: NEWS
|
||||
ioctlsort_CC = $(CC_FOR_BUILD)
|
||||
ioctlsort_DEFS = $(DEFS)
|
||||
ioctlsort_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES)
|
||||
ioctlsort_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_FOR_BUILD)
|
||||
ioctlsort_CFLAGS = $(AM_CFLAGS) $(CFLAGS_FOR_BUILD)
|
||||
ioctlsort_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_FOR_BUILD)
|
||||
ioctlsort_CPPFLAGS = $(AM_CPPFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD)
|
||||
ioctlsort_CFLAGS = $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD)
|
||||
ioctlsort_LDFLAGS = $(AM_LDFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD)
|
||||
|
||||
ioctls_inc_h = $(wildcard $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h)
|
||||
ioctlent_h = $(patsubst $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%,ioctlent%,$(ioctls_inc_h))
|
||||
@ -713,7 +818,7 @@ ioctl_redefs_h = $(filter-out ioctl_redefs0.h,$(subst ioctlent,ioctl_redefs,$(io
|
||||
ioctl_redefs%.h: ioctlent%.h ioctlent0.h
|
||||
sort $< > $<-t
|
||||
sort ioctlent0.h | comm -23 $<-t - | \
|
||||
sed -n 's/^{ "\([^"]\+\)", \(0x[[:xdigit:]]\+\) },$$/#ifdef \1\n# undef \1\n# define \1 \2\n#endif/p' \
|
||||
sed -r -n 's/^\{ "([^"]+)", (0x[[:xdigit:]]+) \},$$/#ifdef \1\n# undef \1\n# define \1 \2\n#endif/p' \
|
||||
> $@-t
|
||||
rm -f $<-t
|
||||
mv $@-t $@
|
||||
@ -721,10 +826,19 @@ ioctl_redefs%.h: ioctlent%.h ioctlent0.h
|
||||
ioctlent%.h: ioctlsort%
|
||||
./$< > $@
|
||||
|
||||
# Need to pick up <linux/ioctl.h> definitions *for host* while compiling
|
||||
# ioctlsort *for build*, hence this magic.
|
||||
ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c
|
||||
$(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@
|
||||
|
||||
ioctl_iocdef.h: ioctl_iocdef.i
|
||||
sed -n 's/^DEFINE HOST/#define /p' $< > $@
|
||||
|
||||
ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o
|
||||
$(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@
|
||||
|
||||
ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c
|
||||
ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c
|
||||
$(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c
|
||||
|
||||
ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h
|
||||
@ -733,9 +847,14 @@ ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioc
|
||||
BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) \
|
||||
native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h .version
|
||||
CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \
|
||||
ioctl_iocdef.h ioctl_iocdef.i \
|
||||
native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h
|
||||
DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h
|
||||
|
||||
include scno.am
|
||||
|
||||
$(strace_OBJECTS): scno.h
|
||||
|
||||
# defines mpers_source_files
|
||||
include mpers.am
|
||||
srcdir_mpers_source_files = $(patsubst %,$(srcdir)/%,$(mpers_source_files))
|
||||
@ -754,7 +873,7 @@ libmpers_CFLAGS = $(strace_CFLAGS)
|
||||
|
||||
mpers-m%.stamp: $(srcdir_mpers_source_files) | printers.h
|
||||
for f in $^; do \
|
||||
CC="$(CC)" CFLAGS="$(mpers_sh_opts)" \
|
||||
CC="$(CC)" CFLAGS="$(mpers_sh_opts) -DMPERS_IS_$(mpers_NAME)" \
|
||||
CPP="$(CPP)" CPPFLAGS="$(mpers_sh_opts) -DIN_MPERS -DMPERS_IS_$(mpers_NAME)" \
|
||||
$(srcdir)/mpers.sh -$(mpers_NAME) $$f || exit; \
|
||||
done
|
||||
@ -762,7 +881,7 @@ mpers-m%.stamp: $(srcdir_mpers_source_files) | printers.h
|
||||
|
||||
m%_type_defs.h: $(srcdir_mpers_source_files)
|
||||
for f in $^; do \
|
||||
sed -n 's/^#include DEF_MPERS_TYPE(\([^)]\+\))/#ifdef MPERS_$(mpers_PREFIX)\1\n# define \1 MPERS_$(mpers_PREFIX)\1\n#endif/p' $$f || exit; \
|
||||
sed -r -n 's/^#[[:space:]]*include DEF_MPERS_TYPE\(([^)]+)\)/#ifdef MPERS_$(mpers_PREFIX)\1\n# define \1 MPERS_$(mpers_PREFIX)\1\n#endif/p' $$f || exit; \
|
||||
done > $@-t
|
||||
echo '#undef MPERS_PRINTER_NAME' >> $@-t
|
||||
echo '#define MPERS_PRINTER_NAME(printer_name) printer_name' >> $@-t
|
||||
@ -772,7 +891,7 @@ m%_type_defs.h: $(srcdir_mpers_source_files)
|
||||
|
||||
m%_funcs.h: $(srcdir_mpers_source_files)
|
||||
for f in $^; do \
|
||||
sed -n 's/^SYS_FUNC(\([^)]\+\))/#undef sys_\1\n#define sys_\1 $(mpers_PREFIX)sys_\1/p' $$f || exit; \
|
||||
sed -r -n 's/^SYS_FUNC\(([^)]+)\)/#undef sys_\1\n#define sys_\1 $(mpers_PREFIX)sys_\1/p' $$f || exit; \
|
||||
done > $@-t && \
|
||||
echo '#include "sys_func.h"' >> $@-t
|
||||
mv $@-t $@
|
||||
@ -782,13 +901,13 @@ m%_funcs.h: $(srcdir_mpers_source_files)
|
||||
%.c.mpers.i: $(srcdir)/%.c
|
||||
$(CPP) -P $(mpers_sh_opts) -DIN_MPERS_BOOTSTRAP $< -o $@
|
||||
|
||||
mpers_printer_decl_pattern = ^MPERS_PRINTER_DECL(\([^,)]\+\),[[:space:]]*\([^,)]\+\),[[:space:]]*\([^)]\+\))$$
|
||||
mpers_printer_decl_pattern = ^MPERS_PRINTER_DECL\(([^,)]+),[[:space:]]*([^,)]+),[[:space:]]*([^)]+)\)$$
|
||||
|
||||
printers.h: $(mpers_preproc_files)
|
||||
echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
|
||||
echo 'typedef struct {' >> $@-t
|
||||
for f in $^; do \
|
||||
sed -n 's/$(mpers_printer_decl_pattern)/ \1 (*\2)(\3);\n#define \2 MPERS_PRINTER_NAME(\2)\n/p' $$f \
|
||||
sed -r -n 's/$(mpers_printer_decl_pattern)/ \1 (*\2)(\3);\n#define \2 MPERS_PRINTER_NAME(\2)\n/p' $$f \
|
||||
|| exit; \
|
||||
done >> $@-t
|
||||
echo '} struct_printers;' >> $@-t
|
||||
@ -799,7 +918,7 @@ printers.h: $(mpers_preproc_files)
|
||||
%_printer_decls.h: $(mpers_preproc_files)
|
||||
echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
|
||||
for f in $^; do \
|
||||
sed -n 's/$(mpers_printer_decl_pattern)/extern \1 $(mpers_PREFIX)\2(\3);/p' $$f \
|
||||
sed -r -n 's/$(mpers_printer_decl_pattern)/extern \1 $(mpers_PREFIX)\2(\3);/p' $$f \
|
||||
|| exit; \
|
||||
done >> $@-t
|
||||
mv $@-t $@
|
||||
@ -807,7 +926,7 @@ printers.h: $(mpers_preproc_files)
|
||||
%_printer_defs.h: $(mpers_preproc_files)
|
||||
echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
|
||||
for f in $^; do \
|
||||
sed -n 's/$(mpers_printer_decl_pattern)/\.\2 = $(mpers_PREFIX)\2,/p' $$f \
|
||||
sed -r -n 's/$(mpers_printer_decl_pattern)/.\2 = $(mpers_PREFIX)\2,/p' $$f \
|
||||
|| exit; \
|
||||
done >> $@-t
|
||||
mv $@-t $@
|
||||
@ -869,7 +988,7 @@ $(srcdir)/CREDITS: $(srcdir)/CREDITS.in $(srcdir)/.mailmap \
|
||||
( \
|
||||
cd $(srcdir); \
|
||||
sed '/^##/,$$d' CREDITS.in; \
|
||||
{ sed -n '1,/^##>/d; s/ \+/\t/; s/^./&/p' CREDITS.in; \
|
||||
{ sed -n '1,/^##>/d; s/ */\t/; s/^./&/p' CREDITS.in; \
|
||||
git log --pretty=format:'%aN %aE'; \
|
||||
} | LC_ALL=C sort -u \
|
||||
| awk -F'\t' '{printf("\t%s <%s>\n",$$1,$$2)}'; \
|
||||
|
112
NEWS
112
NEWS
@ -1,3 +1,115 @@
|
||||
Noteworthy changes in release 4.16 (2017-02-14)
|
||||
===============================================
|
||||
|
||||
* Improvements
|
||||
* Implemented syscall return value injection (-e inject=SET:retval= option).
|
||||
* Implemented signal injection (-e inject=SET:signal= option).
|
||||
* Implemented decoding of SUID_DUMP_* constants in PR_[GS]ET_DUMPABLE.
|
||||
* Implemented decoding of all SG_* ioctl commands.
|
||||
* Implemented decoding of ustat syscall.
|
||||
* Implemented decoding of BPF_OBJ_PIN, BPF_OBJ_GET, BPF_PROG_ATTACH,
|
||||
and BPF_PROG_DETACH commands of bpf syscall.
|
||||
* Enhanced decoding of sg_io_hdr and sg_io_v4 structures.
|
||||
* Enhanced decoding of get_robust_list, getrandom, io_submit, set_robust_list
|
||||
syscalls.
|
||||
* Enhanced decoding of entities of kernel long type on x32 and mips n32 ABIs.
|
||||
* Updated lists of IP_*, IPV6_*, and LOOP_* constants.
|
||||
* Updated lists of ioctl commands from Linux 4.10.
|
||||
* Added decoding of recently added syscalls on avr32, microblaze, ppc,
|
||||
and ppc64.
|
||||
|
||||
* Bug fixes
|
||||
* Fixed pathmatch of oldselect syscall on 64-bit architectures.
|
||||
* Fixed decoding of mmap2 syscall on s390 when arguments are not available.
|
||||
* Fixed decoding of kexec_file_load, mprotect, pkey_mprotect, prctl, preadv*,
|
||||
and pwritev* syscalls on x32.
|
||||
* Fixed printing of string arguments of getxattr and setxattr syscalls
|
||||
when -s option is used to limit the printed string size.
|
||||
* Fixed decoding of ifconf, ifreq, and loop_info structures on non-native
|
||||
personalities.
|
||||
* Fixed decoding of SG_* and LOOP_* ioctl commands.
|
||||
* Fixed build on mips with musl libc.
|
||||
* Fixed cross-building of ioctlsort.
|
||||
* Applied minor formatting fixes to the manual page.
|
||||
|
||||
Noteworthy changes in release 4.15 (2016-12-14)
|
||||
===============================================
|
||||
|
||||
* Changes in behavior
|
||||
* Time stamps are now printed according to ISO 8601.
|
||||
* Changed output format of val3 parameter of futex FUTEX_WAKE_OP operation.
|
||||
* The last argument of mincore, sched_getaffinity, and sched_setaffinity
|
||||
syscalls is now formatted as an array.
|
||||
|
||||
* Improvements
|
||||
* Implemented syscall fault injection (-e fault=... option).
|
||||
* Implemented decoding of DM_* ioctl commands.
|
||||
* Implemented decoding of attr parameter of perf_event_open syscall.
|
||||
* Implemented decoding of pkey_alloc, pkey_free, and pkey_mprotect syscalls.
|
||||
* Implemented dumping of mq_timedsend and mq_timedreceive syscalls.
|
||||
* Implemented decoding of PR_SET_FP_MODE and PR_GET_FP_MODE operations
|
||||
of prctl syscall.
|
||||
* Implemented PTRACE_GETREGS API support on m68k.
|
||||
* Updated lists of ARCH_*, BPF_*, BTRFS_*, FALLOC_*, MS_*, *_MAGIC,
|
||||
and V4L2_* constants.
|
||||
* Updated lists of ioctl commands from Linux 4.9.
|
||||
* Added decoding of recently added syscalls on arc, x32, and xtensa.
|
||||
* Enhanced manual page.
|
||||
|
||||
* Bug fixes
|
||||
* Fixed corner cases in decoding of exit, exit_group, futimesat, getgroups,
|
||||
getresuid, init_module, inotify_init1, kcmp, kexec_load, lookup_dcookie,
|
||||
mq_getsetattr, mq_notify, mq_open, mq_timedreceive, mq_timedsend,
|
||||
name_to_handle_at, prctl, process_vm_readv, process_vm_writev, setfsuid,
|
||||
setgroups, setns, unshare, and utimes syscalls.
|
||||
* Fixed handling of verbose flag in printing of controls array
|
||||
of struct v4l2_ext_controls.
|
||||
* Fixed omission of field names in the output of capability, sigaction,
|
||||
sigevent, statfs, timespec, timeval, and utimbuf structures.
|
||||
* Fixed printing of unknown syscalls in siginfo structure.
|
||||
* Fixed decoding of ioctl constants on m68k.
|
||||
* Fixed cris architecture support.
|
||||
* Fixed cross build when host compiler does not support the same
|
||||
set of warning flags as the cross compiler.
|
||||
* Fixed build on SLE10 and SLE11.
|
||||
|
||||
Noteworthy changes in release 4.14 (2016-10-04)
|
||||
===============================================
|
||||
|
||||
* Changes in behavior
|
||||
* When using -p option without a command and no processes has been attached,
|
||||
strace exits with exit status 1.
|
||||
|
||||
* Improvements
|
||||
* Added printing of the mode argument of open and openat syscalls
|
||||
when O_TMPFILE flag is set. (Addresses Fedora bug #1377846).
|
||||
* Enhanced -e abbrev=set, -e raw=set, and -e verbose=set.
|
||||
* Enhanced decoding of futex, keyctl, quotactl, timerfd_settime,
|
||||
and aio family syscalls.
|
||||
* Implemented fetching of the 7th subcall argument on mips o32.
|
||||
* Updated lists of BPF_*, ETH_P_*, KEXEC_ARCH_*, SCTP_*, TCP_*, and *_MAGIC
|
||||
constants.
|
||||
* Updated lists of ioctl commands from Linux 4.8.
|
||||
* Added decoding of new syscalls on sh and sh64.
|
||||
* Added RISC-V architecture support.
|
||||
|
||||
* Bug fixes
|
||||
* Marked io_setup and io_destroy as memory mapping related syscalls.
|
||||
* Fixed leakage of placeholder descriptors to tracees.
|
||||
* Fixed printing of mode_t, umode_t, and umask types.
|
||||
* Fixed decoding of iovec arrays without a limit on total data size.
|
||||
* Fixed decoding of fadvise64, fallocate, futex, keyctl, quotactl, readahead,
|
||||
and ipc family syscalls.
|
||||
* Fixed decoding of invalid syscalls mapped to indirect subcalls.
|
||||
* Fixed decoding of struct btrfs_ioctl_vol_args_v2 on non-native
|
||||
personalities.
|
||||
* Fixed decoding of PTRACE_DETACH on sparc and sparc64.
|
||||
* Fixed decoding of struct stat64 on sparc64.
|
||||
* Fixed decoding of uid and gid-related syscalls on sparc64.
|
||||
* Fixed decoding of the forth argument of semctl syscall on sparc64.
|
||||
* Fixed values of tty ioctl constants on sparc64.
|
||||
* Fixed sparc personality support on sparc64.
|
||||
|
||||
Noteworthy changes in release 4.13 (2016-07-26)
|
||||
===============================================
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
This is [strace](http://strace.io) -- a diagnostic, debugging and instructional userspace utility for Linux. It is used to monitor interactions between processes and the Linux kernel, which include system calls, signal deliveries, and changes of process state. The operation of strace is made possible by the kernel feature known as [ptrace](http://man7.org/linux/man-pages/man2/ptrace.2.html).
|
||||
This is [strace](https://strace.io) -- a diagnostic, debugging and instructional userspace utility with a traditional command-line interface for Linux. It is used to monitor and tamper with interactions between processes and the Linux kernel, which include system calls, signal deliveries, and changes of process state. The operation of strace is made possible by the kernel feature known as [ptrace](http://man7.org/linux/man-pages/man2/ptrace.2.html).
|
||||
|
||||
strace is released under a Berkeley-style license at the request of Paul Kranenburg; see the file [COPYING](https://raw.githubusercontent.com/strace/strace/master/COPYING) for details.
|
||||
|
||||
|
20
affinity.c
20
affinity.c
@ -35,10 +35,21 @@ get_cpuset_size(void)
|
||||
static unsigned int cpuset_size;
|
||||
|
||||
if (!cpuset_size) {
|
||||
pid_t pid = getpid();
|
||||
/*
|
||||
* If the cpuset size passed to sched_getaffinity is less
|
||||
* than necessary to store the bitmask, the kernel does not
|
||||
* look at the mask pointer and fails with EINVAL.
|
||||
*
|
||||
* If the cpuset size is large enough, the kernel fails with
|
||||
* EFAULT on inaccessible mask pointers.
|
||||
*
|
||||
* This undocumented kernel feature can be used to probe
|
||||
* the kernel and find out the minimal valid cpuset size
|
||||
* without allocating any memory for the CPU affinity mask.
|
||||
*/
|
||||
cpuset_size = 128;
|
||||
while (cpuset_size &&
|
||||
sched_getaffinity(pid, cpuset_size, NULL) == -1 &&
|
||||
sched_getaffinity(0, cpuset_size, NULL) == -1 &&
|
||||
EINVAL == errno) {
|
||||
cpuset_size <<= 1;
|
||||
}
|
||||
@ -50,7 +61,8 @@ get_cpuset_size(void)
|
||||
}
|
||||
|
||||
static void
|
||||
print_affinitylist(struct tcb *tcp, const unsigned long addr, const unsigned int len)
|
||||
print_affinitylist(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
const unsigned int len)
|
||||
{
|
||||
const unsigned int max_size = get_cpuset_size();
|
||||
const unsigned int umove_size = len < max_size ? len : max_size;
|
||||
@ -75,7 +87,7 @@ print_affinitylist(struct tcb *tcp, const unsigned long addr, const unsigned int
|
||||
if (i < 0)
|
||||
break;
|
||||
tprintf("%s%d", sep, i);
|
||||
sep = " ";
|
||||
sep = ", ";
|
||||
}
|
||||
if (size < len)
|
||||
tprintf("%s...", sep);
|
||||
|
58
aio.c
58
aio.c
@ -36,13 +36,13 @@ SYS_FUNC(io_setup)
|
||||
if (entering(tcp))
|
||||
tprintf("%u, ", (unsigned int) tcp->u_arg[0]);
|
||||
else
|
||||
printnum_ulong(tcp, tcp->u_arg[1]);
|
||||
printnum_ptr(tcp, tcp->u_arg[1]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_FUNC(io_destroy)
|
||||
{
|
||||
tprintf("%lu", tcp->u_arg[0]);
|
||||
printaddr(tcp->u_arg[0]);
|
||||
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
@ -78,14 +78,16 @@ tprint_lio_opcode(unsigned cmd)
|
||||
}
|
||||
|
||||
static void
|
||||
print_common_flags(const struct iocb *cb)
|
||||
print_common_flags(struct tcb *tcp, const struct iocb *cb)
|
||||
{
|
||||
/* IOCB_FLAG_RESFD is available since v2.6.22-rc1~47 */
|
||||
#ifdef IOCB_FLAG_RESFD
|
||||
if (cb->aio_flags & IOCB_FLAG_RESFD)
|
||||
tprintf(", resfd=%d", cb->aio_resfd);
|
||||
if (cb->aio_flags & IOCB_FLAG_RESFD) {
|
||||
tprints(", resfd=");
|
||||
printfd(tcp, cb->aio_resfd);
|
||||
}
|
||||
if (cb->aio_flags & ~IOCB_FLAG_RESFD)
|
||||
tprintf(", flags=%x", cb->aio_flags);
|
||||
tprintf(", flags=%#x", cb->aio_flags);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -98,7 +100,7 @@ iocb_is_valid(const struct iocb *cb)
|
||||
}
|
||||
|
||||
static enum iocb_sub
|
||||
print_iocb_header(const struct iocb *cb)
|
||||
print_iocb_header(struct tcb *tcp, const struct iocb *cb)
|
||||
{
|
||||
enum iocb_sub sub;
|
||||
|
||||
@ -113,7 +115,8 @@ print_iocb_header(const struct iocb *cb)
|
||||
if (cb->aio_reqprio)
|
||||
tprintf(", reqprio=%hd", cb->aio_reqprio);
|
||||
|
||||
tprintf(", fildes=%d", cb->aio_fildes);
|
||||
tprints(", fildes=");
|
||||
printfd(tcp, cb->aio_fildes);
|
||||
|
||||
return sub;
|
||||
}
|
||||
@ -121,20 +124,19 @@ print_iocb_header(const struct iocb *cb)
|
||||
static void
|
||||
print_iocb(struct tcb *tcp, const struct iocb *cb)
|
||||
{
|
||||
enum iocb_sub sub = print_iocb_header(cb);
|
||||
enum iocb_sub sub = print_iocb_header(tcp, cb);
|
||||
|
||||
switch (sub) {
|
||||
case SUB_COMMON:
|
||||
if (cb->aio_lio_opcode == 1 && iocb_is_valid(cb)) {
|
||||
tprints(", str=");
|
||||
printstr(tcp, (unsigned long) cb->aio_buf,
|
||||
(unsigned long) cb->aio_nbytes);
|
||||
printstrn(tcp, cb->aio_buf, cb->aio_nbytes);
|
||||
} else {
|
||||
tprintf(", buf=%#" PRIx64, (uint64_t) cb->aio_buf);
|
||||
}
|
||||
tprintf(", nbytes=%" PRIu64 ", offset=%" PRId64,
|
||||
(uint64_t) cb->aio_nbytes, (int64_t) cb->aio_offset);
|
||||
print_common_flags(cb);
|
||||
print_common_flags(tcp, cb);
|
||||
break;
|
||||
case SUB_VECTOR:
|
||||
if (iocb_is_valid(cb)) {
|
||||
@ -149,7 +151,7 @@ print_iocb(struct tcb *tcp, const struct iocb *cb)
|
||||
(uint64_t) cb->aio_nbytes);
|
||||
}
|
||||
tprintf(", offset=%" PRId64, (int64_t) cb->aio_offset);
|
||||
print_common_flags(cb);
|
||||
print_common_flags(tcp, cb);
|
||||
break;
|
||||
case SUB_NONE:
|
||||
break;
|
||||
@ -159,13 +161,13 @@ print_iocb(struct tcb *tcp, const struct iocb *cb)
|
||||
static bool
|
||||
print_iocbp(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
|
||||
{
|
||||
unsigned long addr;
|
||||
kernel_ulong_t addr;
|
||||
struct iocb cb;
|
||||
|
||||
if (elem_size < sizeof(long)) {
|
||||
if (elem_size < sizeof(kernel_ulong_t)) {
|
||||
addr = * (unsigned int *) elem_buf;
|
||||
} else {
|
||||
addr = * (unsigned long *) elem_buf;
|
||||
addr = * (kernel_ulong_t *) elem_buf;
|
||||
}
|
||||
|
||||
tprints("{");
|
||||
@ -178,11 +180,13 @@ print_iocbp(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
|
||||
|
||||
SYS_FUNC(io_submit)
|
||||
{
|
||||
const long nr = widen_to_long(tcp->u_arg[1]);
|
||||
const unsigned long addr = tcp->u_arg[2];
|
||||
unsigned long iocbp;
|
||||
const kernel_long_t nr =
|
||||
truncate_klong_to_current_wordsize(tcp->u_arg[1]);
|
||||
const kernel_ulong_t addr = tcp->u_arg[2];
|
||||
kernel_ulong_t iocbp;
|
||||
|
||||
tprintf("%lu, %ld, ", tcp->u_arg[0], nr);
|
||||
printaddr(tcp->u_arg[0]);
|
||||
tprintf(", %" PRI_kld ", ", nr);
|
||||
|
||||
if (nr < 0)
|
||||
printaddr(addr);
|
||||
@ -209,12 +213,14 @@ print_io_event(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
|
||||
SYS_FUNC(io_cancel)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
tprintf("%lu, ", tcp->u_arg[0]);
|
||||
printaddr(tcp->u_arg[0]);
|
||||
tprints(", ");
|
||||
|
||||
struct iocb cb;
|
||||
|
||||
if (!umove_or_printaddr(tcp, tcp->u_arg[1], &cb)) {
|
||||
tprints("{");
|
||||
print_iocb_header(&cb);
|
||||
print_iocb_header(tcp, &cb);
|
||||
tprints("}");
|
||||
}
|
||||
tprints(", ");
|
||||
@ -230,10 +236,10 @@ SYS_FUNC(io_cancel)
|
||||
SYS_FUNC(io_getevents)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
tprintf("%lu, %ld, %ld, ",
|
||||
tcp->u_arg[0],
|
||||
widen_to_long(tcp->u_arg[1]),
|
||||
widen_to_long(tcp->u_arg[2]));
|
||||
printaddr(tcp->u_arg[0]);
|
||||
tprintf(", %" PRI_kld ", %" PRI_kld ", ",
|
||||
truncate_klong_to_current_wordsize(tcp->u_arg[1]),
|
||||
truncate_klong_to_current_wordsize(tcp->u_arg[2]));
|
||||
} else {
|
||||
struct io_event buf;
|
||||
print_array(tcp, tcp->u_arg[3], tcp->u_rval, &buf, sizeof(buf),
|
||||
|
19
bjm.c
19
bjm.c
@ -33,17 +33,9 @@
|
||||
|
||||
#include "xlat/delete_module_flags.h"
|
||||
|
||||
SYS_FUNC(create_module)
|
||||
{
|
||||
printpath(tcp, tcp->u_arg[0]);
|
||||
tprintf(", %lu", tcp->u_arg[1]);
|
||||
|
||||
return RVAL_DECODED | RVAL_HEX;
|
||||
}
|
||||
|
||||
SYS_FUNC(delete_module)
|
||||
{
|
||||
printstr(tcp, tcp->u_arg[0], -1);
|
||||
printstr(tcp, tcp->u_arg[0]);
|
||||
tprints(", ");
|
||||
printflags(delete_module_flags, tcp->u_arg[1], "O_???");
|
||||
|
||||
@ -53,15 +45,12 @@ SYS_FUNC(delete_module)
|
||||
SYS_FUNC(init_module)
|
||||
{
|
||||
printaddr(tcp->u_arg[0]);
|
||||
tprintf(", %lu, ", tcp->u_arg[1]);
|
||||
printstr(tcp, tcp->u_arg[2], -1);
|
||||
tprintf(", %" PRI_klu ", ", tcp->u_arg[1]);
|
||||
printstr(tcp, tcp->u_arg[2]);
|
||||
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
|
||||
#define MODULE_INIT_IGNORE_MODVERSIONS 1
|
||||
#define MODULE_INIT_IGNORE_VERMAGIC 2
|
||||
|
||||
#include "xlat/module_init_flags.h"
|
||||
|
||||
SYS_FUNC(finit_module)
|
||||
@ -70,7 +59,7 @@ SYS_FUNC(finit_module)
|
||||
printfd(tcp, tcp->u_arg[0]);
|
||||
tprints(", ");
|
||||
/* param_values */
|
||||
printstr(tcp, tcp->u_arg[1], -1);
|
||||
printstr(tcp, tcp->u_arg[1]);
|
||||
tprints(", ");
|
||||
/* flags */
|
||||
printflags(module_init_flags, tcp->u_arg[2], "MODULE_INIT_???");
|
||||
|
40
block.c
40
block.c
@ -32,9 +32,27 @@
|
||||
#include DEF_MPERS_TYPE(struct_blkpg_ioctl_arg)
|
||||
#include DEF_MPERS_TYPE(struct_blkpg_partition)
|
||||
|
||||
#include <linux/blkpg.h>
|
||||
#include <linux/ioctl.h>
|
||||
#include <linux/fs.h>
|
||||
|
||||
typedef struct {
|
||||
int op;
|
||||
int flags;
|
||||
int datalen;
|
||||
void *data;
|
||||
} struct_blkpg_ioctl_arg;
|
||||
|
||||
#define BLKPG_DEVNAMELTH 64
|
||||
#define BLKPG_VOLNAMELTH 64
|
||||
typedef struct {
|
||||
int64_t start; /* starting offset in bytes */
|
||||
int64_t length; /* length in bytes */
|
||||
int pno; /* partition number */
|
||||
char devname[BLKPG_DEVNAMELTH]; /* partition name, like sda5 or c0d1p2,
|
||||
to be used in kernel messages */
|
||||
char volname[BLKPG_VOLNAMELTH]; /* volume label */
|
||||
} struct_blkpg_partition;
|
||||
|
||||
#define BLKTRACE_BDEV_SIZE 32
|
||||
typedef struct blk_user_trace_setup {
|
||||
char name[BLKTRACE_BDEV_SIZE]; /* output */
|
||||
@ -46,11 +64,12 @@ typedef struct blk_user_trace_setup {
|
||||
uint32_t pid;
|
||||
} struct_blk_user_trace_setup;
|
||||
|
||||
typedef struct blkpg_ioctl_arg struct_blkpg_ioctl_arg;
|
||||
typedef struct blkpg_partition struct_blkpg_partition;
|
||||
|
||||
#include MPERS_DEFS
|
||||
|
||||
#ifndef BLKPG
|
||||
# define BLKPG _IO(0x12,105)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ioctl numbers <= 114 are present in Linux 2.4. The following ones have been
|
||||
* added since then and headers containing them may not be available on every
|
||||
@ -110,9 +129,10 @@ print_blkpg_req(struct tcb *tcp, const struct_blkpg_ioctl_arg *blkpg)
|
||||
tprintf(", flags=%d, datalen=%d, data=",
|
||||
blkpg->flags, blkpg->datalen);
|
||||
|
||||
if (!umove_or_printaddr(tcp, (long) blkpg->data, &p)) {
|
||||
tprintf("{start=%lld, length=%lld, pno=%d, devname=",
|
||||
(long long) p.start, (long long) p.length, p.pno);
|
||||
if (!umove_or_printaddr(tcp, ptr_to_kulong(blkpg->data), &p)) {
|
||||
tprintf("{start=%" PRId64 ", length=%" PRId64
|
||||
", pno=%d, devname=",
|
||||
p.start, p.length, p.pno);
|
||||
print_quoted_string(p.devname, sizeof(p.devname),
|
||||
QUOTE_0_TERMINATED);
|
||||
tprints(", volname=");
|
||||
@ -123,14 +143,14 @@ print_blkpg_req(struct tcb *tcp, const struct_blkpg_ioctl_arg *blkpg)
|
||||
tprints("}");
|
||||
}
|
||||
|
||||
MPERS_PRINTER_DECL(int, block_ioctl, struct tcb *tcp,
|
||||
const unsigned int code, const long arg)
|
||||
MPERS_PRINTER_DECL(int, block_ioctl, struct tcb *const tcp,
|
||||
const unsigned int code, const kernel_ulong_t arg)
|
||||
{
|
||||
switch (code) {
|
||||
/* take arg as a value, not as a pointer */
|
||||
case BLKRASET:
|
||||
case BLKFRASET:
|
||||
tprintf(", %lu", arg);
|
||||
tprintf(", %" PRI_klu, arg);
|
||||
break;
|
||||
|
||||
/* return an unsigned short */
|
||||
|
@ -5,7 +5,9 @@ for m in m32 mx32; do
|
||||
rm -rf $tests
|
||||
mkdir $tests
|
||||
s='[[:space:]]*'
|
||||
sed "s/@arch@/@arch_$m@/;s/^MPERS_NAME$s=.*/& $m/;s/^ARCH_MFLAGS$s=.*/& -$m/" \
|
||||
sed "s/@arch@/@arch_$m@/;
|
||||
s/^MPERS_NAME$s=.*/& $m/;
|
||||
s/^ARCH_MFLAGS$s=.*/& -DMPERS_IS_\$(MPERS_NAME) -$m/" \
|
||||
tests/Makefile.am > $tests/Makefile.am
|
||||
for f in tests/*; do
|
||||
case "${f##*/}" in
|
||||
|
106
bpf.c
106
bpf.c
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2015 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2017 Quentin Monnet <quentin.monnet@6wind.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -35,9 +36,11 @@
|
||||
#include "xlat/bpf_map_types.h"
|
||||
#include "xlat/bpf_prog_types.h"
|
||||
#include "xlat/bpf_map_update_elem_flags.h"
|
||||
#include "xlat/bpf_attach_type.h"
|
||||
|
||||
static int
|
||||
bpf_map_create(struct tcb *tcp, const long addr, unsigned int size)
|
||||
bpf_map_create(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
unsigned int size)
|
||||
{
|
||||
struct {
|
||||
uint32_t map_type, key_size, value_size, max_entries;
|
||||
@ -61,7 +64,8 @@ bpf_map_create(struct tcb *tcp, const long addr, unsigned int size)
|
||||
}
|
||||
|
||||
static void
|
||||
bpf_map_update_elem(struct tcb *tcp, const long addr, unsigned int size)
|
||||
bpf_map_update_elem(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
unsigned int size)
|
||||
{
|
||||
struct {
|
||||
uint32_t map_fd;
|
||||
@ -88,7 +92,8 @@ bpf_map_update_elem(struct tcb *tcp, const long addr, unsigned int size)
|
||||
}
|
||||
|
||||
static void
|
||||
bpf_map_delete_elem(struct tcb *tcp, const long addr, unsigned int size)
|
||||
bpf_map_delete_elem(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
unsigned int size)
|
||||
{
|
||||
struct {
|
||||
uint32_t map_fd;
|
||||
@ -110,7 +115,8 @@ bpf_map_delete_elem(struct tcb *tcp, const long addr, unsigned int size)
|
||||
}
|
||||
|
||||
static int
|
||||
bpf_map_io(struct tcb *tcp, const long addr, unsigned int size, const char *text)
|
||||
bpf_map_io(struct tcb *const tcp, const kernel_ulong_t addr, unsigned int size,
|
||||
const char *const text)
|
||||
{
|
||||
struct bpf_io_elem_struct {
|
||||
uint32_t map_fd;
|
||||
@ -142,7 +148,8 @@ bpf_map_io(struct tcb *tcp, const long addr, unsigned int size, const char *text
|
||||
}
|
||||
|
||||
static int
|
||||
bpf_prog_load(struct tcb *tcp, const long addr, unsigned int size)
|
||||
bpf_prog_load(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
unsigned int size)
|
||||
{
|
||||
struct {
|
||||
uint32_t prog_type, insn_cnt;
|
||||
@ -165,17 +172,88 @@ bpf_prog_load(struct tcb *tcp, const long addr, unsigned int size)
|
||||
printxval(bpf_prog_types, attr.prog_type, "BPF_PROG_TYPE_???");
|
||||
tprintf(", insn_cnt=%u, insns=%#" PRIx64 ", license=",
|
||||
attr.insn_cnt, attr.insns);
|
||||
printstr(tcp, attr.license, -1);
|
||||
printstr(tcp, attr.license);
|
||||
tprintf(", log_level=%u, log_size=%u, log_buf=%#" PRIx64 ", kern_version=%u}",
|
||||
attr.log_level, attr.log_size, attr.log_buf, attr.kern_version);
|
||||
|
||||
return RVAL_DECODED | RVAL_FD;
|
||||
}
|
||||
|
||||
static int
|
||||
bpf_obj_manage(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
unsigned int size)
|
||||
{
|
||||
struct {
|
||||
uint64_t ATTRIBUTE_ALIGNED(8) pathname;
|
||||
uint32_t bpf_fd;
|
||||
} attr = {};
|
||||
|
||||
if (!size) {
|
||||
printaddr(addr);
|
||||
return RVAL_DECODED | RVAL_FD;
|
||||
}
|
||||
if (size > sizeof(attr))
|
||||
size = sizeof(attr);
|
||||
if (umoven_or_printaddr(tcp, addr, size, &attr))
|
||||
return RVAL_DECODED | RVAL_FD;
|
||||
|
||||
tprintf("{pathname=");
|
||||
printpath(tcp, attr.pathname);
|
||||
tprints(", bpf_fd=");
|
||||
printfd(tcp, attr.bpf_fd);
|
||||
tprintf("}");
|
||||
|
||||
return RVAL_DECODED | RVAL_FD;
|
||||
}
|
||||
|
||||
static int
|
||||
bpf_prog_attach_detach(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
unsigned int size, bool print_attach_bpf_fd)
|
||||
{
|
||||
struct {
|
||||
uint32_t target_fd, attach_bpf_fd, attach_type;
|
||||
} attr = {};
|
||||
|
||||
if (!size) {
|
||||
printaddr(addr);
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
if (size > sizeof(attr))
|
||||
size = sizeof(attr);
|
||||
if (umoven_or_printaddr(tcp, addr, size, &attr))
|
||||
return RVAL_DECODED;
|
||||
|
||||
tprintf("{target_fd=");
|
||||
printfd(tcp, attr.target_fd);
|
||||
if (print_attach_bpf_fd) {
|
||||
tprintf(", attach_bpf_fd=");
|
||||
printfd(tcp, attr.attach_bpf_fd);
|
||||
}
|
||||
tprintf(", attach_type=");
|
||||
printxval(bpf_attach_type, attr.attach_type, "BPF_???");
|
||||
tprintf("}");
|
||||
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
|
||||
static int
|
||||
bpf_prog_attach(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
unsigned int size)
|
||||
{
|
||||
return bpf_prog_attach_detach(tcp, addr, size, true);
|
||||
}
|
||||
|
||||
static int
|
||||
bpf_prog_detach(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
unsigned int size)
|
||||
{
|
||||
return bpf_prog_attach_detach(tcp, addr, size, false);
|
||||
}
|
||||
|
||||
SYS_FUNC(bpf)
|
||||
{
|
||||
const int cmd = tcp->u_arg[0];
|
||||
const long addr = tcp->u_arg[1];
|
||||
const unsigned int cmd = tcp->u_arg[0];
|
||||
const kernel_ulong_t addr = tcp->u_arg[1];
|
||||
const unsigned int size = tcp->u_arg[2];
|
||||
int rc = RVAL_DECODED;
|
||||
|
||||
@ -203,6 +281,18 @@ SYS_FUNC(bpf)
|
||||
case BPF_PROG_LOAD:
|
||||
rc = bpf_prog_load(tcp, addr, size);
|
||||
break;
|
||||
case BPF_OBJ_PIN:
|
||||
rc = bpf_obj_manage(tcp, addr, size);
|
||||
break;
|
||||
case BPF_OBJ_GET:
|
||||
rc = bpf_obj_manage(tcp, addr, size);
|
||||
break;
|
||||
case BPF_PROG_ATTACH:
|
||||
rc = bpf_prog_attach(tcp, addr, size);
|
||||
break;
|
||||
case BPF_PROG_DETACH:
|
||||
rc = bpf_prog_detach(tcp, addr, size);
|
||||
break;
|
||||
default:
|
||||
printaddr(addr);
|
||||
break;
|
||||
|
28
btrfs.c
28
btrfs.c
@ -32,6 +32,7 @@
|
||||
#include DEF_MPERS_TYPE(struct_btrfs_ioctl_dev_replace_args)
|
||||
#include DEF_MPERS_TYPE(struct_btrfs_ioctl_send_args)
|
||||
#include DEF_MPERS_TYPE(struct_btrfs_ioctl_received_subvol_args)
|
||||
#include DEF_MPERS_TYPE(struct_btrfs_ioctl_vol_args_v2)
|
||||
|
||||
# include <linux/btrfs.h>
|
||||
|
||||
@ -41,6 +42,8 @@ typedef struct btrfs_ioctl_send_args
|
||||
struct_btrfs_ioctl_send_args;
|
||||
typedef struct btrfs_ioctl_received_subvol_args
|
||||
struct_btrfs_ioctl_received_subvol_args;
|
||||
typedef struct btrfs_ioctl_vol_args_v2
|
||||
struct_btrfs_ioctl_vol_args_v2;
|
||||
|
||||
#endif /* HAVE_LINUX_BTRFS_H */
|
||||
|
||||
@ -201,7 +204,7 @@ btrfs_print_balance_args(const char *name, const struct btrfs_balance_args *bba)
|
||||
}
|
||||
|
||||
static void
|
||||
btrfs_print_balance(struct tcb *tcp, const long arg, bool out)
|
||||
btrfs_print_balance(struct tcb *const tcp, const kernel_ulong_t arg, bool out)
|
||||
{
|
||||
struct btrfs_ioctl_balance_args balance_args;
|
||||
|
||||
@ -373,14 +376,14 @@ print_uint64(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
|
||||
}
|
||||
|
||||
static void
|
||||
btrfs_print_qgroup_inherit(struct tcb *tcp, const uint64_t qgi_addr)
|
||||
btrfs_print_qgroup_inherit(struct tcb *const tcp, const kernel_ulong_t qgi_addr)
|
||||
{
|
||||
struct btrfs_qgroup_inherit inherit;
|
||||
|
||||
if (umove_or_printaddr(tcp, qgi_addr, &inherit))
|
||||
return;
|
||||
|
||||
tprintf("{flags=");
|
||||
tprints("{flags=");
|
||||
printflags64(btrfs_qgroup_inherit_flags, inherit.flags,
|
||||
"BTRFS_QGROUP_INHERIT_???");
|
||||
tprintf(", num_qgroups=%" PRI__u64 ", num_ref_copies=%" PRI__u64
|
||||
@ -420,7 +423,7 @@ btrfs_print_tree_search(struct tcb *tcp, struct btrfs_ioctl_search_key *key,
|
||||
uint64_t buf_addr, uint64_t buf_size, bool print_size)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
tprintf("{key={tree_id=");
|
||||
tprints("{key={tree_id=");
|
||||
btrfs_print_objectid(key->tree_id);
|
||||
|
||||
if (key->min_objectid != BTRFS_FIRST_FREE_OBJECTID ||
|
||||
@ -509,7 +512,8 @@ print_btrfs_ioctl_space_info(struct tcb *tcp, void *elem_buf,
|
||||
}
|
||||
|
||||
MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
struct tcb *tcp, const unsigned int code, const long arg)
|
||||
struct tcb *const tcp, const unsigned int code,
|
||||
const kernel_ulong_t arg)
|
||||
{
|
||||
switch (code) {
|
||||
/* Take no arguments; command only. */
|
||||
@ -1213,7 +1217,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
tprints("...");
|
||||
else {
|
||||
uint64_t record;
|
||||
print_array(tcp, (unsigned long) args.clone_sources,
|
||||
print_array(tcp, ptr_to_kulong(args.clone_sources),
|
||||
args.clone_sources_count,
|
||||
&record, sizeof(record),
|
||||
umoven_or_printaddr,
|
||||
@ -1294,7 +1298,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
|
||||
case BTRFS_IOC_SNAP_CREATE_V2:
|
||||
case BTRFS_IOC_SUBVOL_CREATE_V2: { /* code is W, but is actually RW */
|
||||
struct btrfs_ioctl_vol_args_v2 args;
|
||||
struct_btrfs_ioctl_vol_args_v2 args;
|
||||
|
||||
if (entering(tcp))
|
||||
tprints(", ");
|
||||
@ -1313,19 +1317,19 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
printflags64(btrfs_snap_flags_v2, args.flags,
|
||||
"BTRFS_SUBVOL_???");
|
||||
if (args.flags & BTRFS_SUBVOL_QGROUP_INHERIT) {
|
||||
tprintf(", size=%" PRI__u64 ", qgroup_inherit=",
|
||||
args.size);
|
||||
tprintf(", size=%" PRIu64 ", qgroup_inherit=",
|
||||
(uint64_t) args.size);
|
||||
|
||||
btrfs_print_qgroup_inherit(tcp,
|
||||
(unsigned long)args.qgroup_inherit);
|
||||
ptr_to_kulong(args.qgroup_inherit));
|
||||
}
|
||||
tprintf(", name=");
|
||||
tprints(", name=");
|
||||
print_quoted_string(args.name, sizeof(args.name),
|
||||
QUOTE_0_TERMINATED);
|
||||
tprints("}");
|
||||
return 0;
|
||||
}
|
||||
tprintf("{transid=%" PRI__u64 "}", args.transid);
|
||||
tprintf("{transid=%" PRIu64 "}", (uint64_t) args.transid);
|
||||
break;
|
||||
}
|
||||
|
||||
|
33
capability.c
33
capability.c
@ -52,19 +52,19 @@ enum {
|
||||
|
||||
#include "xlat/cap_version.h"
|
||||
|
||||
typedef struct user_cap_header_struct {
|
||||
struct user_cap_header_struct {
|
||||
uint32_t version;
|
||||
int pid;
|
||||
} *cap_user_header_t;
|
||||
};
|
||||
|
||||
typedef struct user_cap_data_struct {
|
||||
struct user_cap_data_struct {
|
||||
uint32_t effective;
|
||||
uint32_t permitted;
|
||||
uint32_t inheritable;
|
||||
} *cap_user_data_t;
|
||||
};
|
||||
|
||||
static cap_user_header_t
|
||||
get_cap_header(struct tcb *tcp, unsigned long addr)
|
||||
static const struct user_cap_header_struct *
|
||||
get_cap_header(struct tcb *const tcp, const kernel_ulong_t addr)
|
||||
{
|
||||
static struct user_cap_header_struct header;
|
||||
|
||||
@ -78,17 +78,18 @@ get_cap_header(struct tcb *tcp, unsigned long addr)
|
||||
}
|
||||
|
||||
static void
|
||||
print_cap_header(struct tcb *tcp, unsigned long addr, cap_user_header_t h)
|
||||
print_cap_header(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
const struct user_cap_header_struct *const h)
|
||||
{
|
||||
if (!addr || !h) {
|
||||
printaddr(addr);
|
||||
return;
|
||||
}
|
||||
|
||||
tprints("{");
|
||||
tprints("{version=");
|
||||
printxval(cap_version, h->version,
|
||||
"_LINUX_CAPABILITY_VERSION_???");
|
||||
tprintf(", %d}", h->pid);
|
||||
tprintf(", pid=%d}", h->pid);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -105,7 +106,8 @@ print_cap_bits(const uint32_t lo, const uint32_t hi)
|
||||
}
|
||||
|
||||
static void
|
||||
print_cap_data(struct tcb *tcp, unsigned long addr, const cap_user_header_t h)
|
||||
print_cap_data(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
const struct user_cap_header_struct *const h)
|
||||
{
|
||||
struct user_cap_data_struct data[2];
|
||||
unsigned int len;
|
||||
@ -124,18 +126,18 @@ print_cap_data(struct tcb *tcp, unsigned long addr, const cap_user_header_t h)
|
||||
if (umoven_or_printaddr(tcp, addr, len * sizeof(data[0]), data))
|
||||
return;
|
||||
|
||||
tprints("{");
|
||||
tprints("{effective=");
|
||||
print_cap_bits(data[0].effective, len > 1 ? data[1].effective : 0);
|
||||
tprints(", ");
|
||||
tprints(", permitted=");
|
||||
print_cap_bits(data[0].permitted, len > 1 ? data[1].permitted : 0);
|
||||
tprints(", ");
|
||||
tprints(", inheritable=");
|
||||
print_cap_bits(data[0].inheritable, len > 1 ? data[1].inheritable : 0);
|
||||
tprints("}");
|
||||
}
|
||||
|
||||
SYS_FUNC(capget)
|
||||
{
|
||||
cap_user_header_t h;
|
||||
const struct user_cap_header_struct *h;
|
||||
|
||||
if (entering(tcp)) {
|
||||
h = get_cap_header(tcp, tcp->u_arg[0]);
|
||||
@ -150,7 +152,8 @@ SYS_FUNC(capget)
|
||||
|
||||
SYS_FUNC(capset)
|
||||
{
|
||||
cap_user_header_t h = get_cap_header(tcp, tcp->u_arg[0]);
|
||||
const struct user_cap_header_struct *const h =
|
||||
get_cap_header(tcp, tcp->u_arg[0]);
|
||||
print_cap_header(tcp, tcp->u_arg[0], h);
|
||||
tprints(", ");
|
||||
print_cap_data(tcp, tcp->u_arg[1], h);
|
||||
|
6
chmod.c
6
chmod.c
@ -4,7 +4,8 @@ static void
|
||||
decode_chmod(struct tcb *tcp, const int offset)
|
||||
{
|
||||
printpath(tcp, tcp->u_arg[offset]);
|
||||
tprintf(", %#lo", tcp->u_arg[offset + 1]);
|
||||
tprints(", ");
|
||||
print_numeric_umode_t(tcp->u_arg[offset + 1]);
|
||||
}
|
||||
|
||||
SYS_FUNC(chmod)
|
||||
@ -25,7 +26,8 @@ SYS_FUNC(fchmodat)
|
||||
SYS_FUNC(fchmod)
|
||||
{
|
||||
printfd(tcp, tcp->u_arg[0]);
|
||||
tprintf(", %#lo", tcp->u_arg[1]);
|
||||
tprints(", ");
|
||||
print_numeric_umode_t(tcp->u_arg[1]);
|
||||
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
|
63
clone.c
63
clone.c
@ -30,22 +30,24 @@
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
#include <sched.h>
|
||||
#include <asm/unistd.h>
|
||||
|
||||
#ifndef CSIGNAL
|
||||
# define CSIGNAL 0x000000ff
|
||||
#endif
|
||||
|
||||
#include "xlat/clone_flags.h"
|
||||
#include "xlat/setns_types.h"
|
||||
#include "xlat/unshare_flags.h"
|
||||
|
||||
#if defined IA64
|
||||
# define ARG_FLAGS 0
|
||||
# define ARG_STACK 1
|
||||
# define ARG_STACKSIZE (tcp->scno == SYS_clone2 ? 2 : -1)
|
||||
# define ARG_PTID (tcp->scno == SYS_clone2 ? 3 : 2)
|
||||
# define ARG_CTID (tcp->scno == SYS_clone2 ? 4 : 3)
|
||||
# define ARG_TLS (tcp->scno == SYS_clone2 ? 5 : 4)
|
||||
# define ARG_STACKSIZE (tcp->scno == __NR_clone2 ? 2 : -1)
|
||||
# define ARG_PTID (tcp->scno == __NR_clone2 ? 3 : 2)
|
||||
# define ARG_CTID (tcp->scno == __NR_clone2 ? 4 : 3)
|
||||
# define ARG_TLS (tcp->scno == __NR_clone2 ? 5 : 4)
|
||||
#elif defined S390 || defined S390X || defined CRISV10 || defined CRISV32
|
||||
# define ARG_STACK 0
|
||||
# define ARG_FLAGS 1
|
||||
@ -59,7 +61,7 @@
|
||||
# define ARG_PTID 2
|
||||
# define ARG_CTID ((current_personality != 1) ? 3 : 4)
|
||||
# define ARG_TLS ((current_personality != 1) ? 4 : 3)
|
||||
#elif defined ALPHA || defined TILE || defined OR1K
|
||||
#elif defined ALPHA || defined TILE || defined OR1K || defined RISCV
|
||||
# define ARG_FLAGS 0
|
||||
# define ARG_STACK 1
|
||||
# define ARG_PTID 2
|
||||
@ -73,25 +75,40 @@
|
||||
# define ARG_CTID 4
|
||||
#endif
|
||||
|
||||
#if defined I386 || defined X86_64 || defined X32
|
||||
extern void print_user_desc(struct tcb *, long);
|
||||
#endif /* I386 || X86_64 || X32 */
|
||||
static void
|
||||
print_tls_arg(struct tcb *const tcp, const kernel_ulong_t addr)
|
||||
{
|
||||
#ifdef HAVE_STRUCT_USER_DESC
|
||||
# if SUPPORTED_PERSONALITIES > 1
|
||||
if (current_personality == 1)
|
||||
# endif
|
||||
{
|
||||
print_user_desc(tcp, tcp->u_arg[ARG_TLS]);
|
||||
}
|
||||
# if SUPPORTED_PERSONALITIES > 1
|
||||
else
|
||||
# endif
|
||||
#endif /* HAVE_STRUCT_USER_DESC */
|
||||
{
|
||||
printaddr(tcp->u_arg[ARG_TLS]);
|
||||
}
|
||||
}
|
||||
|
||||
SYS_FUNC(clone)
|
||||
{
|
||||
if (exiting(tcp)) {
|
||||
const char *sep = "|";
|
||||
unsigned long flags = tcp->u_arg[ARG_FLAGS];
|
||||
kernel_ulong_t flags = tcp->u_arg[ARG_FLAGS];
|
||||
tprints("child_stack=");
|
||||
printaddr(tcp->u_arg[ARG_STACK]);
|
||||
tprints(", ");
|
||||
#ifdef ARG_STACKSIZE
|
||||
if (ARG_STACKSIZE != -1)
|
||||
tprintf("stack_size=%#lx, ",
|
||||
tprintf("stack_size=%#" PRI_klx ", ",
|
||||
tcp->u_arg[ARG_STACKSIZE]);
|
||||
#endif
|
||||
tprints("flags=");
|
||||
if (!printflags(clone_flags, flags &~ CSIGNAL, NULL))
|
||||
if (!printflags64(clone_flags, flags &~ CSIGNAL, NULL))
|
||||
sep = "";
|
||||
if ((flags & CSIGNAL) != 0)
|
||||
tprintf("%s%s", sep, signame(flags & CSIGNAL));
|
||||
@ -103,22 +120,8 @@ SYS_FUNC(clone)
|
||||
printaddr(tcp->u_arg[ARG_PTID]);
|
||||
}
|
||||
if (flags & CLONE_SETTLS) {
|
||||
#if defined I386 || defined X86_64 || defined X32
|
||||
# ifndef I386
|
||||
if (current_personality == 1)
|
||||
# endif
|
||||
{
|
||||
tprints(", tls=");
|
||||
print_user_desc(tcp, tcp->u_arg[ARG_TLS]);
|
||||
}
|
||||
# ifndef I386
|
||||
else
|
||||
# endif
|
||||
#endif /* I386 || X86_64 || X32 */
|
||||
{
|
||||
tprints(", tls=");
|
||||
printaddr(tcp->u_arg[ARG_TLS]);
|
||||
}
|
||||
tprints(", tls=");
|
||||
print_tls_arg(tcp, tcp->u_arg[ARG_TLS]);
|
||||
}
|
||||
if (flags & (CLONE_CHILD_SETTID|CLONE_CHILD_CLEARTID)) {
|
||||
tprints(", child_tidptr=");
|
||||
@ -144,14 +147,14 @@ SYS_FUNC(setns)
|
||||
{
|
||||
printfd(tcp, tcp->u_arg[0]);
|
||||
tprints(", ");
|
||||
printflags(clone_flags, tcp->u_arg[1], "CLONE_???");
|
||||
printxval(setns_types, tcp->u_arg[1], "CLONE_NEW???");
|
||||
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
|
||||
SYS_FUNC(unshare)
|
||||
{
|
||||
printflags_long(clone_flags, tcp->u_arg[0], "CLONE_???");
|
||||
printflags64(unshare_flags, tcp->u_arg[0], "CLONE_???");
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
|
||||
|
155
configure.ac
155
configure.ac
@ -32,11 +32,15 @@
|
||||
AC_PREREQ(2.57)
|
||||
AC_INIT([strace],
|
||||
m4_esyscmd([./git-version-gen .tarball-version]),
|
||||
[strace-devel@lists.sourceforge.net])
|
||||
[strace-devel@lists.sourceforge.net],
|
||||
[strace],
|
||||
[https://strace.io])
|
||||
AC_COPYRIGHT([Copyright (C) 1999-2017 The strace developers.])
|
||||
AC_CONFIG_SRCDIR([strace.c])
|
||||
AC_CONFIG_AUX_DIR([.])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules parallel-tests])
|
||||
AM_EXTRA_RECURSIVE_TARGETS([check-valgrind])
|
||||
AM_MAINTAINER_MODE
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
@ -47,6 +51,7 @@ AC_SUBST(DEB_CHANGELOGTIME)
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_CPP
|
||||
st_WARN_CFLAGS
|
||||
AX_PROG_CC_FOR_BUILD
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_RANLIB
|
||||
@ -187,6 +192,11 @@ xtensa*)
|
||||
AC_DEFINE([XTENSA], 1, [Define for the Xtensa architecture])
|
||||
;;
|
||||
|
||||
riscv*)
|
||||
arch=riscv
|
||||
AC_DEFINE([RISCV], 1, [Define for the RISC-V architecture])
|
||||
;;
|
||||
|
||||
*)
|
||||
AC_MSG_RESULT([NO!])
|
||||
AC_MSG_ERROR([architecture $host_cpu is not supported by strace])
|
||||
@ -202,34 +212,34 @@ AC_SUBST(arch)
|
||||
AC_SUBST(arch_m32)
|
||||
AC_SUBST(arch_mx32)
|
||||
|
||||
MIPS_ABI=
|
||||
if test "$arch" = mips; then
|
||||
AC_CACHE_CHECK([for _MIPS_SIM], [st_cv__MIPS_SIM],
|
||||
[AC_COMPUTE_INT([st_cv__MIPS_SIM], [_MIPS_SIM],
|
||||
[#include <sgidefs.h>],
|
||||
[AC_COMPUTE_INT([st_cv__MIPS_SIM], [_MIPS_SIM], ,
|
||||
[AC_MSG_ERROR([_MIPS_SIM cannot be determined])])])
|
||||
|
||||
# requires GCC >= 3.4
|
||||
AC_CACHE_CHECK([for MIPS ABI], [st_cv_mips_abi],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include <sgidefs.h>]],
|
||||
[[int i[_MIPS_SIM == _MIPS_SIM_ABI32 ? 1 : - 1];]])],
|
||||
[AC_LANG_PROGRAM(, [[int i[_MIPS_SIM == _ABIO32 ? 1 : - 1];]])],
|
||||
[st_cv_mips_abi=o32],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include <sgidefs.h>]],
|
||||
[[int i[_MIPS_SIM == _MIPS_SIM_NABI32 ? 1 : - 1];]])],
|
||||
[AC_LANG_PROGRAM(, [[int i[_MIPS_SIM == _ABIN32 ? 1 : - 1];]])],
|
||||
[st_cv_mips_abi=n32],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include <sgidefs.h>]],
|
||||
[[int i[_MIPS_SIM == _MIPS_SIM_ABI64 ? 1 : - 1];]])],
|
||||
[AC_LANG_PROGRAM(, [[int i[_MIPS_SIM == _ABI64 ? 1 : - 1];]])],
|
||||
[st_cv_mips_abi=n64],
|
||||
[st_cv_mips_abi=unknown])])])])
|
||||
|
||||
case "$st_cv_mips_abi" in
|
||||
o32) AC_DEFINE([LINUX_MIPSO32], [1], [Define for _MIPS_SIM_ABI32.]);;
|
||||
n32) AC_DEFINE([LINUX_MIPSN32], [1], [Define for _MIPS_SIM_NABI32.]);;
|
||||
n64) AC_DEFINE([LINUX_MIPSN64], [1], [Define for _MIPS_SIM_ABI64.]);;
|
||||
o32) AC_DEFINE([LINUX_MIPSO32], [1], [Define for _ABIO32.]);;
|
||||
n32) AC_DEFINE([LINUX_MIPSN32], [1], [Define for _ABIN32.]);;
|
||||
n64) AC_DEFINE([LINUX_MIPSN64], [1], [Define for _ABI64.]);;
|
||||
*) AC_MSG_ERROR([Unsupported _MIPS_SIM]);;
|
||||
esac
|
||||
MIPS_ABI="$st_cv_mips_abi"
|
||||
fi
|
||||
AC_SUBST(MIPS_ABI)
|
||||
|
||||
AC_ARG_ENABLE([arm-oabi],
|
||||
[AS_HELP_STRING([--enable-arm-oabi],
|
||||
@ -243,46 +253,14 @@ esac
|
||||
AC_DEFINE_UNQUOTED([ENABLE_ARM_OABI], [$enable_arm_oabi],
|
||||
[Define to 1 if you want OABI support on ARM EABI.])
|
||||
|
||||
gl_WARN_ADD([-Wall])
|
||||
gl_WARN_ADD([-Wempty-body])
|
||||
gl_WARN_ADD([-Wformat-security])
|
||||
gl_WARN_ADD([-Wignored-qualifiers])
|
||||
gl_WARN_ADD([-Winit-self])
|
||||
gl_WARN_ADD([-Wlogical-op])
|
||||
gl_WARN_ADD([-Wmissing-parameter-type])
|
||||
gl_WARN_ADD([-Wnested-externs])
|
||||
gl_WARN_ADD([-Wold-style-declaration])
|
||||
gl_WARN_ADD([-Wold-style-definition])
|
||||
gl_WARN_ADD([-Wsign-compare])
|
||||
gl_WARN_ADD([-Wtype-limits])
|
||||
gl_WARN_ADD([-Wwrite-strings])
|
||||
AC_ARG_ENABLE([gcc-Werror],
|
||||
[AS_HELP_STRING([--enable-gcc-Werror], [turn on gcc's -Werror option])],
|
||||
[case $enableval in
|
||||
yes) gl_WARN_ADD([-Werror]) ;;
|
||||
no) ;;
|
||||
*) AC_MSG_ERROR([bad value $enableval for gcc-Werror option]) ;;
|
||||
esac]
|
||||
)
|
||||
AC_SUBST([WARN_CFLAGS])
|
||||
|
||||
AC_C_BIGENDIAN
|
||||
AC_C_CONST
|
||||
AC_C_TYPEOF
|
||||
|
||||
AC_TYPE_GETGROUPS
|
||||
AC_TYPE_MODE_T
|
||||
AC_TYPE_SIGNAL
|
||||
AC_TYPE_UID_T
|
||||
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_MAJOR
|
||||
AC_HEADER_STAT
|
||||
AC_HEADER_STDBOOL
|
||||
AC_HEADER_STDC
|
||||
|
||||
AC_CHECK_FUNCS(m4_normalize([
|
||||
accept4
|
||||
fallocate
|
||||
fanotify_mark
|
||||
fopen64
|
||||
fork
|
||||
@ -292,12 +270,11 @@ AC_CHECK_FUNCS(m4_normalize([
|
||||
futimens
|
||||
if_indextoname
|
||||
open64
|
||||
pipe2
|
||||
prctl
|
||||
preadv
|
||||
process_vm_readv
|
||||
pwritev
|
||||
sigaction
|
||||
readahead
|
||||
signalfd
|
||||
stpcpy
|
||||
strerror
|
||||
@ -317,6 +294,12 @@ AC_CHECK_TYPES([struct stat64, struct __old_kernel_stat],,,
|
||||
[#include <sys/types.h>
|
||||
#include <asm/stat.h>])
|
||||
|
||||
AC_CHECK_TYPES([struct user_desc],,, [#include <asm/ldt.h>])
|
||||
|
||||
AC_CHECK_MEMBERS([struct stat.st_mtime_nsec, struct stat64.st_mtime_nsec],,,
|
||||
[#include <sys/types.h>
|
||||
#include <asm/stat.h>])
|
||||
|
||||
AC_CHECK_TYPES(m4_normalize([
|
||||
struct pt_all_user_regs,
|
||||
struct ia64_fpreg,
|
||||
@ -332,35 +315,40 @@ AC_CHECK_TYPES(m4_normalize([
|
||||
[#include <sys/types.h>
|
||||
#include <linux/fcntl.h>])
|
||||
|
||||
AC_CHECK_MEMBERS(m4_normalize([
|
||||
struct stat.st_atim.tv_nsec,
|
||||
struct stat.st_blksize,
|
||||
struct stat.st_blocks,
|
||||
struct stat.st_ctim.tv_nsec,
|
||||
struct stat.st_flags,
|
||||
struct stat.st_fstype,
|
||||
struct stat.st_gen,
|
||||
struct stat.st_mtim.tv_nsec,
|
||||
struct stat.st_rdev
|
||||
]))
|
||||
|
||||
AC_CHECK_MEMBERS([struct timex.tai],,, [#include <sys/timex.h>])
|
||||
|
||||
AC_CHECK_MEMBERS([struct utsname.domainname],,, [#include <sys/utsname.h>])
|
||||
|
||||
AC_CHECK_MEMBERS(m4_normalize([
|
||||
struct stat.st_atime_nsec,
|
||||
struct stat.st_ctime_nsec,
|
||||
struct stat.st_mtime_nsec
|
||||
]),,, [#include <sys/types.h>
|
||||
#include <asm/stat.h>])
|
||||
|
||||
AC_CHECK_MEMBERS(m4_normalize([
|
||||
siginfo_t.si_syscall,
|
||||
siginfo_t.si_timerid,
|
||||
siginfo_t.si_overrun
|
||||
]),,, [#include <signal.h>])
|
||||
|
||||
AC_CHECK_MEMBERS(m4_normalize([
|
||||
struct perf_event_attr.precise_ip,
|
||||
struct perf_event_attr.mmap_data,
|
||||
struct perf_event_attr.sample_id_all,
|
||||
struct perf_event_attr.exclude_host,
|
||||
struct perf_event_attr.exclude_guest,
|
||||
struct perf_event_attr.exclude_callchain_kernel,
|
||||
struct perf_event_attr.exclude_callchain_user,
|
||||
struct perf_event_attr.mmap2,
|
||||
struct perf_event_attr.comm_exec,
|
||||
struct perf_event_attr.use_clockid,
|
||||
struct perf_event_attr.context_switch,
|
||||
struct perf_event_attr.write_backward,
|
||||
struct perf_event_attr.bp_type,
|
||||
struct perf_event_attr.config1,
|
||||
struct perf_event_attr.config2,
|
||||
struct perf_event_attr.branch_sample_type,
|
||||
struct perf_event_attr.sample_regs_user,
|
||||
struct perf_event_attr.sample_stack_user,
|
||||
struct perf_event_attr.sample_regs_intr,
|
||||
struct perf_event_attr.aux_watermark,
|
||||
struct perf_event_attr.sample_max_stack
|
||||
]),,, [#include <linux/perf_event.h>])
|
||||
|
||||
AC_CHECK_HEADERS(m4_normalize([
|
||||
asm/cachectl.h
|
||||
asm/sysmips.h
|
||||
@ -368,6 +356,8 @@ AC_CHECK_HEADERS(m4_normalize([
|
||||
elf.h
|
||||
inttypes.h
|
||||
linux/bsg.h
|
||||
linux/dm-ioctl.h
|
||||
linux/dqblk_xfs.h
|
||||
linux/falloc.h
|
||||
linux/fiemap.h
|
||||
linux/filter.h
|
||||
@ -377,6 +367,7 @@ AC_CHECK_HEADERS(m4_normalize([
|
||||
linux/mmtimer.h
|
||||
linux/msg.h
|
||||
linux/perf_event.h
|
||||
linux/quota.h
|
||||
linux/seccomp.h
|
||||
linux/securebits.h
|
||||
linux/sem.h
|
||||
@ -393,11 +384,13 @@ AC_CHECK_HEADERS(m4_normalize([
|
||||
sys/fanotify.h
|
||||
sys/ipc.h
|
||||
sys/msg.h
|
||||
sys/quota.h
|
||||
sys/reg.h
|
||||
sys/sem.h
|
||||
sys/shm.h
|
||||
sys/signalfd.h
|
||||
sys/xattr.h
|
||||
ustat.h
|
||||
]))
|
||||
|
||||
AC_CHECK_HEADERS([asm/sigcontext.h],,, [#include <signal.h>])
|
||||
@ -430,6 +423,28 @@ AC_CHECK_HEADERS([linux/bpf.h], [
|
||||
AC_DEFINE(HAVE_UNION_BPF_ATTR_LOG_BUF, [1],
|
||||
[Define to 1 if union bpf_attr.log_buf initialization works])
|
||||
fi
|
||||
AC_CACHE_CHECK([whether union bpf_attr.bpf_fd initialization works],
|
||||
[st_cv_have_union_bpf_attr_bpf_fd],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include <linux/bpf.h>]],
|
||||
[[union bpf_attr a = { .bpf_fd = 0 };]])],
|
||||
[st_cv_have_union_bpf_attr_bpf_fd=yes],
|
||||
[st_cv_have_union_bpf_attr_bpf_fd=no])])
|
||||
if test $st_cv_have_union_bpf_attr_bpf_fd = yes; then
|
||||
AC_DEFINE(HAVE_UNION_BPF_ATTR_BPF_FD, [1],
|
||||
[Define to 1 if union bpf_attr.bpf_fd initialization works])
|
||||
fi
|
||||
AC_CACHE_CHECK([whether union bpf_attr.attach_type initialization works],
|
||||
[st_cv_have_union_bpf_attr_attach_type],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include <linux/bpf.h>]],
|
||||
[[union bpf_attr a = { .attach_type = 0 };]])],
|
||||
[st_cv_have_union_bpf_attr_attach_type=yes],
|
||||
[st_cv_have_union_bpf_attr_attach_type=no])])
|
||||
if test $st_cv_have_union_bpf_attr_attach_type = yes; then
|
||||
AC_DEFINE(HAVE_UNION_BPF_ATTR_ATTACH_TYPE, [1],
|
||||
[Define to 1 if union bpf_attr.attach_type initialization works])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_CHECK_TYPES([struct statfs], [
|
||||
@ -490,8 +505,10 @@ AC_CHECK_DECLS(m4_normalize([
|
||||
|
||||
AC_CHECK_DECLS(m4_normalize([
|
||||
LO_FLAGS_READ_ONLY,
|
||||
LO_FLAGS_USE_AOPS,
|
||||
LO_FLAGS_AUTOCLEAR,
|
||||
LO_FLAGS_PARTSCAN
|
||||
LO_FLAGS_PARTSCAN,
|
||||
LO_FLAGS_DIRECT_IO
|
||||
]),,, [#include <linux/loop.h>])
|
||||
|
||||
AC_CHECK_DECLS(m4_normalize([
|
||||
@ -642,6 +659,7 @@ AC_CACHE_CHECK([for BLKGETSIZE64], [ac_cv_have_blkgetsize64],
|
||||
AC_CHECK_SIZEOF([long])
|
||||
AC_CHECK_SIZEOF([long long])
|
||||
AC_CHECK_SIZEOF([off_t],,[#include <sys/types.h>])
|
||||
AC_CHECK_SIZEOF([kernel_long_t],,[#include "$srcdir/kernel_types.h"])
|
||||
AC_CHECK_SIZEOF([struct i64_i32],,[struct i64_i32 {long long i64; int i32;};])
|
||||
|
||||
AC_CACHE_CHECK([for SIGRTMIN], [st_cv_SIGRTMIN],
|
||||
@ -781,6 +799,9 @@ fi
|
||||
st_MPERS([m32], [aarch64|powerpc64|sparc64|tile|x32|x86_64])
|
||||
st_MPERS([mx32], [x86_64])
|
||||
|
||||
AX_VALGRIND_DFLT([sgcheck], [off])
|
||||
AX_VALGRIND_CHECK
|
||||
|
||||
AC_CONFIG_FILES([Makefile
|
||||
tests/Makefile
|
||||
tests-m32/Makefile
|
||||
|
@ -42,7 +42,7 @@ SYS_FUNC(copy_file_range)
|
||||
printnum_int64(tcp, tcp->u_arg[3], "%" PRId64);
|
||||
tprints(", ");
|
||||
/* size_t len */
|
||||
tprintf("%lu, ", tcp->u_arg[4]);
|
||||
tprintf("%" PRI_klu ", ", tcp->u_arg[4]);
|
||||
/* unsigned int flags */
|
||||
tprintf("%u", (unsigned int) tcp->u_arg[5]);
|
||||
|
||||
|
7
count.c
7
count.c
@ -53,17 +53,16 @@ count_syscall(struct tcb *tcp, const struct timeval *syscall_exiting_tv)
|
||||
struct timeval wtv;
|
||||
struct timeval *tv = &wtv;
|
||||
struct call_counts *cc;
|
||||
unsigned long scno = tcp->scno;
|
||||
|
||||
if (!SCNO_IN_RANGE(scno))
|
||||
if (!scno_in_range(tcp->scno))
|
||||
return;
|
||||
|
||||
if (!counts)
|
||||
counts = xcalloc(nsyscalls, sizeof(*counts));
|
||||
cc = &counts[scno];
|
||||
cc = &counts[tcp->scno];
|
||||
|
||||
cc->calls++;
|
||||
if (tcp->u_error)
|
||||
if (syserror(tcp))
|
||||
cc->errors++;
|
||||
|
||||
/* tv = wall clock time spent while in syscall */
|
||||
|
18
debian/changelog.in
vendored
18
debian/changelog.in
vendored
@ -4,6 +4,24 @@ strace (@PACKAGE_VERSION@-1) experimental; urgency=low
|
||||
|
||||
-- Strace <@PACKAGE_BUGREPORT@> @DEB_CHANGELOGTIME@
|
||||
|
||||
strace (4.15-1) unstable; urgency=medium
|
||||
|
||||
* New upstream version.
|
||||
|
||||
-- Dmitry V. Levin <ldv@altlinux.org> Tue, 14 Dec 2016 08:09:10 +0000
|
||||
|
||||
strace (4.14-1) unstable; urgency=medium
|
||||
|
||||
* New upstream version.
|
||||
|
||||
-- Dmitry V. Levin <ldv@altlinux.org> Tue, 04 Oct 2016 18:19:20 +0000
|
||||
|
||||
strace (4.13-1) unstable; urgency=medium
|
||||
|
||||
* New upstream version.
|
||||
|
||||
-- Dmitry V. Levin <ldv@altlinux.org> Tue, 26 Jul 2016 16:17:18 +0000
|
||||
|
||||
strace (4.12-3) unstable; urgency=medium
|
||||
|
||||
* Fix up 32/64-bit test output in strace -S test to fix i386 build
|
||||
|
2
debian/control
vendored
2
debian/control
vendored
@ -5,6 +5,8 @@ Priority: optional
|
||||
Build-Depends: libc6-dev (>= 2.2.2) [!alpha !ia64], libc6.1-dev (>= 2.2.2) [alpha ia64], gcc-multilib [amd64 i386 powerpc ppc64 s390 sparc sparc64 x32], debhelper (>= 7.0.0), gawk
|
||||
Standards-Version: 3.9.6
|
||||
Homepage: http://sourceforge.net/projects/strace/
|
||||
Vcs-Git: https://anonscm.debian.org/git/collab-maint/strace.git
|
||||
Vcs-Browser: https://anonscm.debian.org/git/collab-maint/strace.git
|
||||
|
||||
Package: strace
|
||||
Architecture: alpha amd64 arm64 armeb armel armhf hppa i386 ia64 m68k mips mipsel mips64 mips64el or1k powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 x32
|
||||
|
2
debian/watch
vendored
2
debian/watch
vendored
@ -1,2 +1,2 @@
|
||||
version=3
|
||||
opts="uversionmangle=s/-/./g" http://sf.net/strace/strace-([[:digit:].-]*)\.tar\.xz
|
||||
opts=pgpsigurlmangle=s/$/.asc/,uversionmangle=s/-/./g http://sf.net/strace/strace-([[:digit:].-]*)\.tar\.xz
|
||||
|
713
defs.h
713
defs.h
@ -27,20 +27,19 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef STRACE_DEFS_H
|
||||
#define STRACE_DEFS_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <features.h>
|
||||
#ifdef HAVE_STDBOOL_H
|
||||
# include <stdbool.h>
|
||||
#endif
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <inttypes.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef STDC_HEADERS
|
||||
# include <stddef.h>
|
||||
#endif
|
||||
#include <stddef.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@ -52,10 +51,11 @@
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#include "kernel_types.h"
|
||||
#include "mpers_type.h"
|
||||
#include "gcc_compat.h"
|
||||
#include "sysent.h"
|
||||
|
||||
#ifndef HAVE_STRERROR
|
||||
const char *strerror(int);
|
||||
@ -69,12 +69,12 @@ const char *strerror(int);
|
||||
extern char *stpcpy(char *dst, const char *src);
|
||||
#endif
|
||||
|
||||
#ifndef offsetof
|
||||
# define offsetof(type, member) \
|
||||
(((char *) &(((type *) NULL)->member)) - ((char *) (type *) NULL))
|
||||
#ifndef offsetofend
|
||||
# define offsetofend(type, member) \
|
||||
(offsetof(type, member) + sizeof(((type *)NULL)->member))
|
||||
#endif
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]) + MUST_BE_ARRAY(a))
|
||||
|
||||
/* macros */
|
||||
#ifndef MAX
|
||||
@ -125,15 +125,6 @@ extern char *stpcpy(char *dst, const char *src);
|
||||
#define USE_SEIZE 1
|
||||
/* To force NOMMU build, set to 1 */
|
||||
#define NOMMU_SYSTEM 0
|
||||
/*
|
||||
* Set to 1 to use speed-optimized vfprintf implementation.
|
||||
* It results in strace using about 5% less CPU in user space
|
||||
* (compared to glibc version).
|
||||
* But strace spends a lot of time in kernel space,
|
||||
* so overall it does not appear to be a significant win.
|
||||
* Thus disabled by default.
|
||||
*/
|
||||
#define USE_CUSTOM_PRINTF 0
|
||||
|
||||
#ifndef ERESTARTSYS
|
||||
# define ERESTARTSYS 512
|
||||
@ -148,165 +139,83 @@ extern char *stpcpy(char *dst, const char *src);
|
||||
# define ERESTART_RESTARTBLOCK 516
|
||||
#endif
|
||||
|
||||
#if defined(SPARC) || defined(SPARC64)
|
||||
# define PERSONALITY0_WORDSIZE 4
|
||||
# if defined(SPARC64)
|
||||
# define SUPPORTED_PERSONALITIES 2
|
||||
# define PERSONALITY1_WORDSIZE 8
|
||||
# ifdef HAVE_M32_MPERS
|
||||
# define PERSONALITY1_INCLUDE_FUNCS "m32_funcs.h"
|
||||
# define PERSONALITY1_INCLUDE_PRINTERS_DECLS "m32_printer_decls.h"
|
||||
# define PERSONALITY1_INCLUDE_PRINTERS_DEFS "m32_printer_defs.h"
|
||||
# define MPERS_m32_IOCTL_MACROS "ioctl_redefs1.h"
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef X86_64
|
||||
#if defined X86_64
|
||||
# define SUPPORTED_PERSONALITIES 3
|
||||
# define PERSONALITY0_WORDSIZE 8
|
||||
# define PERSONALITY1_WORDSIZE 4
|
||||
# define PERSONALITY2_WORDSIZE 4
|
||||
# ifdef HAVE_M32_MPERS
|
||||
# define PERSONALITY1_INCLUDE_FUNCS "m32_funcs.h"
|
||||
# define PERSONALITY1_INCLUDE_PRINTERS_DECLS "m32_printer_decls.h"
|
||||
# define PERSONALITY1_INCLUDE_PRINTERS_DEFS "m32_printer_defs.h"
|
||||
# define MPERS_m32_IOCTL_MACROS "ioctl_redefs1.h"
|
||||
# endif
|
||||
# ifdef HAVE_MX32_MPERS
|
||||
# define PERSONALITY2_INCLUDE_FUNCS "mx32_funcs.h"
|
||||
# define PERSONALITY2_INCLUDE_PRINTERS_DECLS "mx32_printer_decls.h"
|
||||
# define PERSONALITY2_INCLUDE_PRINTERS_DEFS "mx32_printer_defs.h"
|
||||
# define MPERS_mx32_IOCTL_MACROS "ioctl_redefs2.h"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef X32
|
||||
# define PERSONALITY2_WORDSIZE 4
|
||||
# define PERSONALITY2_KLONGSIZE PERSONALITY0_KLONGSIZE
|
||||
#elif defined AARCH64 \
|
||||
|| defined POWERPC64 \
|
||||
|| defined RISCV \
|
||||
|| defined SPARC64 \
|
||||
|| defined TILE \
|
||||
|| defined X32
|
||||
# define SUPPORTED_PERSONALITIES 2
|
||||
# define PERSONALITY0_WORDSIZE 4
|
||||
# define PERSONALITY1_WORDSIZE 4
|
||||
# ifdef HAVE_M32_MPERS
|
||||
# define PERSONALITY1_INCLUDE_FUNCS "m32_funcs.h"
|
||||
# define PERSONALITY1_INCLUDE_PRINTERS_DECLS "m32_printer_decls.h"
|
||||
# define PERSONALITY1_INCLUDE_PRINTERS_DEFS "m32_printer_defs.h"
|
||||
# define MPERS_m32_IOCTL_MACROS "ioctl_redefs1.h"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef ARM
|
||||
/* one personality */
|
||||
#endif
|
||||
|
||||
#ifdef AARCH64
|
||||
/* The existing ARM personality, then AArch64 */
|
||||
# define SUPPORTED_PERSONALITIES 2
|
||||
# define PERSONALITY0_WORDSIZE 8
|
||||
# define PERSONALITY1_WORDSIZE 4
|
||||
# ifdef HAVE_M32_MPERS
|
||||
# define PERSONALITY1_INCLUDE_FUNCS "m32_funcs.h"
|
||||
# define PERSONALITY1_INCLUDE_PRINTERS_DECLS "m32_printer_decls.h"
|
||||
# define PERSONALITY1_INCLUDE_PRINTERS_DEFS "m32_printer_defs.h"
|
||||
# define MPERS_m32_IOCTL_MACROS "ioctl_redefs1.h"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef POWERPC64
|
||||
# define SUPPORTED_PERSONALITIES 2
|
||||
# define PERSONALITY0_WORDSIZE 8
|
||||
# define PERSONALITY1_WORDSIZE 4
|
||||
# ifdef HAVE_M32_MPERS
|
||||
# define PERSONALITY1_INCLUDE_FUNCS "m32_funcs.h"
|
||||
# define PERSONALITY1_INCLUDE_PRINTERS_DECLS "m32_printer_decls.h"
|
||||
# define PERSONALITY1_INCLUDE_PRINTERS_DEFS "m32_printer_defs.h"
|
||||
# define MPERS_m32_IOCTL_MACROS "ioctl_redefs1.h"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef TILE
|
||||
# define SUPPORTED_PERSONALITIES 2
|
||||
# define PERSONALITY0_WORDSIZE 8
|
||||
# define PERSONALITY1_WORDSIZE 4
|
||||
# ifdef __tilepro__
|
||||
# define DEFAULT_PERSONALITY 1
|
||||
# endif
|
||||
# ifdef HAVE_M32_MPERS
|
||||
# define PERSONALITY1_INCLUDE_FUNCS "m32_funcs.h"
|
||||
# define PERSONALITY1_INCLUDE_PRINTERS_DECLS "m32_printer_decls.h"
|
||||
# define PERSONALITY1_INCLUDE_PRINTERS_DEFS "m32_printer_defs.h"
|
||||
# define MPERS_m32_IOCTL_MACROS "ioctl_redefs1.h"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef SUPPORTED_PERSONALITIES
|
||||
#else
|
||||
# define SUPPORTED_PERSONALITIES 1
|
||||
#endif
|
||||
#ifndef DEFAULT_PERSONALITY
|
||||
|
||||
#if defined TILE && defined __tilepro__
|
||||
# define DEFAULT_PERSONALITY 1
|
||||
#else
|
||||
# define DEFAULT_PERSONALITY 0
|
||||
#endif
|
||||
#ifndef PERSONALITY0_WORDSIZE
|
||||
# define PERSONALITY0_WORDSIZE SIZEOF_LONG
|
||||
|
||||
#define PERSONALITY0_WORDSIZE SIZEOF_LONG
|
||||
#define PERSONALITY0_KLONGSIZE SIZEOF_KERNEL_LONG_T
|
||||
#define PERSONALITY0_INCLUDE_PRINTERS_DECLS "native_printer_decls.h"
|
||||
#define PERSONALITY0_INCLUDE_PRINTERS_DEFS "native_printer_defs.h"
|
||||
|
||||
#if SUPPORTED_PERSONALITIES > 1
|
||||
# define PERSONALITY1_WORDSIZE 4
|
||||
# define PERSONALITY1_KLONGSIZE PERSONALITY1_WORDSIZE
|
||||
#endif
|
||||
|
||||
#ifndef PERSONALITY0_INCLUDE_PRINTERS_DECLS
|
||||
# define PERSONALITY0_INCLUDE_PRINTERS_DECLS "native_printer_decls.h"
|
||||
#endif
|
||||
#ifndef PERSONALITY0_INCLUDE_PRINTERS_DEFS
|
||||
# define PERSONALITY0_INCLUDE_PRINTERS_DEFS "native_printer_defs.h"
|
||||
#endif
|
||||
|
||||
#ifndef PERSONALITY1_INCLUDE_PRINTERS_DECLS
|
||||
#if SUPPORTED_PERSONALITIES > 1 && defined HAVE_M32_MPERS
|
||||
# define PERSONALITY1_INCLUDE_PRINTERS_DECLS "m32_printer_decls.h"
|
||||
# define PERSONALITY1_INCLUDE_PRINTERS_DEFS "m32_printer_defs.h"
|
||||
# define PERSONALITY1_INCLUDE_FUNCS "m32_funcs.h"
|
||||
# define MPERS_m32_IOCTL_MACROS "ioctl_redefs1.h"
|
||||
#else
|
||||
# define PERSONALITY1_INCLUDE_PRINTERS_DECLS "native_printer_decls.h"
|
||||
#endif
|
||||
#ifndef PERSONALITY1_INCLUDE_PRINTERS_DEFS
|
||||
# define PERSONALITY1_INCLUDE_PRINTERS_DEFS "native_printer_defs.h"
|
||||
#endif
|
||||
|
||||
#ifndef PERSONALITY2_INCLUDE_PRINTERS_DECLS
|
||||
# define PERSONALITY2_INCLUDE_PRINTERS_DECLS "native_printer_decls.h"
|
||||
#endif
|
||||
#ifndef PERSONALITY2_INCLUDE_PRINTERS_DEFS
|
||||
# define PERSONALITY2_INCLUDE_PRINTERS_DEFS "native_printer_defs.h"
|
||||
#endif
|
||||
|
||||
#ifndef PERSONALITY1_INCLUDE_FUNCS
|
||||
# define PERSONALITY1_INCLUDE_FUNCS "empty.h"
|
||||
#endif
|
||||
#ifndef PERSONALITY2_INCLUDE_FUNCS
|
||||
|
||||
#if SUPPORTED_PERSONALITIES > 2 && defined HAVE_MX32_MPERS
|
||||
# define PERSONALITY2_INCLUDE_FUNCS "mx32_funcs.h"
|
||||
# define PERSONALITY2_INCLUDE_PRINTERS_DECLS "mx32_printer_decls.h"
|
||||
# define PERSONALITY2_INCLUDE_PRINTERS_DEFS "mx32_printer_defs.h"
|
||||
# define MPERS_mx32_IOCTL_MACROS "ioctl_redefs2.h"
|
||||
#else
|
||||
# define PERSONALITY2_INCLUDE_PRINTERS_DECLS "native_printer_decls.h"
|
||||
# define PERSONALITY2_INCLUDE_PRINTERS_DEFS "native_printer_defs.h"
|
||||
# define PERSONALITY2_INCLUDE_FUNCS "empty.h"
|
||||
#endif
|
||||
|
||||
typedef struct sysent {
|
||||
unsigned nargs;
|
||||
int sys_flags;
|
||||
int sen;
|
||||
int (*sys_func)();
|
||||
const char *sys_name;
|
||||
} struct_sysent;
|
||||
|
||||
typedef struct ioctlent {
|
||||
const char *symbol;
|
||||
unsigned int code;
|
||||
} struct_ioctlent;
|
||||
|
||||
#if defined LINUX_MIPSN32 || defined X32
|
||||
# define HAVE_STRUCT_TCB_EXT_ARG 1
|
||||
#else
|
||||
# define HAVE_STRUCT_TCB_EXT_ARG 0
|
||||
#endif
|
||||
struct inject_opts {
|
||||
uint16_t first;
|
||||
uint16_t step;
|
||||
uint16_t signo;
|
||||
int rval;
|
||||
};
|
||||
|
||||
#define MAX_ERRNO_VALUE 4095
|
||||
#define INJECT_OPTS_RVAL_DEFAULT (-(MAX_ERRNO_VALUE + 1))
|
||||
|
||||
/* Trace Control Block */
|
||||
struct tcb {
|
||||
int flags; /* See below for TCB_ values */
|
||||
int pid; /* If 0, this tcb is free */
|
||||
int qual_flg; /* qual_flags[scno] or DEFAULT_QUAL_FLAGS + RAW */
|
||||
int u_error; /* Error code */
|
||||
long scno; /* System call number */
|
||||
long u_arg[MAX_ARGS]; /* System call arguments */
|
||||
#if HAVE_STRUCT_TCB_EXT_ARG
|
||||
long long ext_arg[MAX_ARGS];
|
||||
long long u_lrval; /* long long return value */
|
||||
#endif
|
||||
long u_rval; /* Return value */
|
||||
unsigned long u_error; /* Error code */
|
||||
kernel_ulong_t scno; /* System call number */
|
||||
kernel_ulong_t u_arg[MAX_ARGS]; /* System call arguments */
|
||||
kernel_long_t u_rval; /* Return value */
|
||||
#if SUPPORTED_PERSONALITIES > 1
|
||||
unsigned int currpers; /* Personality at the time of scno update */
|
||||
#endif
|
||||
@ -318,6 +227,7 @@ struct tcb {
|
||||
void (*_free_priv_data)(void *); /* Callback for freeing priv_data */
|
||||
const struct_sysent *s_ent; /* sysent[scno] or dummy struct for bad scno */
|
||||
const struct_sysent *s_prev_ent; /* for "resuming interrupted SYSCALL" msg */
|
||||
struct inject_opts *inject_vec[SUPPORTED_PERSONALITIES];
|
||||
struct timeval stime; /* System time usage as of last process wait */
|
||||
struct timeval dtime; /* Delta for system time usage */
|
||||
struct timeval etime; /* Syscall entry time */
|
||||
@ -354,16 +264,19 @@ struct tcb {
|
||||
#define TCB_ATTACHED 0x08 /* We attached to it already */
|
||||
#define TCB_REPRINT 0x10 /* We should reprint this syscall on exit */
|
||||
#define TCB_FILTERED 0x20 /* This system call has been filtered out */
|
||||
#define TCB_TAMPERED 0x40 /* A syscall has been tampered with */
|
||||
#define TCB_HIDE_LOG 0x80 /* We should hide everything (until execve) */
|
||||
#define TCB_SKIP_DETACH_ON_FIRST_EXEC 0x100 /* -b execve should skip detach on first execve */
|
||||
|
||||
/* qualifier flags */
|
||||
#define QUAL_TRACE 0x001 /* this system call should be traced */
|
||||
#define QUAL_ABBREV 0x002 /* abbreviate the structures of this syscall */
|
||||
#define QUAL_VERBOSE 0x004 /* decode the structures of this syscall */
|
||||
#define QUAL_RAW 0x008 /* print all args in hex for this syscall */
|
||||
#define QUAL_SIGNAL 0x010 /* report events with this signal */
|
||||
#define QUAL_READ 0x020 /* dump data read on this file descriptor */
|
||||
#define QUAL_WRITE 0x040 /* dump data written to this file descriptor */
|
||||
typedef uint8_t qualbits_t;
|
||||
#define QUAL_INJECT 0x010 /* tamper with this system call on purpose */
|
||||
#define QUAL_SIGNAL 0x100 /* report events with this signal */
|
||||
#define QUAL_READ 0x200 /* dump data read from this file descriptor */
|
||||
#define QUAL_WRITE 0x400 /* dump data written to this file descriptor */
|
||||
|
||||
#define DEFAULT_QUAL_FLAGS (QUAL_TRACE | QUAL_ABBREV | QUAL_VERBOSE)
|
||||
|
||||
@ -373,6 +286,7 @@ typedef uint8_t qualbits_t;
|
||||
#define verbose(tcp) ((tcp)->qual_flg & QUAL_VERBOSE)
|
||||
#define abbrev(tcp) ((tcp)->qual_flg & QUAL_ABBREV)
|
||||
#define filtered(tcp) ((tcp)->flags & TCB_FILTERED)
|
||||
#define hide_log(tcp) ((tcp)->flags & TCB_HIDE_LOG)
|
||||
|
||||
#include "xlat.h"
|
||||
|
||||
@ -384,6 +298,7 @@ extern const struct xlat msg_flags[];
|
||||
extern const struct xlat open_access_modes[];
|
||||
extern const struct xlat open_mode_flags[];
|
||||
extern const struct xlat resource_flags[];
|
||||
extern const struct xlat sg_io_info[];
|
||||
extern const struct xlat socketlayers[];
|
||||
extern const struct xlat whence_codes[];
|
||||
|
||||
@ -392,34 +307,14 @@ extern const struct xlat whence_codes[];
|
||||
#define RVAL_HEX 001 /* hex format */
|
||||
#define RVAL_OCTAL 002 /* octal format */
|
||||
#define RVAL_UDECIMAL 003 /* unsigned decimal format */
|
||||
#if HAVE_STRUCT_TCB_EXT_ARG
|
||||
# if 0 /* unused so far */
|
||||
# define RVAL_LDECIMAL 004 /* long decimal format */
|
||||
# define RVAL_LHEX 005 /* long hex format */
|
||||
# define RVAL_LOCTAL 006 /* long octal format */
|
||||
# endif
|
||||
# define RVAL_LUDECIMAL 007 /* long unsigned decimal format */
|
||||
#endif /* HAVE_STRUCT_TCB_EXT_ARG */
|
||||
#define RVAL_FD 010 /* file descriptor */
|
||||
#define RVAL_MASK 017 /* mask for these values */
|
||||
#define RVAL_MASK 013 /* mask for these values */
|
||||
|
||||
#define RVAL_STR 020 /* Print `auxstr' field after return val */
|
||||
#define RVAL_NONE 040 /* Print nothing */
|
||||
|
||||
#define RVAL_DECODED 0100 /* syscall decoding finished */
|
||||
|
||||
#define TRACE_FILE 001 /* Trace file-related syscalls. */
|
||||
#define TRACE_IPC 002 /* Trace IPC-related syscalls. */
|
||||
#define TRACE_NETWORK 004 /* Trace network-related syscalls. */
|
||||
#define TRACE_PROCESS 010 /* Trace process-related syscalls. */
|
||||
#define TRACE_SIGNAL 020 /* Trace signal-related syscalls. */
|
||||
#define TRACE_DESC 040 /* Trace file descriptor-related syscalls. */
|
||||
#define TRACE_MEMORY 0100 /* Trace memory mapping-related syscalls. */
|
||||
#define SYSCALL_NEVER_FAILS 0200 /* Syscall is always successful. */
|
||||
#define STACKTRACE_INVALIDATE_CACHE 0400 /* Trigger proc/maps cache updating */
|
||||
#define STACKTRACE_CAPTURE_ON_ENTER 01000 /* Capture stacktrace on "entering" stage */
|
||||
#define TRACE_INDIRECT_SUBCALL 02000 /* Syscall is an indirect socket/ipc subcall. */
|
||||
|
||||
#define IOCTL_NUMBER_UNKNOWN 0
|
||||
#define IOCTL_NUMBER_HANDLED 1
|
||||
#define IOCTL_NUMBER_STOP_LOOKUP 010
|
||||
@ -432,6 +327,7 @@ extern const struct xlat whence_codes[];
|
||||
|| defined(BFIN) \
|
||||
|| defined(M68K) \
|
||||
|| defined(MICROBLAZE) \
|
||||
|| defined(RISCV) \
|
||||
|| defined(S390) \
|
||||
|| defined(SH) || defined(SH64) \
|
||||
|| defined(SPARC) || defined(SPARC64) \
|
||||
@ -471,7 +367,6 @@ extern bool count_wallclock;
|
||||
extern unsigned int qflag;
|
||||
extern bool not_failing_only;
|
||||
extern unsigned int show_fd_path;
|
||||
extern bool hide_log_until_execve;
|
||||
/* are we filtering traces based on paths? */
|
||||
extern const char **paths_selected;
|
||||
#define tracing_paths (paths_selected != NULL)
|
||||
@ -504,30 +399,27 @@ void *xreallocarray(void *ptr, size_t nmemb, size_t size)
|
||||
ATTRIBUTE_ALLOC_SIZE((2, 3));
|
||||
char *xstrdup(const char *str) ATTRIBUTE_MALLOC;
|
||||
|
||||
#if USE_CUSTOM_PRINTF
|
||||
/*
|
||||
* See comment in vsprintf.c for allowed formats.
|
||||
* Short version: %h[h]u, %zu, %tu are not allowed, use %[l[l]]u.
|
||||
*/
|
||||
int strace_vfprintf(FILE *fp, const char *fmt, va_list args);
|
||||
#else
|
||||
# define strace_vfprintf vfprintf
|
||||
#endif
|
||||
|
||||
extern int read_int_from_file(const char *, int *);
|
||||
|
||||
extern void set_sortby(const char *);
|
||||
extern void set_overhead(int);
|
||||
extern void qualify(const char *);
|
||||
extern void print_pc(struct tcb *);
|
||||
extern int trace_syscall(struct tcb *);
|
||||
extern int trace_syscall(struct tcb *, unsigned int *);
|
||||
extern void count_syscall(struct tcb *, const struct timeval *);
|
||||
extern void call_summary(FILE *);
|
||||
|
||||
extern void clear_regs(void);
|
||||
extern void get_regs(pid_t pid);
|
||||
extern int get_scno(struct tcb *tcp);
|
||||
extern const char *syscall_name(long scno);
|
||||
/**
|
||||
* Convert syscall number to syscall name.
|
||||
*
|
||||
* @param scno Syscall number.
|
||||
* @return String literal corresponding to the syscall number in case latter
|
||||
* is valid; NULL otherwise.
|
||||
*/
|
||||
extern const char *syscall_name(kernel_ulong_t scno);
|
||||
extern const char *err_name(unsigned long err);
|
||||
|
||||
extern bool is_erestart(struct tcb *);
|
||||
extern void temporarily_clear_syserror(struct tcb *);
|
||||
@ -548,30 +440,42 @@ static inline int set_tcb_priv_ulong(struct tcb *tcp, unsigned long val)
|
||||
return set_tcb_priv_data(tcp, (void *) val, 0);
|
||||
}
|
||||
|
||||
extern int umoven(struct tcb *, long, unsigned int, void *);
|
||||
extern int
|
||||
umoven(struct tcb *tcp, kernel_ulong_t addr, unsigned int len, void *laddr);
|
||||
#define umove(pid, addr, objp) \
|
||||
umoven((pid), (addr), sizeof(*(objp)), (void *) (objp))
|
||||
extern int umoven_or_printaddr(struct tcb *, long, unsigned int, void *);
|
||||
|
||||
extern int
|
||||
umoven_or_printaddr(struct tcb *tcp, kernel_ulong_t addr,
|
||||
unsigned int len, void *laddr);
|
||||
#define umove_or_printaddr(pid, addr, objp) \
|
||||
umoven_or_printaddr((pid), (addr), sizeof(*(objp)), (void *) (objp))
|
||||
extern int umovestr(struct tcb *, long, unsigned int, char *);
|
||||
extern int upeek(int pid, long, long *);
|
||||
|
||||
extern int
|
||||
umoven_or_printaddr_ignore_syserror(struct tcb *tcp, kernel_ulong_t addr,
|
||||
unsigned int len, void *laddr);
|
||||
|
||||
extern int
|
||||
umovestr(struct tcb *tcp, kernel_ulong_t addr, unsigned int len, char *laddr);
|
||||
|
||||
extern int upeek(int pid, unsigned long, kernel_ulong_t *);
|
||||
extern int upoke(int pid, unsigned long, kernel_ulong_t);
|
||||
|
||||
extern bool
|
||||
print_array(struct tcb *tcp,
|
||||
const unsigned long start_addr,
|
||||
const size_t nmemb,
|
||||
void *const elem_buf,
|
||||
const size_t elem_size,
|
||||
int (*const umoven_func)(struct tcb *,
|
||||
long,
|
||||
kernel_ulong_t start_addr,
|
||||
size_t nmemb,
|
||||
void *elem_buf,
|
||||
size_t elem_size,
|
||||
int (*umoven_func)(struct tcb *,
|
||||
kernel_ulong_t,
|
||||
unsigned int,
|
||||
void *),
|
||||
bool (*const print_func)(struct tcb *,
|
||||
bool (*print_func)(struct tcb *,
|
||||
void *elem_buf,
|
||||
size_t elem_size,
|
||||
void *opaque_data),
|
||||
void *const opaque_data);
|
||||
void *opaque_data);
|
||||
|
||||
#if defined ALPHA || defined IA64 || defined MIPS \
|
||||
|| defined SH || defined SPARC || defined SPARC64
|
||||
@ -591,11 +495,21 @@ extern const char *xlookup(const struct xlat *, const uint64_t);
|
||||
extern const char *xlat_search(const struct xlat *, const size_t, const uint64_t);
|
||||
|
||||
extern unsigned long get_pagesize(void);
|
||||
extern int
|
||||
string_to_uint_ex(const char *str, char **endptr,
|
||||
unsigned int max_val, const char *accepted_ending);
|
||||
extern int string_to_uint(const char *str);
|
||||
static inline int
|
||||
string_to_uint_upto(const char *const str, unsigned int max_val)
|
||||
{
|
||||
return string_to_uint_ex(str, NULL, max_val, NULL);
|
||||
}
|
||||
extern int next_set_bit(const void *bit_array, unsigned cur_bit, unsigned size_bits);
|
||||
|
||||
#define QUOTE_0_TERMINATED 0x01
|
||||
#define QUOTE_OMIT_LEADING_TRAILING_QUOTES 0x02
|
||||
#define QUOTE_0_TERMINATED 0x01
|
||||
#define QUOTE_OMIT_LEADING_TRAILING_QUOTES 0x02
|
||||
#define QUOTE_OMIT_TRAILING_0 0x08
|
||||
#define QUOTE_FORCE_HEX 0x10
|
||||
|
||||
extern int string_quote(const char *, char *, unsigned int, unsigned int);
|
||||
extern int print_quoted_string(const char *, unsigned int, unsigned int);
|
||||
@ -604,19 +518,23 @@ extern int print_quoted_string(const char *, unsigned int, unsigned int);
|
||||
* b refers to the higher numbered u_arg
|
||||
*/
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
# define LONG_LONG(a,b) \
|
||||
((long long)((unsigned long long)(unsigned)(b) | ((unsigned long long)(a)<<32)))
|
||||
# define ULONG_LONG(a,b) \
|
||||
((unsigned long long)(unsigned)(b) | ((unsigned long long)(a)<<32))
|
||||
#else
|
||||
# define LONG_LONG(a,b) \
|
||||
((long long)((unsigned long long)(unsigned)(a) | ((unsigned long long)(b)<<32)))
|
||||
# define ULONG_LONG(a,b) \
|
||||
((unsigned long long)(unsigned)(a) | ((unsigned long long)(b)<<32))
|
||||
#endif
|
||||
extern int getllval(struct tcb *, unsigned long long *, int);
|
||||
extern int printllval(struct tcb *, const char *, int)
|
||||
ATTRIBUTE_FORMAT((printf, 2, 0));
|
||||
|
||||
extern void printaddr(long);
|
||||
extern void printxvals(const uint64_t, const char *, const struct xlat *, ...)
|
||||
extern void printaddr(kernel_ulong_t addr);
|
||||
extern int printxvals(const uint64_t, const char *, const struct xlat *, ...)
|
||||
ATTRIBUTE_SENTINEL;
|
||||
extern int printxval_searchn(const struct xlat *xlat, size_t xlat_size,
|
||||
uint64_t val, const char *dflt);
|
||||
#define printxval_search(xlat__, val__, dflt__) \
|
||||
printxval_searchn(xlat__, ARRAY_SIZE(xlat__), val__, dflt__)
|
||||
extern int printargs(struct tcb *);
|
||||
extern int printargs_u(struct tcb *);
|
||||
extern int printargs_d(struct tcb *);
|
||||
@ -624,54 +542,34 @@ extern int printargs_d(struct tcb *);
|
||||
extern void addflags(const struct xlat *, uint64_t);
|
||||
extern int printflags64(const struct xlat *, uint64_t, const char *);
|
||||
extern const char *sprintflags(const char *, const struct xlat *, uint64_t);
|
||||
extern const char *sprintmode(unsigned int);
|
||||
extern const char *sprinttime(time_t);
|
||||
extern void dumpiov_in_msghdr(struct tcb *, long, unsigned long);
|
||||
extern void dumpiov_in_mmsghdr(struct tcb *, long);
|
||||
extern void dumpiov_upto(struct tcb *, int, long, unsigned long);
|
||||
#define dumpiov(tcp, len, addr) \
|
||||
dumpiov_upto((tcp), (len), (addr), (unsigned long) -1L)
|
||||
extern void dumpstr(struct tcb *, long, int);
|
||||
extern void printstr(struct tcb *, long, long);
|
||||
extern bool printnum_short(struct tcb *, long, const char *)
|
||||
ATTRIBUTE_FORMAT((printf, 3, 0));
|
||||
extern bool printnum_int(struct tcb *, long, const char *)
|
||||
ATTRIBUTE_FORMAT((printf, 3, 0));
|
||||
extern bool printnum_int64(struct tcb *, long, const char *)
|
||||
ATTRIBUTE_FORMAT((printf, 3, 0));
|
||||
extern void print_symbolic_mode_t(unsigned int);
|
||||
extern void print_numeric_umode_t(unsigned short);
|
||||
extern void print_numeric_long_umask(unsigned long);
|
||||
extern void print_dev_t(unsigned long long dev);
|
||||
|
||||
#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4
|
||||
extern bool printnum_long_int(struct tcb *, long, const char *, const char *)
|
||||
ATTRIBUTE_FORMAT((printf, 3, 0))
|
||||
ATTRIBUTE_FORMAT((printf, 4, 0));
|
||||
# define printnum_slong(tcp, addr) \
|
||||
printnum_long_int((tcp), (addr), "%" PRId64, "%d")
|
||||
# define printnum_ulong(tcp, addr) \
|
||||
printnum_long_int((tcp), (addr), "%" PRIu64, "%u")
|
||||
# define printnum_ptr(tcp, addr) \
|
||||
printnum_long_int((tcp), (addr), "%#" PRIx64, "%#x")
|
||||
#elif SIZEOF_LONG > 4
|
||||
# define printnum_slong(tcp, addr) \
|
||||
printnum_int64((tcp), (addr), "%" PRId64)
|
||||
# define printnum_ulong(tcp, addr) \
|
||||
printnum_int64((tcp), (addr), "%" PRIu64)
|
||||
# define printnum_ptr(tcp, addr) \
|
||||
printnum_int64((tcp), (addr), "%#" PRIx64)
|
||||
#else
|
||||
# define printnum_slong(tcp, addr) \
|
||||
printnum_int((tcp), (addr), "%d")
|
||||
# define printnum_ulong(tcp, addr) \
|
||||
printnum_int((tcp), (addr), "%u")
|
||||
# define printnum_ptr(tcp, addr) \
|
||||
printnum_int((tcp), (addr), "%#x")
|
||||
#endif
|
||||
extern void
|
||||
dumpiov_in_msghdr(struct tcb *, kernel_ulong_t addr, kernel_ulong_t data_size);
|
||||
|
||||
extern void
|
||||
dumpiov_in_mmsghdr(struct tcb *, kernel_ulong_t addr);
|
||||
|
||||
extern void
|
||||
dumpiov_upto(struct tcb *, int len, kernel_ulong_t addr, kernel_ulong_t data_size);
|
||||
|
||||
extern void
|
||||
dumpstr(struct tcb *, kernel_ulong_t addr, int len);
|
||||
|
||||
extern void
|
||||
printstr_ex(struct tcb *, kernel_ulong_t addr, kernel_ulong_t len,
|
||||
unsigned int user_style);
|
||||
|
||||
extern void
|
||||
printpathn(struct tcb *, kernel_ulong_t addr, unsigned int n);
|
||||
|
||||
extern void
|
||||
printpath(struct tcb *, kernel_ulong_t addr);
|
||||
|
||||
extern bool printpair_int(struct tcb *, long, const char *)
|
||||
ATTRIBUTE_FORMAT((printf, 3, 0));
|
||||
extern bool printpair_int64(struct tcb *, long, const char *)
|
||||
ATTRIBUTE_FORMAT((printf, 3, 0));
|
||||
extern void printpath(struct tcb *, long);
|
||||
extern void printpathn(struct tcb *, long, unsigned int);
|
||||
#define TIMESPEC_TEXT_BUFSIZE \
|
||||
(sizeof(intmax_t)*3 * 2 + sizeof("{tv_sec=%jd, tv_nsec=%jd}"))
|
||||
extern void printfd(struct tcb *, int);
|
||||
@ -679,44 +577,72 @@ extern void print_sockaddr(struct tcb *tcp, const void *, int);
|
||||
extern bool print_sockaddr_by_inode(const unsigned long, const enum sock_proto);
|
||||
extern bool print_sockaddr_by_inode_cached(const unsigned long);
|
||||
extern void print_dirfd(struct tcb *, int);
|
||||
extern int decode_sockaddr(struct tcb *, long, int);
|
||||
#ifdef ALPHA
|
||||
extern void printrusage32(struct tcb *, long);
|
||||
extern const char *sprint_timeval32(struct tcb *tcp, long);
|
||||
extern void print_timeval32(struct tcb *tcp, long);
|
||||
extern void print_timeval32_pair(struct tcb *tcp, long);
|
||||
extern void print_itimerval32(struct tcb *tcp, long);
|
||||
#endif
|
||||
|
||||
extern int
|
||||
decode_sockaddr(struct tcb *, kernel_ulong_t addr, int addrlen);
|
||||
|
||||
extern void printuid(const char *, const unsigned int);
|
||||
extern void print_sigset_addr_len(struct tcb *, long, long);
|
||||
|
||||
extern void
|
||||
print_sigset_addr_len(struct tcb *, kernel_ulong_t addr, kernel_ulong_t len);
|
||||
|
||||
extern const char *sprintsigmask_n(const char *, const void *, unsigned int);
|
||||
#define tprintsigmask_addr(prefix, mask) \
|
||||
tprints(sprintsigmask_n((prefix), (mask), sizeof(mask)))
|
||||
extern void printsignal(int);
|
||||
extern void tprint_iov(struct tcb *, unsigned long, unsigned long, enum iov_decode);
|
||||
extern void tprint_iov_upto(struct tcb *, unsigned long, unsigned long,
|
||||
enum iov_decode, unsigned long);
|
||||
extern void decode_netlink(struct tcb *, unsigned long, unsigned long);
|
||||
|
||||
extern void
|
||||
tprint_iov_upto(struct tcb *, kernel_ulong_t len, kernel_ulong_t addr,
|
||||
enum iov_decode, kernel_ulong_t data_size);
|
||||
|
||||
extern void
|
||||
decode_netlink(struct tcb *, kernel_ulong_t addr, kernel_ulong_t len);
|
||||
|
||||
extern void tprint_open_modes(unsigned int);
|
||||
extern const char *sprint_open_modes(unsigned int);
|
||||
extern void print_seccomp_filter(struct tcb *, unsigned long);
|
||||
extern void print_seccomp_fprog(struct tcb *, unsigned long, unsigned short);
|
||||
|
||||
extern void
|
||||
print_seccomp_filter(struct tcb *, kernel_ulong_t addr);
|
||||
|
||||
extern void
|
||||
print_seccomp_fprog(struct tcb *, kernel_ulong_t addr, unsigned short len);
|
||||
|
||||
struct strace_stat;
|
||||
extern void print_struct_stat(struct tcb *tcp, const struct strace_stat *const st);
|
||||
|
||||
struct strace_statfs;
|
||||
extern void print_struct_statfs(struct tcb *tcp, long);
|
||||
extern void print_struct_statfs64(struct tcb *tcp, long, unsigned long);
|
||||
|
||||
extern void
|
||||
print_struct_statfs(struct tcb *, kernel_ulong_t addr);
|
||||
|
||||
extern void
|
||||
print_struct_statfs64(struct tcb *, kernel_ulong_t addr, kernel_ulong_t size);
|
||||
|
||||
extern void print_ifindex(unsigned int);
|
||||
|
||||
extern int file_ioctl(struct tcb *, const unsigned int, long);
|
||||
extern int fs_x_ioctl(struct tcb *, const unsigned int, long);
|
||||
extern int loop_ioctl(struct tcb *, const unsigned int, long);
|
||||
extern int ptp_ioctl(struct tcb *, const unsigned int, long);
|
||||
extern int scsi_ioctl(struct tcb *, const unsigned int, long);
|
||||
extern int sock_ioctl(struct tcb *, const unsigned int, long);
|
||||
extern int term_ioctl(struct tcb *, const unsigned int, long);
|
||||
extern int ubi_ioctl(struct tcb *, const unsigned int, long);
|
||||
extern int uffdio_ioctl(struct tcb *, const unsigned int, long);
|
||||
struct number_set;
|
||||
extern struct number_set read_set;
|
||||
extern struct number_set write_set;
|
||||
extern struct number_set signal_set;
|
||||
|
||||
extern bool is_number_in_set(unsigned int number, const struct number_set *);
|
||||
extern void qualify(const char *);
|
||||
extern unsigned int qual_flags(const unsigned int);
|
||||
|
||||
#define DECL_IOCTL(name) \
|
||||
extern int \
|
||||
name ## _ioctl(struct tcb *, unsigned int request, kernel_ulong_t arg)
|
||||
DECL_IOCTL(dm);
|
||||
DECL_IOCTL(file);
|
||||
DECL_IOCTL(fs_x);
|
||||
DECL_IOCTL(ptp);
|
||||
DECL_IOCTL(scsi);
|
||||
DECL_IOCTL(term);
|
||||
DECL_IOCTL(ubi);
|
||||
DECL_IOCTL(uffdio);
|
||||
#undef DECL_IOCTL
|
||||
|
||||
extern int decode_sg_io_v4(struct tcb *, const kernel_ulong_t arg);
|
||||
|
||||
extern int tv_nz(const struct timeval *);
|
||||
extern int tv_cmp(const struct timeval *, const struct timeval *);
|
||||
@ -735,6 +661,18 @@ extern void unwind_print_stacktrace(struct tcb* tcp);
|
||||
extern void unwind_capture_stacktrace(struct tcb* tcp);
|
||||
#endif
|
||||
|
||||
static inline void
|
||||
printstrn(struct tcb *tcp, kernel_ulong_t addr, kernel_ulong_t len)
|
||||
{
|
||||
printstr_ex(tcp, addr, len, 0);
|
||||
}
|
||||
|
||||
static inline void
|
||||
printstr(struct tcb *tcp, kernel_ulong_t addr)
|
||||
{
|
||||
printstr_ex(tcp, addr, -1, QUOTE_0_TERMINATED);
|
||||
}
|
||||
|
||||
static inline int
|
||||
printflags(const struct xlat *x, unsigned int flags, const char *dflt)
|
||||
{
|
||||
@ -742,29 +680,41 @@ printflags(const struct xlat *x, unsigned int flags, const char *dflt)
|
||||
}
|
||||
|
||||
static inline int
|
||||
printflags_long(const struct xlat *x, unsigned long flags, const char *dflt)
|
||||
{
|
||||
return printflags64(x, flags, dflt);
|
||||
}
|
||||
|
||||
static inline void
|
||||
printxval64(const struct xlat *x, const uint64_t val, const char *dflt)
|
||||
{
|
||||
printxvals(val, dflt, x, NULL);
|
||||
return printxvals(val, dflt, x, NULL);
|
||||
}
|
||||
|
||||
static inline void
|
||||
static inline int
|
||||
printxval(const struct xlat *x, const unsigned int val, const char *dflt)
|
||||
{
|
||||
printxvals(val, dflt, x, NULL);
|
||||
return printxvals(val, dflt, x, NULL);
|
||||
}
|
||||
|
||||
static inline void
|
||||
printxval_long(const struct xlat *x, const unsigned long val, const char *dflt)
|
||||
tprint_iov(struct tcb *tcp, kernel_ulong_t len, kernel_ulong_t addr,
|
||||
enum iov_decode decode_iov)
|
||||
{
|
||||
printxvals(val, dflt, x, NULL);
|
||||
tprint_iov_upto(tcp, len, addr, decode_iov, -1);
|
||||
}
|
||||
|
||||
#ifdef ALPHA
|
||||
typedef struct {
|
||||
int tv_sec, tv_usec;
|
||||
} timeval32_t;
|
||||
|
||||
extern void print_timeval32_t(const timeval32_t *);
|
||||
extern void printrusage32(struct tcb *, kernel_ulong_t);
|
||||
extern const char *sprint_timeval32(struct tcb *tcp, kernel_ulong_t);
|
||||
extern void print_timeval32(struct tcb *tcp, kernel_ulong_t);
|
||||
extern void print_timeval32_pair(struct tcb *tcp, kernel_ulong_t);
|
||||
extern void print_itimerval32(struct tcb *tcp, kernel_ulong_t);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRUCT_USER_DESC
|
||||
extern void print_user_desc(struct tcb *, kernel_ulong_t addr);
|
||||
#endif
|
||||
|
||||
/* Strace log generation machinery.
|
||||
*
|
||||
* printing_tcp: tcb which has incomplete line being printed right now.
|
||||
@ -799,38 +749,144 @@ extern unsigned current_personality;
|
||||
|
||||
#if SUPPORTED_PERSONALITIES == 1
|
||||
# define current_wordsize PERSONALITY0_WORDSIZE
|
||||
# define current_klongsize PERSONALITY0_KLONGSIZE
|
||||
#else
|
||||
# if SUPPORTED_PERSONALITIES == 2 && PERSONALITY0_WORDSIZE == PERSONALITY1_WORDSIZE
|
||||
# define current_wordsize PERSONALITY0_WORDSIZE
|
||||
# else
|
||||
extern unsigned current_wordsize;
|
||||
# endif
|
||||
# if SUPPORTED_PERSONALITIES == 2 && PERSONALITY0_KLONGSIZE == PERSONALITY1_KLONGSIZE
|
||||
# define current_klongsize PERSONALITY0_KLONGSIZE
|
||||
# else
|
||||
extern unsigned current_klongsize;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* In many, many places we play fast and loose and use
|
||||
* tprintf("%d", (int) tcp->u_arg[N]) to print fds, pids etc.
|
||||
* We probably need to use widen_to_long() instead:
|
||||
*/
|
||||
#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4
|
||||
# define widen_to_long(v) (current_wordsize == 4 ? (long)(int32_t)(v) : (long)(v))
|
||||
#else
|
||||
# define widen_to_long(v) ((long)(v))
|
||||
#define ANY_WORDSIZE_LESS_THAN_KERNEL_LONG \
|
||||
(SIZEOF_KERNEL_LONG_T > 4 \
|
||||
&& (SIZEOF_LONG < SIZEOF_KERNEL_LONG_T || !defined(current_wordsize)))
|
||||
|
||||
#define DECL_PRINTNUM(name) \
|
||||
extern bool \
|
||||
printnum_ ## name(struct tcb *, kernel_ulong_t addr, const char *fmt) \
|
||||
ATTRIBUTE_FORMAT((printf, 3, 0))
|
||||
DECL_PRINTNUM(short);
|
||||
DECL_PRINTNUM(int);
|
||||
DECL_PRINTNUM(int64);
|
||||
#undef DECL_PRINTNUM
|
||||
|
||||
#define DECL_PRINTNUM_ADDR(name) \
|
||||
extern bool \
|
||||
printnum_addr_ ## name(struct tcb *, kernel_ulong_t addr)
|
||||
DECL_PRINTNUM_ADDR(int);
|
||||
DECL_PRINTNUM_ADDR(int64);
|
||||
#undef DECL_PRINTNUM_ADDR
|
||||
|
||||
#ifndef current_wordsize
|
||||
extern bool
|
||||
printnum_long_int(struct tcb *, kernel_ulong_t addr,
|
||||
const char *fmt_long, const char *fmt_int)
|
||||
ATTRIBUTE_FORMAT((printf, 3, 0))
|
||||
ATTRIBUTE_FORMAT((printf, 4, 0));
|
||||
extern bool printnum_addr_long_int(struct tcb *, kernel_ulong_t addr);
|
||||
# define printnum_slong(tcp, addr) \
|
||||
printnum_long_int((tcp), (addr), "%" PRId64, "%d")
|
||||
# define printnum_ulong(tcp, addr) \
|
||||
printnum_long_int((tcp), (addr), "%" PRIu64, "%u")
|
||||
# define printnum_ptr(tcp, addr) \
|
||||
printnum_addr_long_int((tcp), (addr))
|
||||
#elif current_wordsize > 4
|
||||
# define printnum_slong(tcp, addr) \
|
||||
printnum_int64((tcp), (addr), "%" PRId64)
|
||||
# define printnum_ulong(tcp, addr) \
|
||||
printnum_int64((tcp), (addr), "%" PRIu64)
|
||||
# define printnum_ptr(tcp, addr) \
|
||||
printnum_addr_int64((tcp), (addr))
|
||||
#else /* current_wordsize == 4 */
|
||||
# define printnum_slong(tcp, addr) \
|
||||
printnum_int((tcp), (addr), "%d")
|
||||
# define printnum_ulong(tcp, addr) \
|
||||
printnum_int((tcp), (addr), "%u")
|
||||
# define printnum_ptr(tcp, addr) \
|
||||
printnum_addr_int((tcp), (addr))
|
||||
#endif
|
||||
|
||||
#ifndef current_klongsize
|
||||
extern bool printnum_addr_klong_int(struct tcb *, kernel_ulong_t addr);
|
||||
# define printnum_kptr(tcp, addr) \
|
||||
printnum_addr_klong_int((tcp), (addr))
|
||||
#elif current_klongsize > 4
|
||||
# define printnum_kptr(tcp, addr) \
|
||||
printnum_addr_int64((tcp), (addr))
|
||||
#else /* current_klongsize == 4 */
|
||||
# define printnum_kptr(tcp, addr) \
|
||||
printnum_addr_int((tcp), (addr))
|
||||
#endif
|
||||
|
||||
#define DECL_PRINTPAIR(name) \
|
||||
extern bool \
|
||||
printpair_ ## name(struct tcb *, kernel_ulong_t addr, const char *fmt) \
|
||||
ATTRIBUTE_FORMAT((printf, 3, 0))
|
||||
DECL_PRINTPAIR(int);
|
||||
DECL_PRINTPAIR(int64);
|
||||
#undef DECL_PRINTPAIR
|
||||
|
||||
static inline kernel_long_t
|
||||
truncate_klong_to_current_wordsize(const kernel_long_t v)
|
||||
{
|
||||
#if ANY_WORDSIZE_LESS_THAN_KERNEL_LONG
|
||||
if (current_wordsize < sizeof(v)) {
|
||||
return (int) v;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
return v;
|
||||
}
|
||||
}
|
||||
|
||||
static inline kernel_ulong_t
|
||||
truncate_kulong_to_current_wordsize(const kernel_ulong_t v)
|
||||
{
|
||||
#if ANY_WORDSIZE_LESS_THAN_KERNEL_LONG
|
||||
if (current_wordsize < sizeof(v)) {
|
||||
return (unsigned int) v;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
return v;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Widen without sign-extension a signed integer type to unsigned long long.
|
||||
* Cast a pointer or a pointer-sized integer to kernel_ulong_t.
|
||||
*/
|
||||
#define widen_to_ull(v) \
|
||||
(sizeof(v) == sizeof(int) ? (unsigned long long) (unsigned int) (v) : \
|
||||
#define ptr_to_kulong(v) ((kernel_ulong_t) (unsigned long) (v))
|
||||
|
||||
/*
|
||||
* Zero-extend a signed integer type to unsigned long long.
|
||||
*/
|
||||
#define zero_extend_signed_to_ull(v) \
|
||||
(sizeof(v) == sizeof(char) ? (unsigned long long) (unsigned char) (v) : \
|
||||
sizeof(v) == sizeof(short) ? (unsigned long long) (unsigned short) (v) : \
|
||||
sizeof(v) == sizeof(int) ? (unsigned long long) (unsigned int) (v) : \
|
||||
sizeof(v) == sizeof(long) ? (unsigned long long) (unsigned long) (v) : \
|
||||
(unsigned long long) (v))
|
||||
|
||||
/*
|
||||
* Sign-extend an unsigned integer type to long long.
|
||||
*/
|
||||
#define sign_extend_unsigned_to_ll(v) \
|
||||
(sizeof(v) == sizeof(char) ? (long long) (char) (v) : \
|
||||
sizeof(v) == sizeof(short) ? (long long) (short) (v) : \
|
||||
sizeof(v) == sizeof(int) ? (long long) (int) (v) : \
|
||||
sizeof(v) == sizeof(long) ? (long long) (long) (v) : \
|
||||
(long long) (v))
|
||||
|
||||
extern const struct_sysent sysent0[];
|
||||
extern const char *const errnoent0[];
|
||||
extern const char *const signalent0[];
|
||||
extern const struct_ioctlent ioctlent0[];
|
||||
extern qualbits_t *qual_vec[SUPPORTED_PERSONALITIES];
|
||||
#define qual_flags (qual_vec[current_personality])
|
||||
|
||||
#if SUPPORTED_PERSONALITIES > 1
|
||||
extern const struct_sysent *sysent;
|
||||
@ -848,7 +904,10 @@ extern unsigned nsyscalls;
|
||||
extern unsigned nerrnos;
|
||||
extern unsigned nsignals;
|
||||
extern unsigned nioctlents;
|
||||
extern unsigned num_quals;
|
||||
|
||||
extern const unsigned int nsyscall_vec[SUPPORTED_PERSONALITIES];
|
||||
extern const struct_sysent *const sysent_vec[SUPPORTED_PERSONALITIES];
|
||||
extern struct inject_opts *inject_vec[SUPPORTED_PERSONALITIES];
|
||||
|
||||
#ifdef IN_MPERS_BOOTSTRAP
|
||||
/* Transform multi-line MPERS_PRINTER_DECL statements to one-liners. */
|
||||
@ -862,15 +921,25 @@ extern unsigned num_quals;
|
||||
# define MPERS_PRINTER_DECL(type, name, ...) type MPERS_FUNC_NAME(name)(__VA_ARGS__)
|
||||
#endif /* !IN_MPERS_BOOTSTRAP */
|
||||
|
||||
/*
|
||||
* If you need non-NULL sysent[scno].sys_func and sysent[scno].sys_name
|
||||
*/
|
||||
#define SCNO_IS_VALID(scno) \
|
||||
((unsigned long)(scno) < nsyscalls && sysent[scno].sys_func)
|
||||
/* Checks that sysent[scno] is not out of range. */
|
||||
static inline bool
|
||||
scno_in_range(kernel_ulong_t scno)
|
||||
{
|
||||
return scno < nsyscalls;
|
||||
}
|
||||
|
||||
/* Only ensures that sysent[scno] isn't out of range */
|
||||
#define SCNO_IN_RANGE(scno) \
|
||||
((unsigned long)(scno) < nsyscalls)
|
||||
/*
|
||||
* Checks whether scno is not out of range,
|
||||
* its corresponding sysent[scno].sys_func is non-NULL,
|
||||
* and its sysent[scno].sys_flags has no TRACE_INDIRECT_SUBCALL flag set.
|
||||
*/
|
||||
static inline bool
|
||||
scno_is_valid(kernel_ulong_t scno)
|
||||
{
|
||||
return scno_in_range(scno)
|
||||
&& sysent[scno].sys_func
|
||||
&& !(sysent[scno].sys_flags & TRACE_INDIRECT_SUBCALL);
|
||||
}
|
||||
|
||||
#define MPERS_FUNC_NAME__(prefix, name) prefix ## name
|
||||
#define MPERS_FUNC_NAME_(prefix, name) MPERS_FUNC_NAME__(prefix, name)
|
||||
@ -880,6 +949,16 @@ extern unsigned num_quals;
|
||||
|
||||
#define SYS_FUNC(syscall_name) int SYS_FUNC_NAME(sys_ ## syscall_name)(struct tcb *tcp)
|
||||
|
||||
#if SIZEOF_KERNEL_LONG_T > SIZEOF_LONG
|
||||
# define PRI_kl "ll"
|
||||
#else
|
||||
# define PRI_kl "l"
|
||||
#endif
|
||||
|
||||
#define PRI_kld PRI_kl"d"
|
||||
#define PRI_klu PRI_kl"u"
|
||||
#define PRI_klx PRI_kl"x"
|
||||
|
||||
/*
|
||||
* The kernel used to define 64-bit types on 64-bit systems on a per-arch
|
||||
* basis. Some architectures would use unsigned long and others would use
|
||||
@ -899,3 +978,5 @@ extern unsigned num_quals;
|
||||
#define PRI__d64 PRI__64"d"
|
||||
#define PRI__u64 PRI__64"u"
|
||||
#define PRI__x64 PRI__64"x"
|
||||
|
||||
#endif /* !STRACE_DEFS_H */
|
||||
|
77
desc.c
77
desc.c
@ -69,17 +69,17 @@ SYS_FUNC(dup3)
|
||||
}
|
||||
|
||||
static int
|
||||
decode_select(struct tcb *tcp, long *args,
|
||||
void (*print_tv_ts) (struct tcb *, const long),
|
||||
const char * (*sprint_tv_ts) (struct tcb *, const long))
|
||||
decode_select(struct tcb *const tcp, const kernel_ulong_t *const args,
|
||||
void (*const print_tv_ts) (struct tcb *, kernel_ulong_t),
|
||||
const char * (*const sprint_tv_ts) (struct tcb *, kernel_ulong_t))
|
||||
{
|
||||
int i, j;
|
||||
int nfds, fdsize;
|
||||
fd_set *fds = NULL;
|
||||
const char *sep;
|
||||
long arg;
|
||||
kernel_ulong_t addr;
|
||||
|
||||
/* Kernel truncates arg[0] to int, we do the same. */
|
||||
/* Kernel truncates args[0] to int, we do the same. */
|
||||
nfds = (int) args[0];
|
||||
|
||||
/* Kernel rejects negative nfds, so we don't parse it either. */
|
||||
@ -102,13 +102,13 @@ decode_select(struct tcb *tcp, long *args,
|
||||
if (verbose(tcp) && fdsize > 0)
|
||||
fds = malloc(fdsize);
|
||||
for (i = 0; i < 3; i++) {
|
||||
arg = args[i+1];
|
||||
addr = args[i+1];
|
||||
tprints(", ");
|
||||
if (!fds) {
|
||||
printaddr(arg);
|
||||
printaddr(addr);
|
||||
continue;
|
||||
}
|
||||
if (umoven_or_printaddr(tcp, arg, fdsize, fds))
|
||||
if (umoven_or_printaddr(tcp, addr, fdsize, fds))
|
||||
continue;
|
||||
tprints("[");
|
||||
for (j = 0, sep = "";; j++) {
|
||||
@ -146,8 +146,8 @@ decode_select(struct tcb *tcp, long *args,
|
||||
for (i = 0; i < 3 && ready_fds > 0; i++) {
|
||||
int first = 1;
|
||||
|
||||
arg = args[i+1];
|
||||
if (!arg || !fds || umoven(tcp, arg, fdsize, fds) < 0)
|
||||
addr = args[i+1];
|
||||
if (!addr || !fds || umoven(tcp, addr, fdsize, fds) < 0)
|
||||
continue;
|
||||
for (j = 0;; j++) {
|
||||
j = next_set_bit(fds, j, nfds);
|
||||
@ -192,26 +192,26 @@ decode_select(struct tcb *tcp, long *args,
|
||||
|
||||
SYS_FUNC(oldselect)
|
||||
{
|
||||
long long_args[5];
|
||||
#undef oldselect_args
|
||||
#if SIZEOF_LONG == 4
|
||||
# define oldselect_args long_args
|
||||
#else
|
||||
kernel_ulong_t select_args[5];
|
||||
unsigned int oldselect_args[5];
|
||||
unsigned int i;
|
||||
#endif
|
||||
|
||||
if (umove(tcp, tcp->u_arg[0], &oldselect_args) < 0) {
|
||||
printaddr(tcp->u_arg[0]);
|
||||
return 0;
|
||||
if (sizeof(*select_args) == sizeof(*oldselect_args)) {
|
||||
if (umove_or_printaddr(tcp, tcp->u_arg[0], &select_args)) {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
unsigned int i;
|
||||
|
||||
if (umove_or_printaddr(tcp, tcp->u_arg[0], &oldselect_args)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < 5; ++i) {
|
||||
select_args[i] = oldselect_args[i];
|
||||
}
|
||||
}
|
||||
#ifndef oldselect_args
|
||||
for (i = 0; i < 5; i++) {
|
||||
long_args[i] = oldselect_args[i];
|
||||
}
|
||||
#endif
|
||||
return decode_select(tcp, long_args, print_timeval, sprint_timeval);
|
||||
#undef oldselect_args
|
||||
|
||||
return decode_select(tcp, select_args, print_timeval, sprint_timeval);
|
||||
}
|
||||
|
||||
#ifdef ALPHA
|
||||
@ -226,27 +226,23 @@ SYS_FUNC(select)
|
||||
return decode_select(tcp, tcp->u_arg, print_timeval, sprint_timeval);
|
||||
}
|
||||
|
||||
#include "kernel_types.h"
|
||||
|
||||
static int
|
||||
umove_kulong_array_or_printaddr(struct tcb *tcp, const long addr,
|
||||
kernel_ulong_t *ptr, size_t n)
|
||||
umove_kulong_array_or_printaddr(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
kernel_ulong_t *const ptr, const size_t n)
|
||||
{
|
||||
#if defined X86_64 || defined X32
|
||||
if (current_personality == 1) {
|
||||
#else
|
||||
if (current_wordsize < sizeof(*ptr)) {
|
||||
#endif
|
||||
#ifndef current_klongsize
|
||||
if (current_klongsize < sizeof(*ptr)) {
|
||||
uint32_t ptr32[n];
|
||||
int r = umove_or_printaddr(tcp, addr, &ptr32);
|
||||
if (!r) {
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < n; ++i)
|
||||
ptr[i] = (kernel_ulong_t) ptr32[i];
|
||||
ptr[i] = ptr32[i];
|
||||
}
|
||||
return r;
|
||||
}
|
||||
#endif /* !current_klongsize */
|
||||
return umoven_or_printaddr(tcp, addr, n * sizeof(*ptr), ptr);
|
||||
}
|
||||
|
||||
@ -260,10 +256,9 @@ SYS_FUNC(pselect6)
|
||||
if (!umove_kulong_array_or_printaddr(tcp, tcp->u_arg[5],
|
||||
data, ARRAY_SIZE(data))) {
|
||||
tprints("{");
|
||||
/* NB: kernel requires data[1] == NSIG / 8 */
|
||||
print_sigset_addr_len(tcp, (unsigned long) data[0],
|
||||
(unsigned long) data[1]);
|
||||
tprintf(", %llu}", (unsigned long long) data[1]);
|
||||
/* NB: kernel requires data[1] == NSIG_BYTES */
|
||||
print_sigset_addr_len(tcp, data[0], data[1]);
|
||||
tprintf(", %" PRI_klu "}", data[1]);
|
||||
}
|
||||
}
|
||||
|
||||
|
15
dirent.c
15
dirent.c
@ -33,14 +33,12 @@
|
||||
|
||||
#include DEF_MPERS_TYPE(kernel_dirent)
|
||||
|
||||
#include "kernel_types.h"
|
||||
|
||||
#include MPERS_DEFS
|
||||
|
||||
#define D_NAME_LEN_MAX 256
|
||||
|
||||
static void
|
||||
print_old_dirent(struct tcb *tcp, long addr)
|
||||
print_old_dirent(struct tcb *const tcp, const kernel_ulong_t addr)
|
||||
{
|
||||
kernel_dirent d;
|
||||
|
||||
@ -48,8 +46,8 @@ print_old_dirent(struct tcb *tcp, long addr)
|
||||
return;
|
||||
|
||||
tprintf("{d_ino=%llu, d_off=%llu, d_reclen=%u, d_name=",
|
||||
widen_to_ull(d.d_ino),
|
||||
widen_to_ull(d.d_off), d.d_reclen);
|
||||
zero_extend_signed_to_ull(d.d_ino),
|
||||
zero_extend_signed_to_ull(d.d_off), d.d_reclen);
|
||||
if (d.d_reclen > D_NAME_LEN_MAX)
|
||||
d.d_reclen = D_NAME_LEN_MAX;
|
||||
printpathn(tcp, addr + offsetof(kernel_dirent, d_name), d.d_reclen);
|
||||
@ -68,7 +66,7 @@ SYS_FUNC(readdir)
|
||||
print_old_dirent(tcp, tcp->u_arg[1]);
|
||||
/* Not much point in printing this out, it is always 1. */
|
||||
if (tcp->u_arg[2] != 1)
|
||||
tprintf(", %lu", tcp->u_arg[2]);
|
||||
tprintf(", %" PRI_klu, tcp->u_arg[2]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -127,8 +125,9 @@ SYS_FUNC(getdents)
|
||||
|
||||
tprintf("%s{d_ino=%llu, d_off=%llu, d_reclen=%u"
|
||||
", d_name=", i ? ", " : "",
|
||||
widen_to_ull(d->d_ino),
|
||||
widen_to_ull(d->d_off), d->d_reclen);
|
||||
zero_extend_signed_to_ull(d->d_ino),
|
||||
zero_extend_signed_to_ull(d->d_off),
|
||||
d->d_reclen);
|
||||
|
||||
if (print_quoted_string(d->d_name, d_name_len,
|
||||
QUOTE_0_TERMINATED) > 0) {
|
||||
|
587
dm.c
Normal file
587
dm.c
Normal file
@ -0,0 +1,587 @@
|
||||
/*
|
||||
* Support for decoding of DM_* ioctl commands.
|
||||
*
|
||||
* Copyright (c) 2016 Mikulas Patocka <mpatocka@redhat.com>
|
||||
* Copyright (c) 2016 Masatake Yamato <yamato@redhat.com>
|
||||
* Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* Copyright (c) 2016 Eugene Syromyatnikov <evgsyr@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
#ifdef HAVE_LINUX_DM_IOCTL_H
|
||||
|
||||
# include <linux/dm-ioctl.h>
|
||||
# include <linux/ioctl.h>
|
||||
|
||||
# if DM_VERSION_MAJOR == 4
|
||||
|
||||
/* Definitions for command which have been added later */
|
||||
|
||||
# ifndef DM_LIST_VERSIONS
|
||||
# define DM_LIST_VERSIONS _IOWR(DM_IOCTL, 0xd, struct dm_ioctl)
|
||||
# endif
|
||||
# ifndef DM_TARGET_MSG
|
||||
# define DM_TARGET_MSG _IOWR(DM_IOCTL, 0xe, struct dm_ioctl)
|
||||
# endif
|
||||
# ifndef DM_DEV_SET_GEOMETRY
|
||||
# define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, 0xf, struct dm_ioctl)
|
||||
# endif
|
||||
|
||||
|
||||
static void
|
||||
dm_decode_device(const unsigned int code, const struct dm_ioctl *ioc)
|
||||
{
|
||||
switch (code) {
|
||||
case DM_REMOVE_ALL:
|
||||
case DM_LIST_DEVICES:
|
||||
case DM_LIST_VERSIONS:
|
||||
break;
|
||||
default:
|
||||
if (ioc->dev) {
|
||||
tprints(", dev=");
|
||||
print_dev_t(ioc->dev);
|
||||
}
|
||||
if (ioc->name[0]) {
|
||||
tprints(", name=");
|
||||
print_quoted_string(ioc->name, DM_NAME_LEN,
|
||||
QUOTE_0_TERMINATED);
|
||||
}
|
||||
if (ioc->uuid[0]) {
|
||||
tprints(", uuid=");
|
||||
print_quoted_string(ioc->uuid, DM_UUID_LEN,
|
||||
QUOTE_0_TERMINATED);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dm_decode_values(struct tcb *tcp, const unsigned int code,
|
||||
const struct dm_ioctl *ioc)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
switch (code) {
|
||||
case DM_TABLE_LOAD:
|
||||
tprintf(", target_count=%" PRIu32,
|
||||
ioc->target_count);
|
||||
break;
|
||||
case DM_DEV_SUSPEND:
|
||||
if (ioc->flags & DM_SUSPEND_FLAG)
|
||||
break;
|
||||
/* Fall through */
|
||||
case DM_DEV_RENAME:
|
||||
case DM_DEV_REMOVE:
|
||||
case DM_DEV_WAIT:
|
||||
tprintf(", event_nr=%" PRIu32,
|
||||
ioc->event_nr);
|
||||
break;
|
||||
}
|
||||
} else if (!syserror(tcp)) {
|
||||
switch (code) {
|
||||
case DM_DEV_CREATE:
|
||||
case DM_DEV_RENAME:
|
||||
case DM_DEV_SUSPEND:
|
||||
case DM_DEV_STATUS:
|
||||
case DM_DEV_WAIT:
|
||||
case DM_TABLE_LOAD:
|
||||
case DM_TABLE_CLEAR:
|
||||
case DM_TABLE_DEPS:
|
||||
case DM_TABLE_STATUS:
|
||||
case DM_TARGET_MSG:
|
||||
tprintf(", target_count=%" PRIu32,
|
||||
ioc->target_count);
|
||||
tprintf(", open_count=%" PRIu32,
|
||||
ioc->open_count);
|
||||
tprintf(", event_nr=%" PRIu32,
|
||||
ioc->event_nr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#include "xlat/dm_flags.h"
|
||||
|
||||
static void
|
||||
dm_decode_flags(const struct dm_ioctl *ioc)
|
||||
{
|
||||
tprints(", flags=");
|
||||
printflags(dm_flags, ioc->flags, "DM_???");
|
||||
}
|
||||
|
||||
static void
|
||||
dm_decode_dm_target_spec(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
const struct dm_ioctl *const ioc)
|
||||
{
|
||||
static const uint32_t target_spec_size =
|
||||
sizeof(struct dm_target_spec);
|
||||
uint32_t i;
|
||||
uint32_t offset = ioc->data_start;
|
||||
uint32_t offset_end;
|
||||
|
||||
if (abbrev(tcp)) {
|
||||
if (ioc->target_count)
|
||||
tprints(", ...");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < ioc->target_count; i++) {
|
||||
struct dm_target_spec s;
|
||||
|
||||
offset_end = offset + target_spec_size;
|
||||
|
||||
if (offset_end <= offset || offset_end > ioc->data_size)
|
||||
goto misplaced;
|
||||
|
||||
tprints(", ");
|
||||
|
||||
if (i >= max_strlen) {
|
||||
tprints("...");
|
||||
break;
|
||||
}
|
||||
|
||||
if (umove_or_printaddr(tcp, addr + offset, &s))
|
||||
break;
|
||||
|
||||
tprintf("{sector_start=%" PRI__u64 ", length=%" PRI__u64,
|
||||
s.sector_start, s.length);
|
||||
|
||||
if (exiting(tcp))
|
||||
tprintf(", status=%" PRId32, s.status);
|
||||
|
||||
tprints(", target_type=");
|
||||
print_quoted_string(s.target_type, DM_MAX_TYPE_NAME,
|
||||
QUOTE_0_TERMINATED);
|
||||
|
||||
tprints(", string=");
|
||||
printstr_ex(tcp, addr + offset_end, ioc->data_size - offset_end,
|
||||
QUOTE_0_TERMINATED);
|
||||
tprintf("}");
|
||||
|
||||
if (entering(tcp))
|
||||
offset += s.next;
|
||||
else
|
||||
offset = ioc->data_start + s.next;
|
||||
|
||||
if (offset <= offset_end)
|
||||
goto misplaced;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
misplaced:
|
||||
tprints(", /* misplaced struct dm_target_spec */ ...");
|
||||
}
|
||||
|
||||
bool
|
||||
dm_print_dev(struct tcb *tcp, void *dev_ptr, size_t dev_size, void *dummy)
|
||||
{
|
||||
uint64_t *dev = (uint64_t *) dev_ptr;
|
||||
|
||||
print_dev_t(*dev);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
dm_decode_dm_target_deps(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
const struct dm_ioctl *const ioc)
|
||||
{
|
||||
static const uint32_t target_deps_dev_offs =
|
||||
offsetof(struct dm_target_deps, dev);
|
||||
uint64_t dev_buf;
|
||||
struct dm_target_deps s;
|
||||
uint32_t offset = ioc->data_start;
|
||||
uint32_t offset_end = offset + target_deps_dev_offs;
|
||||
uint32_t space;
|
||||
|
||||
if (abbrev(tcp)) {
|
||||
tprints(", ...");
|
||||
return;
|
||||
}
|
||||
|
||||
tprints(", ");
|
||||
|
||||
if (offset_end <= offset || offset_end > ioc->data_size)
|
||||
goto misplaced;
|
||||
|
||||
if (umove_or_printaddr(tcp, addr + offset, &s))
|
||||
return;
|
||||
|
||||
space = (ioc->data_size - offset_end) / sizeof(dev_buf);
|
||||
|
||||
if (s.count > space)
|
||||
goto misplaced;
|
||||
|
||||
tprintf("{count=%u, deps=", s.count);
|
||||
|
||||
print_array(tcp, addr + offset_end, s.count, &dev_buf, sizeof(dev_buf),
|
||||
umoven_or_printaddr, dm_print_dev, NULL);
|
||||
|
||||
tprints("}");
|
||||
|
||||
return;
|
||||
|
||||
misplaced:
|
||||
tprints("/* misplaced struct dm_target_deps */ ...");
|
||||
}
|
||||
|
||||
static void
|
||||
dm_decode_dm_name_list(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
const struct dm_ioctl *const ioc)
|
||||
{
|
||||
static const uint32_t name_list_name_offs =
|
||||
offsetof(struct dm_name_list, name);
|
||||
struct dm_name_list s;
|
||||
uint32_t offset = ioc->data_start;
|
||||
uint32_t offset_end;
|
||||
uint32_t count;
|
||||
|
||||
if (abbrev(tcp)) {
|
||||
tprints(", ...");
|
||||
return;
|
||||
}
|
||||
|
||||
for (count = 0;; count++) {
|
||||
offset_end = offset + name_list_name_offs;
|
||||
|
||||
if (offset_end <= offset || offset_end > ioc->data_size)
|
||||
goto misplaced;
|
||||
|
||||
tprints(", ");
|
||||
|
||||
if (count >= max_strlen) {
|
||||
tprints("...");
|
||||
break;
|
||||
}
|
||||
|
||||
if (umove_or_printaddr(tcp, addr + offset, &s))
|
||||
break;
|
||||
if (!count && !s.dev) {
|
||||
tprints("/* no devices present */");
|
||||
break;
|
||||
}
|
||||
|
||||
tprints("{dev=");
|
||||
print_dev_t(s.dev);
|
||||
|
||||
tprints("name=");
|
||||
printstr_ex(tcp, addr + offset_end, ioc->data_size - offset_end,
|
||||
QUOTE_0_TERMINATED);
|
||||
tprints("}");
|
||||
|
||||
if (!s.next)
|
||||
break;
|
||||
|
||||
offset += s.next;
|
||||
if (offset <= offset_end)
|
||||
goto misplaced;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
misplaced:
|
||||
tprints(", /* misplaced struct dm_name_list */ ...");
|
||||
}
|
||||
|
||||
static void
|
||||
dm_decode_dm_target_versions(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
const struct dm_ioctl *const ioc)
|
||||
{
|
||||
static const uint32_t target_vers_name_offs =
|
||||
offsetof(struct dm_target_versions, name);
|
||||
struct dm_target_versions s;
|
||||
uint32_t offset = ioc->data_start;
|
||||
uint32_t offset_end;
|
||||
uint32_t count;
|
||||
|
||||
if (abbrev(tcp)) {
|
||||
tprints(", ...");
|
||||
return;
|
||||
}
|
||||
|
||||
for (count = 0;; count++) {
|
||||
offset_end = offset + target_vers_name_offs;
|
||||
|
||||
if (offset_end <= offset || offset_end > ioc->data_size)
|
||||
goto misplaced;
|
||||
|
||||
tprints(", ");
|
||||
|
||||
if (count >= max_strlen) {
|
||||
tprints("...");
|
||||
break;
|
||||
}
|
||||
|
||||
if (umove_or_printaddr(tcp, addr + offset, &s))
|
||||
break;
|
||||
|
||||
tprints("{name=");
|
||||
printstr_ex(tcp, addr + offset_end, ioc->data_size - offset_end,
|
||||
QUOTE_0_TERMINATED);
|
||||
tprintf(", version=%" PRIu32 ".%" PRIu32 ".%" PRIu32 "}",
|
||||
s.version[0], s.version[1], s.version[2]);
|
||||
|
||||
if (!s.next)
|
||||
break;
|
||||
|
||||
offset += s.next;
|
||||
if (offset <= offset_end)
|
||||
goto misplaced;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
misplaced:
|
||||
tprints(", /* misplaced struct dm_target_versions */ ...");
|
||||
}
|
||||
|
||||
static void
|
||||
dm_decode_dm_target_msg(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
const struct dm_ioctl *const ioc)
|
||||
{
|
||||
static const uint32_t target_msg_message_offs =
|
||||
offsetof(struct dm_target_msg, message);
|
||||
uint32_t offset = ioc->data_start;
|
||||
uint32_t offset_end = offset + target_msg_message_offs;
|
||||
|
||||
if (abbrev(tcp)) {
|
||||
tprints(", ...");
|
||||
return;
|
||||
}
|
||||
|
||||
if (offset_end > offset && offset_end <= ioc->data_size) {
|
||||
struct dm_target_msg s;
|
||||
|
||||
tprints(", ");
|
||||
|
||||
if (umove_or_printaddr(tcp, addr + offset, &s))
|
||||
return;
|
||||
|
||||
tprintf("{sector=%" PRI__u64 ", message=", s.sector);
|
||||
printstr_ex(tcp, addr + offset_end, ioc->data_size - offset_end,
|
||||
QUOTE_0_TERMINATED);
|
||||
tprints("}");
|
||||
} else {
|
||||
tprints(", /* misplaced struct dm_target_msg */");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dm_decode_string(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
const struct dm_ioctl *const ioc)
|
||||
{
|
||||
uint32_t offset = ioc->data_start;
|
||||
|
||||
if (abbrev(tcp)) {
|
||||
tprints(", ...");
|
||||
return;
|
||||
}
|
||||
|
||||
if (offset < ioc->data_size) {
|
||||
tprints(", string=");
|
||||
printstr_ex(tcp, addr + offset, ioc->data_size - offset,
|
||||
QUOTE_0_TERMINATED);
|
||||
} else {
|
||||
tprints(", /* misplaced string */");
|
||||
}
|
||||
}
|
||||
|
||||
static inline bool
|
||||
dm_ioctl_has_params(const unsigned int code)
|
||||
{
|
||||
switch (code) {
|
||||
case DM_VERSION:
|
||||
case DM_REMOVE_ALL:
|
||||
case DM_DEV_CREATE:
|
||||
case DM_DEV_REMOVE:
|
||||
case DM_DEV_SUSPEND:
|
||||
case DM_DEV_STATUS:
|
||||
case DM_TABLE_CLEAR:
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static int
|
||||
dm_known_ioctl(struct tcb *const tcp, const unsigned int code,
|
||||
const kernel_ulong_t arg)
|
||||
{
|
||||
struct dm_ioctl *ioc = NULL;
|
||||
struct dm_ioctl *entering_ioc = NULL;
|
||||
bool ioc_changed = false;
|
||||
|
||||
if (entering(tcp)) {
|
||||
ioc = malloc(sizeof(*ioc));
|
||||
if (!ioc)
|
||||
return 0;
|
||||
} else {
|
||||
ioc = alloca(sizeof(*ioc));
|
||||
}
|
||||
|
||||
if ((umoven(tcp, arg, offsetof(struct dm_ioctl, data), ioc) < 0) ||
|
||||
(ioc->data_size < offsetof(struct dm_ioctl, data_size))) {
|
||||
if (entering(tcp))
|
||||
free(ioc);
|
||||
return 0;
|
||||
}
|
||||
if (entering(tcp))
|
||||
set_tcb_priv_data(tcp, ioc, free);
|
||||
else {
|
||||
entering_ioc = get_tcb_priv_data(tcp);
|
||||
|
||||
/*
|
||||
* retrieve_status, __dev_status called only in case of success,
|
||||
* so it looks like there's no need to check open_count,
|
||||
* event_nr, target_count, dev fields for change (they are
|
||||
* printed only in case of absence of errors).
|
||||
*/
|
||||
if (!entering_ioc ||
|
||||
(ioc->version[0] != entering_ioc->version[0]) ||
|
||||
(ioc->version[1] != entering_ioc->version[1]) ||
|
||||
(ioc->version[2] != entering_ioc->version[2]) ||
|
||||
(ioc->data_size != entering_ioc->data_size) ||
|
||||
(ioc->data_start != entering_ioc->data_start) ||
|
||||
(ioc->flags != entering_ioc->flags))
|
||||
ioc_changed = true;
|
||||
}
|
||||
|
||||
if (exiting(tcp) && syserror(tcp) && !ioc_changed)
|
||||
return 1;
|
||||
|
||||
/*
|
||||
* device mapper code uses %d in some places and %u in another, but
|
||||
* fields themselves are declared as __u32.
|
||||
*/
|
||||
tprintf("%s{version=%u.%u.%u", entering(tcp) ? ", " : " => ",
|
||||
ioc->version[0], ioc->version[1], ioc->version[2]);
|
||||
/*
|
||||
* if we use a different version of ABI, do not attempt to decode
|
||||
* ioctl fields
|
||||
*/
|
||||
if (ioc->version[0] != DM_VERSION_MAJOR) {
|
||||
tprints(", /* Unsupported device mapper ABI version */ ...");
|
||||
goto skip;
|
||||
}
|
||||
|
||||
tprintf(", data_size=%u", ioc->data_size);
|
||||
|
||||
if (dm_ioctl_has_params(code))
|
||||
tprintf(", data_start=%u", ioc->data_start);
|
||||
|
||||
if (ioc->data_size < offsetof(struct dm_ioctl, data)) {
|
||||
tprints(", /* Incorrect data_size */ ...");
|
||||
goto skip;
|
||||
}
|
||||
|
||||
dm_decode_device(code, ioc);
|
||||
dm_decode_values(tcp, code, ioc);
|
||||
dm_decode_flags(ioc);
|
||||
|
||||
switch (code) {
|
||||
case DM_DEV_WAIT:
|
||||
case DM_TABLE_STATUS:
|
||||
if (entering(tcp) || syserror(tcp))
|
||||
break;
|
||||
dm_decode_dm_target_spec(tcp, arg, ioc);
|
||||
break;
|
||||
case DM_TABLE_LOAD:
|
||||
if (exiting(tcp))
|
||||
break;
|
||||
dm_decode_dm_target_spec(tcp, arg, ioc);
|
||||
break;
|
||||
case DM_TABLE_DEPS:
|
||||
if (entering(tcp) || syserror(tcp))
|
||||
break;
|
||||
dm_decode_dm_target_deps(tcp, arg, ioc);
|
||||
break;
|
||||
case DM_LIST_DEVICES:
|
||||
if (entering(tcp) || syserror(tcp))
|
||||
break;
|
||||
dm_decode_dm_name_list(tcp, arg, ioc);
|
||||
break;
|
||||
case DM_LIST_VERSIONS:
|
||||
if (entering(tcp) || syserror(tcp))
|
||||
break;
|
||||
dm_decode_dm_target_versions(tcp, arg, ioc);
|
||||
break;
|
||||
case DM_TARGET_MSG:
|
||||
if (entering(tcp))
|
||||
dm_decode_dm_target_msg(tcp, arg, ioc);
|
||||
else if (!syserror(tcp) && ioc->flags & DM_DATA_OUT_FLAG)
|
||||
dm_decode_string(tcp, arg, ioc);
|
||||
break;
|
||||
case DM_DEV_RENAME:
|
||||
case DM_DEV_SET_GEOMETRY:
|
||||
if (exiting(tcp))
|
||||
break;
|
||||
dm_decode_string(tcp, arg, ioc);
|
||||
break;
|
||||
}
|
||||
|
||||
skip:
|
||||
tprints("}");
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
dm_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg)
|
||||
{
|
||||
switch (code) {
|
||||
case DM_VERSION:
|
||||
case DM_REMOVE_ALL:
|
||||
case DM_LIST_DEVICES:
|
||||
case DM_DEV_CREATE:
|
||||
case DM_DEV_REMOVE:
|
||||
case DM_DEV_RENAME:
|
||||
case DM_DEV_SUSPEND:
|
||||
case DM_DEV_STATUS:
|
||||
case DM_DEV_WAIT:
|
||||
case DM_TABLE_LOAD:
|
||||
case DM_TABLE_CLEAR:
|
||||
case DM_TABLE_DEPS:
|
||||
case DM_TABLE_STATUS:
|
||||
case DM_LIST_VERSIONS:
|
||||
case DM_TARGET_MSG:
|
||||
case DM_DEV_SET_GEOMETRY:
|
||||
return dm_known_ioctl(tcp, code, arg);
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
# else /* !(DM_VERSION_MAJOR == 4) */
|
||||
|
||||
int
|
||||
dm_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
# endif /* DM_VERSION_MAJOR == 4 */
|
||||
#endif /* HAVE_LINUX_DM_IOCTL_H */
|
4
epoll.c
4
epoll.c
@ -109,9 +109,9 @@ SYS_FUNC(epoll_pwait)
|
||||
epoll_wait_common(tcp);
|
||||
if (exiting(tcp)) {
|
||||
tprints(", ");
|
||||
/* NB: kernel requires arg[5] == NSIG / 8 */
|
||||
/* NB: kernel requires arg[5] == NSIG_BYTES */
|
||||
print_sigset_addr_len(tcp, tcp->u_arg[4], tcp->u_arg[5]);
|
||||
tprintf(", %lu", tcp->u_arg[5]);
|
||||
tprintf(", %" PRI_klu, tcp->u_arg[5]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
43
evdev.c
43
evdev.c
@ -37,7 +37,7 @@
|
||||
|
||||
typedef struct ff_effect struct_ff_effect;
|
||||
|
||||
#endif /* HAVE_LINUX_BTRFS_H */
|
||||
#endif /* HAVE_LINUX_INPUT_H */
|
||||
|
||||
#include MPERS_DEFS
|
||||
|
||||
@ -76,7 +76,7 @@ decode_envelope(void *const data)
|
||||
}
|
||||
|
||||
static int
|
||||
ff_effect_ioctl(struct tcb *tcp, long arg)
|
||||
ff_effect_ioctl(struct tcb *const tcp, const kernel_ulong_t arg)
|
||||
{
|
||||
tprints(", ");
|
||||
|
||||
@ -135,7 +135,7 @@ ff_effect_ioctl(struct tcb *tcp, long arg)
|
||||
decode_envelope(&ffe.u.periodic.envelope);
|
||||
tprintf(", custom_len=%u, custom_data=",
|
||||
ffe.u.periodic.custom_len);
|
||||
printaddr((unsigned long) ffe.u.periodic.custom_data);
|
||||
printaddr(ptr_to_kulong(ffe.u.periodic.custom_data));
|
||||
tprints("}");
|
||||
break;
|
||||
case FF_RUMBLE:
|
||||
@ -154,7 +154,7 @@ ff_effect_ioctl(struct tcb *tcp, long arg)
|
||||
}
|
||||
|
||||
static int
|
||||
abs_ioctl(struct tcb *tcp, long arg)
|
||||
abs_ioctl(struct tcb *const tcp, const kernel_ulong_t arg)
|
||||
{
|
||||
tprints(", ");
|
||||
|
||||
@ -188,7 +188,7 @@ abs_ioctl(struct tcb *tcp, long arg)
|
||||
}
|
||||
|
||||
static int
|
||||
keycode_ioctl(struct tcb *tcp, long arg)
|
||||
keycode_ioctl(struct tcb *const tcp, const kernel_ulong_t arg)
|
||||
{
|
||||
tprints(", ");
|
||||
|
||||
@ -205,7 +205,7 @@ keycode_ioctl(struct tcb *tcp, long arg)
|
||||
|
||||
# ifdef EVIOCGKEYCODE_V2
|
||||
static int
|
||||
keycode_V2_ioctl(struct tcb *tcp, long arg)
|
||||
keycode_V2_ioctl(struct tcb *const tcp, const kernel_ulong_t arg)
|
||||
{
|
||||
tprints(", ");
|
||||
|
||||
@ -242,7 +242,7 @@ keycode_V2_ioctl(struct tcb *tcp, long arg)
|
||||
# endif /* EVIOCGKEYCODE_V2 */
|
||||
|
||||
static int
|
||||
getid_ioctl(struct tcb *tcp, long arg)
|
||||
getid_ioctl(struct tcb *const tcp, const kernel_ulong_t arg)
|
||||
{
|
||||
tprints(", ");
|
||||
|
||||
@ -262,13 +262,14 @@ getid_ioctl(struct tcb *tcp, long arg)
|
||||
}
|
||||
|
||||
static int
|
||||
decode_bitset(struct tcb *tcp, long arg, const struct xlat decode_nr[],
|
||||
const unsigned int max_nr, const char *dflt)
|
||||
decode_bitset(struct tcb *const tcp, const kernel_ulong_t arg,
|
||||
const struct xlat decode_nr[], const unsigned int max_nr,
|
||||
const char *const dflt)
|
||||
{
|
||||
tprints(", ");
|
||||
|
||||
unsigned int size;
|
||||
if ((unsigned long) tcp->u_rval > max_nr)
|
||||
if ((kernel_ulong_t) tcp->u_rval > max_nr)
|
||||
size = max_nr;
|
||||
else
|
||||
size = tcp->u_rval;
|
||||
@ -304,7 +305,8 @@ decode_bitset(struct tcb *tcp, long arg, const struct xlat decode_nr[],
|
||||
|
||||
# ifdef EVIOCGMTSLOTS
|
||||
static int
|
||||
mtslots_ioctl(struct tcb *tcp, const unsigned int code, long arg)
|
||||
mtslots_ioctl(struct tcb *const tcp, const unsigned int code,
|
||||
const kernel_ulong_t arg)
|
||||
{
|
||||
tprints(", ");
|
||||
|
||||
@ -336,7 +338,7 @@ mtslots_ioctl(struct tcb *tcp, const unsigned int code, long arg)
|
||||
|
||||
# if defined EVIOCGREP || defined EVIOCSREP
|
||||
static int
|
||||
repeat_ioctl(struct tcb *tcp, long arg)
|
||||
repeat_ioctl(struct tcb *const tcp, const kernel_ulong_t arg)
|
||||
{
|
||||
tprints(", ");
|
||||
printpair_int(tcp, arg, "%u");
|
||||
@ -345,7 +347,8 @@ repeat_ioctl(struct tcb *tcp, long arg)
|
||||
# endif /* EVIOCGREP || EVIOCSREP */
|
||||
|
||||
static int
|
||||
bit_ioctl(struct tcb *tcp, const unsigned int ev_nr, const long arg)
|
||||
bit_ioctl(struct tcb *const tcp, const unsigned int ev_nr,
|
||||
const kernel_ulong_t arg)
|
||||
{
|
||||
switch (ev_nr) {
|
||||
case EV_SYN:
|
||||
@ -395,7 +398,8 @@ bit_ioctl(struct tcb *tcp, const unsigned int ev_nr, const long arg)
|
||||
}
|
||||
|
||||
static int
|
||||
evdev_read_ioctl(struct tcb *tcp, const unsigned int code, const long arg)
|
||||
evdev_read_ioctl(struct tcb *const tcp, const unsigned int code,
|
||||
const kernel_ulong_t arg)
|
||||
{
|
||||
/* fixed-number fixed-length commands */
|
||||
switch (code) {
|
||||
@ -434,7 +438,7 @@ evdev_read_ioctl(struct tcb *tcp, const unsigned int code, const long arg)
|
||||
if (syserror(tcp))
|
||||
printaddr(arg);
|
||||
else
|
||||
printstr(tcp, arg, tcp->u_rval);
|
||||
printstrn(tcp, arg, tcp->u_rval);
|
||||
return 1;
|
||||
# ifdef EVIOCGPROP
|
||||
case _IOC_NR(EVIOCGPROP(0)):
|
||||
@ -469,7 +473,8 @@ evdev_read_ioctl(struct tcb *tcp, const unsigned int code, const long arg)
|
||||
}
|
||||
|
||||
static int
|
||||
evdev_write_ioctl(struct tcb *tcp, const unsigned int code, const long arg)
|
||||
evdev_write_ioctl(struct tcb *const tcp, const unsigned int code,
|
||||
const kernel_ulong_t arg)
|
||||
{
|
||||
/* fixed-number fixed-length commands */
|
||||
switch (code) {
|
||||
@ -492,7 +497,7 @@ evdev_write_ioctl(struct tcb *tcp, const unsigned int code, const long arg)
|
||||
# ifdef EVIOCREVOKE
|
||||
case EVIOCREVOKE:
|
||||
# endif
|
||||
tprintf(", %lu", arg);
|
||||
tprintf(", %" PRI_klu, arg);
|
||||
return 1;
|
||||
# ifdef EVIOCSCLOCKID
|
||||
case EVIOCSCLOCKID:
|
||||
@ -509,8 +514,8 @@ evdev_write_ioctl(struct tcb *tcp, const unsigned int code, const long arg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
MPERS_PRINTER_DECL(int, evdev_ioctl, struct tcb *tcp,
|
||||
const unsigned int code, const long arg)
|
||||
MPERS_PRINTER_DECL(int, evdev_ioctl, struct tcb *const tcp,
|
||||
const unsigned int code, const kernel_ulong_t arg)
|
||||
{
|
||||
switch(_IOC_DIR(code)) {
|
||||
case _IOC_READ:
|
||||
|
10
execve.c
10
execve.c
@ -34,7 +34,7 @@
|
||||
#include "defs.h"
|
||||
|
||||
static void
|
||||
printargv(struct tcb *tcp, long addr)
|
||||
printargv(struct tcb *const tcp, kernel_ulong_t addr)
|
||||
{
|
||||
if (!addr || !verbose(tcp)) {
|
||||
printaddr(addr);
|
||||
@ -49,8 +49,8 @@ printargv(struct tcb *tcp, long addr)
|
||||
for (n = 0; addr; sep = ", ", addr += wordsize, ++n) {
|
||||
union {
|
||||
unsigned int p32;
|
||||
unsigned long p64;
|
||||
char data[sizeof(long)];
|
||||
kernel_ulong_t p64;
|
||||
char data[sizeof(kernel_ulong_t)];
|
||||
} cp;
|
||||
|
||||
if (umoven(tcp, addr, wordsize, cp.data)) {
|
||||
@ -70,13 +70,13 @@ printargv(struct tcb *tcp, long addr)
|
||||
break;
|
||||
}
|
||||
tprints(sep);
|
||||
printstr(tcp, wordsize < sizeof(cp.p64) ? cp.p32 : cp.p64, -1);
|
||||
printstr(tcp, wordsize < sizeof(cp.p64) ? cp.p32 : cp.p64);
|
||||
}
|
||||
tprints("]");
|
||||
}
|
||||
|
||||
static void
|
||||
printargc(struct tcb *tcp, long addr)
|
||||
printargc(struct tcb *const tcp, kernel_ulong_t addr)
|
||||
{
|
||||
if (!addr || !verbose(tcp)) {
|
||||
printaddr(addr);
|
||||
|
15
exit.c
15
exit.c
@ -1,15 +0,0 @@
|
||||
#include "defs.h"
|
||||
|
||||
SYS_FUNC(exit)
|
||||
{
|
||||
if (exiting(tcp)) {
|
||||
error_msg("_exit returned!");
|
||||
return -1;
|
||||
}
|
||||
/* special case: we stop tracing this process, finish line now */
|
||||
tprintf("%ld) ", tcp->u_arg[0]);
|
||||
tabto();
|
||||
tprints("= ?\n");
|
||||
line_ended();
|
||||
return 0;
|
||||
}
|
@ -42,7 +42,7 @@ SYS_FUNC(fadvise64)
|
||||
|
||||
printfd(tcp, tcp->u_arg[0]);
|
||||
argn = printllval(tcp, ", %lld", 1);
|
||||
tprintf(", %ld, ", tcp->u_arg[argn++]);
|
||||
tprintf(", %" PRI_klu ", ", tcp->u_arg[argn++]);
|
||||
printxval(advise, tcp->u_arg[argn], "POSIX_FADV_???");
|
||||
|
||||
return RVAL_DECODED;
|
||||
|
@ -19,10 +19,10 @@ SYS_FUNC(fallocate)
|
||||
tprints(", ");
|
||||
|
||||
/* offset */
|
||||
argn = printllval(tcp, "%llu, ", 2);
|
||||
argn = printllval(tcp, "%lld, ", 2);
|
||||
|
||||
/* len */
|
||||
printllval(tcp, "%llu", argn);
|
||||
printllval(tcp, "%lld", argn);
|
||||
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
|
28
fcntl.c
28
fcntl.c
@ -46,15 +46,15 @@ print_struct_flock64(const struct_kernel_flock64 *fl, const int getlk)
|
||||
printxval(lockfcmds, (unsigned short) fl->l_type, "F_???");
|
||||
tprints(", l_whence=");
|
||||
printxval(whence_codes, (unsigned short) fl->l_whence, "SEEK_???");
|
||||
tprintf(", l_start=%lld, l_len=%lld",
|
||||
(long long) fl->l_start, (long long) fl->l_len);
|
||||
tprintf(", l_start=%" PRId64 ", l_len=%" PRId64,
|
||||
(int64_t) fl->l_start, (int64_t) fl->l_len);
|
||||
if (getlk)
|
||||
tprintf(", l_pid=%lu", (unsigned long) fl->l_pid);
|
||||
tprints("}");
|
||||
}
|
||||
|
||||
static void
|
||||
printflock64(struct tcb *tcp, const long addr, const int getlk)
|
||||
printflock64(struct tcb *const tcp, const kernel_ulong_t addr, const int getlk)
|
||||
{
|
||||
struct_kernel_flock64 fl;
|
||||
|
||||
@ -63,7 +63,7 @@ printflock64(struct tcb *tcp, const long addr, const int getlk)
|
||||
}
|
||||
|
||||
static void
|
||||
printflock(struct tcb *tcp, const long addr, const int getlk)
|
||||
printflock(struct tcb *const tcp, const kernel_ulong_t addr, const int getlk)
|
||||
{
|
||||
struct_kernel_flock64 fl;
|
||||
|
||||
@ -72,7 +72,7 @@ printflock(struct tcb *tcp, const long addr, const int getlk)
|
||||
}
|
||||
|
||||
static void
|
||||
print_f_owner_ex(struct tcb *tcp, const long addr)
|
||||
print_f_owner_ex(struct tcb *const tcp, const kernel_ulong_t addr)
|
||||
{
|
||||
struct { int type, pid; } owner;
|
||||
|
||||
@ -96,11 +96,11 @@ print_fcntl(struct tcb *tcp)
|
||||
break;
|
||||
case F_SETOWN:
|
||||
case F_SETPIPE_SZ:
|
||||
tprintf(", %ld", tcp->u_arg[2]);
|
||||
tprintf(", %" PRI_kld, tcp->u_arg[2]);
|
||||
break;
|
||||
case F_DUPFD:
|
||||
case F_DUPFD_CLOEXEC:
|
||||
tprintf(", %ld", tcp->u_arg[2]);
|
||||
tprintf(", %" PRI_kld, tcp->u_arg[2]);
|
||||
return RVAL_DECODED | RVAL_FD;
|
||||
case F_SETFL:
|
||||
tprints(", ");
|
||||
@ -122,15 +122,15 @@ print_fcntl(struct tcb *tcp)
|
||||
break;
|
||||
case F_NOTIFY:
|
||||
tprints(", ");
|
||||
printflags_long(notifyflags, tcp->u_arg[2], "DN_???");
|
||||
printflags64(notifyflags, tcp->u_arg[2], "DN_???");
|
||||
break;
|
||||
case F_SETLEASE:
|
||||
tprints(", ");
|
||||
printxval_long(lockfcmds, tcp->u_arg[2], "F_???");
|
||||
printxval64(lockfcmds, tcp->u_arg[2], "F_???");
|
||||
break;
|
||||
case F_ADD_SEALS:
|
||||
tprints(", ");
|
||||
printflags_long(f_seals, tcp->u_arg[2], "F_SEAL_???");
|
||||
printflags64(f_seals, tcp->u_arg[2], "F_SEAL_???");
|
||||
break;
|
||||
case F_SETSIG:
|
||||
tprints(", ");
|
||||
@ -143,7 +143,7 @@ print_fcntl(struct tcb *tcp)
|
||||
if (entering(tcp) || syserror(tcp) || tcp->u_rval == 0)
|
||||
return 0;
|
||||
tcp->auxstr = sprintflags("flags ", fdflags,
|
||||
(unsigned long) tcp->u_rval);
|
||||
(kernel_ulong_t) tcp->u_rval);
|
||||
return RVAL_HEX | RVAL_STR;
|
||||
case F_GETFL:
|
||||
if (entering(tcp) || syserror(tcp))
|
||||
@ -171,13 +171,13 @@ print_fcntl(struct tcb *tcp)
|
||||
case F_GETLEASE:
|
||||
if (entering(tcp) || syserror(tcp))
|
||||
return 0;
|
||||
tcp->auxstr = xlookup(lockfcmds, (unsigned long) tcp->u_rval);
|
||||
tcp->auxstr = xlookup(lockfcmds, (kernel_ulong_t) tcp->u_rval);
|
||||
return RVAL_HEX | RVAL_STR;
|
||||
case F_GET_SEALS:
|
||||
if (entering(tcp) || syserror(tcp) || tcp->u_rval == 0)
|
||||
return 0;
|
||||
tcp->auxstr = sprintflags("seals ", f_seals,
|
||||
(unsigned long) tcp->u_rval);
|
||||
(kernel_ulong_t) tcp->u_rval);
|
||||
return RVAL_HEX | RVAL_STR;
|
||||
case F_GETSIG:
|
||||
if (entering(tcp) || syserror(tcp) || tcp->u_rval == 0)
|
||||
@ -185,7 +185,7 @@ print_fcntl(struct tcb *tcp)
|
||||
tcp->auxstr = signame(tcp->u_rval);
|
||||
return RVAL_STR;
|
||||
default:
|
||||
tprintf(", %#lx", tcp->u_arg[2]);
|
||||
tprintf(", %#" PRI_klx, tcp->u_arg[2]);
|
||||
break;
|
||||
}
|
||||
return RVAL_DECODED;
|
||||
|
@ -34,8 +34,8 @@ typedef struct seccomp_fprog seccomp_fprog_t;
|
||||
|
||||
#include MPERS_DEFS
|
||||
|
||||
MPERS_PRINTER_DECL(bool, fetch_seccomp_fprog,
|
||||
struct tcb *tcp, const long addr, void *p)
|
||||
MPERS_PRINTER_DECL(bool, fetch_seccomp_fprog, struct tcb *const tcp,
|
||||
const kernel_ulong_t addr, void *const p)
|
||||
{
|
||||
struct seccomp_fprog *pfp = p;
|
||||
seccomp_fprog_t mfp;
|
||||
|
@ -51,8 +51,8 @@ typedef struct_kernel_flock64 struct_flock64;
|
||||
&& FLOCK_MEMBERS_EQ(type, l_len) \
|
||||
&& FLOCK_MEMBERS_EQ(type, l_pid))
|
||||
|
||||
MPERS_PRINTER_DECL(bool, fetch_struct_flock,
|
||||
struct tcb *tcp, const long addr, void *p)
|
||||
MPERS_PRINTER_DECL(bool, fetch_struct_flock, struct tcb *const tcp,
|
||||
const kernel_ulong_t addr, void *const p)
|
||||
{
|
||||
struct_kernel_flock64 *pfl = p;
|
||||
struct_flock mfl;
|
||||
@ -71,8 +71,8 @@ MPERS_PRINTER_DECL(bool, fetch_struct_flock,
|
||||
return true;
|
||||
}
|
||||
|
||||
MPERS_PRINTER_DECL(bool, fetch_struct_flock64,
|
||||
struct tcb *tcp, const long addr, void *p)
|
||||
MPERS_PRINTER_DECL(bool, fetch_struct_flock64, struct tcb *const tcp,
|
||||
const kernel_ulong_t addr, void *const p)
|
||||
{
|
||||
struct_kernel_flock64 *pfl = p;
|
||||
struct_flock64 mfl;
|
||||
|
@ -43,7 +43,8 @@ typedef struct mmsghdr struct_mmsghdr;
|
||||
*/
|
||||
|
||||
MPERS_PRINTER_DECL(int, fetch_struct_mmsghdr,
|
||||
struct tcb *tcp, const unsigned long addr, void *p)
|
||||
struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
void *const p)
|
||||
{
|
||||
struct mmsghdr *p_native = p;
|
||||
struct_mmsghdr v_compat;
|
||||
|
@ -43,9 +43,10 @@ typedef struct msghdr struct_msghdr;
|
||||
*/
|
||||
|
||||
MPERS_PRINTER_DECL(int, fetch_struct_msghdr,
|
||||
struct tcb *tcp, const unsigned long addr, void *p)
|
||||
struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
void *const p)
|
||||
{
|
||||
struct msghdr *p_native = p;
|
||||
struct msghdr *const p_native = p;
|
||||
struct_msghdr v_compat;
|
||||
|
||||
if (sizeof(*p_native) == sizeof(v_compat))
|
||||
|
102
fetch_struct_stat.c
Normal file
102
fetch_struct_stat.c
Normal file
@ -0,0 +1,102 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2016 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
#include DEF_MPERS_TYPE(struct_stat)
|
||||
|
||||
#include "asm_stat.h"
|
||||
|
||||
#if defined MPERS_IS_m32
|
||||
# undef HAVE_STRUCT_STAT
|
||||
# undef HAVE_STRUCT_STAT_ST_MTIME_NSEC
|
||||
# ifdef HAVE_M32_STRUCT_STAT
|
||||
# define HAVE_STRUCT_STAT 1
|
||||
# ifdef HAVE_M32_STRUCT_STAT_ST_MTIME_NSEC
|
||||
# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1
|
||||
# endif /* HAVE_M32_STRUCT_STAT_ST_MTIME_NSEC */
|
||||
# endif /* HAVE_M32_STRUCT_STAT */
|
||||
#elif defined MPERS_IS_mx32
|
||||
# undef HAVE_STRUCT_STAT
|
||||
# undef HAVE_STRUCT_STAT_ST_MTIME_NSEC
|
||||
# ifdef HAVE_MX32_STRUCT_STAT
|
||||
# define HAVE_STRUCT_STAT 1
|
||||
# ifdef HAVE_MX32_STRUCT_STAT_ST_MTIME_NSEC
|
||||
# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1
|
||||
# endif /* HAVE_MX32_STRUCT_STAT_ST_MTIME_NSEC */
|
||||
# endif /* HAVE_MX32_STRUCT_STAT */
|
||||
#else /* !MPERS_IS_m32 && !MPERS_IS_mx32 */
|
||||
# define HAVE_STRUCT_STAT 1
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRUCT_STAT
|
||||
struct stat {};
|
||||
#endif
|
||||
|
||||
typedef struct stat struct_stat;
|
||||
|
||||
#include MPERS_DEFS
|
||||
|
||||
#include "stat.h"
|
||||
|
||||
#ifdef HAVE_STRUCT_STAT_ST_MTIME_NSEC
|
||||
# define TIME_NSEC(arg) zero_extend_signed_to_ull(arg)
|
||||
#else
|
||||
# define TIME_NSEC(arg) 0
|
||||
#endif
|
||||
|
||||
MPERS_PRINTER_DECL(bool, fetch_struct_stat,
|
||||
struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
struct strace_stat *const dst)
|
||||
{
|
||||
#ifdef HAVE_STRUCT_STAT
|
||||
struct_stat buf;
|
||||
if (umove_or_printaddr(tcp, addr, &buf))
|
||||
return false;
|
||||
|
||||
dst->dev = zero_extend_signed_to_ull(buf.st_dev);
|
||||
dst->ino = zero_extend_signed_to_ull(buf.st_ino);
|
||||
dst->rdev = zero_extend_signed_to_ull(buf.st_rdev);
|
||||
dst->size = zero_extend_signed_to_ull(buf.st_size);
|
||||
dst->blocks = zero_extend_signed_to_ull(buf.st_blocks);
|
||||
dst->blksize = zero_extend_signed_to_ull(buf.st_blksize);
|
||||
dst->mode = zero_extend_signed_to_ull(buf.st_mode);
|
||||
dst->nlink = zero_extend_signed_to_ull(buf.st_nlink);
|
||||
dst->uid = zero_extend_signed_to_ull(buf.st_uid);
|
||||
dst->gid = zero_extend_signed_to_ull(buf.st_gid);
|
||||
dst->atime = sign_extend_unsigned_to_ll(buf.st_atime);
|
||||
dst->ctime = sign_extend_unsigned_to_ll(buf.st_ctime);
|
||||
dst->mtime = sign_extend_unsigned_to_ll(buf.st_mtime);
|
||||
dst->atime_nsec = TIME_NSEC(buf.st_atime_nsec);
|
||||
dst->ctime_nsec = TIME_NSEC(buf.st_ctime_nsec);
|
||||
dst->mtime_nsec = TIME_NSEC(buf.st_mtime_nsec);
|
||||
return true;
|
||||
#else /* !HAVE_STRUCT_STAT */
|
||||
printaddr(addr);
|
||||
return false;
|
||||
#endif
|
||||
}
|
100
fetch_struct_stat64.c
Normal file
100
fetch_struct_stat64.c
Normal file
@ -0,0 +1,100 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2016 Dmitry V. Levin <ldv@altlinux.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
#include DEF_MPERS_TYPE(struct_stat64)
|
||||
|
||||
#include "asm_stat.h"
|
||||
|
||||
#if defined MPERS_IS_m32
|
||||
# undef HAVE_STRUCT_STAT64
|
||||
# undef HAVE_STRUCT_STAT64_ST_MTIME_NSEC
|
||||
# ifdef HAVE_M32_STRUCT_STAT64
|
||||
# define HAVE_STRUCT_STAT64 1
|
||||
# ifdef HAVE_M32_STRUCT_STAT64_ST_MTIME_NSEC
|
||||
# define HAVE_STRUCT_STAT64_ST_MTIME_NSEC 1
|
||||
# endif /* HAVE_M32_STRUCT_STAT64_ST_MTIME_NSEC */
|
||||
# endif /* HAVE_M32_STRUCT_STAT64 */
|
||||
#elif defined MPERS_IS_mx32
|
||||
# undef HAVE_STRUCT_STAT64
|
||||
# undef HAVE_STRUCT_STAT64_ST_MTIME_NSEC
|
||||
# ifdef HAVE_MX32_STRUCT_STAT64
|
||||
# define HAVE_STRUCT_STAT64 1
|
||||
# ifdef HAVE_MX32_STRUCT_STAT64_ST_MTIME_NSEC
|
||||
# define HAVE_STRUCT_STAT64_ST_MTIME_NSEC 1
|
||||
# endif /* HAVE_MX32_STRUCT_STAT64_ST_MTIME_NSEC */
|
||||
# endif /* HAVE_MX32_STRUCT_STAT64 */
|
||||
#endif /* MPERS_IS_m32 || MPERS_IS_mx32 */
|
||||
|
||||
#ifndef HAVE_STRUCT_STAT64
|
||||
struct stat64 {};
|
||||
#endif
|
||||
|
||||
typedef struct stat64 struct_stat64;
|
||||
|
||||
#include MPERS_DEFS
|
||||
|
||||
#include "stat.h"
|
||||
|
||||
#ifdef HAVE_STRUCT_STAT64_ST_MTIME_NSEC
|
||||
# define TIME_NSEC(arg) zero_extend_signed_to_ull(arg)
|
||||
#else
|
||||
# define TIME_NSEC(arg) 0
|
||||
#endif
|
||||
|
||||
MPERS_PRINTER_DECL(bool, fetch_struct_stat64,
|
||||
struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
struct strace_stat *const dst)
|
||||
{
|
||||
#ifdef HAVE_STRUCT_STAT64
|
||||
struct_stat64 buf;
|
||||
if (umove_or_printaddr(tcp, addr, &buf))
|
||||
return false;
|
||||
|
||||
dst->dev = zero_extend_signed_to_ull(buf.st_dev);
|
||||
dst->ino = zero_extend_signed_to_ull(buf.st_ino);
|
||||
dst->rdev = zero_extend_signed_to_ull(buf.st_rdev);
|
||||
dst->size = zero_extend_signed_to_ull(buf.st_size);
|
||||
dst->blocks = zero_extend_signed_to_ull(buf.st_blocks);
|
||||
dst->blksize = zero_extend_signed_to_ull(buf.st_blksize);
|
||||
dst->mode = zero_extend_signed_to_ull(buf.st_mode);
|
||||
dst->nlink = zero_extend_signed_to_ull(buf.st_nlink);
|
||||
dst->uid = zero_extend_signed_to_ull(buf.st_uid);
|
||||
dst->gid = zero_extend_signed_to_ull(buf.st_gid);
|
||||
dst->atime = sign_extend_unsigned_to_ll(buf.st_atime);
|
||||
dst->ctime = sign_extend_unsigned_to_ll(buf.st_ctime);
|
||||
dst->mtime = sign_extend_unsigned_to_ll(buf.st_mtime);
|
||||
dst->atime_nsec = TIME_NSEC(buf.st_atime_nsec);
|
||||
dst->ctime_nsec = TIME_NSEC(buf.st_ctime_nsec);
|
||||
dst->mtime_nsec = TIME_NSEC(buf.st_mtime_nsec);
|
||||
return true;
|
||||
#else /* !HAVE_STRUCT_STAT64 */
|
||||
printaddr(addr);
|
||||
return false;
|
||||
#endif
|
||||
}
|
@ -40,33 +40,34 @@ typedef struct statfs64 struct_statfs64;
|
||||
#include "statfs.h"
|
||||
|
||||
MPERS_PRINTER_DECL(bool, fetch_struct_statfs,
|
||||
struct tcb *tcp, const long addr, struct strace_statfs *p)
|
||||
struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
struct strace_statfs *const p)
|
||||
{
|
||||
struct_statfs b;
|
||||
|
||||
if (umove_or_printaddr(tcp, addr, &b))
|
||||
return false;
|
||||
|
||||
p->f_type = widen_to_ull(b.f_type);
|
||||
p->f_bsize = widen_to_ull(b.f_bsize);
|
||||
p->f_blocks = widen_to_ull(b.f_blocks);
|
||||
p->f_bfree = widen_to_ull(b.f_bfree);
|
||||
p->f_bavail = widen_to_ull(b.f_bavail);
|
||||
p->f_files = widen_to_ull(b.f_files);
|
||||
p->f_ffree = widen_to_ull(b.f_ffree);
|
||||
p->f_type = zero_extend_signed_to_ull(b.f_type);
|
||||
p->f_bsize = zero_extend_signed_to_ull(b.f_bsize);
|
||||
p->f_blocks = zero_extend_signed_to_ull(b.f_blocks);
|
||||
p->f_bfree = zero_extend_signed_to_ull(b.f_bfree);
|
||||
p->f_bavail = zero_extend_signed_to_ull(b.f_bavail);
|
||||
p->f_files = zero_extend_signed_to_ull(b.f_files);
|
||||
p->f_ffree = zero_extend_signed_to_ull(b.f_ffree);
|
||||
#if defined HAVE_STRUCT_STATFS_F_FSID_VAL
|
||||
p->f_fsid[0] = widen_to_ull(b.f_fsid.val[0]);
|
||||
p->f_fsid[1] = widen_to_ull(b.f_fsid.val[1]);
|
||||
p->f_fsid[0] = zero_extend_signed_to_ull(b.f_fsid.val[0]);
|
||||
p->f_fsid[1] = zero_extend_signed_to_ull(b.f_fsid.val[1]);
|
||||
#elif defined HAVE_STRUCT_STATFS_F_FSID___VAL
|
||||
p->f_fsid[0] = widen_to_ull(b.f_fsid.__val[0]);
|
||||
p->f_fsid[1] = widen_to_ull(b.f_fsid.__val[1]);
|
||||
p->f_fsid[0] = zero_extend_signed_to_ull(b.f_fsid.__val[0]);
|
||||
p->f_fsid[1] = zero_extend_signed_to_ull(b.f_fsid.__val[1]);
|
||||
#endif
|
||||
p->f_namelen = widen_to_ull(b.f_namelen);
|
||||
p->f_namelen = zero_extend_signed_to_ull(b.f_namelen);
|
||||
#ifdef HAVE_STRUCT_STATFS_F_FRSIZE
|
||||
p->f_frsize = widen_to_ull(b.f_frsize);
|
||||
p->f_frsize = zero_extend_signed_to_ull(b.f_frsize);
|
||||
#endif
|
||||
#ifdef HAVE_STRUCT_STATFS_F_FLAGS
|
||||
p->f_flags = widen_to_ull(b.f_flags);
|
||||
p->f_flags = zero_extend_signed_to_ull(b.f_flags);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
@ -78,8 +79,8 @@ MPERS_PRINTER_DECL(bool, fetch_struct_statfs,
|
||||
#endif
|
||||
|
||||
MPERS_PRINTER_DECL(bool, fetch_struct_statfs64,
|
||||
struct tcb *tcp, const long addr, const unsigned long size,
|
||||
struct strace_statfs *p)
|
||||
struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
const kernel_ulong_t size, struct strace_statfs *const p)
|
||||
{
|
||||
struct_statfs64 b;
|
||||
|
||||
@ -95,26 +96,26 @@ MPERS_PRINTER_DECL(bool, fetch_struct_statfs64,
|
||||
if (umove_or_printaddr(tcp, addr, &b))
|
||||
return false;
|
||||
|
||||
p->f_type = widen_to_ull(b.f_type);
|
||||
p->f_bsize = widen_to_ull(b.f_bsize);
|
||||
p->f_blocks = widen_to_ull(b.f_blocks);
|
||||
p->f_bfree = widen_to_ull(b.f_bfree);
|
||||
p->f_bavail = widen_to_ull(b.f_bavail);
|
||||
p->f_files = widen_to_ull(b.f_files);
|
||||
p->f_ffree = widen_to_ull(b.f_ffree);
|
||||
p->f_type = zero_extend_signed_to_ull(b.f_type);
|
||||
p->f_bsize = zero_extend_signed_to_ull(b.f_bsize);
|
||||
p->f_blocks = zero_extend_signed_to_ull(b.f_blocks);
|
||||
p->f_bfree = zero_extend_signed_to_ull(b.f_bfree);
|
||||
p->f_bavail = zero_extend_signed_to_ull(b.f_bavail);
|
||||
p->f_files = zero_extend_signed_to_ull(b.f_files);
|
||||
p->f_ffree = zero_extend_signed_to_ull(b.f_ffree);
|
||||
#if defined HAVE_STRUCT_STATFS64_F_FSID_VAL
|
||||
p->f_fsid[0] = widen_to_ull(b.f_fsid.val[0]);
|
||||
p->f_fsid[1] = widen_to_ull(b.f_fsid.val[1]);
|
||||
p->f_fsid[0] = zero_extend_signed_to_ull(b.f_fsid.val[0]);
|
||||
p->f_fsid[1] = zero_extend_signed_to_ull(b.f_fsid.val[1]);
|
||||
#elif defined HAVE_STRUCT_STATFS64_F_FSID___VAL
|
||||
p->f_fsid[0] = widen_to_ull(b.f_fsid.__val[0]);
|
||||
p->f_fsid[1] = widen_to_ull(b.f_fsid.__val[1]);
|
||||
p->f_fsid[0] = zero_extend_signed_to_ull(b.f_fsid.__val[0]);
|
||||
p->f_fsid[1] = zero_extend_signed_to_ull(b.f_fsid.__val[1]);
|
||||
#endif
|
||||
p->f_namelen = widen_to_ull(b.f_namelen);
|
||||
p->f_namelen = zero_extend_signed_to_ull(b.f_namelen);
|
||||
#ifdef HAVE_STRUCT_STATFS64_F_FRSIZE
|
||||
p->f_frsize = widen_to_ull(b.f_frsize);
|
||||
p->f_frsize = zero_extend_signed_to_ull(b.f_frsize);
|
||||
#endif
|
||||
#ifdef HAVE_STRUCT_STATFS64_F_FLAGS
|
||||
p->f_flags = widen_to_ull(b.f_flags);
|
||||
p->f_flags = zero_extend_signed_to_ull(b.f_flags);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
|
493
file.c
493
file.c
@ -1,493 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
|
||||
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
|
||||
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
|
||||
* Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
#undef dev_t
|
||||
#undef ino_t
|
||||
#undef mode_t
|
||||
#undef nlink_t
|
||||
#undef uid_t
|
||||
#undef gid_t
|
||||
#undef off_t
|
||||
#undef loff_t
|
||||
#define dev_t __kernel_dev_t
|
||||
#define ino_t __kernel_ino_t
|
||||
#define mode_t __kernel_mode_t
|
||||
#define nlink_t __kernel_nlink_t
|
||||
#define uid_t __kernel_uid_t
|
||||
#define gid_t __kernel_gid_t
|
||||
#define off_t __kernel_off_t
|
||||
#define loff_t __kernel_loff_t
|
||||
|
||||
#include "asm_stat.h"
|
||||
|
||||
#undef dev_t
|
||||
#undef ino_t
|
||||
#undef mode_t
|
||||
#undef nlink_t
|
||||
#undef uid_t
|
||||
#undef gid_t
|
||||
#undef off_t
|
||||
#undef loff_t
|
||||
#define dev_t dev_t
|
||||
#define ino_t ino_t
|
||||
#define mode_t mode_t
|
||||
#define nlink_t nlink_t
|
||||
#define uid_t uid_t
|
||||
#define gid_t gid_t
|
||||
#define off_t off_t
|
||||
#define loff_t loff_t
|
||||
|
||||
/* for S_IFMT */
|
||||
#define stat libc_stat
|
||||
#define stat64 libc_stat64
|
||||
#include <sys/stat.h>
|
||||
#undef stat
|
||||
#undef stat64
|
||||
/* These might be macros. */
|
||||
#undef st_atime
|
||||
#undef st_mtime
|
||||
#undef st_ctime
|
||||
|
||||
#if defined MAJOR_IN_SYSMACROS
|
||||
# include <sys/sysmacros.h>
|
||||
#elif defined MAJOR_IN_MKDEV
|
||||
# include <sys/mkdev.h>
|
||||
#endif
|
||||
|
||||
/* several stats */
|
||||
|
||||
#include "printstat.h"
|
||||
|
||||
/* all locally defined structures provide these fields */
|
||||
#undef HAVE_STRUCT_STAT_ST_ATIME_NSEC
|
||||
#define HAVE_STRUCT_STAT_ST_ATIME_NSEC 1
|
||||
#undef HAVE_STRUCT_STAT_ST_CTIME_NSEC
|
||||
#define HAVE_STRUCT_STAT_ST_CTIME_NSEC 1
|
||||
#undef HAVE_STRUCT_STAT_ST_MTIME_NSEC
|
||||
#define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1
|
||||
|
||||
#undef STAT32_PERSONALITY
|
||||
#if SUPPORTED_PERSONALITIES > 1
|
||||
# if defined AARCH64 || defined X86_64 || defined X32
|
||||
struct stat32 {
|
||||
unsigned int st_dev;
|
||||
unsigned int st_ino;
|
||||
unsigned short st_mode;
|
||||
unsigned short st_nlink;
|
||||
unsigned short st_uid;
|
||||
unsigned short st_gid;
|
||||
unsigned int st_rdev;
|
||||
unsigned int st_size;
|
||||
unsigned int st_blksize;
|
||||
unsigned int st_blocks;
|
||||
unsigned int st_atime;
|
||||
unsigned int st_atime_nsec;
|
||||
unsigned int st_mtime;
|
||||
unsigned int st_mtime_nsec;
|
||||
unsigned int st_ctime;
|
||||
unsigned int st_ctime_nsec;
|
||||
unsigned int __unused4;
|
||||
unsigned int __unused5;
|
||||
};
|
||||
# define STAT32_PERSONALITY 1
|
||||
# elif defined POWERPC64
|
||||
struct stat32 {
|
||||
unsigned int st_dev;
|
||||
unsigned int st_ino;
|
||||
unsigned int st_mode;
|
||||
unsigned short st_nlink;
|
||||
unsigned int st_uid;
|
||||
unsigned int st_gid;
|
||||
unsigned int st_rdev;
|
||||
unsigned int st_size;
|
||||
unsigned int st_blksize;
|
||||
unsigned int st_blocks;
|
||||
unsigned int st_atime;
|
||||
unsigned int st_atime_nsec;
|
||||
unsigned int st_mtime;
|
||||
unsigned int st_mtime_nsec;
|
||||
unsigned int st_ctime;
|
||||
unsigned int st_ctime_nsec;
|
||||
unsigned int __unused4;
|
||||
unsigned int __unused5;
|
||||
};
|
||||
# define STAT32_PERSONALITY 1
|
||||
# elif defined SPARC64
|
||||
struct stat32 {
|
||||
unsigned short st_dev;
|
||||
unsigned int st_ino;
|
||||
unsigned short st_mode;
|
||||
unsigned short st_nlink;
|
||||
unsigned short st_uid;
|
||||
unsigned short st_gid;
|
||||
unsigned short st_rdev;
|
||||
unsigned int st_size;
|
||||
unsigned int st_atime;
|
||||
unsigned int st_atime_nsec;
|
||||
unsigned int st_mtime;
|
||||
unsigned int st_mtime_nsec;
|
||||
unsigned int st_ctime;
|
||||
unsigned int st_ctime_nsec;
|
||||
unsigned int st_blksize;
|
||||
unsigned int st_blocks;
|
||||
unsigned int __unused4[2];
|
||||
};
|
||||
# define STAT32_PERSONALITY 0
|
||||
# elif defined SPARC
|
||||
# /* no 64-bit personalities */
|
||||
# elif defined TILE
|
||||
# /* no 32-bit stat */
|
||||
# else
|
||||
# warning FIXME: check whether struct stat32 definition is needed for this architecture!
|
||||
# endif /* X86_64 || X32 || POWERPC64 */
|
||||
#endif /* SUPPORTED_PERSONALITIES > 1 */
|
||||
|
||||
#ifdef STAT32_PERSONALITY
|
||||
# define DO_PRINTSTAT do_printstat32
|
||||
# define STRUCT_STAT struct stat32
|
||||
# undef HAVE_STRUCT_STAT_ST_FLAGS
|
||||
# undef HAVE_STRUCT_STAT_ST_FSTYPE
|
||||
# undef HAVE_STRUCT_STAT_ST_GEN
|
||||
# include "printstat.h"
|
||||
#endif /* STAT32_PERSONALITY */
|
||||
|
||||
#if defined(SPARC) || defined(SPARC64)
|
||||
|
||||
struct solstat {
|
||||
unsigned st_dev;
|
||||
unsigned int st_pad1[3]; /* network id */
|
||||
unsigned st_ino;
|
||||
unsigned st_mode;
|
||||
unsigned st_nlink;
|
||||
unsigned st_uid;
|
||||
unsigned st_gid;
|
||||
unsigned st_rdev;
|
||||
unsigned int st_pad2[2];
|
||||
unsigned int st_size;
|
||||
unsigned int st_pad3; /* st_size, off_t expansion */
|
||||
unsigned int st_atime;
|
||||
unsigned int st_atime_nsec;
|
||||
unsigned int st_mtime;
|
||||
unsigned int st_mtime_nsec;
|
||||
unsigned int st_ctime;
|
||||
unsigned int st_ctime_nsec;
|
||||
unsigned int st_blksize;
|
||||
unsigned int st_blocks;
|
||||
char st_fstype[16];
|
||||
unsigned int st_pad4[8]; /* expansion area */
|
||||
};
|
||||
|
||||
# define DO_PRINTSTAT do_printstat_sol
|
||||
# define STRUCT_STAT struct solstat
|
||||
# define STAT_MAJOR(x) (((x) >> 18) & 0x3fff)
|
||||
# define STAT_MINOR(x) ((x) & 0x3ffff)
|
||||
# undef HAVE_STRUCT_STAT_ST_FLAGS
|
||||
# undef HAVE_STRUCT_STAT_ST_FSTYPE
|
||||
# undef HAVE_STRUCT_STAT_ST_GEN
|
||||
# include "printstat.h"
|
||||
#endif /* SPARC || SPARC64 */
|
||||
|
||||
static void
|
||||
printstat(struct tcb *tcp, long addr)
|
||||
{
|
||||
struct stat statbuf;
|
||||
|
||||
#ifdef STAT32_PERSONALITY
|
||||
if (current_personality == STAT32_PERSONALITY) {
|
||||
struct stat32 statbuf;
|
||||
|
||||
if (!umove_or_printaddr(tcp, addr, &statbuf))
|
||||
do_printstat32(tcp, &statbuf);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(SPARC) || defined(SPARC64)
|
||||
if (current_personality == 1) {
|
||||
struct solstat statbuf;
|
||||
|
||||
if (!umove_or_printaddr(tcp, addr, &statbuf))
|
||||
do_printstat_sol(tcp, &statbuf);
|
||||
return;
|
||||
}
|
||||
#endif /* SPARC || SPARC64 */
|
||||
|
||||
if (!umove_or_printaddr(tcp, addr, &statbuf))
|
||||
do_printstat(tcp, &statbuf);
|
||||
}
|
||||
|
||||
SYS_FUNC(stat)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
printpath(tcp, tcp->u_arg[0]);
|
||||
tprints(", ");
|
||||
} else {
|
||||
printstat(tcp, tcp->u_arg[1]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_FUNC(fstat)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
printfd(tcp, tcp->u_arg[0]);
|
||||
tprints(", ");
|
||||
} else {
|
||||
printstat(tcp, tcp->u_arg[1]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined STAT32_PERSONALITY && !defined HAVE_STRUCT_STAT64
|
||||
# if defined AARCH64 || defined X86_64 || defined X32
|
||||
/*
|
||||
* Linux x86_64 and x32 have unified `struct stat' but their i386 personality
|
||||
* needs `struct stat64'.
|
||||
* linux/arch/x86/include/uapi/asm/stat.h defines `struct stat64' only for i386.
|
||||
*
|
||||
* Similarly, aarch64 has a unified `struct stat' but its arm personality
|
||||
* needs `struct stat64' (unlike x86, it shouldn't be packed).
|
||||
*/
|
||||
struct stat64 {
|
||||
unsigned long long st_dev;
|
||||
unsigned char __pad0[4];
|
||||
unsigned int __st_ino;
|
||||
unsigned int st_mode;
|
||||
unsigned int st_nlink;
|
||||
unsigned int st_uid;
|
||||
unsigned int st_gid;
|
||||
unsigned long long st_rdev;
|
||||
unsigned char __pad3[4];
|
||||
long long st_size;
|
||||
unsigned int st_blksize;
|
||||
unsigned long long st_blocks;
|
||||
unsigned int st_atime;
|
||||
unsigned int st_atime_nsec;
|
||||
unsigned int st_mtime;
|
||||
unsigned int st_mtime_nsec;
|
||||
unsigned int st_ctime;
|
||||
unsigned int st_ctime_nsec;
|
||||
unsigned long long st_ino;
|
||||
}
|
||||
# if defined X86_64 || defined X32
|
||||
ATTRIBUTE_PACKED
|
||||
# define STAT64_SIZE 96
|
||||
# else
|
||||
# define STAT64_SIZE 104
|
||||
# endif
|
||||
;
|
||||
# define HAVE_STRUCT_STAT64 1
|
||||
# else /* !(AARCH64 || X86_64 || X32) */
|
||||
# warning FIXME: check whether struct stat64 definition is needed for this architecture!
|
||||
# endif
|
||||
#endif /* STAT32_PERSONALITY && !HAVE_STRUCT_STAT64 */
|
||||
|
||||
#ifdef HAVE_STRUCT_STAT64
|
||||
|
||||
# define DO_PRINTSTAT do_printstat64
|
||||
# define STRUCT_STAT struct stat64
|
||||
# undef HAVE_STRUCT_STAT_ST_FLAGS
|
||||
# undef HAVE_STRUCT_STAT_ST_FSTYPE
|
||||
# undef HAVE_STRUCT_STAT_ST_GEN
|
||||
# include "printstat.h"
|
||||
|
||||
static void
|
||||
printstat64(struct tcb *tcp, long addr)
|
||||
{
|
||||
struct stat64 statbuf;
|
||||
|
||||
# ifdef STAT64_SIZE
|
||||
(void) sizeof(char[sizeof statbuf == STAT64_SIZE ? 1 : -1]);
|
||||
# endif
|
||||
|
||||
# ifdef STAT32_PERSONALITY
|
||||
if (current_personality != STAT32_PERSONALITY) {
|
||||
printstat(tcp, addr);
|
||||
return;
|
||||
}
|
||||
# endif /* STAT32_PERSONALITY */
|
||||
|
||||
if (!umove_or_printaddr(tcp, addr, &statbuf))
|
||||
do_printstat64(tcp, &statbuf);
|
||||
}
|
||||
|
||||
SYS_FUNC(stat64)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
printpath(tcp, tcp->u_arg[0]);
|
||||
tprints(", ");
|
||||
} else {
|
||||
printstat64(tcp, tcp->u_arg[1]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_FUNC(fstat64)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
printfd(tcp, tcp->u_arg[0]);
|
||||
tprints(", ");
|
||||
} else {
|
||||
printstat64(tcp, tcp->u_arg[1]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
SYS_FUNC(stat64)
|
||||
{
|
||||
return sys_stat(tcp);
|
||||
}
|
||||
|
||||
SYS_FUNC(fstat64)
|
||||
{
|
||||
return sys_fstat(tcp);
|
||||
}
|
||||
|
||||
#endif /* HAVE_STRUCT_STAT64 */
|
||||
|
||||
SYS_FUNC(newfstatat)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
print_dirfd(tcp, tcp->u_arg[0]);
|
||||
printpath(tcp, tcp->u_arg[1]);
|
||||
tprints(", ");
|
||||
} else {
|
||||
#if defined STAT32_PERSONALITY
|
||||
if (current_personality == STAT32_PERSONALITY)
|
||||
printstat64(tcp, tcp->u_arg[2]);
|
||||
else
|
||||
printstat(tcp, tcp->u_arg[2]);
|
||||
#elif defined HAVE_STRUCT_STAT64
|
||||
printstat64(tcp, tcp->u_arg[2]);
|
||||
#else
|
||||
printstat(tcp, tcp->u_arg[2]);
|
||||
#endif /* STAT32_PERSONALITY || HAVE_STRUCT_STAT64 */
|
||||
tprints(", ");
|
||||
printflags(at_flags, tcp->u_arg[3], "AT_???");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(HAVE_STRUCT___OLD_KERNEL_STAT)
|
||||
|
||||
static void
|
||||
convertoldstat(const struct __old_kernel_stat *oldbuf, struct stat *newbuf)
|
||||
{
|
||||
memset(newbuf, 0, sizeof(*newbuf));
|
||||
newbuf->st_dev = oldbuf->st_dev;
|
||||
newbuf->st_ino = oldbuf->st_ino;
|
||||
newbuf->st_mode = oldbuf->st_mode;
|
||||
newbuf->st_nlink = oldbuf->st_nlink;
|
||||
newbuf->st_uid = oldbuf->st_uid;
|
||||
newbuf->st_gid = oldbuf->st_gid;
|
||||
newbuf->st_rdev = oldbuf->st_rdev;
|
||||
newbuf->st_size = oldbuf->st_size;
|
||||
newbuf->st_atime = oldbuf->st_atime;
|
||||
newbuf->st_mtime = oldbuf->st_mtime;
|
||||
newbuf->st_ctime = oldbuf->st_ctime;
|
||||
}
|
||||
|
||||
static void
|
||||
printoldstat(struct tcb *tcp, long addr)
|
||||
{
|
||||
struct __old_kernel_stat statbuf;
|
||||
struct stat newstatbuf;
|
||||
|
||||
# if defined(SPARC) || defined(SPARC64)
|
||||
if (current_personality == 1) {
|
||||
struct solstat statbuf;
|
||||
|
||||
if (!umove_or_printaddr(tcp, addr, &statbuf))
|
||||
do_printstat_sol(tcp, &statbuf);
|
||||
return;
|
||||
}
|
||||
# endif
|
||||
|
||||
if (!umove_or_printaddr(tcp, addr, &statbuf)) {
|
||||
convertoldstat(&statbuf, &newstatbuf);
|
||||
do_printstat(tcp, &newstatbuf);
|
||||
}
|
||||
}
|
||||
|
||||
SYS_FUNC(oldstat)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
printpath(tcp, tcp->u_arg[0]);
|
||||
tprints(", ");
|
||||
} else {
|
||||
printoldstat(tcp, tcp->u_arg[1]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_FUNC(oldfstat)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
printfd(tcp, tcp->u_arg[0]);
|
||||
tprints(", ");
|
||||
} else {
|
||||
printoldstat(tcp, tcp->u_arg[1]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* HAVE_STRUCT___OLD_KERNEL_STAT */
|
||||
|
||||
#if defined(SPARC) || defined(SPARC64)
|
||||
|
||||
SYS_FUNC(xstat)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
tprintf("%ld, ", tcp->u_arg[0]);
|
||||
printpath(tcp, tcp->u_arg[1]);
|
||||
tprints(", ");
|
||||
} else {
|
||||
printstat(tcp, tcp->u_arg[2]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_FUNC(fxstat)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
tprintf("%ld, ", tcp->u_arg[0]);
|
||||
printfd(tcp, tcp->u_arg[1]);
|
||||
tprints(", ");
|
||||
} else {
|
||||
printstat(tcp, tcp->u_arg[2]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* SPARC || SPARC64 */
|
@ -27,6 +27,8 @@
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
#include "xlat/name_to_handle_at_flags.h"
|
||||
|
||||
#ifndef MAX_HANDLE_SZ
|
||||
# define MAX_HANDLE_SZ 128
|
||||
#endif
|
||||
@ -39,7 +41,7 @@ typedef struct {
|
||||
SYS_FUNC(name_to_handle_at)
|
||||
{
|
||||
file_handle_header h;
|
||||
const long addr = tcp->u_arg[2];
|
||||
const kernel_ulong_t addr = tcp->u_arg[2];
|
||||
|
||||
if (entering(tcp)) {
|
||||
/* dirfd */
|
||||
@ -58,7 +60,8 @@ SYS_FUNC(name_to_handle_at)
|
||||
tprints(", ");
|
||||
|
||||
/* flags */
|
||||
printflags(at_flags, tcp->u_arg[4], "AT_???");
|
||||
printflags(name_to_handle_at_flags, tcp->u_arg[4],
|
||||
"AT_???");
|
||||
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
@ -95,7 +98,7 @@ SYS_FUNC(name_to_handle_at)
|
||||
tprints(", ");
|
||||
|
||||
/* flags */
|
||||
printflags(at_flags, tcp->u_arg[4], "AT_???");
|
||||
printflags(name_to_handle_at_flags, tcp->u_arg[4], "AT_???");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -103,7 +106,7 @@ SYS_FUNC(name_to_handle_at)
|
||||
SYS_FUNC(open_by_handle_at)
|
||||
{
|
||||
file_handle_header h;
|
||||
const long addr = tcp->u_arg[1];
|
||||
const kernel_ulong_t addr = tcp->u_arg[1];
|
||||
|
||||
/* mount_fd */
|
||||
printfd(tcp, tcp->u_arg[0]);
|
||||
|
@ -123,7 +123,8 @@ print_fiemap_extent(struct tcb *tcp, void *elem_buf, size_t elem_size, void *dat
|
||||
#endif /* HAVE_LINUX_FIEMAP_H */
|
||||
|
||||
int
|
||||
file_ioctl(struct tcb *tcp, const unsigned int code, const long arg)
|
||||
file_ioctl(struct tcb *const tcp, const unsigned int code,
|
||||
const kernel_ulong_t arg)
|
||||
{
|
||||
switch (code) {
|
||||
case FICLONE: /* W */
|
||||
|
5
flock.h
5
flock.h
@ -25,6 +25,9 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef STRACE_FLOCK_H
|
||||
#define STRACE_FLOCK_H
|
||||
|
||||
#include <linux/fcntl.h>
|
||||
|
||||
#if defined HAVE_STRUCT_FLOCK
|
||||
@ -42,3 +45,5 @@ typedef struct __kernel_flock64 struct_kernel_flock64;
|
||||
#else
|
||||
# error struct flock64 definition not found in <linux/fcntl.h>
|
||||
#endif
|
||||
|
||||
#endif /* !STRACE_FLOCK_H */
|
||||
|
@ -30,7 +30,8 @@
|
||||
#include <linux/fs.h>
|
||||
|
||||
int
|
||||
fs_x_ioctl(struct tcb *tcp, const unsigned int code, const long arg)
|
||||
fs_x_ioctl(struct tcb *const tcp, const unsigned int code,
|
||||
const kernel_ulong_t arg)
|
||||
{
|
||||
switch (code) {
|
||||
#ifdef FITRIM
|
||||
|
@ -2,13 +2,11 @@
|
||||
|
||||
SYS_FUNC(fstatfs64)
|
||||
{
|
||||
const unsigned long size = tcp->u_arg[1];
|
||||
|
||||
if (entering(tcp)) {
|
||||
printfd(tcp, tcp->u_arg[0]);
|
||||
tprintf(", %lu, ", size);
|
||||
tprintf(", %" PRI_klu ", ", tcp->u_arg[1]);
|
||||
} else {
|
||||
print_struct_statfs64(tcp, tcp->u_arg[2], size);
|
||||
print_struct_statfs64(tcp, tcp->u_arg[2], tcp->u_arg[1]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
55
futex.c
55
futex.c
@ -30,10 +30,6 @@
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
#ifdef HAVE_LINUX_FUTEX_H
|
||||
# include <linux/futex.h>
|
||||
#endif
|
||||
|
||||
#ifndef FUTEX_PRIVATE_FLAG
|
||||
# define FUTEX_PRIVATE_FLAG 128
|
||||
#endif
|
||||
@ -47,11 +43,11 @@
|
||||
|
||||
SYS_FUNC(futex)
|
||||
{
|
||||
const long uaddr = tcp->u_arg[0];
|
||||
const kernel_ulong_t uaddr = tcp->u_arg[0];
|
||||
const int op = tcp->u_arg[1];
|
||||
const int cmd = op & 127;
|
||||
const long timeout = tcp->u_arg[3];
|
||||
const long uaddr2 = tcp->u_arg[4];
|
||||
const kernel_ulong_t timeout = tcp->u_arg[3];
|
||||
const kernel_ulong_t uaddr2 = tcp->u_arg[4];
|
||||
const unsigned int val = tcp->u_arg[2];
|
||||
const unsigned int val2 = tcp->u_arg[3];
|
||||
const unsigned int val3 = tcp->u_arg[5];
|
||||
@ -59,56 +55,77 @@ SYS_FUNC(futex)
|
||||
printaddr(uaddr);
|
||||
tprints(", ");
|
||||
printxval(futexops, op, "FUTEX_???");
|
||||
tprintf(", %u", val);
|
||||
switch (cmd) {
|
||||
case FUTEX_WAIT:
|
||||
tprintf(", %u", val);
|
||||
tprints(", ");
|
||||
print_timespec(tcp, timeout);
|
||||
break;
|
||||
case FUTEX_LOCK_PI:
|
||||
tprints(", ");
|
||||
print_timespec(tcp, timeout);
|
||||
break;
|
||||
case FUTEX_WAIT_BITSET:
|
||||
tprintf(", %u", val);
|
||||
tprints(", ");
|
||||
print_timespec(tcp, timeout);
|
||||
tprintf(", %x", val3);
|
||||
tprintf(", %#x", val3);
|
||||
break;
|
||||
case FUTEX_WAKE_BITSET:
|
||||
tprintf(", %x", val3);
|
||||
tprintf(", %u", val);
|
||||
tprintf(", %#x", val3);
|
||||
break;
|
||||
case FUTEX_REQUEUE:
|
||||
tprintf(", %u", val);
|
||||
tprintf(", %u, ", val2);
|
||||
printaddr(uaddr2);
|
||||
break;
|
||||
case FUTEX_CMP_REQUEUE:
|
||||
case FUTEX_CMP_REQUEUE_PI:
|
||||
tprintf(", %u", val);
|
||||
tprintf(", %u, ", val2);
|
||||
printaddr(uaddr2);
|
||||
tprintf(", %u", val3);
|
||||
break;
|
||||
case FUTEX_WAKE_OP:
|
||||
tprintf(", %u", val);
|
||||
tprintf(", %u, ", val2);
|
||||
printaddr(uaddr2);
|
||||
tprints(", {");
|
||||
tprints(", ");
|
||||
if ((val3 >> 28) & 8)
|
||||
tprints("FUTEX_OP_OPARG_SHIFT|");
|
||||
printxval(futexwakeops, (val3 >> 28) & 0x7, "FUTEX_OP_???");
|
||||
tprintf(", %u, ", (val3 >> 12) & 0xfff);
|
||||
if ((val3 >> 24) & 8)
|
||||
tprints("FUTEX_OP_OPARG_SHIFT|");
|
||||
printxval(futexwakecmps, (val3 >> 24) & 0x7, "FUTEX_OP_CMP_???");
|
||||
tprintf(", %u}", val3 & 0xfff);
|
||||
tprints("FUTEX_OP_OPARG_SHIFT<<28|");
|
||||
if (printxval(futexwakeops, (val3 >> 28) & 0x7, NULL))
|
||||
tprints("<<28");
|
||||
else
|
||||
tprints("<<28 /* FUTEX_OP_??? */");
|
||||
tprintf("|%#x<<12|", (val3 >> 12) & 0xfff);
|
||||
if (printxval(futexwakecmps, (val3 >> 24) & 0xf, NULL))
|
||||
tprints("<<24");
|
||||
else
|
||||
tprints("<<24 /* FUTEX_OP_CMP_??? */");
|
||||
tprintf("|%#x", val3 & 0xfff);
|
||||
break;
|
||||
case FUTEX_WAIT_REQUEUE_PI:
|
||||
tprintf(", %u", val);
|
||||
tprints(", ");
|
||||
print_timespec(tcp, timeout);
|
||||
tprints(", ");
|
||||
printaddr(uaddr2);
|
||||
break;
|
||||
case FUTEX_FD:
|
||||
case FUTEX_WAKE:
|
||||
tprintf(", %u", val);
|
||||
break;
|
||||
case FUTEX_UNLOCK_PI:
|
||||
case FUTEX_TRYLOCK_PI:
|
||||
break;
|
||||
default:
|
||||
tprintf(", %lx, %lx, %x", timeout, uaddr2, val3);
|
||||
tprintf(", %u", val);
|
||||
tprints(", ");
|
||||
printaddr(timeout);
|
||||
tprints(", ");
|
||||
printaddr(uaddr2);
|
||||
tprintf(", %#x", val3);
|
||||
break;
|
||||
}
|
||||
|
||||
|
22
gcc_compat.h
22
gcc_compat.h
@ -25,8 +25,8 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef GCC_COMPAT_H_
|
||||
#define GCC_COMPAT_H_
|
||||
#ifndef STRACE_GCC_COMPAT_H
|
||||
#define STRACE_GCC_COMPAT_H
|
||||
|
||||
#if defined __GNUC__ && defined __GNUC_MINOR__
|
||||
# define GNUC_PREREQ(maj, min) \
|
||||
@ -52,6 +52,16 @@
|
||||
# define ATTRIBUTE_PACKED /* empty */
|
||||
#endif
|
||||
|
||||
#if GNUC_PREREQ(3, 0)
|
||||
# define SAME_TYPE(x, y) __builtin_types_compatible_p(typeof(x), typeof(y))
|
||||
# define FAIL_BUILD_ON_ZERO(expr) (sizeof(int[-1 + 2 * !!(expr)]) * 0)
|
||||
/* &(a)[0] is a pointer and not an array, shouldn't be treated as the same */
|
||||
# define MUST_BE_ARRAY(a) FAIL_BUILD_ON_ZERO(!SAME_TYPE((a), &(a)[0]))
|
||||
#else
|
||||
# define SAME_TYPE(x, y) 0
|
||||
# define MUST_BE_ARRAY(a) 0
|
||||
#endif
|
||||
|
||||
#if GNUC_PREREQ(3, 0)
|
||||
# define ATTRIBUTE_MALLOC __attribute__((__malloc__))
|
||||
#else
|
||||
@ -70,10 +80,16 @@
|
||||
# define ATTRIBUTE_SENTINEL /* empty */
|
||||
#endif
|
||||
|
||||
#if GNUC_PREREQ(4, 1)
|
||||
# define ALIGNOF(t_) __alignof__(t_)
|
||||
#else
|
||||
# define ALIGNOF(t_) (sizeof(struct {char x_; t_ y_;}) - sizeof(t_))
|
||||
#endif
|
||||
|
||||
#if GNUC_PREREQ(4, 3)
|
||||
# define ATTRIBUTE_ALLOC_SIZE(args) __attribute__((__alloc_size__ args))
|
||||
#else
|
||||
# define ATTRIBUTE_ALLOC_SIZE(args) /* empty */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* !STRACE_GCC_COMPAT_H */
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
list="$(sed -n '/^strace_SOURCES[[:space:]]*=/,/^[[:space:]]*# end of strace_SOURCES/ s/^[[:space:]]*\([[:alnum:]][^.]*\.c\)[[:space:]]*\\$/\1/p' Makefile.am |
|
||||
xargs -r grep -lx '#[[:space:]]*include[[:space:]]\+MPERS_DEFS' |
|
||||
list="$(sed -r -n '/^strace_SOURCES[[:space:]]*=/,/^[[:space:]]*# end of strace_SOURCES/ s/^[[:space:]]*([[:alnum:]][^.]*\.c)[[:space:]]*\\$/\1/p' Makefile.am |
|
||||
xargs -r grep -Elx '#[[:space:]]*include[[:space:]]+MPERS_DEFS' |
|
||||
tr '\n' ' ')"
|
||||
|
||||
cat > mpers.am <<EOF
|
||||
@ -9,5 +9,5 @@ cat > mpers.am <<EOF
|
||||
mpers_source_files = $list
|
||||
EOF
|
||||
|
||||
sed -n 's/^#[[:space:]]*include[[:space:]]*"xlat\/\([^."]\+\)\.h".*/extern const struct xlat \1[];/p' \
|
||||
sed -r -n 's/^#[[:space:]]*include[[:space:]]*"xlat\/([a-z][a-z_0-9]*)\.h".*/extern const struct xlat \1[];/p' \
|
||||
$list > mpers_xlat.h
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
echo 'enum {'
|
||||
echo 'SEN_printargs = 0,'
|
||||
sed -n '/printargs/! s/.*SEN(\([^)]*\)).*/\1/p' |
|
||||
sort -u |
|
||||
sed -r -n '/printargs/! s/.*SEN\(([^)]+)\).*/\1/p' |
|
||||
LC_COLLATE=C sort -u |
|
||||
sed 's/.*/SEN_&,/'
|
||||
echo '};'
|
||||
|
@ -1,28 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
convert() {
|
||||
sed -n '/^\(static \)\?const struct xlat '"$n"'\[\] = {$/,/^};$/{
|
||||
s/^[[:space:]]*XLAT(\([^)]\+\)).*/\1/p
|
||||
s/^[[:space:]]*{[[:space:]]*(\?\(1<<[^),[:space:]]\+\).*/\1/p
|
||||
s/.*not NULL-terminated.*/#unterminated/p
|
||||
s/^\([[:space:]]*{.*\)/\1/p
|
||||
s/^\t*\( *[/*].*\)/\1/p}' "$f" >> xlat/"$n".in
|
||||
sed -i '/^\(static \)\?const struct xlat '"$n"'\[\] = {$/,/^};$/c #include "xlat/'"$n"'.h"' "$f"
|
||||
}
|
||||
|
||||
for f; do
|
||||
for n in $(sed -n 's/^\(static \)\?const struct xlat \([a-z0-9_]\+\)\[\] = {$/\2/p' "$f"); do
|
||||
case "$n" in
|
||||
cacheflush_flags|struct_user_offsets) # skip
|
||||
;;
|
||||
ioprio_class|ioprio_who|mtd_mode_options|personality_options|syslog_action_type|ubi_volume_props|ubi_volume_types)
|
||||
echo '#unconditional' > xlat/"$n".in
|
||||
convert
|
||||
;;
|
||||
*)
|
||||
> xlat/"$n".in
|
||||
convert
|
||||
;;
|
||||
esac
|
||||
done
|
||||
done
|
2
getcwd.c
2
getcwd.c
@ -7,7 +7,7 @@ SYS_FUNC(getcwd)
|
||||
printaddr(tcp->u_arg[0]);
|
||||
else
|
||||
printpathn(tcp, tcp->u_arg[0], tcp->u_rval - 1);
|
||||
tprintf(", %lu", tcp->u_arg[1]);
|
||||
tprintf(", %" PRI_klu, tcp->u_arg[1]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -7,8 +7,9 @@ SYS_FUNC(getrandom)
|
||||
if (syserror(tcp))
|
||||
printaddr(tcp->u_arg[0]);
|
||||
else
|
||||
printstr(tcp, tcp->u_arg[0], tcp->u_rval);
|
||||
tprintf(", %lu, ", tcp->u_arg[1]);
|
||||
printstr_ex(tcp, tcp->u_arg[0], tcp->u_rval,
|
||||
QUOTE_FORCE_HEX);
|
||||
tprintf(", %" PRI_klu ", ", tcp->u_arg[1]);
|
||||
printflags(getrandom_flags, tcp->u_arg[2], "GRND_???");
|
||||
}
|
||||
return 0;
|
||||
|
4
hdio.c
4
hdio.c
@ -36,8 +36,8 @@ typedef struct hd_geometry struct_hd_geometry;
|
||||
|
||||
#include MPERS_DEFS
|
||||
|
||||
MPERS_PRINTER_DECL(int, hdio_ioctl, struct tcb *tcp,
|
||||
const unsigned int code, const long arg)
|
||||
MPERS_PRINTER_DECL(int, hdio_ioctl, struct tcb *const tcp,
|
||||
const unsigned int code, const kernel_ulong_t arg)
|
||||
{
|
||||
switch (code) {
|
||||
case HDIO_GETGEO:
|
||||
|
23
hostname.c
23
hostname.c
@ -1,9 +1,24 @@
|
||||
#include "defs.h"
|
||||
|
||||
#ifdef HAVE_LINUX_UTSNAME_H
|
||||
# include <linux/utsname.h>
|
||||
#endif
|
||||
|
||||
#ifndef __NEW_UTS_LEN
|
||||
# define __NEW_UTS_LEN 64
|
||||
#endif
|
||||
|
||||
SYS_FUNC(sethostname)
|
||||
{
|
||||
printstr(tcp, tcp->u_arg[0], tcp->u_arg[1]);
|
||||
tprintf(", %lu", tcp->u_arg[1]);
|
||||
unsigned int len = tcp->u_arg[1];
|
||||
|
||||
if (len > __NEW_UTS_LEN) {
|
||||
printaddr(tcp->u_arg[0]);
|
||||
} else {
|
||||
printstrn(tcp, tcp->u_arg[0], len);
|
||||
}
|
||||
|
||||
tprintf(", %u", len);
|
||||
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
@ -15,8 +30,8 @@ SYS_FUNC(gethostname)
|
||||
if (syserror(tcp))
|
||||
printaddr(tcp->u_arg[0]);
|
||||
else
|
||||
printstr(tcp, tcp->u_arg[0], -1);
|
||||
tprintf(", %lu", tcp->u_arg[1]);
|
||||
printstr(tcp, tcp->u_arg[0]);
|
||||
tprintf(", %" PRI_klu, tcp->u_arg[1]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
129
io.c
129
io.c
@ -41,8 +41,8 @@ SYS_FUNC(read)
|
||||
if (syserror(tcp))
|
||||
printaddr(tcp->u_arg[1]);
|
||||
else
|
||||
printstr(tcp, tcp->u_arg[1], tcp->u_rval);
|
||||
tprintf(", %lu", tcp->u_arg[2]);
|
||||
printstrn(tcp, tcp->u_arg[1], tcp->u_rval);
|
||||
tprintf(", %" PRI_klu, tcp->u_arg[2]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -51,22 +51,22 @@ SYS_FUNC(write)
|
||||
{
|
||||
printfd(tcp, tcp->u_arg[0]);
|
||||
tprints(", ");
|
||||
printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
|
||||
tprintf(", %lu", tcp->u_arg[2]);
|
||||
printstrn(tcp, tcp->u_arg[1], tcp->u_arg[2]);
|
||||
tprintf(", %" PRI_klu, tcp->u_arg[2]);
|
||||
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
|
||||
struct print_iovec_config {
|
||||
enum iov_decode decode_iov;
|
||||
unsigned long data_size;
|
||||
kernel_ulong_t data_size;
|
||||
};
|
||||
|
||||
static bool
|
||||
print_iovec(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
|
||||
{
|
||||
const unsigned long *iov;
|
||||
unsigned long iov_buf[2], len;
|
||||
const kernel_ulong_t *iov;
|
||||
kernel_ulong_t iov_buf[2], len;
|
||||
struct print_iovec_config *c = data;
|
||||
|
||||
if (elem_size < sizeof(iov_buf)) {
|
||||
@ -85,13 +85,15 @@ print_iovec(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
|
||||
case IOV_DECODE_STR:
|
||||
if (len > c->data_size)
|
||||
len = c->data_size;
|
||||
c->data_size -= len;
|
||||
printstr(tcp, iov[0], len);
|
||||
if (c->data_size != (kernel_ulong_t) -1)
|
||||
c->data_size -= len;
|
||||
printstrn(tcp, iov[0], len);
|
||||
break;
|
||||
case IOV_DECODE_NETLINK:
|
||||
if (len > c->data_size)
|
||||
len = c->data_size;
|
||||
c->data_size -= len;
|
||||
if (c->data_size != (kernel_ulong_t) -1)
|
||||
c->data_size -= len;
|
||||
decode_netlink(tcp, iov[0], iov[1]);
|
||||
break;
|
||||
default:
|
||||
@ -99,7 +101,7 @@ print_iovec(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
|
||||
break;
|
||||
}
|
||||
|
||||
tprintf(", iov_len=%lu}", iov[1]);
|
||||
tprintf(", iov_len=%" PRI_klu "}", iov[1]);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -109,22 +111,16 @@ print_iovec(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
|
||||
* Example: recvmsg returing a short read.
|
||||
*/
|
||||
void
|
||||
tprint_iov_upto(struct tcb *tcp, unsigned long len, unsigned long addr,
|
||||
enum iov_decode decode_iov, unsigned long data_size)
|
||||
tprint_iov_upto(struct tcb *const tcp, const kernel_ulong_t len,
|
||||
const kernel_ulong_t addr, const enum iov_decode decode_iov,
|
||||
const kernel_ulong_t data_size)
|
||||
{
|
||||
unsigned long iov[2];
|
||||
kernel_ulong_t iov[2];
|
||||
struct print_iovec_config config =
|
||||
{ .decode_iov = decode_iov, .data_size = data_size };
|
||||
|
||||
print_array(tcp, addr, len, iov, current_wordsize * 2,
|
||||
umoven_or_printaddr, print_iovec, &config);
|
||||
}
|
||||
|
||||
void
|
||||
tprint_iov(struct tcb *tcp, unsigned long len, unsigned long addr,
|
||||
enum iov_decode decode_iov)
|
||||
{
|
||||
tprint_iov_upto(tcp, len, addr, decode_iov, (unsigned long) -1L);
|
||||
umoven_or_printaddr_ignore_syserror, print_iovec, &config);
|
||||
}
|
||||
|
||||
SYS_FUNC(readv)
|
||||
@ -134,8 +130,9 @@ SYS_FUNC(readv)
|
||||
tprints(", ");
|
||||
} else {
|
||||
tprint_iov_upto(tcp, tcp->u_arg[2], tcp->u_arg[1],
|
||||
syserror(tcp) ? IOV_DECODE_ADDR :
|
||||
IOV_DECODE_STR, tcp->u_rval);
|
||||
tprintf(", %lu", tcp->u_arg[2]);
|
||||
tprintf(", %" PRI_klu, tcp->u_arg[2]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -145,22 +142,11 @@ SYS_FUNC(writev)
|
||||
printfd(tcp, tcp->u_arg[0]);
|
||||
tprints(", ");
|
||||
tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], IOV_DECODE_STR);
|
||||
tprintf(", %lu", tcp->u_arg[2]);
|
||||
tprintf(", %" PRI_klu, tcp->u_arg[2]);
|
||||
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
|
||||
/* The SH4 ABI does allow long longs in odd-numbered registers, but
|
||||
does not allow them to be split between registers and memory - and
|
||||
there are only four argument registers for normal functions. As a
|
||||
result pread takes an extra padding argument before the offset. This
|
||||
was changed late in the 2.4 series (around 2.4.20). */
|
||||
#if defined(SH)
|
||||
#define PREAD_OFFSET_ARG 4
|
||||
#else
|
||||
#define PREAD_OFFSET_ARG 3
|
||||
#endif
|
||||
|
||||
SYS_FUNC(pread)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
@ -170,9 +156,9 @@ SYS_FUNC(pread)
|
||||
if (syserror(tcp))
|
||||
printaddr(tcp->u_arg[1]);
|
||||
else
|
||||
printstr(tcp, tcp->u_arg[1], tcp->u_rval);
|
||||
tprintf(", %lu, ", tcp->u_arg[2]);
|
||||
printllval(tcp, "%lld", PREAD_OFFSET_ARG);
|
||||
printstrn(tcp, tcp->u_arg[1], tcp->u_rval);
|
||||
tprintf(", %" PRI_klu ", ", tcp->u_arg[2]);
|
||||
printllval(tcp, "%lld", 3);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -181,9 +167,9 @@ SYS_FUNC(pwrite)
|
||||
{
|
||||
printfd(tcp, tcp->u_arg[0]);
|
||||
tprints(", ");
|
||||
printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
|
||||
tprintf(", %lu, ", tcp->u_arg[2]);
|
||||
printllval(tcp, "%lld", PREAD_OFFSET_ARG);
|
||||
printstrn(tcp, tcp->u_arg[1], tcp->u_arg[2]);
|
||||
tprintf(", %" PRI_klu ", ", tcp->u_arg[2]);
|
||||
printllval(tcp, "%lld", 3);
|
||||
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
@ -191,38 +177,20 @@ SYS_FUNC(pwrite)
|
||||
static void
|
||||
print_lld_from_low_high_val(struct tcb *tcp, int arg)
|
||||
{
|
||||
#if SIZEOF_LONG > 4 && SIZEOF_LONG == SIZEOF_LONG_LONG
|
||||
# if SUPPORTED_PERSONALITIES > 1
|
||||
# ifdef X86_64
|
||||
if (current_personality != 1)
|
||||
# else
|
||||
if (current_wordsize == sizeof(long))
|
||||
# endif
|
||||
# endif
|
||||
tprintf("%ld", tcp->u_arg[arg]);
|
||||
# if SUPPORTED_PERSONALITIES > 1
|
||||
else
|
||||
tprintf("%ld",
|
||||
((unsigned long) tcp->u_arg[arg + 1] << current_wordsize * 8)
|
||||
| (unsigned long) tcp->u_arg[arg]);
|
||||
# endif
|
||||
#elif SIZEOF_LONG > 4
|
||||
# error Unsupported configuration: SIZEOF_LONG > 4 && SIZEOF_LONG_LONG > SIZEOF_LONG
|
||||
#elif HAVE_STRUCT_TCB_EXT_ARG
|
||||
# if SUPPORTED_PERSONALITIES > 1
|
||||
if (current_personality == 1) {
|
||||
tprintf("%lld",
|
||||
(widen_to_ull(tcp->u_arg[arg + 1]) << sizeof(long) * 8)
|
||||
| widen_to_ull(tcp->u_arg[arg]));
|
||||
#if SIZEOF_KERNEL_LONG_T > 4
|
||||
# ifndef current_klongsize
|
||||
if (current_klongsize < SIZEOF_KERNEL_LONG_T) {
|
||||
tprintf("%" PRI_kld, (tcp->u_arg[arg + 1] << 32)
|
||||
| tcp->u_arg[arg]);
|
||||
} else
|
||||
# endif
|
||||
# endif /* !current_klongsize */
|
||||
{
|
||||
tprintf("%lld", tcp->ext_arg[arg]);
|
||||
tprintf("%" PRI_kld, tcp->u_arg[arg]);
|
||||
}
|
||||
#else /* SIZEOF_LONG_LONG > SIZEOF_LONG && !HAVE_STRUCT_TCB_EXT_ARG */
|
||||
#else /* SIZEOF_KERNEL_LONG_T == 4 */
|
||||
tprintf("%lld",
|
||||
(widen_to_ull(tcp->u_arg[arg + 1]) << sizeof(long) * 8)
|
||||
| widen_to_ull(tcp->u_arg[arg]));
|
||||
((long long) tcp->u_arg[arg + 1] << 32)
|
||||
| ((long long) tcp->u_arg[arg]));
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -235,9 +203,13 @@ do_preadv(struct tcb *tcp, const int flags_arg)
|
||||
printfd(tcp, tcp->u_arg[0]);
|
||||
tprints(", ");
|
||||
} else {
|
||||
tprint_iov_upto(tcp, tcp->u_arg[2], tcp->u_arg[1], IOV_DECODE_STR,
|
||||
tcp->u_rval);
|
||||
tprintf(", %lu, ", tcp->u_arg[2]);
|
||||
kernel_ulong_t len =
|
||||
truncate_kulong_to_current_wordsize(tcp->u_arg[2]);
|
||||
|
||||
tprint_iov_upto(tcp, len, tcp->u_arg[1],
|
||||
syserror(tcp) ? IOV_DECODE_ADDR :
|
||||
IOV_DECODE_STR, tcp->u_rval);
|
||||
tprintf(", %" PRI_klu ", ", len);
|
||||
print_lld_from_low_high_val(tcp, 3);
|
||||
if (flags_arg >= 0) {
|
||||
tprints(", ");
|
||||
@ -260,10 +232,13 @@ SYS_FUNC(preadv2)
|
||||
static int
|
||||
do_pwritev(struct tcb *tcp, const int flags_arg)
|
||||
{
|
||||
kernel_ulong_t len =
|
||||
truncate_kulong_to_current_wordsize(tcp->u_arg[2]);
|
||||
|
||||
printfd(tcp, tcp->u_arg[0]);
|
||||
tprints(", ");
|
||||
tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], IOV_DECODE_STR);
|
||||
tprintf(", %lu, ", tcp->u_arg[2]);
|
||||
tprint_iov(tcp, len, tcp->u_arg[1], IOV_DECODE_STR);
|
||||
tprintf(", %" PRI_klu ", ", len);
|
||||
print_lld_from_low_high_val(tcp, 3);
|
||||
if (flags_arg >= 0) {
|
||||
tprints(", ");
|
||||
@ -294,7 +269,7 @@ SYS_FUNC(tee)
|
||||
printfd(tcp, tcp->u_arg[1]);
|
||||
tprints(", ");
|
||||
/* size_t len */
|
||||
tprintf("%lu, ", tcp->u_arg[2]);
|
||||
tprintf("%" PRI_klu ", ", tcp->u_arg[2]);
|
||||
/* unsigned int flags */
|
||||
printflags(splice_flags, tcp->u_arg[3], "SPLICE_F_???");
|
||||
|
||||
@ -316,7 +291,7 @@ SYS_FUNC(splice)
|
||||
printnum_int64(tcp, tcp->u_arg[3], "%" PRId64);
|
||||
tprints(", ");
|
||||
/* size_t len */
|
||||
tprintf("%lu, ", tcp->u_arg[4]);
|
||||
tprintf("%" PRI_klu ", ", tcp->u_arg[4]);
|
||||
/* unsigned int flags */
|
||||
printflags(splice_flags, tcp->u_arg[5], "SPLICE_F_???");
|
||||
|
||||
@ -330,7 +305,7 @@ SYS_FUNC(vmsplice)
|
||||
tprints(", ");
|
||||
/* const struct iovec *iov, unsigned long nr_segs */
|
||||
tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], IOV_DECODE_STR);
|
||||
tprintf(", %lu, ", tcp->u_arg[2]);
|
||||
tprintf(", %" PRI_klu ", ", tcp->u_arg[2]);
|
||||
/* unsigned int flags */
|
||||
printflags(splice_flags, tcp->u_arg[3], "SPLICE_F_???");
|
||||
|
||||
|
16
ioctl.c
16
ioctl.c
@ -42,7 +42,7 @@
|
||||
static int
|
||||
compare(const void *a, const void *b)
|
||||
{
|
||||
const unsigned int code1 = (const unsigned long) a;
|
||||
const unsigned int code1 = (const uintptr_t) a;
|
||||
const unsigned int code2 = ((struct_ioctlent *) b)->code;
|
||||
return (code1 > code2) ? 1 : (code1 < code2) ? -1 : 0;
|
||||
}
|
||||
@ -52,7 +52,7 @@ ioctl_lookup(const unsigned int code)
|
||||
{
|
||||
struct_ioctlent *iop;
|
||||
|
||||
iop = bsearch((const void *) (const unsigned long) code, ioctlent,
|
||||
iop = bsearch((const void *) (const uintptr_t) code, ioctlent,
|
||||
nioctlents, sizeof(ioctlent[0]), compare);
|
||||
while (iop > ioctlent) {
|
||||
iop--;
|
||||
@ -79,7 +79,7 @@ ioctl_print_code(const unsigned int code)
|
||||
{
|
||||
tprints("_IOC(");
|
||||
printflags(ioctl_dirs, _IOC_DIR(code), "_IOC_???");
|
||||
tprintf(", 0x%02x, 0x%02x, 0x%02x)",
|
||||
tprintf(", %#x, %#x, %#x)",
|
||||
_IOC_TYPE(code), _IOC_NR(code), _IOC_SIZE(code));
|
||||
}
|
||||
|
||||
@ -227,7 +227,7 @@ static int
|
||||
ioctl_decode(struct tcb *tcp)
|
||||
{
|
||||
const unsigned int code = tcp->u_arg[1];
|
||||
const long arg = tcp->u_arg[2];
|
||||
const kernel_ulong_t arg = tcp->u_arg[2];
|
||||
|
||||
switch (_IOC_TYPE(code)) {
|
||||
#if defined(ALPHA) || defined(POWERPC)
|
||||
@ -255,10 +255,8 @@ ioctl_decode(struct tcb *tcp)
|
||||
return block_ioctl(tcp, code, arg);
|
||||
case 'X':
|
||||
return fs_x_ioctl(tcp, code, arg);
|
||||
#ifdef HAVE_SCSI_SG_H
|
||||
case 0x22:
|
||||
return scsi_ioctl(tcp, code, arg);
|
||||
#endif
|
||||
case 'L':
|
||||
return loop_ioctl(tcp, code, arg);
|
||||
case 'M':
|
||||
@ -281,6 +279,10 @@ ioctl_decode(struct tcb *tcp)
|
||||
#ifdef HAVE_LINUX_BTRFS_H
|
||||
case 0x94:
|
||||
return btrfs_ioctl(tcp, code, arg);
|
||||
#endif
|
||||
#ifdef HAVE_LINUX_DM_IOCTL_H
|
||||
case 0xfd:
|
||||
return dm_ioctl(tcp, code, arg);
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
@ -319,7 +321,7 @@ SYS_FUNC(ioctl)
|
||||
if (ret)
|
||||
--ret;
|
||||
else
|
||||
tprintf(", %#lx", tcp->u_arg[2]);
|
||||
tprintf(", %#" PRI_klx, tcp->u_arg[2]);
|
||||
ret |= RVAL_DECODED;
|
||||
} else {
|
||||
if (ret)
|
||||
|
43
ioctl_iocdef.c
Normal file
43
ioctl_iocdef.c
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (c) 2017 Alexey Neyman <stilor@att.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file is *PREPROCESSED*, not *COMPILED* for host and the result
|
||||
* is included into ioctlsort (which is compiled for build). Since some
|
||||
* of these values are used in structure initializers, they cannot be
|
||||
* defined as 'const unsigned int' - instead, they have to be macros.
|
||||
* Hence, the result of preprocessing will be run through sed to change
|
||||
* 'DEFINE' into '#define'
|
||||
*/
|
||||
#include <linux/ioctl.h>
|
||||
|
||||
DEFINE HOST_IOC_NONE _IOC_NONE
|
||||
DEFINE HOST_IOC_READ _IOC_READ
|
||||
DEFINE HOST_IOC_WRITE _IOC_WRITE
|
||||
|
||||
DEFINE HOST_IOC_SIZESHIFT _IOC_SIZESHIFT
|
||||
DEFINE HOST_IOC_DIRSHIFT _IOC_DIRSHIFT
|
@ -33,7 +33,8 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <linux/ioctl.h>
|
||||
|
||||
#include "ioctl_iocdef.h"
|
||||
|
||||
struct ioctlent {
|
||||
const char *info;
|
||||
|
2
ioperm.c
2
ioperm.c
@ -2,7 +2,7 @@
|
||||
|
||||
SYS_FUNC(ioperm)
|
||||
{
|
||||
tprintf("%#lx, %#lx, %d",
|
||||
tprintf("%#" PRI_klx ", %#" PRI_klx ", %d",
|
||||
tcp->u_arg[0], tcp->u_arg[1], (int) tcp->u_arg[2]);
|
||||
|
||||
return RVAL_DECODED;
|
||||
|
2
ipc.c
2
ipc.c
@ -45,7 +45,7 @@ SYS_FUNC(ipc)
|
||||
|
||||
unsigned int i;
|
||||
for (i = 1; i < tcp->s_ent->nargs; ++i)
|
||||
tprintf(", %#lx", tcp->u_arg[i]);
|
||||
tprintf(", %#" PRI_klx, tcp->u_arg[i]);
|
||||
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
|
@ -25,6 +25,9 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef STRACE_IPC_DEFS_H
|
||||
#define STRACE_IPC_DEFS_H
|
||||
|
||||
#ifdef HAVE_SYS_IPC_H
|
||||
# include <sys/ipc.h>
|
||||
#elif defined HAVE_LINUX_IPC_H
|
||||
@ -40,3 +43,5 @@
|
||||
#define PRINTCTL(flagset, arg, dflt) \
|
||||
if ((arg) & IPC_64) tprints("IPC_64|"); \
|
||||
printxval((flagset), (arg) &~ IPC_64, dflt)
|
||||
|
||||
#endif /* !STRACE_IPC_DEFS_H */
|
||||
|
27
ipc_msg.c
27
ipc_msg.c
@ -44,19 +44,21 @@
|
||||
|
||||
SYS_FUNC(msgget)
|
||||
{
|
||||
if (tcp->u_arg[0])
|
||||
tprintf("%#lx, ", tcp->u_arg[0]);
|
||||
const int key = (int) tcp->u_arg[0];
|
||||
if (key)
|
||||
tprintf("%#x", key);
|
||||
else
|
||||
tprints("IPC_PRIVATE, ");
|
||||
tprints("IPC_PRIVATE");
|
||||
tprints(", ");
|
||||
if (printflags(resource_flags, tcp->u_arg[1] & ~0777, NULL) != 0)
|
||||
tprints("|");
|
||||
tprintf("%#lo", tcp->u_arg[1] & 0777);
|
||||
print_numeric_umode_t(tcp->u_arg[1] & 0777);
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
|
||||
static void
|
||||
tprint_msgsnd(struct tcb *tcp, const long addr, const unsigned long count,
|
||||
const unsigned long flags)
|
||||
tprint_msgsnd(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
const kernel_ulong_t count, const unsigned int flags)
|
||||
{
|
||||
tprint_msgbuf(tcp, addr, count);
|
||||
printflags(ipc_msg_flags, flags, "MSG_???");
|
||||
@ -76,15 +78,16 @@ SYS_FUNC(msgsnd)
|
||||
}
|
||||
|
||||
static void
|
||||
tprint_msgrcv(struct tcb *tcp, const long addr, const unsigned long count,
|
||||
const long msgtyp)
|
||||
tprint_msgrcv(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
const kernel_ulong_t count, const kernel_ulong_t msgtyp)
|
||||
{
|
||||
tprint_msgbuf(tcp, addr, count);
|
||||
tprintf("%ld, ", msgtyp);
|
||||
tprintf("%" PRI_kld ", ", msgtyp);
|
||||
}
|
||||
|
||||
static int
|
||||
fetch_msgrcv_args(struct tcb *tcp, const long addr, unsigned long *pair)
|
||||
fetch_msgrcv_args(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
kernel_ulong_t *const pair)
|
||||
{
|
||||
if (current_wordsize == sizeof(*pair)) {
|
||||
if (umoven_or_printaddr(tcp, addr, 2 * sizeof(*pair), pair))
|
||||
@ -115,10 +118,10 @@ SYS_FUNC(msgrcv)
|
||||
tprint_msgrcv(tcp, tcp->u_arg[3],
|
||||
tcp->u_arg[1], tcp->u_arg[4]);
|
||||
} else {
|
||||
unsigned long pair[2];
|
||||
kernel_ulong_t pair[2];
|
||||
|
||||
if (fetch_msgrcv_args(tcp, tcp->u_arg[3], pair))
|
||||
tprintf(", %lu, ", tcp->u_arg[1]);
|
||||
tprintf(", %" PRI_klu ", ", tcp->u_arg[1]);
|
||||
else
|
||||
tprint_msgrcv(tcp, pair[0],
|
||||
tcp->u_arg[1], pair[1]);
|
||||
|
@ -51,7 +51,7 @@ typedef struct msqid64_ds msqid_ds_t;
|
||||
#include "xlat/msgctl_flags.h"
|
||||
|
||||
static void
|
||||
print_msqid_ds(struct tcb *tcp, const long addr, int cmd)
|
||||
print_msqid_ds(struct tcb *const tcp, const kernel_ulong_t addr, int cmd)
|
||||
{
|
||||
/* TODO: We don't properly decode old compat ipc calls. */
|
||||
if (cmd & IPC_64)
|
||||
@ -67,7 +67,7 @@ print_msqid_ds(struct tcb *tcp, const long addr, int cmd)
|
||||
printuid("uid=", msqid_ds.msg_perm.uid);
|
||||
printuid(", gid=", msqid_ds.msg_perm.gid);
|
||||
tprints(", mode=");
|
||||
tprints(sprintmode(msqid_ds.msg_perm.mode));
|
||||
print_numeric_umode_t(msqid_ds.msg_perm.mode);
|
||||
|
||||
if (cmd != IPC_STAT) {
|
||||
tprints("}, ...}");
|
||||
@ -97,11 +97,11 @@ print_msqid_ds(struct tcb *tcp, const long addr, int cmd)
|
||||
SYS_FUNC(msgctl)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
tprintf("%lu, ", tcp->u_arg[0]);
|
||||
tprintf("%d, ", (int) tcp->u_arg[0]);
|
||||
PRINTCTL(msgctl_flags, tcp->u_arg[1], "MSG_???");
|
||||
tprints(", ");
|
||||
} else {
|
||||
const long addr = tcp->u_arg[indirect_ipccall(tcp) ? 3 : 2];
|
||||
const kernel_ulong_t addr = tcp->u_arg[indirect_ipccall(tcp) ? 3 : 2];
|
||||
print_msqid_ds(tcp, addr, tcp->u_arg[1]);
|
||||
}
|
||||
return 0;
|
||||
|
28
ipc_sem.c
28
ipc_sem.c
@ -57,7 +57,8 @@ print_sembuf(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
|
||||
#endif
|
||||
|
||||
static void
|
||||
tprint_sembuf_array(struct tcb *tcp, const long addr, const unsigned long count)
|
||||
tprint_sembuf_array(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
const unsigned int count)
|
||||
{
|
||||
#if defined HAVE_SYS_SEM_H || defined HAVE_LINUX_SEM_H
|
||||
struct sembuf sb;
|
||||
@ -66,12 +67,12 @@ tprint_sembuf_array(struct tcb *tcp, const long addr, const unsigned long count)
|
||||
#else
|
||||
printaddr(addr);
|
||||
#endif
|
||||
tprintf(", %lu", count);
|
||||
tprintf(", %u", count);
|
||||
}
|
||||
|
||||
SYS_FUNC(semop)
|
||||
{
|
||||
tprintf("%lu, ", tcp->u_arg[0]);
|
||||
tprintf("%d, ", (int) tcp->u_arg[0]);
|
||||
if (indirect_ipccall(tcp)) {
|
||||
tprint_sembuf_array(tcp, tcp->u_arg[3], tcp->u_arg[1]);
|
||||
} else {
|
||||
@ -82,7 +83,7 @@ SYS_FUNC(semop)
|
||||
|
||||
SYS_FUNC(semtimedop)
|
||||
{
|
||||
tprintf("%lu, ", tcp->u_arg[0]);
|
||||
tprintf("%d, ", (int) tcp->u_arg[0]);
|
||||
if (indirect_ipccall(tcp)) {
|
||||
tprint_sembuf_array(tcp, tcp->u_arg[3], tcp->u_arg[1]);
|
||||
tprints(", ");
|
||||
@ -101,26 +102,31 @@ SYS_FUNC(semtimedop)
|
||||
|
||||
SYS_FUNC(semget)
|
||||
{
|
||||
if (tcp->u_arg[0])
|
||||
tprintf("%#lx", tcp->u_arg[0]);
|
||||
const int key = (int) tcp->u_arg[0];
|
||||
if (key)
|
||||
tprintf("%#x", key);
|
||||
else
|
||||
tprints("IPC_PRIVATE");
|
||||
tprintf(", %lu, ", tcp->u_arg[1]);
|
||||
tprintf(", %d, ", (int) tcp->u_arg[1]);
|
||||
if (printflags(resource_flags, tcp->u_arg[2] & ~0777, NULL) != 0)
|
||||
tprints("|");
|
||||
tprintf("%#lo", tcp->u_arg[2] & 0777);
|
||||
print_numeric_umode_t(tcp->u_arg[2] & 0777);
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
|
||||
SYS_FUNC(semctl)
|
||||
{
|
||||
tprintf("%lu, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
|
||||
tprintf("%d, %d, ", (int) tcp->u_arg[0], (int) tcp->u_arg[1]);
|
||||
PRINTCTL(semctl_flags, tcp->u_arg[2], "SEM_???");
|
||||
tprints(", ");
|
||||
if (indirect_ipccall(tcp)) {
|
||||
if (indirect_ipccall(tcp)
|
||||
#ifdef SPARC64
|
||||
&& current_personality != 0
|
||||
#endif
|
||||
) {
|
||||
printnum_ptr(tcp, tcp->u_arg[3]);
|
||||
} else {
|
||||
tprintf("%#lx", tcp->u_arg[3]);
|
||||
printaddr(tcp->u_arg[3]);
|
||||
}
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
|
21
ipc_shm.c
21
ipc_shm.c
@ -43,21 +43,22 @@
|
||||
|
||||
SYS_FUNC(shmget)
|
||||
{
|
||||
if (tcp->u_arg[0])
|
||||
tprintf("%#lx", tcp->u_arg[0]);
|
||||
const int key = (int) tcp->u_arg[0];
|
||||
if (key)
|
||||
tprintf("%#x", key);
|
||||
else
|
||||
tprints("IPC_PRIVATE");
|
||||
tprintf(", %lu, ", tcp->u_arg[1]);
|
||||
tprintf(", %" PRI_klu ", ", tcp->u_arg[1]);
|
||||
if (printflags(shm_resource_flags, tcp->u_arg[2] & ~0777, NULL) != 0)
|
||||
tprints("|");
|
||||
tprintf("%#lo", tcp->u_arg[2] & 0777);
|
||||
print_numeric_umode_t(tcp->u_arg[2] & 0777);
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
|
||||
SYS_FUNC(shmat)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
tprintf("%lu, ", tcp->u_arg[0]);
|
||||
tprintf("%d, ", (int) tcp->u_arg[0]);
|
||||
if (indirect_ipccall(tcp)) {
|
||||
printaddr(tcp->u_arg[3]);
|
||||
tprints(", ");
|
||||
@ -72,10 +73,14 @@ SYS_FUNC(shmat)
|
||||
if (syserror(tcp))
|
||||
return 0;
|
||||
if (indirect_ipccall(tcp)) {
|
||||
unsigned long raddr;
|
||||
if (umove(tcp, tcp->u_arg[2], &raddr) < 0)
|
||||
union {
|
||||
uint64_t r64;
|
||||
uint32_t r32;
|
||||
} u;
|
||||
if (umoven(tcp, tcp->u_arg[2], current_wordsize, &u) < 0)
|
||||
return RVAL_NONE;
|
||||
tcp->u_rval = raddr;
|
||||
tcp->u_rval = (sizeof(u.r32) == current_wordsize)
|
||||
? u.r32 : u.r64;
|
||||
}
|
||||
return RVAL_HEX;
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ typedef struct shmid64_ds shmid_ds_t;
|
||||
#include "xlat/shmctl_flags.h"
|
||||
|
||||
static void
|
||||
print_shmid_ds(struct tcb *tcp, const long addr, int cmd)
|
||||
print_shmid_ds(struct tcb *const tcp, const kernel_ulong_t addr, int cmd)
|
||||
{
|
||||
/* TODO: We don't properly decode old compat ipc calls. */
|
||||
if (cmd & IPC_64)
|
||||
@ -67,7 +67,7 @@ print_shmid_ds(struct tcb *tcp, const long addr, int cmd)
|
||||
printuid("uid=", shmid_ds.shm_perm.uid);
|
||||
printuid(", gid=", shmid_ds.shm_perm.gid);
|
||||
tprints(", mode=");
|
||||
tprints(sprintmode(shmid_ds.shm_perm.mode));
|
||||
print_numeric_umode_t(shmid_ds.shm_perm.mode);
|
||||
|
||||
if (cmd != IPC_STAT) {
|
||||
tprints("}, ...}");
|
||||
@ -97,11 +97,11 @@ print_shmid_ds(struct tcb *tcp, const long addr, int cmd)
|
||||
SYS_FUNC(shmctl)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
tprintf("%lu, ", tcp->u_arg[0]);
|
||||
tprintf("%d, ", (int) tcp->u_arg[0]);
|
||||
PRINTCTL(shmctl_flags, tcp->u_arg[1], "SHM_???");
|
||||
tprints(", ");
|
||||
} else {
|
||||
const long addr = tcp->u_arg[indirect_ipccall(tcp) ? 3 : 2];
|
||||
const kernel_ulong_t addr = tcp->u_arg[indirect_ipccall(tcp) ? 3 : 2];
|
||||
print_shmid_ds(tcp, addr, tcp->u_arg[1]);
|
||||
}
|
||||
return 0;
|
||||
|
6
kcmp.c
6
kcmp.c
@ -33,8 +33,8 @@ SYS_FUNC(kcmp)
|
||||
pid_t pid1 = tcp->u_arg[0];
|
||||
pid_t pid2 = tcp->u_arg[1];
|
||||
int type = tcp->u_arg[2];
|
||||
unsigned long idx1 = tcp->u_arg[3];
|
||||
unsigned long idx2 = tcp->u_arg[4];
|
||||
kernel_ulong_t idx1 = tcp->u_arg[3];
|
||||
kernel_ulong_t idx2 = tcp->u_arg[4];
|
||||
|
||||
tprintf("%d, %d, ", pid1, pid2);
|
||||
printxval(kcmp_types, type, "KCMP_???");
|
||||
@ -51,7 +51,7 @@ SYS_FUNC(kcmp)
|
||||
case KCMP_VM:
|
||||
break;
|
||||
default:
|
||||
tprintf(", %#lx, %#lx", idx1, idx2);
|
||||
tprintf(", %#" PRI_klx ", %#" PRI_klx, idx1, idx2);
|
||||
}
|
||||
|
||||
return RVAL_DECODED;
|
||||
|
@ -26,8 +26,7 @@
|
||||
*/
|
||||
|
||||
#ifndef STRACE_KERNEL_TYPES_H
|
||||
|
||||
# define STRACE_KERNEL_TYPES_H
|
||||
#define STRACE_KERNEL_TYPES_H
|
||||
|
||||
# if defined HAVE___KERNEL_LONG_T && defined HAVE___KERNEL_ULONG_T
|
||||
|
||||
@ -36,7 +35,7 @@
|
||||
typedef __kernel_long_t kernel_long_t;
|
||||
typedef __kernel_ulong_t kernel_ulong_t;
|
||||
|
||||
# elif defined __x86_64__ && defined __ILP32__
|
||||
# elif (defined __x86_64__ && defined __ILP32__) || defined LINUX_MIPSN32
|
||||
|
||||
typedef long long kernel_long_t;
|
||||
typedef unsigned long long kernel_ulong_t;
|
||||
@ -55,4 +54,4 @@ typedef struct {
|
||||
char d_name[1];
|
||||
} kernel_dirent;
|
||||
|
||||
#endif
|
||||
#endif /* !STRACE_KERNEL_TYPES_H */
|
||||
|
32
kexec.c
32
kexec.c
@ -40,8 +40,8 @@
|
||||
static bool
|
||||
print_seg(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
|
||||
{
|
||||
const unsigned long *seg;
|
||||
unsigned long seg_buf[4];
|
||||
const kernel_ulong_t *seg;
|
||||
kernel_ulong_t seg_buf[4];
|
||||
|
||||
if (elem_size < sizeof(seg_buf)) {
|
||||
unsigned int i;
|
||||
@ -53,25 +53,25 @@ print_seg(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
|
||||
seg = elem_buf;
|
||||
}
|
||||
|
||||
tprints("{");
|
||||
tprints("{buf=");
|
||||
printaddr(seg[0]);
|
||||
tprintf(", %lu, ", seg[1]);
|
||||
tprintf(", bufsz=%" PRI_klu ", mem=", seg[1]);
|
||||
printaddr(seg[2]);
|
||||
tprintf(", %lu}", seg[3]);
|
||||
tprintf(", memsz=%" PRI_klu "}", seg[3]);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void
|
||||
print_kexec_segments(struct tcb *tcp, const unsigned long addr,
|
||||
const unsigned long len)
|
||||
print_kexec_segments(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
const kernel_ulong_t len)
|
||||
{
|
||||
if (len > KEXEC_SEGMENT_MAX) {
|
||||
printaddr(addr);
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned long seg[4];
|
||||
kernel_ulong_t seg[4];
|
||||
const size_t sizeof_seg = ARRAY_SIZE(seg) * current_wordsize;
|
||||
|
||||
print_array(tcp, addr, len, seg, sizeof_seg,
|
||||
@ -82,19 +82,19 @@ SYS_FUNC(kexec_load)
|
||||
{
|
||||
/* entry, nr_segments */
|
||||
printaddr(tcp->u_arg[0]);
|
||||
tprintf(", %lu, ", tcp->u_arg[1]);
|
||||
tprintf(", %" PRI_klu ", ", tcp->u_arg[1]);
|
||||
|
||||
/* segments */
|
||||
print_kexec_segments(tcp, tcp->u_arg[2], tcp->u_arg[1]);
|
||||
tprints(", ");
|
||||
|
||||
/* flags */
|
||||
unsigned long n = tcp->u_arg[3];
|
||||
printxval_long(kexec_arch_values, n & KEXEC_ARCH_MASK, "KEXEC_ARCH_???");
|
||||
n &= ~KEXEC_ARCH_MASK;
|
||||
kernel_ulong_t n = tcp->u_arg[3];
|
||||
printxval64(kexec_arch_values, n & KEXEC_ARCH_MASK, "KEXEC_ARCH_???");
|
||||
n &= ~(kernel_ulong_t) KEXEC_ARCH_MASK;
|
||||
if (n) {
|
||||
tprints("|");
|
||||
printflags_long(kexec_load_flags, n, "KEXEC_???");
|
||||
printflags64(kexec_load_flags, n, "KEXEC_???");
|
||||
}
|
||||
|
||||
return RVAL_DECODED;
|
||||
@ -111,12 +111,12 @@ SYS_FUNC(kexec_file_load)
|
||||
printfd(tcp, tcp->u_arg[1]);
|
||||
tprints(", ");
|
||||
/* cmdline_len */
|
||||
tprintf("%lu, ", tcp->u_arg[2]);
|
||||
tprintf("%" PRI_klu ", ", tcp->u_arg[2]);
|
||||
/* cmdline */
|
||||
printstr(tcp, tcp->u_arg[3], tcp->u_arg[2]);
|
||||
printstrn(tcp, tcp->u_arg[3], tcp->u_arg[2]);
|
||||
tprints(", ");
|
||||
/* flags */
|
||||
printflags_long(kexec_file_load_flags, tcp->u_arg[4], "KEXEC_FILE_???");
|
||||
printflags64(kexec_file_load_flags, tcp->u_arg[4], "KEXEC_FILE_???");
|
||||
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
|
182
keyctl.c
182
keyctl.c
@ -31,6 +31,12 @@ typedef int32_t key_serial_t;
|
||||
|
||||
#include "xlat/key_spec.h"
|
||||
|
||||
struct keyctl_dh_params {
|
||||
int32_t private;
|
||||
int32_t prime;
|
||||
int32_t base;
|
||||
};
|
||||
|
||||
static void
|
||||
print_keyring_serial_number(key_serial_t id)
|
||||
{
|
||||
@ -45,15 +51,15 @@ print_keyring_serial_number(key_serial_t id)
|
||||
SYS_FUNC(add_key)
|
||||
{
|
||||
/* type */
|
||||
printstr(tcp, tcp->u_arg[0], -1);
|
||||
printstr(tcp, tcp->u_arg[0]);
|
||||
/* description */
|
||||
tprints(", ");
|
||||
printstr(tcp, tcp->u_arg[1], -1);
|
||||
printstr(tcp, tcp->u_arg[1]);
|
||||
/* payload */
|
||||
tprints(", ");
|
||||
printstr(tcp, tcp->u_arg[2], tcp->u_arg[3]);
|
||||
printstrn(tcp, tcp->u_arg[2], tcp->u_arg[3]);
|
||||
/* payload length */
|
||||
tprintf(", %lu, ", tcp->u_arg[3]);
|
||||
tprintf(", %" PRI_klu ", ", tcp->u_arg[3]);
|
||||
/* keyring serial number */
|
||||
print_keyring_serial_number(tcp->u_arg[4]);
|
||||
|
||||
@ -63,13 +69,13 @@ SYS_FUNC(add_key)
|
||||
SYS_FUNC(request_key)
|
||||
{
|
||||
/* type */
|
||||
printstr(tcp, tcp->u_arg[0], -1);
|
||||
printstr(tcp, tcp->u_arg[0]);
|
||||
/* description */
|
||||
tprints(", ");
|
||||
printstr(tcp, tcp->u_arg[1], -1);
|
||||
printstr(tcp, tcp->u_arg[1]);
|
||||
/* callout_info */
|
||||
tprints(", ");
|
||||
printstr(tcp, tcp->u_arg[2], -1);
|
||||
printstr(tcp, tcp->u_arg[2]);
|
||||
/* keyring serial number */
|
||||
tprints(", ");
|
||||
print_keyring_serial_number(tcp->u_arg[3]);
|
||||
@ -85,12 +91,13 @@ keyctl_get_keyring_id(struct tcb *tcp, key_serial_t id, int create)
|
||||
}
|
||||
|
||||
static void
|
||||
keyctl_update_key(struct tcb *tcp, key_serial_t id, long addr, long len)
|
||||
keyctl_update_key(struct tcb *tcp, key_serial_t id, kernel_ulong_t addr,
|
||||
kernel_ulong_t len)
|
||||
{
|
||||
print_keyring_serial_number(id);
|
||||
tprints(", ");
|
||||
printstr(tcp, addr, len);
|
||||
tprintf(", %lu", len);
|
||||
printstrn(tcp, addr, len);
|
||||
tprintf(", %llu", zero_extend_signed_to_ull(len));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -102,7 +109,8 @@ keyctl_handle_key_key(struct tcb *tcp, key_serial_t id1, key_serial_t id2)
|
||||
}
|
||||
|
||||
static void
|
||||
keyctl_read_key(struct tcb *tcp, key_serial_t id, long addr, long len)
|
||||
keyctl_read_key(struct tcb *tcp, key_serial_t id, kernel_ulong_t addr,
|
||||
kernel_ulong_t len, bool has_nul)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
print_keyring_serial_number(id);
|
||||
@ -111,53 +119,58 @@ keyctl_read_key(struct tcb *tcp, key_serial_t id, long addr, long len)
|
||||
if (syserror(tcp))
|
||||
printaddr(addr);
|
||||
else {
|
||||
long rval = tcp->u_rval > len ?
|
||||
len : (tcp->u_rval ? -1 : 0);
|
||||
printstr(tcp, addr, rval);
|
||||
kernel_ulong_t rval = (tcp->u_rval >= 0) &&
|
||||
((kernel_ulong_t) tcp->u_rval > len) ? len :
|
||||
(kernel_ulong_t) tcp->u_rval;
|
||||
printstr_ex(tcp, addr, rval, has_nul ?
|
||||
QUOTE_OMIT_TRAILING_0 : 0);
|
||||
}
|
||||
tprintf(", %lu", len);
|
||||
tprintf(", %llu", zero_extend_signed_to_ull(len));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
keyctl_keyring_search(struct tcb *tcp, key_serial_t id1, long addr1,
|
||||
long addr2, key_serial_t id2)
|
||||
keyctl_keyring_search(struct tcb *tcp, key_serial_t id1, kernel_ulong_t addr1,
|
||||
kernel_ulong_t addr2, key_serial_t id2)
|
||||
{
|
||||
print_keyring_serial_number(id1);
|
||||
tprints(", ");
|
||||
printstr(tcp, addr1, -1);
|
||||
printstr(tcp, addr1);
|
||||
tprints(", ");
|
||||
printstr(tcp, addr2, -1);
|
||||
printstr(tcp, addr2);
|
||||
tprints(", ");
|
||||
print_keyring_serial_number(id2);
|
||||
}
|
||||
|
||||
static void
|
||||
keyctl_chown_key(struct tcb *tcp, key_serial_t id, int user, int group)
|
||||
keyctl_chown_key(struct tcb *tcp, key_serial_t id, unsigned user,
|
||||
unsigned group)
|
||||
{
|
||||
print_keyring_serial_number(id);
|
||||
tprintf(", %d, %d", user, group);
|
||||
printuid(", ", user);
|
||||
printuid(", ", group);
|
||||
}
|
||||
|
||||
static void
|
||||
keyctl_instantiate_key(struct tcb *tcp, key_serial_t id1, long addr,
|
||||
long len, key_serial_t id2)
|
||||
keyctl_instantiate_key(struct tcb *tcp, key_serial_t id1, kernel_ulong_t addr,
|
||||
kernel_ulong_t len, key_serial_t id2)
|
||||
{
|
||||
print_keyring_serial_number(id1);
|
||||
tprints(", ");
|
||||
printstr(tcp, addr, len);
|
||||
tprintf(", %lu, ", len);
|
||||
printstrn(tcp, addr, len);
|
||||
tprintf(", %llu, ", zero_extend_signed_to_ull(len));
|
||||
print_keyring_serial_number(id2);
|
||||
}
|
||||
|
||||
static void
|
||||
keyctl_instantiate_key_iov(struct tcb *tcp, key_serial_t id1,
|
||||
long addr, long len, key_serial_t id2)
|
||||
kernel_ulong_t addr, kernel_ulong_t len,
|
||||
key_serial_t id2)
|
||||
{
|
||||
print_keyring_serial_number(id1);
|
||||
tprints(", ");
|
||||
tprint_iov(tcp, len, addr, IOV_DECODE_STR);
|
||||
tprintf(", %lu, ", len);
|
||||
tprintf(", %llu, ", zero_extend_signed_to_ull(len));
|
||||
print_keyring_serial_number(id2);
|
||||
}
|
||||
|
||||
@ -174,8 +187,16 @@ static void
|
||||
keyctl_reject_key(struct tcb *tcp, key_serial_t id1, unsigned timeout,
|
||||
unsigned error, key_serial_t id2)
|
||||
{
|
||||
const char *err_str = err_name(error);
|
||||
|
||||
print_keyring_serial_number(id1);
|
||||
tprintf(", %u, %u, ", timeout, error);
|
||||
tprintf(", %u, ", timeout);
|
||||
|
||||
if (err_str)
|
||||
tprintf("%s, ", err_str);
|
||||
else
|
||||
tprintf("%u, ", error);
|
||||
|
||||
print_keyring_serial_number(id2);
|
||||
}
|
||||
|
||||
@ -187,9 +208,10 @@ keyctl_set_timeout(struct tcb *tcp, key_serial_t id, unsigned timeout)
|
||||
}
|
||||
|
||||
static void
|
||||
keyctl_get_persistent(struct tcb *tcp, int uid, key_serial_t id)
|
||||
keyctl_get_persistent(struct tcb *tcp, unsigned uid, key_serial_t id)
|
||||
{
|
||||
tprintf("%d, ", uid);
|
||||
printuid("", uid);
|
||||
tprints(", ");
|
||||
print_keyring_serial_number(id);
|
||||
}
|
||||
|
||||
@ -203,105 +225,147 @@ keyctl_setperm_key(struct tcb *tcp, key_serial_t id, uint32_t perm)
|
||||
printflags(key_perms, perm, "KEY_???");
|
||||
}
|
||||
|
||||
static void
|
||||
print_dh_params(struct tcb *tcp, kernel_ulong_t addr)
|
||||
{
|
||||
struct keyctl_dh_params params;
|
||||
|
||||
if (umove_or_printaddr(tcp, addr, ¶ms))
|
||||
return;
|
||||
|
||||
tprints("{private=");
|
||||
print_keyring_serial_number(params.private);
|
||||
tprints(", prime=");
|
||||
print_keyring_serial_number(params.prime);
|
||||
tprints(", base=");
|
||||
print_keyring_serial_number(params.base);
|
||||
tprints("}");
|
||||
}
|
||||
|
||||
static void
|
||||
keyctl_dh_compute(struct tcb *tcp, kernel_ulong_t params, kernel_ulong_t buf,
|
||||
kernel_ulong_t len)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
print_dh_params(tcp, params);
|
||||
tprints(", ");
|
||||
} else {
|
||||
if (syserror(tcp)) {
|
||||
printaddr(buf);
|
||||
} else {
|
||||
kernel_ulong_t rval = (tcp->u_rval >= 0) &&
|
||||
((kernel_ulong_t) tcp->u_rval > len) ? len :
|
||||
(kernel_ulong_t) tcp->u_rval;
|
||||
printstrn(tcp, buf, rval);
|
||||
}
|
||||
tprintf(", %llu", zero_extend_signed_to_ull(len));
|
||||
}
|
||||
}
|
||||
|
||||
#include "xlat/key_reqkeys.h"
|
||||
#include "xlat/keyctl_commands.h"
|
||||
|
||||
SYS_FUNC(keyctl)
|
||||
{
|
||||
int cmd = tcp->u_arg[0];
|
||||
kernel_ulong_t arg2 = tcp->u_arg[1];
|
||||
kernel_ulong_t arg3 = tcp->u_arg[2];
|
||||
kernel_ulong_t arg4 = tcp->u_arg[3];
|
||||
kernel_ulong_t arg5 = tcp->u_arg[4];
|
||||
|
||||
if (entering(tcp)) {
|
||||
printxval(keyctl_commands, cmd, "KEYCTL_???");
|
||||
tprints(", ");
|
||||
|
||||
/*
|
||||
* For now, KEYCTL_SESSION_TO_PARENT is the only cmd without
|
||||
* arguments.
|
||||
*/
|
||||
if (cmd != KEYCTL_SESSION_TO_PARENT)
|
||||
tprints(", ");
|
||||
}
|
||||
|
||||
switch (cmd) {
|
||||
case KEYCTL_GET_KEYRING_ID:
|
||||
keyctl_get_keyring_id(tcp, tcp->u_arg[1], tcp->u_arg[2]);
|
||||
keyctl_get_keyring_id(tcp, arg2, arg3);
|
||||
break;
|
||||
|
||||
case KEYCTL_JOIN_SESSION_KEYRING:
|
||||
printstr(tcp, tcp->u_arg[1], -1);
|
||||
printstr(tcp, arg2);
|
||||
break;
|
||||
|
||||
case KEYCTL_UPDATE:
|
||||
keyctl_update_key(tcp, tcp->u_arg[1],
|
||||
tcp->u_arg[2], tcp->u_arg[3]);
|
||||
keyctl_update_key(tcp, arg2, arg3, arg4);
|
||||
break;
|
||||
|
||||
case KEYCTL_REVOKE:
|
||||
case KEYCTL_CLEAR:
|
||||
case KEYCTL_INVALIDATE:
|
||||
case KEYCTL_ASSUME_AUTHORITY:
|
||||
print_keyring_serial_number(tcp->u_arg[1]);
|
||||
print_keyring_serial_number(arg2);
|
||||
break;
|
||||
|
||||
case KEYCTL_LINK:
|
||||
case KEYCTL_UNLINK:
|
||||
keyctl_handle_key_key(tcp, tcp->u_arg[1], tcp->u_arg[2]);
|
||||
keyctl_handle_key_key(tcp, arg2, arg3);
|
||||
break;
|
||||
|
||||
case KEYCTL_DESCRIBE:
|
||||
case KEYCTL_READ:
|
||||
case KEYCTL_GET_SECURITY:
|
||||
keyctl_read_key(tcp, tcp->u_arg[1],
|
||||
tcp->u_arg[2], tcp->u_arg[3]);
|
||||
keyctl_read_key(tcp, arg2, arg3, arg4, cmd != KEYCTL_READ);
|
||||
return 0;
|
||||
|
||||
case KEYCTL_SEARCH:
|
||||
keyctl_keyring_search(tcp, tcp->u_arg[1], tcp->u_arg[2],
|
||||
tcp->u_arg[3], tcp->u_arg[4]);
|
||||
keyctl_keyring_search(tcp, arg2, arg3, arg4, arg5);
|
||||
break;
|
||||
|
||||
case KEYCTL_CHOWN:
|
||||
keyctl_chown_key(tcp, tcp->u_arg[1],
|
||||
tcp->u_arg[2], tcp->u_arg[3]);
|
||||
keyctl_chown_key(tcp, arg2, arg3, arg4);
|
||||
break;
|
||||
|
||||
case KEYCTL_SETPERM:
|
||||
keyctl_setperm_key(tcp, tcp->u_arg[1], tcp->u_arg[2]);
|
||||
keyctl_setperm_key(tcp, arg2, arg3);
|
||||
break;
|
||||
|
||||
case KEYCTL_INSTANTIATE:
|
||||
keyctl_instantiate_key(tcp, tcp->u_arg[1], tcp->u_arg[2],
|
||||
tcp->u_arg[3], tcp->u_arg[4]);
|
||||
keyctl_instantiate_key(tcp, arg2, arg3, arg4, arg5);
|
||||
break;
|
||||
|
||||
case KEYCTL_NEGATE:
|
||||
keyctl_negate_key(tcp, tcp->u_arg[1],
|
||||
tcp->u_arg[2], tcp->u_arg[3]);
|
||||
keyctl_negate_key(tcp, arg2, arg3, arg4);
|
||||
break;
|
||||
|
||||
case KEYCTL_SET_REQKEY_KEYRING:
|
||||
printxval(key_reqkeys, tcp->u_arg[1], "KEY_REQKEY_DEFL_???");
|
||||
printxval(key_reqkeys, arg2, "KEY_REQKEY_DEFL_???");
|
||||
break;
|
||||
|
||||
case KEYCTL_SET_TIMEOUT:
|
||||
keyctl_set_timeout(tcp, tcp->u_arg[1], tcp->u_arg[2]);
|
||||
keyctl_set_timeout(tcp, arg2, arg3);
|
||||
break;
|
||||
|
||||
case KEYCTL_SESSION_TO_PARENT:
|
||||
break;
|
||||
|
||||
case KEYCTL_REJECT:
|
||||
keyctl_reject_key(tcp, tcp->u_arg[1], tcp->u_arg[2],
|
||||
tcp->u_arg[3], tcp->u_arg[4]);
|
||||
keyctl_reject_key(tcp, arg2, arg3, arg4, arg5);
|
||||
break;
|
||||
|
||||
case KEYCTL_INSTANTIATE_IOV:
|
||||
keyctl_instantiate_key_iov(tcp, tcp->u_arg[1],
|
||||
tcp->u_arg[2], tcp->u_arg[3],
|
||||
tcp->u_arg[4]);
|
||||
keyctl_instantiate_key_iov(tcp, arg2, arg3, arg4, arg5);
|
||||
break;
|
||||
|
||||
case KEYCTL_GET_PERSISTENT:
|
||||
keyctl_get_persistent(tcp, tcp->u_arg[1], tcp->u_arg[2]);
|
||||
keyctl_get_persistent(tcp, arg2, arg3);
|
||||
break;
|
||||
|
||||
case KEYCTL_DH_COMPUTE:
|
||||
keyctl_dh_compute(tcp, arg2, arg3, arg4);
|
||||
return 0;
|
||||
|
||||
default:
|
||||
tprintf("%#lx, %#lx, %#lx, %#lx",
|
||||
tcp->u_arg[1], tcp->u_arg[2],
|
||||
tcp->u_arg[3], tcp->u_arg[4]);
|
||||
tprintf("%#" PRI_klx ", %#" PRI_klx
|
||||
", %#" PRI_klx ", %#" PRI_klx,
|
||||
arg2, arg3, arg4, arg5);
|
||||
break;
|
||||
}
|
||||
|
||||
|
10
ldt.c
10
ldt.c
@ -33,12 +33,12 @@
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
#if defined I386 || defined X86_64 || defined X32
|
||||
#ifdef HAVE_STRUCT_USER_DESC
|
||||
|
||||
# include <asm/ldt.h>
|
||||
|
||||
void
|
||||
print_user_desc(struct tcb *tcp, const long addr)
|
||||
print_user_desc(struct tcb *const tcp, const kernel_ulong_t addr)
|
||||
{
|
||||
struct user_desc desc;
|
||||
|
||||
@ -67,12 +67,12 @@ print_user_desc(struct tcb *tcp, const long addr)
|
||||
|
||||
SYS_FUNC(modify_ldt)
|
||||
{
|
||||
tprintf("%ld, ", tcp->u_arg[0]);
|
||||
tprintf("%" PRI_kld ", ", tcp->u_arg[0]);
|
||||
if (tcp->u_arg[2] != sizeof(struct user_desc))
|
||||
printaddr(tcp->u_arg[1]);
|
||||
else
|
||||
print_user_desc(tcp, tcp->u_arg[1]);
|
||||
tprintf(", %lu", tcp->u_arg[2]);
|
||||
tprintf(", %" PRI_klu, tcp->u_arg[2]);
|
||||
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
@ -105,7 +105,7 @@ SYS_FUNC(get_thread_area)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* I386 || X86_64 || X32 */
|
||||
#endif /* HAVE_STRUCT_USER_DESC */
|
||||
|
||||
#if defined(M68K) || defined(MIPS)
|
||||
SYS_FUNC(set_thread_area)
|
||||
|
@ -1,4 +1,6 @@
|
||||
#if defined X86_64 || defined X32 \
|
||||
#if defined M68K
|
||||
# include "32/ioctls_inc_align16.h"
|
||||
#elif defined X86_64 || defined X32 \
|
||||
|| SIZEOF_STRUCT_I64_I32 < SIZEOF_LONG_LONG * 2
|
||||
# include "32/ioctls_inc_align32.h"
|
||||
#else
|
||||
|
2729
linux/32/ioctls_inc_align16.h
Normal file
2729
linux/32/ioctls_inc_align16.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -93,6 +93,7 @@
|
||||
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 },
|
||||
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_INFO", _IOC_WRITE, 0x6445, 0x20 },
|
||||
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_CS", _IOC_READ|_IOC_WRITE, 0x6449, 0x20 },
|
||||
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_FENCES", _IOC_READ|_IOC_WRITE, 0x6452, 0x18 },
|
||||
{ "drm/drm.h", "DRM_IOCTL_ADD_BUFS", _IOC_READ|_IOC_WRITE, 0x6416, 0x18 },
|
||||
{ "drm/drm.h", "DRM_IOCTL_ADD_CTX", _IOC_READ|_IOC_WRITE, 0x6420, 0x08 },
|
||||
{ "drm/drm.h", "DRM_IOCTL_ADD_DRAW", _IOC_READ|_IOC_WRITE, 0x6427, 0x04 },
|
||||
@ -284,8 +285,9 @@
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_CPU_FINI", _IOC_WRITE, 0x6445, 0x04 },
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_CPU_PREP", _IOC_WRITE, 0x6444, 0x18 },
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 },
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_MADVISE", _IOC_READ|_IOC_WRITE, 0x6448, 0x0c },
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x20 },
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x24 },
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 },
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_WAIT_FENCE", _IOC_WRITE, 0x6447, 0x18 },
|
||||
{ "drm/nouveau_drm.h", "DRM_IOCTL_NOUVEAU_GEM_CPU_FINI", _IOC_WRITE, 0x6483, 0x04 },
|
||||
@ -392,10 +394,13 @@
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_CREATE_BO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 },
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_CREATE_SHADER_BO", _IOC_READ|_IOC_WRITE, 0x6445, 0x18 },
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GET_HANG_STATE", _IOC_READ|_IOC_WRITE, 0x6446, 0xa0 },
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 },
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_MMAP_BO", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 },
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_SUBMIT_CL", _IOC_READ|_IOC_WRITE, 0x6440, 0xa0 },
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_WAIT_BO", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_WAIT_SEQNO", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 },
|
||||
{ "drm/vgem_drm.h", "DRM_IOCTL_VGEM_FENCE_ATTACH", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 },
|
||||
{ "drm/vgem_drm.h", "DRM_IOCTL_VGEM_FENCE_SIGNAL", _IOC_WRITE, 0x6442, 0x08 },
|
||||
{ "drm/via_drm.h", "DRM_IOCTL_VIA_AGP_INIT", _IOC_READ|_IOC_WRITE, 0x6442, 0x08 },
|
||||
{ "drm/via_drm.h", "DRM_IOCTL_VIA_ALLOCMEM", _IOC_READ|_IOC_WRITE, 0x6440, 0x14 },
|
||||
{ "drm/via_drm.h", "DRM_IOCTL_VIA_BLIT_SYNC", _IOC_WRITE, 0x644f, 0x08 },
|
||||
@ -553,6 +558,9 @@
|
||||
{ "linux/auto_fs4.h", "AUTOFS_IOC_EXPIRE_MULTI", _IOC_WRITE, 0x9366, 0x04 },
|
||||
{ "linux/auto_fs4.h", "AUTOFS_IOC_PROTOSUBVER", _IOC_READ, 0x9367, 0x04 },
|
||||
{ "linux/blkpg.h", "BLKPG", _IOC_NONE, 0x1269, 0x00 },
|
||||
{ "linux/blkzoned.h", "BLKREPORTZONE", _IOC_READ|_IOC_WRITE, 0x1282, 0x10 },
|
||||
{ "linux/blkzoned.h", "BLKRESETZONE", _IOC_WRITE, 0x1283, 0x10 },
|
||||
{ "linux/bt-bmc.h", "BT_BMC_IOCTL_SMS_ATN", _IOC_NONE, 0xb100, 0x00 },
|
||||
{ "linux/btrfs.h", "BTRFS_IOC_ADD_DEV", _IOC_WRITE, 0x940a, 0x1000 },
|
||||
{ "linux/btrfs.h", "BTRFS_IOC_BALANCE", _IOC_WRITE, 0x940c, 0x1000 },
|
||||
{ "linux/btrfs.h", "BTRFS_IOC_BALANCE_CTL", _IOC_WRITE, 0x9421, 0x04 },
|
||||
@ -683,6 +691,16 @@
|
||||
{ "linux/cdrom.h", "DVD_AUTH", 0, 0x5392, 0 },
|
||||
{ "linux/cdrom.h", "DVD_READ_STRUCT", 0, 0x5390, 0 },
|
||||
{ "linux/cdrom.h", "DVD_WRITE_STRUCT", 0, 0x5391, 0 },
|
||||
{ "linux/cec.h", "CEC_ADAP_G_CAPS", _IOC_READ|_IOC_WRITE, 0x6100, 0x4c },
|
||||
{ "linux/cec.h", "CEC_ADAP_G_LOG_ADDRS", _IOC_READ, 0x6103, 0x5c },
|
||||
{ "linux/cec.h", "CEC_ADAP_G_PHYS_ADDR", _IOC_READ, 0x6101, 0x02 },
|
||||
{ "linux/cec.h", "CEC_ADAP_S_LOG_ADDRS", _IOC_READ|_IOC_WRITE, 0x6104, 0x5c },
|
||||
{ "linux/cec.h", "CEC_ADAP_S_PHYS_ADDR", _IOC_WRITE, 0x6102, 0x02 },
|
||||
{ "linux/cec.h", "CEC_DQEVENT", _IOC_READ|_IOC_WRITE, 0x6107, 0x50 },
|
||||
{ "linux/cec.h", "CEC_G_MODE", _IOC_READ, 0x6108, 0x04 },
|
||||
{ "linux/cec.h", "CEC_RECEIVE", _IOC_READ|_IOC_WRITE, 0x6106, 0x38 },
|
||||
{ "linux/cec.h", "CEC_S_MODE", _IOC_WRITE, 0x6109, 0x04 },
|
||||
{ "linux/cec.h", "CEC_TRANSMIT", _IOC_READ|_IOC_WRITE, 0x6105, 0x38 },
|
||||
{ "linux/chio.h", "CHIOEXCHANGE", _IOC_WRITE, 0x6302, 0x1c },
|
||||
{ "linux/chio.h", "CHIOGELEM", _IOC_WRITE, 0x6310, 0x6c },
|
||||
{ "linux/chio.h", "CHIOGPARAMS", _IOC_READ, 0x6306, 0x14 },
|
||||
@ -969,7 +987,11 @@
|
||||
{ "linux/gigaset_dev.h", "GIGASET_CONFIG", _IOC_READ|_IOC_WRITE, 0x4701, 0x04 },
|
||||
{ "linux/gigaset_dev.h", "GIGASET_REDIR", _IOC_READ|_IOC_WRITE, 0x4700, 0x04 },
|
||||
{ "linux/gigaset_dev.h", "GIGASET_VERSION", _IOC_READ|_IOC_WRITE, 0x4703, 0x10 },
|
||||
{ "linux/gpio.h", "GPIOHANDLE_GET_LINE_VALUES_IOCTL", _IOC_READ|_IOC_WRITE, 0xb408, 0x40 },
|
||||
{ "linux/gpio.h", "GPIOHANDLE_SET_LINE_VALUES_IOCTL", _IOC_READ|_IOC_WRITE, 0xb409, 0x40 },
|
||||
{ "linux/gpio.h", "GPIO_GET_CHIPINFO_IOCTL", _IOC_READ, 0xb401, 0x44 },
|
||||
{ "linux/gpio.h", "GPIO_GET_LINEEVENT_IOCTL", _IOC_READ|_IOC_WRITE, 0xb404, 0x30 },
|
||||
{ "linux/gpio.h", "GPIO_GET_LINEHANDLE_IOCTL", _IOC_READ|_IOC_WRITE, 0xb403, 0x16c },
|
||||
{ "linux/gpio.h", "GPIO_GET_LINEINFO_IOCTL", _IOC_READ|_IOC_WRITE, 0xb402, 0x48 },
|
||||
{ "linux/gsmmux.h", "GSMIOC_DISABLE_NET", _IOC_NONE, 0x4703, 0x00 },
|
||||
{ "linux/gsmmux.h", "GSMIOC_ENABLE_NET", _IOC_WRITE, 0x4702, 0x34 },
|
||||
@ -1293,123 +1315,6 @@
|
||||
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_MEMORY_POLICY", _IOC_WRITE, 0x4b04, 0x20 },
|
||||
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_UPDATE_QUEUE", _IOC_WRITE, 0x4b07, 0x18 },
|
||||
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_WAIT_EVENTS", _IOC_READ|_IOC_WRITE, 0x4b0c, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_ALLOCATE_RMA", _IOC_READ, 0xaea9, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_ARM_PREFERRED_TARGET", _IOC_READ, 0xaeaf, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_ARM_SET_DEVICE_ADDR", _IOC_WRITE, 0xaeab, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_ARM_VCPU_INIT", _IOC_WRITE, 0xaeae, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_ASSIGN_DEV_IRQ", _IOC_WRITE, 0xae70, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_ASSIGN_PCI_DEVICE", _IOC_READ, 0xae69, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_ASSIGN_SET_INTX_MASK", _IOC_WRITE, 0xaea4, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_ENTRY", _IOC_WRITE, 0xae74, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_NR", _IOC_WRITE, 0xae73, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_CHECK_EXTENSION", _IOC_NONE, 0xae03, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_CREATE_DEVICE", _IOC_READ|_IOC_WRITE, 0xaee0, 0x0c },
|
||||
{ "linux/kvm.h", "KVM_CREATE_IRQCHIP", _IOC_NONE, 0xae60, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_CREATE_PIT", _IOC_NONE, 0xae64, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_CREATE_PIT2", _IOC_WRITE, 0xae77, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_CREATE_SPAPR_TCE", _IOC_WRITE, 0xaea8, 0x0c },
|
||||
{ "linux/kvm.h", "KVM_CREATE_SPAPR_TCE_64", _IOC_WRITE, 0xaea8, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_CREATE_VCPU", _IOC_NONE, 0xae41, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_CREATE_VM", _IOC_NONE, 0xae01, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_DEASSIGN_DEV_IRQ", _IOC_WRITE, 0xae75, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_DEASSIGN_PCI_DEVICE", _IOC_WRITE, 0xae72, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_DIRTY_TLB", _IOC_WRITE, 0xaeaa, 0x0c },
|
||||
{ "linux/kvm.h", "KVM_ENABLE_CAP", _IOC_WRITE, 0xaea3, 0x68 },
|
||||
{ "linux/kvm.h", "KVM_GET_API_VERSION", _IOC_NONE, 0xae00, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_GET_CLOCK", _IOC_READ, 0xae7c, 0x30 },
|
||||
{ "linux/kvm.h", "KVM_GET_CPUID2", _IOC_READ|_IOC_WRITE, 0xae91, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_GET_DEBUGREGS", _IOC_READ, 0xaea1, 0x80 },
|
||||
{ "linux/kvm.h", "KVM_GET_DEVICE_ATTR", _IOC_WRITE, 0xaee2, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_GET_DIRTY_LOG", _IOC_WRITE, 0xae42, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_GET_EMULATED_CPUID", _IOC_READ|_IOC_WRITE, 0xae09, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_GET_FPU", _IOC_READ, 0xae8c, 0x1a0 },
|
||||
{ "linux/kvm.h", "KVM_GET_IRQCHIP", _IOC_READ|_IOC_WRITE, 0xae62, 0x208 },
|
||||
{ "linux/kvm.h", "KVM_GET_LAPIC", _IOC_READ, 0xae8e, 0x400 },
|
||||
{ "linux/kvm.h", "KVM_GET_MP_STATE", _IOC_READ, 0xae98, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_GET_MSRS", _IOC_READ|_IOC_WRITE, 0xae88, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_GET_MSR_INDEX_LIST", _IOC_READ|_IOC_WRITE, 0xae02, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_GET_NR_MMU_PAGES", _IOC_NONE, 0xae45, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_GET_ONE_REG", _IOC_WRITE, 0xaeab, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_GET_PIT", _IOC_READ|_IOC_WRITE, 0xae65, 0x48 },
|
||||
{ "linux/kvm.h", "KVM_GET_PIT2", _IOC_READ, 0xae9f, 0x70 },
|
||||
{ "linux/kvm.h", "KVM_GET_REGS", _IOC_READ, 0xae81, 0x90 },
|
||||
{ "linux/kvm.h", "KVM_GET_REG_LIST", _IOC_READ|_IOC_WRITE, 0xaeb0, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_GET_SREGS", _IOC_READ, 0xae83, 0x138 },
|
||||
{ "linux/kvm.h", "KVM_GET_SUPPORTED_CPUID", _IOC_READ|_IOC_WRITE, 0xae05, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_GET_TSC_KHZ", _IOC_NONE, 0xaea3, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_GET_VCPU_EVENTS", _IOC_READ, 0xae9f, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_GET_VCPU_MMAP_SIZE", _IOC_NONE, 0xae04, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_GET_XCRS", _IOC_READ, 0xaea6, 0x188 },
|
||||
{ "linux/kvm.h", "KVM_GET_XSAVE", _IOC_READ, 0xaea4, 0x1000 },
|
||||
{ "linux/kvm.h", "KVM_HAS_DEVICE_ATTR", _IOC_WRITE, 0xaee3, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_INTERRUPT", _IOC_WRITE, 0xae86, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_IOEVENTFD", _IOC_WRITE, 0xae79, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_IRQFD", _IOC_WRITE, 0xae76, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_IRQ_LINE", _IOC_WRITE, 0xae61, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_IRQ_LINE_STATUS", _IOC_READ|_IOC_WRITE, 0xae67, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_KVMCLOCK_CTRL", _IOC_NONE, 0xaead, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_NMI", _IOC_NONE, 0xae9a, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_PPC_ALLOCATE_HTAB", _IOC_READ|_IOC_WRITE, 0xaea7, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_PPC_GET_HTAB_FD", _IOC_WRITE, 0xaeaa, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_PPC_GET_PVINFO", _IOC_WRITE, 0xaea1, 0x80 },
|
||||
{ "linux/kvm.h", "KVM_PPC_GET_SMMU_INFO", _IOC_READ, 0xaea6, 0x250 },
|
||||
{ "linux/kvm.h", "KVM_PPC_RTAS_DEFINE_TOKEN", _IOC_WRITE, 0xaeac, 0x80 },
|
||||
{ "linux/kvm.h", "KVM_REGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae67, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_REINJECT_CONTROL", _IOC_NONE, 0xae71, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_RUN", _IOC_NONE, 0xae80, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_S390_ENABLE_SIE", _IOC_NONE, 0xae06, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_S390_GET_IRQ_STATE", _IOC_WRITE, 0xaeb6, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_S390_GET_SKEYS", _IOC_WRITE, 0xaeb2, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_S390_INITIAL_RESET", _IOC_NONE, 0xae97, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_S390_INTERRUPT", _IOC_WRITE, 0xae94, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_S390_IRQ", _IOC_WRITE, 0xaeb4, 0x48 },
|
||||
{ "linux/kvm.h", "KVM_S390_MEM_OP", _IOC_WRITE, 0xaeb1, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_S390_SET_INITIAL_PSW", _IOC_WRITE, 0xae96, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_S390_SET_IRQ_STATE", _IOC_WRITE, 0xaeb5, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_S390_SET_SKEYS", _IOC_WRITE, 0xaeb3, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_S390_STORE_STATUS", _IOC_WRITE, 0xae95, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_S390_UCAS_MAP", _IOC_WRITE, 0xae50, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_S390_UCAS_UNMAP", _IOC_WRITE, 0xae51, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_S390_VCPU_FAULT", _IOC_WRITE, 0xae52, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_SET_BOOT_CPU_ID", _IOC_NONE, 0xae78, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_SET_CLOCK", _IOC_WRITE, 0xae7b, 0x30 },
|
||||
{ "linux/kvm.h", "KVM_SET_CPUID", _IOC_WRITE, 0xae8a, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_SET_CPUID2", _IOC_WRITE, 0xae90, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_SET_DEBUGREGS", _IOC_WRITE, 0xaea2, 0x80 },
|
||||
{ "linux/kvm.h", "KVM_SET_DEVICE_ATTR", _IOC_WRITE, 0xaee1, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_SET_FPU", _IOC_WRITE, 0xae8d, 0x1a0 },
|
||||
{ "linux/kvm.h", "KVM_SET_GSI_ROUTING", _IOC_WRITE, 0xae6a, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_SET_GUEST_DEBUG", _IOC_WRITE, 0xae9b, 0x48 },
|
||||
{ "linux/kvm.h", "KVM_SET_IDENTITY_MAP_ADDR", _IOC_WRITE, 0xae48, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_SET_IRQCHIP", _IOC_READ, 0xae63, 0x208 },
|
||||
{ "linux/kvm.h", "KVM_SET_LAPIC", _IOC_WRITE, 0xae8f, 0x400 },
|
||||
{ "linux/kvm.h", "KVM_SET_MEMORY_ALIAS", _IOC_WRITE, 0xae43, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_SET_MEMORY_REGION", _IOC_WRITE, 0xae40, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_SET_MP_STATE", _IOC_WRITE, 0xae99, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_SET_MSRS", _IOC_WRITE, 0xae89, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_SET_NR_MMU_PAGES", _IOC_NONE, 0xae44, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_SET_ONE_REG", _IOC_WRITE, 0xaeac, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_SET_PIT", _IOC_READ, 0xae66, 0x48 },
|
||||
{ "linux/kvm.h", "KVM_SET_PIT2", _IOC_WRITE, 0xaea0, 0x70 },
|
||||
{ "linux/kvm.h", "KVM_SET_REGS", _IOC_WRITE, 0xae82, 0x90 },
|
||||
{ "linux/kvm.h", "KVM_SET_SIGNAL_MASK", _IOC_WRITE, 0xae8b, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_SET_SREGS", _IOC_WRITE, 0xae84, 0x138 },
|
||||
{ "linux/kvm.h", "KVM_SET_TSC_KHZ", _IOC_NONE, 0xaea2, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_SET_TSS_ADDR", _IOC_NONE, 0xae47, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_SET_USER_MEMORY_REGION", _IOC_WRITE, 0xae46, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_SET_VAPIC_ADDR", _IOC_WRITE, 0xae93, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_SET_VCPU_EVENTS", _IOC_WRITE, 0xaea0, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_SET_XCRS", _IOC_WRITE, 0xaea7, 0x188 },
|
||||
{ "linux/kvm.h", "KVM_SET_XSAVE", _IOC_WRITE, 0xaea5, 0x1000 },
|
||||
{ "linux/kvm.h", "KVM_SIGNAL_MSI", _IOC_WRITE, 0xaea5, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_SMI", _IOC_NONE, 0xaeb7, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_TPR_ACCESS_REPORTING", _IOC_READ|_IOC_WRITE, 0xae92, 0x28 },
|
||||
{ "linux/kvm.h", "KVM_TRANSLATE", _IOC_READ|_IOC_WRITE, 0xae85, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_UNREGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae68, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_X86_GET_MCE_CAP_SUPPORTED", _IOC_READ, 0xae9d, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_X86_SETUP_MCE", _IOC_WRITE, 0xae9c, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_X86_SET_MCE", _IOC_WRITE, 0xae9e, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_XEN_HVM_CONFIG", _IOC_WRITE, 0xae7a, 0x38 },
|
||||
{ "linux/lightnvm.h", "NVM_DEV_CREATE", _IOC_WRITE, 0x4c22, 0x80 },
|
||||
{ "linux/lightnvm.h", "NVM_DEV_FACTORY", _IOC_WRITE, 0x4c25, 0x24 },
|
||||
{ "linux/lightnvm.h", "NVM_DEV_INIT", _IOC_WRITE, 0x4c24, 0x2c },
|
||||
@ -1418,30 +1323,14 @@
|
||||
{ "linux/lightnvm.h", "NVM_INFO", _IOC_READ|_IOC_WRITE, 0x4c20, 0x1000 },
|
||||
{ "linux/lirc.h", "LIRC_GET_FEATURES", _IOC_READ, 0x6900, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_LENGTH", _IOC_READ, 0x690f, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_MAX_FILTER_PULSE", _IOC_READ, 0x690b, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_MAX_FILTER_SPACE", _IOC_READ, 0x690d, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_MAX_TIMEOUT", _IOC_READ, 0x6909, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_MIN_FILTER_PULSE", _IOC_READ, 0x690a, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_MIN_FILTER_SPACE", _IOC_READ, 0x690c, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_MIN_TIMEOUT", _IOC_READ, 0x6908, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_REC_CARRIER", _IOC_READ, 0x6904, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_REC_DUTY_CYCLE", _IOC_READ, 0x6906, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_REC_MODE", _IOC_READ, 0x6902, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_REC_RESOLUTION", _IOC_READ, 0x6907, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_SEND_CARRIER", _IOC_READ, 0x6903, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_SEND_DUTY_CYCLE", _IOC_READ, 0x6905, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_SEND_MODE", _IOC_READ, 0x6901, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_NOTIFY_DECODE", _IOC_NONE, 0x6920, 0x00 },
|
||||
{ "linux/lirc.h", "LIRC_SETUP_END", _IOC_NONE, 0x6922, 0x00 },
|
||||
{ "linux/lirc.h", "LIRC_SETUP_START", _IOC_NONE, 0x6921, 0x00 },
|
||||
{ "linux/lirc.h", "LIRC_SET_MEASURE_CARRIER_MODE", _IOC_WRITE, 0x691d, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_CARRIER", _IOC_WRITE, 0x6914, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_CARRIER_RANGE", _IOC_WRITE, 0x691f, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_DUTY_CYCLE", _IOC_WRITE, 0x6916, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_DUTY_CYCLE_RANGE", _IOC_WRITE, 0x691e, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_FILTER", _IOC_WRITE, 0x691c, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_FILTER_PULSE", _IOC_WRITE, 0x691a, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_FILTER_SPACE", _IOC_WRITE, 0x691b, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_MODE", _IOC_WRITE, 0x6912, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_TIMEOUT", _IOC_WRITE, 0x6918, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_TIMEOUT_REPORTS", _IOC_WRITE, 0x6919, 0x04 },
|
||||
@ -1553,19 +1442,21 @@
|
||||
{ "linux/ndctl.h", "ND_IOCTL_SMART", _IOC_READ|_IOC_WRITE, 0x4e01, 0x84 },
|
||||
{ "linux/ndctl.h", "ND_IOCTL_SMART_THRESHOLD", _IOC_READ|_IOC_WRITE, 0x4e02, 0x0c },
|
||||
{ "linux/ndctl.h", "ND_IOCTL_VENDOR", _IOC_READ|_IOC_WRITE, 0x4e09, 0x08 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_CHANGE_CPMODE", _IOC_WRITE, 0x6e80, 0x10 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_CLEAN_SEGMENTS", _IOC_WRITE, 0x6e88, 0x78 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_DELETE_CHECKPOINT", _IOC_WRITE, 0x6e81, 0x08 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_GET_BDESCS", _IOC_READ|_IOC_WRITE, 0x6e87, 0x18 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_GET_CPINFO", _IOC_READ, 0x6e82, 0x18 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_GET_CPSTAT", _IOC_READ, 0x6e83, 0x18 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_GET_SUINFO", _IOC_READ, 0x6e84, 0x18 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_GET_SUSTAT", _IOC_READ, 0x6e85, 0x30 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_GET_VINFO", _IOC_READ|_IOC_WRITE, 0x6e86, 0x18 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_RESIZE", _IOC_WRITE, 0x6e8b, 0x08 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_SET_ALLOC_RANGE", _IOC_WRITE, 0x6e8c, 0x10 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_SET_SUINFO", _IOC_WRITE, 0x6e8d, 0x18 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_SYNC", _IOC_READ, 0x6e8a, 0x08 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_CHANGE_CPMODE", _IOC_WRITE, 0x6e80, 0x10 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_CLEAN_SEGMENTS", _IOC_WRITE, 0x6e88, 0x78 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_DELETE_CHECKPOINT", _IOC_WRITE, 0x6e81, 0x08 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_GET_BDESCS", _IOC_READ|_IOC_WRITE, 0x6e87, 0x18 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_GET_CPINFO", _IOC_READ, 0x6e82, 0x18 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_GET_CPSTAT", _IOC_READ, 0x6e83, 0x18 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_GET_SUINFO", _IOC_READ, 0x6e84, 0x18 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_GET_SUSTAT", _IOC_READ, 0x6e85, 0x30 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_GET_VINFO", _IOC_READ|_IOC_WRITE, 0x6e86, 0x18 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_RESIZE", _IOC_WRITE, 0x6e8b, 0x08 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_SET_ALLOC_RANGE", _IOC_WRITE, 0x6e8c, 0x10 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_SET_SUINFO", _IOC_WRITE, 0x6e8d, 0x18 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_SYNC", _IOC_READ, 0x6e8a, 0x08 },
|
||||
{ "linux/nsfs.h", "NS_GET_PARENT", _IOC_NONE, 0xb702, 0x00 },
|
||||
{ "linux/nsfs.h", "NS_GET_USERNS", _IOC_NONE, 0xb701, 0x00 },
|
||||
{ "linux/nvme_ioctl.h", "NVME_IOCTL_ADMIN_CMD", _IOC_READ|_IOC_WRITE, 0x4e41, 0x48 },
|
||||
{ "linux/nvme_ioctl.h", "NVME_IOCTL_ID", _IOC_NONE, 0x4e40, 0x00 },
|
||||
{ "linux/nvme_ioctl.h", "NVME_IOCTL_IO_CMD", _IOC_READ|_IOC_WRITE, 0x4e43, 0x48 },
|
||||
@ -1739,6 +1630,17 @@
|
||||
{ "linux/raw.h", "RAW_SETBIND", _IOC_NONE, 0xac00, 0x00 },
|
||||
{ "linux/reiserfs_fs.h", "REISERFS_IOC_UNPACK", _IOC_WRITE, 0xcd01, 0x04 },
|
||||
{ "linux/rfkill.h", "RFKILL_IOCTL_NOINPUT", _IOC_NONE, 0x5201, 0x00 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_ACCEPT", _IOC_READ|_IOC_WRITE, 0x6307, 0x08 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_BIND", _IOC_WRITE, 0x6305, 0x08 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_CLOSE", _IOC_WRITE, 0x6304, 0x02 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_CONNECT", _IOC_WRITE, 0x6308, 0x08 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_CREATE", _IOC_READ|_IOC_WRITE, 0x6303, 0x02 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_LISTEN", _IOC_WRITE, 0x6306, 0x02 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_RECEIVE", _IOC_READ|_IOC_WRITE, 0x630a, 0x10 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_SEND", _IOC_WRITE, 0x6309, 0x10 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_EP_GET_LIST", _IOC_READ|_IOC_WRITE, 0x6302, 0x04 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_EP_GET_LIST_SIZE", _IOC_READ|_IOC_WRITE, 0x6301, 0x04 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_MPORT_GET_LIST", _IOC_READ|_IOC_WRITE, 0x630b, 0x04 },
|
||||
{ "linux/rio_mport_cdev.h", "RIO_ALLOC_DMA", _IOC_READ|_IOC_WRITE, 0x6d13, 0x18 },
|
||||
{ "linux/rio_mport_cdev.h", "RIO_DEV_ADD", _IOC_WRITE, 0x6d17, 0x20 },
|
||||
{ "linux/rio_mport_cdev.h", "RIO_DEV_DEL", _IOC_WRITE, 0x6d18, 0x20 },
|
||||
@ -1849,6 +1751,7 @@
|
||||
{ "linux/sockios.h", "SIOCGMIIPHY", 0, 0x8947, 0 },
|
||||
{ "linux/sockios.h", "SIOCGMIIREG", 0, 0x8948, 0 },
|
||||
{ "linux/sockios.h", "SIOCGRARP", 0, 0x8961, 0 },
|
||||
{ "linux/sockios.h", "SIOCGSKNS", 0, 0x894C, 0 },
|
||||
{ "linux/sockios.h", "SIOCOUTQNSD", 0, 0x894B, 0 },
|
||||
{ "linux/sockios.h", "SIOCPROTOPRIVATE", 0, 0x89E0, 0 },
|
||||
{ "linux/sockios.h", "SIOCRTMSG", 0, 0x890D, 0 },
|
||||
@ -2244,6 +2147,8 @@
|
||||
{ "linux/vhost.h", "VHOST_SET_VRING_ERR", _IOC_WRITE, 0xaf22, 0x08 },
|
||||
{ "linux/vhost.h", "VHOST_SET_VRING_KICK", _IOC_WRITE, 0xaf20, 0x08 },
|
||||
{ "linux/vhost.h", "VHOST_SET_VRING_NUM", _IOC_WRITE, 0xaf10, 0x08 },
|
||||
{ "linux/vhost.h", "VHOST_VSOCK_SET_GUEST_CID", _IOC_WRITE, 0xaf60, 0x08 },
|
||||
{ "linux/vhost.h", "VHOST_VSOCK_SET_RUNNING", _IOC_WRITE, 0xaf61, 0x04 },
|
||||
{ "linux/videodev2.h", "VIDIOC_CREATE_BUFS", _IOC_READ|_IOC_WRITE, 0x565c, 0xf8 },
|
||||
{ "linux/videodev2.h", "VIDIOC_CROPCAP", _IOC_READ|_IOC_WRITE, 0x563a, 0x2c },
|
||||
{ "linux/videodev2.h", "VIDIOC_DBG_G_CHIP_INFO", _IOC_READ|_IOC_WRITE, 0x5666, 0xc8 },
|
||||
@ -2348,7 +2253,6 @@
|
||||
{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_SOCKETS_VERSION", _IOC_NONE, 0x07b4, 0x00 },
|
||||
{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_VERSION", _IOC_NONE, 0x079f, 0x00 },
|
||||
{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_VERSION2", _IOC_NONE, 0x07a7, 0x00 },
|
||||
{ "linux/vsp1.h", "VIDIOC_VSP1_LUT_CONFIG", _IOC_READ|_IOC_WRITE, 0x56c1, 0x400 },
|
||||
{ "linux/vt.h", "VT_ACTIVATE", 0, 0x5606, 0 },
|
||||
{ "linux/vt.h", "VT_DISALLOCATE", 0, 0x5608, 0 },
|
||||
{ "linux/vt.h", "VT_GETHIFONTMASK", 0, 0x560D, 0 },
|
||||
@ -2365,6 +2269,7 @@
|
||||
{ "linux/vt.h", "VT_UNLOCKSWITCH", 0, 0x560C, 0 },
|
||||
{ "linux/vt.h", "VT_WAITACTIVE", 0, 0x5607, 0 },
|
||||
{ "linux/vt.h", "VT_WAITEVENT", 0, 0x560E, 0 },
|
||||
{ "linux/vtpm_proxy.h", "VTPM_PROXY_IOC_NEW_DEV", _IOC_READ|_IOC_WRITE, 0xa100, 0x14 },
|
||||
{ "linux/watchdog.h", "WDIOC_GETBOOTSTATUS", _IOC_READ, 0x5702, 0x04 },
|
||||
{ "linux/watchdog.h", "WDIOC_GETPRETIMEOUT", _IOC_READ, 0x5709, 0x04 },
|
||||
{ "linux/watchdog.h", "WDIOC_GETSTATUS", _IOC_READ, 0x5701, 0x04 },
|
||||
@ -2764,6 +2669,7 @@
|
||||
{ "staging/android/ion.h", "ION_IOC_ALLOC", _IOC_READ|_IOC_WRITE, 0x4900, 0x14 },
|
||||
{ "staging/android/ion.h", "ION_IOC_CUSTOM", _IOC_READ|_IOC_WRITE, 0x4906, 0x08 },
|
||||
{ "staging/android/ion.h", "ION_IOC_FREE", _IOC_READ|_IOC_WRITE, 0x4901, 0x04 },
|
||||
{ "staging/android/ion.h", "ION_IOC_HEAP_QUERY", _IOC_READ|_IOC_WRITE, 0x4908, 0x18 },
|
||||
{ "staging/android/ion.h", "ION_IOC_IMPORT", _IOC_READ|_IOC_WRITE, 0x4905, 0x08 },
|
||||
{ "staging/android/ion.h", "ION_IOC_MAP", _IOC_READ|_IOC_WRITE, 0x4902, 0x08 },
|
||||
{ "staging/android/ion.h", "ION_IOC_SHARE", _IOC_READ|_IOC_WRITE, 0x4904, 0x08 },
|
||||
@ -2771,8 +2677,6 @@
|
||||
{ "staging/android/ion_test.h", "ION_IOC_TEST_DMA_MAPPING", _IOC_WRITE, 0x49f1, 0x20 },
|
||||
{ "staging/android/ion_test.h", "ION_IOC_TEST_KERNEL_MAPPING", _IOC_WRITE, 0x49f2, 0x20 },
|
||||
{ "staging/android/ion_test.h", "ION_IOC_TEST_SET_FD", _IOC_NONE, 0x49f0, 0x00 },
|
||||
{ "staging/android/sw_sync.h", "SW_SYNC_IOC_CREATE_FENCE", _IOC_READ|_IOC_WRITE, 0x5700, 0x28 },
|
||||
{ "staging/android/sw_sync.h", "SW_SYNC_IOC_INC", _IOC_WRITE, 0x5701, 0x04 },
|
||||
{ "video/da8xx-fb.h", "FBIGET_BRIGHTNESS", _IOC_READ, 0x4603, 0x04 },
|
||||
{ "video/da8xx-fb.h", "FBIGET_COLOR", _IOC_READ, 0x4605, 0x04 },
|
||||
{ "video/da8xx-fb.h", "FBIOGET_CONTRAST", _IOC_READ, 0x4601, 0x04 },
|
||||
@ -2813,6 +2717,7 @@
|
||||
{ "xen/evtchn.h", "IOCTL_EVTCHN_BIND_VIRQ", _IOC_NONE, 0x4500, 0x04 },
|
||||
{ "xen/evtchn.h", "IOCTL_EVTCHN_NOTIFY", _IOC_NONE, 0x4504, 0x04 },
|
||||
{ "xen/evtchn.h", "IOCTL_EVTCHN_RESET", _IOC_NONE, 0x4505, 0x00 },
|
||||
{ "xen/evtchn.h", "IOCTL_EVTCHN_RESTRICT_DOMID", _IOC_NONE, 0x4506, 0x02 },
|
||||
{ "xen/evtchn.h", "IOCTL_EVTCHN_UNBIND", _IOC_NONE, 0x4503, 0x04 },
|
||||
{ "xen/gntdev.h", "IOCTL_GNTDEV_GET_OFFSET_FOR_VADDR", _IOC_NONE, 0x4702, 0x18 },
|
||||
{ "xen/gntdev.h", "IOCTL_GNTDEV_GRANT_COPY", _IOC_NONE, 0x4708, 0x08 },
|
||||
|
@ -93,6 +93,7 @@
|
||||
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 },
|
||||
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_INFO", _IOC_WRITE, 0x6445, 0x20 },
|
||||
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_CS", _IOC_READ|_IOC_WRITE, 0x6449, 0x20 },
|
||||
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_FENCES", _IOC_READ|_IOC_WRITE, 0x6452, 0x18 },
|
||||
{ "drm/drm.h", "DRM_IOCTL_ADD_BUFS", _IOC_READ|_IOC_WRITE, 0x6416, 0x18 },
|
||||
{ "drm/drm.h", "DRM_IOCTL_ADD_CTX", _IOC_READ|_IOC_WRITE, 0x6420, 0x08 },
|
||||
{ "drm/drm.h", "DRM_IOCTL_ADD_DRAW", _IOC_READ|_IOC_WRITE, 0x6427, 0x04 },
|
||||
@ -284,8 +285,9 @@
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_CPU_FINI", _IOC_WRITE, 0x6445, 0x04 },
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_CPU_PREP", _IOC_WRITE, 0x6444, 0x18 },
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 },
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_MADVISE", _IOC_READ|_IOC_WRITE, 0x6448, 0x0c },
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x20 },
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x28 },
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 },
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_WAIT_FENCE", _IOC_WRITE, 0x6447, 0x18 },
|
||||
{ "drm/nouveau_drm.h", "DRM_IOCTL_NOUVEAU_GEM_CPU_FINI", _IOC_WRITE, 0x6483, 0x04 },
|
||||
@ -392,10 +394,13 @@
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_CREATE_BO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 },
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_CREATE_SHADER_BO", _IOC_READ|_IOC_WRITE, 0x6445, 0x18 },
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GET_HANG_STATE", _IOC_READ|_IOC_WRITE, 0x6446, 0xa0 },
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 },
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_MMAP_BO", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 },
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_SUBMIT_CL", _IOC_READ|_IOC_WRITE, 0x6440, 0xa0 },
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_WAIT_BO", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_WAIT_SEQNO", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 },
|
||||
{ "drm/vgem_drm.h", "DRM_IOCTL_VGEM_FENCE_ATTACH", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 },
|
||||
{ "drm/vgem_drm.h", "DRM_IOCTL_VGEM_FENCE_SIGNAL", _IOC_WRITE, 0x6442, 0x08 },
|
||||
{ "drm/via_drm.h", "DRM_IOCTL_VIA_AGP_INIT", _IOC_READ|_IOC_WRITE, 0x6442, 0x08 },
|
||||
{ "drm/via_drm.h", "DRM_IOCTL_VIA_ALLOCMEM", _IOC_READ|_IOC_WRITE, 0x6440, 0x14 },
|
||||
{ "drm/via_drm.h", "DRM_IOCTL_VIA_BLIT_SYNC", _IOC_WRITE, 0x644f, 0x08 },
|
||||
@ -553,6 +558,9 @@
|
||||
{ "linux/auto_fs4.h", "AUTOFS_IOC_EXPIRE_MULTI", _IOC_WRITE, 0x9366, 0x04 },
|
||||
{ "linux/auto_fs4.h", "AUTOFS_IOC_PROTOSUBVER", _IOC_READ, 0x9367, 0x04 },
|
||||
{ "linux/blkpg.h", "BLKPG", _IOC_NONE, 0x1269, 0x00 },
|
||||
{ "linux/blkzoned.h", "BLKREPORTZONE", _IOC_READ|_IOC_WRITE, 0x1282, 0x10 },
|
||||
{ "linux/blkzoned.h", "BLKRESETZONE", _IOC_WRITE, 0x1283, 0x10 },
|
||||
{ "linux/bt-bmc.h", "BT_BMC_IOCTL_SMS_ATN", _IOC_NONE, 0xb100, 0x00 },
|
||||
{ "linux/btrfs.h", "BTRFS_IOC_ADD_DEV", _IOC_WRITE, 0x940a, 0x1000 },
|
||||
{ "linux/btrfs.h", "BTRFS_IOC_BALANCE", _IOC_WRITE, 0x940c, 0x1000 },
|
||||
{ "linux/btrfs.h", "BTRFS_IOC_BALANCE_CTL", _IOC_WRITE, 0x9421, 0x04 },
|
||||
@ -683,6 +691,16 @@
|
||||
{ "linux/cdrom.h", "DVD_AUTH", 0, 0x5392, 0 },
|
||||
{ "linux/cdrom.h", "DVD_READ_STRUCT", 0, 0x5390, 0 },
|
||||
{ "linux/cdrom.h", "DVD_WRITE_STRUCT", 0, 0x5391, 0 },
|
||||
{ "linux/cec.h", "CEC_ADAP_G_CAPS", _IOC_READ|_IOC_WRITE, 0x6100, 0x4c },
|
||||
{ "linux/cec.h", "CEC_ADAP_G_LOG_ADDRS", _IOC_READ, 0x6103, 0x5c },
|
||||
{ "linux/cec.h", "CEC_ADAP_G_PHYS_ADDR", _IOC_READ, 0x6101, 0x02 },
|
||||
{ "linux/cec.h", "CEC_ADAP_S_LOG_ADDRS", _IOC_READ|_IOC_WRITE, 0x6104, 0x5c },
|
||||
{ "linux/cec.h", "CEC_ADAP_S_PHYS_ADDR", _IOC_WRITE, 0x6102, 0x02 },
|
||||
{ "linux/cec.h", "CEC_DQEVENT", _IOC_READ|_IOC_WRITE, 0x6107, 0x50 },
|
||||
{ "linux/cec.h", "CEC_G_MODE", _IOC_READ, 0x6108, 0x04 },
|
||||
{ "linux/cec.h", "CEC_RECEIVE", _IOC_READ|_IOC_WRITE, 0x6106, 0x38 },
|
||||
{ "linux/cec.h", "CEC_S_MODE", _IOC_WRITE, 0x6109, 0x04 },
|
||||
{ "linux/cec.h", "CEC_TRANSMIT", _IOC_READ|_IOC_WRITE, 0x6105, 0x38 },
|
||||
{ "linux/chio.h", "CHIOEXCHANGE", _IOC_WRITE, 0x6302, 0x1c },
|
||||
{ "linux/chio.h", "CHIOGELEM", _IOC_WRITE, 0x6310, 0x6c },
|
||||
{ "linux/chio.h", "CHIOGPARAMS", _IOC_READ, 0x6306, 0x14 },
|
||||
@ -969,7 +987,11 @@
|
||||
{ "linux/gigaset_dev.h", "GIGASET_CONFIG", _IOC_READ|_IOC_WRITE, 0x4701, 0x04 },
|
||||
{ "linux/gigaset_dev.h", "GIGASET_REDIR", _IOC_READ|_IOC_WRITE, 0x4700, 0x04 },
|
||||
{ "linux/gigaset_dev.h", "GIGASET_VERSION", _IOC_READ|_IOC_WRITE, 0x4703, 0x10 },
|
||||
{ "linux/gpio.h", "GPIOHANDLE_GET_LINE_VALUES_IOCTL", _IOC_READ|_IOC_WRITE, 0xb408, 0x40 },
|
||||
{ "linux/gpio.h", "GPIOHANDLE_SET_LINE_VALUES_IOCTL", _IOC_READ|_IOC_WRITE, 0xb409, 0x40 },
|
||||
{ "linux/gpio.h", "GPIO_GET_CHIPINFO_IOCTL", _IOC_READ, 0xb401, 0x44 },
|
||||
{ "linux/gpio.h", "GPIO_GET_LINEEVENT_IOCTL", _IOC_READ|_IOC_WRITE, 0xb404, 0x30 },
|
||||
{ "linux/gpio.h", "GPIO_GET_LINEHANDLE_IOCTL", _IOC_READ|_IOC_WRITE, 0xb403, 0x16c },
|
||||
{ "linux/gpio.h", "GPIO_GET_LINEINFO_IOCTL", _IOC_READ|_IOC_WRITE, 0xb402, 0x48 },
|
||||
{ "linux/gsmmux.h", "GSMIOC_DISABLE_NET", _IOC_NONE, 0x4703, 0x00 },
|
||||
{ "linux/gsmmux.h", "GSMIOC_ENABLE_NET", _IOC_WRITE, 0x4702, 0x34 },
|
||||
@ -1293,123 +1315,6 @@
|
||||
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_MEMORY_POLICY", _IOC_WRITE, 0x4b04, 0x20 },
|
||||
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_UPDATE_QUEUE", _IOC_WRITE, 0x4b07, 0x18 },
|
||||
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_WAIT_EVENTS", _IOC_READ|_IOC_WRITE, 0x4b0c, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_ALLOCATE_RMA", _IOC_READ, 0xaea9, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_ARM_PREFERRED_TARGET", _IOC_READ, 0xaeaf, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_ARM_SET_DEVICE_ADDR", _IOC_WRITE, 0xaeab, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_ARM_VCPU_INIT", _IOC_WRITE, 0xaeae, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_ASSIGN_DEV_IRQ", _IOC_WRITE, 0xae70, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_ASSIGN_PCI_DEVICE", _IOC_READ, 0xae69, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_ASSIGN_SET_INTX_MASK", _IOC_WRITE, 0xaea4, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_ENTRY", _IOC_WRITE, 0xae74, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_NR", _IOC_WRITE, 0xae73, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_CHECK_EXTENSION", _IOC_NONE, 0xae03, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_CREATE_DEVICE", _IOC_READ|_IOC_WRITE, 0xaee0, 0x0c },
|
||||
{ "linux/kvm.h", "KVM_CREATE_IRQCHIP", _IOC_NONE, 0xae60, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_CREATE_PIT", _IOC_NONE, 0xae64, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_CREATE_PIT2", _IOC_WRITE, 0xae77, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_CREATE_SPAPR_TCE", _IOC_WRITE, 0xaea8, 0x0c },
|
||||
{ "linux/kvm.h", "KVM_CREATE_SPAPR_TCE_64", _IOC_WRITE, 0xaea8, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_CREATE_VCPU", _IOC_NONE, 0xae41, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_CREATE_VM", _IOC_NONE, 0xae01, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_DEASSIGN_DEV_IRQ", _IOC_WRITE, 0xae75, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_DEASSIGN_PCI_DEVICE", _IOC_WRITE, 0xae72, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_DIRTY_TLB", _IOC_WRITE, 0xaeaa, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_ENABLE_CAP", _IOC_WRITE, 0xaea3, 0x68 },
|
||||
{ "linux/kvm.h", "KVM_GET_API_VERSION", _IOC_NONE, 0xae00, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_GET_CLOCK", _IOC_READ, 0xae7c, 0x30 },
|
||||
{ "linux/kvm.h", "KVM_GET_CPUID2", _IOC_READ|_IOC_WRITE, 0xae91, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_GET_DEBUGREGS", _IOC_READ, 0xaea1, 0x80 },
|
||||
{ "linux/kvm.h", "KVM_GET_DEVICE_ATTR", _IOC_WRITE, 0xaee2, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_GET_DIRTY_LOG", _IOC_WRITE, 0xae42, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_GET_EMULATED_CPUID", _IOC_READ|_IOC_WRITE, 0xae09, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_GET_FPU", _IOC_READ, 0xae8c, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_GET_IRQCHIP", _IOC_READ|_IOC_WRITE, 0xae62, 0x208 },
|
||||
{ "linux/kvm.h", "KVM_GET_LAPIC", _IOC_READ, 0xae8e, 0x400 },
|
||||
{ "linux/kvm.h", "KVM_GET_MP_STATE", _IOC_READ, 0xae98, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_GET_MSRS", _IOC_READ|_IOC_WRITE, 0xae88, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_GET_MSR_INDEX_LIST", _IOC_READ|_IOC_WRITE, 0xae02, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_GET_NR_MMU_PAGES", _IOC_NONE, 0xae45, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_GET_ONE_REG", _IOC_WRITE, 0xaeab, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_GET_PIT", _IOC_READ|_IOC_WRITE, 0xae65, 0x48 },
|
||||
{ "linux/kvm.h", "KVM_GET_PIT2", _IOC_READ, 0xae9f, 0x70 },
|
||||
{ "linux/kvm.h", "KVM_GET_REGS", _IOC_READ, 0xae81, 0x98 },
|
||||
{ "linux/kvm.h", "KVM_GET_REG_LIST", _IOC_READ|_IOC_WRITE, 0xaeb0, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_GET_SREGS", _IOC_READ, 0xae83, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_GET_SUPPORTED_CPUID", _IOC_READ|_IOC_WRITE, 0xae05, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_GET_TSC_KHZ", _IOC_NONE, 0xaea3, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_GET_VCPU_EVENTS", _IOC_READ, 0xae9f, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_GET_VCPU_MMAP_SIZE", _IOC_NONE, 0xae04, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_GET_XCRS", _IOC_READ, 0xaea6, 0x188 },
|
||||
{ "linux/kvm.h", "KVM_GET_XSAVE", _IOC_READ, 0xaea4, 0x1000 },
|
||||
{ "linux/kvm.h", "KVM_HAS_DEVICE_ATTR", _IOC_WRITE, 0xaee3, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_INTERRUPT", _IOC_WRITE, 0xae86, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_IOEVENTFD", _IOC_WRITE, 0xae79, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_IRQFD", _IOC_WRITE, 0xae76, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_IRQ_LINE", _IOC_WRITE, 0xae61, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_IRQ_LINE_STATUS", _IOC_READ|_IOC_WRITE, 0xae67, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_KVMCLOCK_CTRL", _IOC_NONE, 0xaead, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_NMI", _IOC_NONE, 0xae9a, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_PPC_ALLOCATE_HTAB", _IOC_READ|_IOC_WRITE, 0xaea7, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_PPC_GET_HTAB_FD", _IOC_WRITE, 0xaeaa, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_PPC_GET_PVINFO", _IOC_WRITE, 0xaea1, 0x80 },
|
||||
{ "linux/kvm.h", "KVM_PPC_GET_SMMU_INFO", _IOC_READ, 0xaea6, 0x250 },
|
||||
{ "linux/kvm.h", "KVM_PPC_RTAS_DEFINE_TOKEN", _IOC_WRITE, 0xaeac, 0x80 },
|
||||
{ "linux/kvm.h", "KVM_REGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae67, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_REINJECT_CONTROL", _IOC_NONE, 0xae71, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_RUN", _IOC_NONE, 0xae80, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_S390_ENABLE_SIE", _IOC_NONE, 0xae06, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_S390_GET_IRQ_STATE", _IOC_WRITE, 0xaeb6, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_S390_GET_SKEYS", _IOC_WRITE, 0xaeb2, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_S390_INITIAL_RESET", _IOC_NONE, 0xae97, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_S390_INTERRUPT", _IOC_WRITE, 0xae94, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_S390_IRQ", _IOC_WRITE, 0xaeb4, 0x48 },
|
||||
{ "linux/kvm.h", "KVM_S390_MEM_OP", _IOC_WRITE, 0xaeb1, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_S390_SET_INITIAL_PSW", _IOC_WRITE, 0xae96, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_S390_SET_IRQ_STATE", _IOC_WRITE, 0xaeb5, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_S390_SET_SKEYS", _IOC_WRITE, 0xaeb3, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_S390_STORE_STATUS", _IOC_WRITE, 0xae95, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_S390_UCAS_MAP", _IOC_WRITE, 0xae50, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_S390_UCAS_UNMAP", _IOC_WRITE, 0xae51, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_S390_VCPU_FAULT", _IOC_WRITE, 0xae52, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_SET_BOOT_CPU_ID", _IOC_NONE, 0xae78, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_SET_CLOCK", _IOC_WRITE, 0xae7b, 0x30 },
|
||||
{ "linux/kvm.h", "KVM_SET_CPUID", _IOC_WRITE, 0xae8a, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_SET_CPUID2", _IOC_WRITE, 0xae90, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_SET_DEBUGREGS", _IOC_WRITE, 0xaea2, 0x80 },
|
||||
{ "linux/kvm.h", "KVM_SET_DEVICE_ATTR", _IOC_WRITE, 0xaee1, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_SET_FPU", _IOC_WRITE, 0xae8d, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_SET_GSI_ROUTING", _IOC_WRITE, 0xae6a, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_SET_GUEST_DEBUG", _IOC_WRITE, 0xae9b, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_SET_IDENTITY_MAP_ADDR", _IOC_WRITE, 0xae48, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_SET_IRQCHIP", _IOC_READ, 0xae63, 0x208 },
|
||||
{ "linux/kvm.h", "KVM_SET_LAPIC", _IOC_WRITE, 0xae8f, 0x400 },
|
||||
{ "linux/kvm.h", "KVM_SET_MEMORY_ALIAS", _IOC_WRITE, 0xae43, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_SET_MEMORY_REGION", _IOC_WRITE, 0xae40, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_SET_MP_STATE", _IOC_WRITE, 0xae99, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_SET_MSRS", _IOC_WRITE, 0xae89, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_SET_NR_MMU_PAGES", _IOC_NONE, 0xae44, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_SET_ONE_REG", _IOC_WRITE, 0xaeac, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_SET_PIT", _IOC_READ, 0xae66, 0x48 },
|
||||
{ "linux/kvm.h", "KVM_SET_PIT2", _IOC_WRITE, 0xaea0, 0x70 },
|
||||
{ "linux/kvm.h", "KVM_SET_REGS", _IOC_WRITE, 0xae82, 0x98 },
|
||||
{ "linux/kvm.h", "KVM_SET_SIGNAL_MASK", _IOC_WRITE, 0xae8b, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_SET_SREGS", _IOC_WRITE, 0xae84, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_SET_TSC_KHZ", _IOC_NONE, 0xaea2, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_SET_TSS_ADDR", _IOC_NONE, 0xae47, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_SET_USER_MEMORY_REGION", _IOC_WRITE, 0xae46, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_SET_VAPIC_ADDR", _IOC_WRITE, 0xae93, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_SET_VCPU_EVENTS", _IOC_WRITE, 0xaea0, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_SET_XCRS", _IOC_WRITE, 0xaea7, 0x188 },
|
||||
{ "linux/kvm.h", "KVM_SET_XSAVE", _IOC_WRITE, 0xaea5, 0x1000 },
|
||||
{ "linux/kvm.h", "KVM_SIGNAL_MSI", _IOC_WRITE, 0xaea5, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_SMI", _IOC_NONE, 0xaeb7, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_TPR_ACCESS_REPORTING", _IOC_READ|_IOC_WRITE, 0xae92, 0x28 },
|
||||
{ "linux/kvm.h", "KVM_TRANSLATE", _IOC_READ|_IOC_WRITE, 0xae85, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_UNREGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae68, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_X86_GET_MCE_CAP_SUPPORTED", _IOC_READ, 0xae9d, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_X86_SETUP_MCE", _IOC_WRITE, 0xae9c, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_X86_SET_MCE", _IOC_WRITE, 0xae9e, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_XEN_HVM_CONFIG", _IOC_WRITE, 0xae7a, 0x38 },
|
||||
{ "linux/lightnvm.h", "NVM_DEV_CREATE", _IOC_WRITE, 0x4c22, 0x80 },
|
||||
{ "linux/lightnvm.h", "NVM_DEV_FACTORY", _IOC_WRITE, 0x4c25, 0x24 },
|
||||
{ "linux/lightnvm.h", "NVM_DEV_INIT", _IOC_WRITE, 0x4c24, 0x2c },
|
||||
@ -1418,30 +1323,14 @@
|
||||
{ "linux/lightnvm.h", "NVM_INFO", _IOC_READ|_IOC_WRITE, 0x4c20, 0x1000 },
|
||||
{ "linux/lirc.h", "LIRC_GET_FEATURES", _IOC_READ, 0x6900, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_LENGTH", _IOC_READ, 0x690f, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_MAX_FILTER_PULSE", _IOC_READ, 0x690b, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_MAX_FILTER_SPACE", _IOC_READ, 0x690d, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_MAX_TIMEOUT", _IOC_READ, 0x6909, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_MIN_FILTER_PULSE", _IOC_READ, 0x690a, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_MIN_FILTER_SPACE", _IOC_READ, 0x690c, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_MIN_TIMEOUT", _IOC_READ, 0x6908, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_REC_CARRIER", _IOC_READ, 0x6904, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_REC_DUTY_CYCLE", _IOC_READ, 0x6906, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_REC_MODE", _IOC_READ, 0x6902, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_REC_RESOLUTION", _IOC_READ, 0x6907, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_SEND_CARRIER", _IOC_READ, 0x6903, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_SEND_DUTY_CYCLE", _IOC_READ, 0x6905, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_SEND_MODE", _IOC_READ, 0x6901, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_NOTIFY_DECODE", _IOC_NONE, 0x6920, 0x00 },
|
||||
{ "linux/lirc.h", "LIRC_SETUP_END", _IOC_NONE, 0x6922, 0x00 },
|
||||
{ "linux/lirc.h", "LIRC_SETUP_START", _IOC_NONE, 0x6921, 0x00 },
|
||||
{ "linux/lirc.h", "LIRC_SET_MEASURE_CARRIER_MODE", _IOC_WRITE, 0x691d, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_CARRIER", _IOC_WRITE, 0x6914, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_CARRIER_RANGE", _IOC_WRITE, 0x691f, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_DUTY_CYCLE", _IOC_WRITE, 0x6916, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_DUTY_CYCLE_RANGE", _IOC_WRITE, 0x691e, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_FILTER", _IOC_WRITE, 0x691c, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_FILTER_PULSE", _IOC_WRITE, 0x691a, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_FILTER_SPACE", _IOC_WRITE, 0x691b, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_MODE", _IOC_WRITE, 0x6912, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_TIMEOUT", _IOC_WRITE, 0x6918, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_TIMEOUT_REPORTS", _IOC_WRITE, 0x6919, 0x04 },
|
||||
@ -1553,19 +1442,21 @@
|
||||
{ "linux/ndctl.h", "ND_IOCTL_SMART", _IOC_READ|_IOC_WRITE, 0x4e01, 0x84 },
|
||||
{ "linux/ndctl.h", "ND_IOCTL_SMART_THRESHOLD", _IOC_READ|_IOC_WRITE, 0x4e02, 0x0c },
|
||||
{ "linux/ndctl.h", "ND_IOCTL_VENDOR", _IOC_READ|_IOC_WRITE, 0x4e09, 0x08 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_CHANGE_CPMODE", _IOC_WRITE, 0x6e80, 0x10 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_CLEAN_SEGMENTS", _IOC_WRITE, 0x6e88, 0x78 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_DELETE_CHECKPOINT", _IOC_WRITE, 0x6e81, 0x08 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_GET_BDESCS", _IOC_READ|_IOC_WRITE, 0x6e87, 0x18 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_GET_CPINFO", _IOC_READ, 0x6e82, 0x18 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_GET_CPSTAT", _IOC_READ, 0x6e83, 0x18 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_GET_SUINFO", _IOC_READ, 0x6e84, 0x18 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_GET_SUSTAT", _IOC_READ, 0x6e85, 0x30 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_GET_VINFO", _IOC_READ|_IOC_WRITE, 0x6e86, 0x18 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_RESIZE", _IOC_WRITE, 0x6e8b, 0x08 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_SET_ALLOC_RANGE", _IOC_WRITE, 0x6e8c, 0x10 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_SET_SUINFO", _IOC_WRITE, 0x6e8d, 0x18 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_SYNC", _IOC_READ, 0x6e8a, 0x08 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_CHANGE_CPMODE", _IOC_WRITE, 0x6e80, 0x10 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_CLEAN_SEGMENTS", _IOC_WRITE, 0x6e88, 0x78 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_DELETE_CHECKPOINT", _IOC_WRITE, 0x6e81, 0x08 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_GET_BDESCS", _IOC_READ|_IOC_WRITE, 0x6e87, 0x18 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_GET_CPINFO", _IOC_READ, 0x6e82, 0x18 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_GET_CPSTAT", _IOC_READ, 0x6e83, 0x18 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_GET_SUINFO", _IOC_READ, 0x6e84, 0x18 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_GET_SUSTAT", _IOC_READ, 0x6e85, 0x30 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_GET_VINFO", _IOC_READ|_IOC_WRITE, 0x6e86, 0x18 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_RESIZE", _IOC_WRITE, 0x6e8b, 0x08 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_SET_ALLOC_RANGE", _IOC_WRITE, 0x6e8c, 0x10 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_SET_SUINFO", _IOC_WRITE, 0x6e8d, 0x18 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_SYNC", _IOC_READ, 0x6e8a, 0x08 },
|
||||
{ "linux/nsfs.h", "NS_GET_PARENT", _IOC_NONE, 0xb702, 0x00 },
|
||||
{ "linux/nsfs.h", "NS_GET_USERNS", _IOC_NONE, 0xb701, 0x00 },
|
||||
{ "linux/nvme_ioctl.h", "NVME_IOCTL_ADMIN_CMD", _IOC_READ|_IOC_WRITE, 0x4e41, 0x48 },
|
||||
{ "linux/nvme_ioctl.h", "NVME_IOCTL_ID", _IOC_NONE, 0x4e40, 0x00 },
|
||||
{ "linux/nvme_ioctl.h", "NVME_IOCTL_IO_CMD", _IOC_READ|_IOC_WRITE, 0x4e43, 0x48 },
|
||||
@ -1739,6 +1630,17 @@
|
||||
{ "linux/raw.h", "RAW_SETBIND", _IOC_NONE, 0xac00, 0x00 },
|
||||
{ "linux/reiserfs_fs.h", "REISERFS_IOC_UNPACK", _IOC_WRITE, 0xcd01, 0x04 },
|
||||
{ "linux/rfkill.h", "RFKILL_IOCTL_NOINPUT", _IOC_NONE, 0x5201, 0x00 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_ACCEPT", _IOC_READ|_IOC_WRITE, 0x6307, 0x08 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_BIND", _IOC_WRITE, 0x6305, 0x08 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_CLOSE", _IOC_WRITE, 0x6304, 0x02 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_CONNECT", _IOC_WRITE, 0x6308, 0x08 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_CREATE", _IOC_READ|_IOC_WRITE, 0x6303, 0x02 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_LISTEN", _IOC_WRITE, 0x6306, 0x02 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_RECEIVE", _IOC_READ|_IOC_WRITE, 0x630a, 0x10 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_SEND", _IOC_WRITE, 0x6309, 0x10 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_EP_GET_LIST", _IOC_READ|_IOC_WRITE, 0x6302, 0x04 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_EP_GET_LIST_SIZE", _IOC_READ|_IOC_WRITE, 0x6301, 0x04 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_MPORT_GET_LIST", _IOC_READ|_IOC_WRITE, 0x630b, 0x04 },
|
||||
{ "linux/rio_mport_cdev.h", "RIO_ALLOC_DMA", _IOC_READ|_IOC_WRITE, 0x6d13, 0x18 },
|
||||
{ "linux/rio_mport_cdev.h", "RIO_DEV_ADD", _IOC_WRITE, 0x6d17, 0x20 },
|
||||
{ "linux/rio_mport_cdev.h", "RIO_DEV_DEL", _IOC_WRITE, 0x6d18, 0x20 },
|
||||
@ -1849,6 +1751,7 @@
|
||||
{ "linux/sockios.h", "SIOCGMIIPHY", 0, 0x8947, 0 },
|
||||
{ "linux/sockios.h", "SIOCGMIIREG", 0, 0x8948, 0 },
|
||||
{ "linux/sockios.h", "SIOCGRARP", 0, 0x8961, 0 },
|
||||
{ "linux/sockios.h", "SIOCGSKNS", 0, 0x894C, 0 },
|
||||
{ "linux/sockios.h", "SIOCOUTQNSD", 0, 0x894B, 0 },
|
||||
{ "linux/sockios.h", "SIOCPROTOPRIVATE", 0, 0x89E0, 0 },
|
||||
{ "linux/sockios.h", "SIOCRTMSG", 0, 0x890D, 0 },
|
||||
@ -2244,6 +2147,8 @@
|
||||
{ "linux/vhost.h", "VHOST_SET_VRING_ERR", _IOC_WRITE, 0xaf22, 0x08 },
|
||||
{ "linux/vhost.h", "VHOST_SET_VRING_KICK", _IOC_WRITE, 0xaf20, 0x08 },
|
||||
{ "linux/vhost.h", "VHOST_SET_VRING_NUM", _IOC_WRITE, 0xaf10, 0x08 },
|
||||
{ "linux/vhost.h", "VHOST_VSOCK_SET_GUEST_CID", _IOC_WRITE, 0xaf60, 0x08 },
|
||||
{ "linux/vhost.h", "VHOST_VSOCK_SET_RUNNING", _IOC_WRITE, 0xaf61, 0x04 },
|
||||
{ "linux/videodev2.h", "VIDIOC_CREATE_BUFS", _IOC_READ|_IOC_WRITE, 0x565c, 0xf8 },
|
||||
{ "linux/videodev2.h", "VIDIOC_CROPCAP", _IOC_READ|_IOC_WRITE, 0x563a, 0x2c },
|
||||
{ "linux/videodev2.h", "VIDIOC_DBG_G_CHIP_INFO", _IOC_READ|_IOC_WRITE, 0x5666, 0xc8 },
|
||||
@ -2348,7 +2253,6 @@
|
||||
{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_SOCKETS_VERSION", _IOC_NONE, 0x07b4, 0x00 },
|
||||
{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_VERSION", _IOC_NONE, 0x079f, 0x00 },
|
||||
{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_VERSION2", _IOC_NONE, 0x07a7, 0x00 },
|
||||
{ "linux/vsp1.h", "VIDIOC_VSP1_LUT_CONFIG", _IOC_READ|_IOC_WRITE, 0x56c1, 0x400 },
|
||||
{ "linux/vt.h", "VT_ACTIVATE", 0, 0x5606, 0 },
|
||||
{ "linux/vt.h", "VT_DISALLOCATE", 0, 0x5608, 0 },
|
||||
{ "linux/vt.h", "VT_GETHIFONTMASK", 0, 0x560D, 0 },
|
||||
@ -2365,6 +2269,7 @@
|
||||
{ "linux/vt.h", "VT_UNLOCKSWITCH", 0, 0x560C, 0 },
|
||||
{ "linux/vt.h", "VT_WAITACTIVE", 0, 0x5607, 0 },
|
||||
{ "linux/vt.h", "VT_WAITEVENT", 0, 0x560E, 0 },
|
||||
{ "linux/vtpm_proxy.h", "VTPM_PROXY_IOC_NEW_DEV", _IOC_READ|_IOC_WRITE, 0xa100, 0x14 },
|
||||
{ "linux/watchdog.h", "WDIOC_GETBOOTSTATUS", _IOC_READ, 0x5702, 0x04 },
|
||||
{ "linux/watchdog.h", "WDIOC_GETPRETIMEOUT", _IOC_READ, 0x5709, 0x04 },
|
||||
{ "linux/watchdog.h", "WDIOC_GETSTATUS", _IOC_READ, 0x5701, 0x04 },
|
||||
@ -2764,6 +2669,7 @@
|
||||
{ "staging/android/ion.h", "ION_IOC_ALLOC", _IOC_READ|_IOC_WRITE, 0x4900, 0x14 },
|
||||
{ "staging/android/ion.h", "ION_IOC_CUSTOM", _IOC_READ|_IOC_WRITE, 0x4906, 0x08 },
|
||||
{ "staging/android/ion.h", "ION_IOC_FREE", _IOC_READ|_IOC_WRITE, 0x4901, 0x04 },
|
||||
{ "staging/android/ion.h", "ION_IOC_HEAP_QUERY", _IOC_READ|_IOC_WRITE, 0x4908, 0x18 },
|
||||
{ "staging/android/ion.h", "ION_IOC_IMPORT", _IOC_READ|_IOC_WRITE, 0x4905, 0x08 },
|
||||
{ "staging/android/ion.h", "ION_IOC_MAP", _IOC_READ|_IOC_WRITE, 0x4902, 0x08 },
|
||||
{ "staging/android/ion.h", "ION_IOC_SHARE", _IOC_READ|_IOC_WRITE, 0x4904, 0x08 },
|
||||
@ -2771,8 +2677,6 @@
|
||||
{ "staging/android/ion_test.h", "ION_IOC_TEST_DMA_MAPPING", _IOC_WRITE, 0x49f1, 0x20 },
|
||||
{ "staging/android/ion_test.h", "ION_IOC_TEST_KERNEL_MAPPING", _IOC_WRITE, 0x49f2, 0x20 },
|
||||
{ "staging/android/ion_test.h", "ION_IOC_TEST_SET_FD", _IOC_NONE, 0x49f0, 0x00 },
|
||||
{ "staging/android/sw_sync.h", "SW_SYNC_IOC_CREATE_FENCE", _IOC_READ|_IOC_WRITE, 0x5700, 0x28 },
|
||||
{ "staging/android/sw_sync.h", "SW_SYNC_IOC_INC", _IOC_WRITE, 0x5701, 0x04 },
|
||||
{ "video/da8xx-fb.h", "FBIGET_BRIGHTNESS", _IOC_READ, 0x4603, 0x04 },
|
||||
{ "video/da8xx-fb.h", "FBIGET_COLOR", _IOC_READ, 0x4605, 0x04 },
|
||||
{ "video/da8xx-fb.h", "FBIOGET_CONTRAST", _IOC_READ, 0x4601, 0x04 },
|
||||
@ -2813,6 +2717,7 @@
|
||||
{ "xen/evtchn.h", "IOCTL_EVTCHN_BIND_VIRQ", _IOC_NONE, 0x4500, 0x04 },
|
||||
{ "xen/evtchn.h", "IOCTL_EVTCHN_NOTIFY", _IOC_NONE, 0x4504, 0x04 },
|
||||
{ "xen/evtchn.h", "IOCTL_EVTCHN_RESET", _IOC_NONE, 0x4505, 0x00 },
|
||||
{ "xen/evtchn.h", "IOCTL_EVTCHN_RESTRICT_DOMID", _IOC_NONE, 0x4506, 0x02 },
|
||||
{ "xen/evtchn.h", "IOCTL_EVTCHN_UNBIND", _IOC_NONE, 0x4503, 0x04 },
|
||||
{ "xen/gntdev.h", "IOCTL_GNTDEV_GET_OFFSET_FOR_VADDR", _IOC_NONE, 0x4702, 0x18 },
|
||||
{ "xen/gntdev.h", "IOCTL_GNTDEV_GRANT_COPY", _IOC_NONE, 0x4708, 0x08 },
|
||||
|
@ -1,8 +1,8 @@
|
||||
#ifndef sys_ARCH_mmap
|
||||
# define sys_ARCH_mmap sys_mmap
|
||||
#endif
|
||||
[ 0] = { 2, 0, SEN(io_setup), "io_setup" },
|
||||
[ 1] = { 1, 0, SEN(io_destroy), "io_destroy" },
|
||||
[ 0] = { 2, TM, SEN(io_setup), "io_setup" },
|
||||
[ 1] = { 1, TM, SEN(io_destroy), "io_destroy" },
|
||||
[ 2] = { 3, 0, SEN(io_submit), "io_submit" },
|
||||
[ 3] = { 3, 0, SEN(io_cancel), "io_cancel" },
|
||||
[ 4] = { 5, 0, SEN(io_getevents), "io_getevents" },
|
||||
@ -80,7 +80,7 @@
|
||||
[ 76] = { 6, TD, SEN(splice), "splice" },
|
||||
[ 77] = { 4, TD, SEN(tee), "tee" },
|
||||
[ 78] = { 4, TD|TF, SEN(readlinkat), "readlinkat" },
|
||||
[ 79] = { 4, TD|TF, SEN(newfstatat), "fstatat64" },
|
||||
[ 79] = { 4, TD|TF, SEN(fstatat64), "fstatat64" },
|
||||
[ 80] = { 2, TD, SEN(fstat64), "fstat64" },
|
||||
[ 81] = { 0, 0, SEN(sync), "sync" },
|
||||
[ 82] = { 1, TD, SEN(fsync), "fsync" },
|
||||
@ -267,17 +267,20 @@
|
||||
[274] = { 3, 0, SEN(sched_setattr), "sched_setattr" },
|
||||
[275] = { 4, 0, SEN(sched_getattr), "sched_getattr" },
|
||||
[276] = { 5, TD|TF, SEN(renameat2), "renameat2" },
|
||||
[277] = { 3, 0, SEN(seccomp), "seccomp", },
|
||||
[278] = { 3, 0, SEN(getrandom), "getrandom", },
|
||||
[279] = { 2, TD, SEN(memfd_create), "memfd_create", },
|
||||
[280] = { 3, TD, SEN(bpf), "bpf", },
|
||||
[281] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", },
|
||||
[282] = { 1, TD, SEN(userfaultfd), "userfaultfd", },
|
||||
[283] = { 2, 0, SEN(membarrier), "membarrier", },
|
||||
[277] = { 3, 0, SEN(seccomp), "seccomp" },
|
||||
[278] = { 3, 0, SEN(getrandom), "getrandom" },
|
||||
[279] = { 2, TD, SEN(memfd_create), "memfd_create" },
|
||||
[280] = { 3, TD, SEN(bpf), "bpf" },
|
||||
[281] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" },
|
||||
[282] = { 1, TD, SEN(userfaultfd), "userfaultfd" },
|
||||
[283] = { 2, 0, SEN(membarrier), "membarrier" },
|
||||
[284] = { 3, TM, SEN(mlock2), "mlock2" },
|
||||
[285] = { 6, TD, SEN(copy_file_range), "copy_file_range" },
|
||||
[286] = { 6, TD, SEN(preadv2), "preadv2" },
|
||||
[287] = { 6, TD, SEN(pwritev2), "pwritev2" },
|
||||
[288] = { 4, TM|SI, SEN(pkey_mprotect), "pkey_mprotect" },
|
||||
[289] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" },
|
||||
[290] = { 1, 0, SEN(pkey_free), "pkey_free" },
|
||||
|
||||
#undef sys_ARCH_mmap
|
||||
#undef ARCH_WANT_SYNC_FILE_RANGE2
|
||||
|
@ -93,6 +93,7 @@
|
||||
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 },
|
||||
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_INFO", _IOC_WRITE, 0x6445, 0x20 },
|
||||
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_CS", _IOC_READ|_IOC_WRITE, 0x6449, 0x20 },
|
||||
{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_FENCES", _IOC_READ|_IOC_WRITE, 0x6452, 0x18 },
|
||||
{ "drm/drm.h", "DRM_IOCTL_ADD_BUFS", _IOC_READ|_IOC_WRITE, 0x6416, 0x20 },
|
||||
{ "drm/drm.h", "DRM_IOCTL_ADD_CTX", _IOC_READ|_IOC_WRITE, 0x6420, 0x08 },
|
||||
{ "drm/drm.h", "DRM_IOCTL_ADD_DRAW", _IOC_READ|_IOC_WRITE, 0x6427, 0x04 },
|
||||
@ -284,8 +285,9 @@
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_CPU_FINI", _IOC_WRITE, 0x6445, 0x04 },
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_CPU_PREP", _IOC_WRITE, 0x6444, 0x18 },
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 },
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_MADVISE", _IOC_READ|_IOC_WRITE, 0x6448, 0x0c },
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x20 },
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x28 },
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 },
|
||||
{ "drm/msm_drm.h", "DRM_IOCTL_MSM_WAIT_FENCE", _IOC_WRITE, 0x6447, 0x18 },
|
||||
{ "drm/nouveau_drm.h", "DRM_IOCTL_NOUVEAU_GEM_CPU_FINI", _IOC_WRITE, 0x6483, 0x04 },
|
||||
@ -392,10 +394,13 @@
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_CREATE_BO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 },
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_CREATE_SHADER_BO", _IOC_READ|_IOC_WRITE, 0x6445, 0x18 },
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GET_HANG_STATE", _IOC_READ|_IOC_WRITE, 0x6446, 0xa0 },
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 },
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_MMAP_BO", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 },
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_SUBMIT_CL", _IOC_READ|_IOC_WRITE, 0x6440, 0xa0 },
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_WAIT_BO", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
|
||||
{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_WAIT_SEQNO", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 },
|
||||
{ "drm/vgem_drm.h", "DRM_IOCTL_VGEM_FENCE_ATTACH", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 },
|
||||
{ "drm/vgem_drm.h", "DRM_IOCTL_VGEM_FENCE_SIGNAL", _IOC_WRITE, 0x6442, 0x08 },
|
||||
{ "drm/via_drm.h", "DRM_IOCTL_VIA_AGP_INIT", _IOC_READ|_IOC_WRITE, 0x6442, 0x08 },
|
||||
{ "drm/via_drm.h", "DRM_IOCTL_VIA_ALLOCMEM", _IOC_READ|_IOC_WRITE, 0x6440, 0x20 },
|
||||
{ "drm/via_drm.h", "DRM_IOCTL_VIA_BLIT_SYNC", _IOC_WRITE, 0x644f, 0x08 },
|
||||
@ -553,6 +558,9 @@
|
||||
{ "linux/auto_fs4.h", "AUTOFS_IOC_EXPIRE_MULTI", _IOC_WRITE, 0x9366, 0x04 },
|
||||
{ "linux/auto_fs4.h", "AUTOFS_IOC_PROTOSUBVER", _IOC_READ, 0x9367, 0x04 },
|
||||
{ "linux/blkpg.h", "BLKPG", _IOC_NONE, 0x1269, 0x00 },
|
||||
{ "linux/blkzoned.h", "BLKREPORTZONE", _IOC_READ|_IOC_WRITE, 0x1282, 0x10 },
|
||||
{ "linux/blkzoned.h", "BLKRESETZONE", _IOC_WRITE, 0x1283, 0x10 },
|
||||
{ "linux/bt-bmc.h", "BT_BMC_IOCTL_SMS_ATN", _IOC_NONE, 0xb100, 0x00 },
|
||||
{ "linux/btrfs.h", "BTRFS_IOC_ADD_DEV", _IOC_WRITE, 0x940a, 0x1000 },
|
||||
{ "linux/btrfs.h", "BTRFS_IOC_BALANCE", _IOC_WRITE, 0x940c, 0x1000 },
|
||||
{ "linux/btrfs.h", "BTRFS_IOC_BALANCE_CTL", _IOC_WRITE, 0x9421, 0x04 },
|
||||
@ -683,6 +691,16 @@
|
||||
{ "linux/cdrom.h", "DVD_AUTH", 0, 0x5392, 0 },
|
||||
{ "linux/cdrom.h", "DVD_READ_STRUCT", 0, 0x5390, 0 },
|
||||
{ "linux/cdrom.h", "DVD_WRITE_STRUCT", 0, 0x5391, 0 },
|
||||
{ "linux/cec.h", "CEC_ADAP_G_CAPS", _IOC_READ|_IOC_WRITE, 0x6100, 0x4c },
|
||||
{ "linux/cec.h", "CEC_ADAP_G_LOG_ADDRS", _IOC_READ, 0x6103, 0x5c },
|
||||
{ "linux/cec.h", "CEC_ADAP_G_PHYS_ADDR", _IOC_READ, 0x6101, 0x02 },
|
||||
{ "linux/cec.h", "CEC_ADAP_S_LOG_ADDRS", _IOC_READ|_IOC_WRITE, 0x6104, 0x5c },
|
||||
{ "linux/cec.h", "CEC_ADAP_S_PHYS_ADDR", _IOC_WRITE, 0x6102, 0x02 },
|
||||
{ "linux/cec.h", "CEC_DQEVENT", _IOC_READ|_IOC_WRITE, 0x6107, 0x50 },
|
||||
{ "linux/cec.h", "CEC_G_MODE", _IOC_READ, 0x6108, 0x04 },
|
||||
{ "linux/cec.h", "CEC_RECEIVE", _IOC_READ|_IOC_WRITE, 0x6106, 0x38 },
|
||||
{ "linux/cec.h", "CEC_S_MODE", _IOC_WRITE, 0x6109, 0x04 },
|
||||
{ "linux/cec.h", "CEC_TRANSMIT", _IOC_READ|_IOC_WRITE, 0x6105, 0x38 },
|
||||
{ "linux/chio.h", "CHIOEXCHANGE", _IOC_WRITE, 0x6302, 0x1c },
|
||||
{ "linux/chio.h", "CHIOGELEM", _IOC_WRITE, 0x6310, 0x6c },
|
||||
{ "linux/chio.h", "CHIOGPARAMS", _IOC_READ, 0x6306, 0x14 },
|
||||
@ -969,7 +987,11 @@
|
||||
{ "linux/gigaset_dev.h", "GIGASET_CONFIG", _IOC_READ|_IOC_WRITE, 0x4701, 0x04 },
|
||||
{ "linux/gigaset_dev.h", "GIGASET_REDIR", _IOC_READ|_IOC_WRITE, 0x4700, 0x04 },
|
||||
{ "linux/gigaset_dev.h", "GIGASET_VERSION", _IOC_READ|_IOC_WRITE, 0x4703, 0x10 },
|
||||
{ "linux/gpio.h", "GPIOHANDLE_GET_LINE_VALUES_IOCTL", _IOC_READ|_IOC_WRITE, 0xb408, 0x40 },
|
||||
{ "linux/gpio.h", "GPIOHANDLE_SET_LINE_VALUES_IOCTL", _IOC_READ|_IOC_WRITE, 0xb409, 0x40 },
|
||||
{ "linux/gpio.h", "GPIO_GET_CHIPINFO_IOCTL", _IOC_READ, 0xb401, 0x44 },
|
||||
{ "linux/gpio.h", "GPIO_GET_LINEEVENT_IOCTL", _IOC_READ|_IOC_WRITE, 0xb404, 0x30 },
|
||||
{ "linux/gpio.h", "GPIO_GET_LINEHANDLE_IOCTL", _IOC_READ|_IOC_WRITE, 0xb403, 0x16c },
|
||||
{ "linux/gpio.h", "GPIO_GET_LINEINFO_IOCTL", _IOC_READ|_IOC_WRITE, 0xb402, 0x48 },
|
||||
{ "linux/gsmmux.h", "GSMIOC_DISABLE_NET", _IOC_NONE, 0x4703, 0x00 },
|
||||
{ "linux/gsmmux.h", "GSMIOC_ENABLE_NET", _IOC_WRITE, 0x4702, 0x34 },
|
||||
@ -1293,123 +1315,6 @@
|
||||
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_MEMORY_POLICY", _IOC_WRITE, 0x4b04, 0x20 },
|
||||
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_UPDATE_QUEUE", _IOC_WRITE, 0x4b07, 0x18 },
|
||||
{ "linux/kfd_ioctl.h", "AMDKFD_IOC_WAIT_EVENTS", _IOC_READ|_IOC_WRITE, 0x4b0c, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_ALLOCATE_RMA", _IOC_READ, 0xaea9, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_ARM_PREFERRED_TARGET", _IOC_READ, 0xaeaf, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_ARM_SET_DEVICE_ADDR", _IOC_WRITE, 0xaeab, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_ARM_VCPU_INIT", _IOC_WRITE, 0xaeae, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_ASSIGN_DEV_IRQ", _IOC_WRITE, 0xae70, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_ASSIGN_PCI_DEVICE", _IOC_READ, 0xae69, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_ASSIGN_SET_INTX_MASK", _IOC_WRITE, 0xaea4, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_ENTRY", _IOC_WRITE, 0xae74, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_NR", _IOC_WRITE, 0xae73, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_CHECK_EXTENSION", _IOC_NONE, 0xae03, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_CREATE_DEVICE", _IOC_READ|_IOC_WRITE, 0xaee0, 0x0c },
|
||||
{ "linux/kvm.h", "KVM_CREATE_IRQCHIP", _IOC_NONE, 0xae60, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_CREATE_PIT", _IOC_NONE, 0xae64, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_CREATE_PIT2", _IOC_WRITE, 0xae77, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_CREATE_SPAPR_TCE", _IOC_WRITE, 0xaea8, 0x0c },
|
||||
{ "linux/kvm.h", "KVM_CREATE_SPAPR_TCE_64", _IOC_WRITE, 0xaea8, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_CREATE_VCPU", _IOC_NONE, 0xae41, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_CREATE_VM", _IOC_NONE, 0xae01, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_DEASSIGN_DEV_IRQ", _IOC_WRITE, 0xae75, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_DEASSIGN_PCI_DEVICE", _IOC_WRITE, 0xae72, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_DIRTY_TLB", _IOC_WRITE, 0xaeaa, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_ENABLE_CAP", _IOC_WRITE, 0xaea3, 0x68 },
|
||||
{ "linux/kvm.h", "KVM_GET_API_VERSION", _IOC_NONE, 0xae00, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_GET_CLOCK", _IOC_READ, 0xae7c, 0x30 },
|
||||
{ "linux/kvm.h", "KVM_GET_CPUID2", _IOC_READ|_IOC_WRITE, 0xae91, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_GET_DEBUGREGS", _IOC_READ, 0xaea1, 0x80 },
|
||||
{ "linux/kvm.h", "KVM_GET_DEVICE_ATTR", _IOC_WRITE, 0xaee2, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_GET_DIRTY_LOG", _IOC_WRITE, 0xae42, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_GET_EMULATED_CPUID", _IOC_READ|_IOC_WRITE, 0xae09, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_GET_FPU", _IOC_READ, 0xae8c, 0x1a0 },
|
||||
{ "linux/kvm.h", "KVM_GET_IRQCHIP", _IOC_READ|_IOC_WRITE, 0xae62, 0x208 },
|
||||
{ "linux/kvm.h", "KVM_GET_LAPIC", _IOC_READ, 0xae8e, 0x400 },
|
||||
{ "linux/kvm.h", "KVM_GET_MP_STATE", _IOC_READ, 0xae98, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_GET_MSRS", _IOC_READ|_IOC_WRITE, 0xae88, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_GET_MSR_INDEX_LIST", _IOC_READ|_IOC_WRITE, 0xae02, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_GET_NR_MMU_PAGES", _IOC_NONE, 0xae45, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_GET_ONE_REG", _IOC_WRITE, 0xaeab, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_GET_PIT", _IOC_READ|_IOC_WRITE, 0xae65, 0x48 },
|
||||
{ "linux/kvm.h", "KVM_GET_PIT2", _IOC_READ, 0xae9f, 0x70 },
|
||||
{ "linux/kvm.h", "KVM_GET_REGS", _IOC_READ, 0xae81, 0x90 },
|
||||
{ "linux/kvm.h", "KVM_GET_REG_LIST", _IOC_READ|_IOC_WRITE, 0xaeb0, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_GET_SREGS", _IOC_READ, 0xae83, 0x138 },
|
||||
{ "linux/kvm.h", "KVM_GET_SUPPORTED_CPUID", _IOC_READ|_IOC_WRITE, 0xae05, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_GET_TSC_KHZ", _IOC_NONE, 0xaea3, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_GET_VCPU_EVENTS", _IOC_READ, 0xae9f, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_GET_VCPU_MMAP_SIZE", _IOC_NONE, 0xae04, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_GET_XCRS", _IOC_READ, 0xaea6, 0x188 },
|
||||
{ "linux/kvm.h", "KVM_GET_XSAVE", _IOC_READ, 0xaea4, 0x1000 },
|
||||
{ "linux/kvm.h", "KVM_HAS_DEVICE_ATTR", _IOC_WRITE, 0xaee3, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_INTERRUPT", _IOC_WRITE, 0xae86, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_IOEVENTFD", _IOC_WRITE, 0xae79, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_IRQFD", _IOC_WRITE, 0xae76, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_IRQ_LINE", _IOC_WRITE, 0xae61, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_IRQ_LINE_STATUS", _IOC_READ|_IOC_WRITE, 0xae67, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_KVMCLOCK_CTRL", _IOC_NONE, 0xaead, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_NMI", _IOC_NONE, 0xae9a, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_PPC_ALLOCATE_HTAB", _IOC_READ|_IOC_WRITE, 0xaea7, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_PPC_GET_HTAB_FD", _IOC_WRITE, 0xaeaa, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_PPC_GET_PVINFO", _IOC_WRITE, 0xaea1, 0x80 },
|
||||
{ "linux/kvm.h", "KVM_PPC_GET_SMMU_INFO", _IOC_READ, 0xaea6, 0x250 },
|
||||
{ "linux/kvm.h", "KVM_PPC_RTAS_DEFINE_TOKEN", _IOC_WRITE, 0xaeac, 0x80 },
|
||||
{ "linux/kvm.h", "KVM_REGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae67, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_REINJECT_CONTROL", _IOC_NONE, 0xae71, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_RUN", _IOC_NONE, 0xae80, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_S390_ENABLE_SIE", _IOC_NONE, 0xae06, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_S390_GET_IRQ_STATE", _IOC_WRITE, 0xaeb6, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_S390_GET_SKEYS", _IOC_WRITE, 0xaeb2, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_S390_INITIAL_RESET", _IOC_NONE, 0xae97, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_S390_INTERRUPT", _IOC_WRITE, 0xae94, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_S390_IRQ", _IOC_WRITE, 0xaeb4, 0x48 },
|
||||
{ "linux/kvm.h", "KVM_S390_MEM_OP", _IOC_WRITE, 0xaeb1, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_S390_SET_INITIAL_PSW", _IOC_WRITE, 0xae96, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_S390_SET_IRQ_STATE", _IOC_WRITE, 0xaeb5, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_S390_SET_SKEYS", _IOC_WRITE, 0xaeb3, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_S390_STORE_STATUS", _IOC_WRITE, 0xae95, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_S390_UCAS_MAP", _IOC_WRITE, 0xae50, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_S390_UCAS_UNMAP", _IOC_WRITE, 0xae51, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_S390_VCPU_FAULT", _IOC_WRITE, 0xae52, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_SET_BOOT_CPU_ID", _IOC_NONE, 0xae78, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_SET_CLOCK", _IOC_WRITE, 0xae7b, 0x30 },
|
||||
{ "linux/kvm.h", "KVM_SET_CPUID", _IOC_WRITE, 0xae8a, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_SET_CPUID2", _IOC_WRITE, 0xae90, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_SET_DEBUGREGS", _IOC_WRITE, 0xaea2, 0x80 },
|
||||
{ "linux/kvm.h", "KVM_SET_DEVICE_ATTR", _IOC_WRITE, 0xaee1, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_SET_FPU", _IOC_WRITE, 0xae8d, 0x1a0 },
|
||||
{ "linux/kvm.h", "KVM_SET_GSI_ROUTING", _IOC_WRITE, 0xae6a, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_SET_GUEST_DEBUG", _IOC_WRITE, 0xae9b, 0x48 },
|
||||
{ "linux/kvm.h", "KVM_SET_IDENTITY_MAP_ADDR", _IOC_WRITE, 0xae48, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_SET_IRQCHIP", _IOC_READ, 0xae63, 0x208 },
|
||||
{ "linux/kvm.h", "KVM_SET_LAPIC", _IOC_WRITE, 0xae8f, 0x400 },
|
||||
{ "linux/kvm.h", "KVM_SET_MEMORY_ALIAS", _IOC_WRITE, 0xae43, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_SET_MEMORY_REGION", _IOC_WRITE, 0xae40, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_SET_MP_STATE", _IOC_WRITE, 0xae99, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_SET_MSRS", _IOC_WRITE, 0xae89, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_SET_NR_MMU_PAGES", _IOC_NONE, 0xae44, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_SET_ONE_REG", _IOC_WRITE, 0xaeac, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_SET_PIT", _IOC_READ, 0xae66, 0x48 },
|
||||
{ "linux/kvm.h", "KVM_SET_PIT2", _IOC_WRITE, 0xaea0, 0x70 },
|
||||
{ "linux/kvm.h", "KVM_SET_REGS", _IOC_WRITE, 0xae82, 0x90 },
|
||||
{ "linux/kvm.h", "KVM_SET_SIGNAL_MASK", _IOC_WRITE, 0xae8b, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_SET_SREGS", _IOC_WRITE, 0xae84, 0x138 },
|
||||
{ "linux/kvm.h", "KVM_SET_TSC_KHZ", _IOC_NONE, 0xaea2, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_SET_TSS_ADDR", _IOC_NONE, 0xae47, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_SET_USER_MEMORY_REGION", _IOC_WRITE, 0xae46, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_SET_VAPIC_ADDR", _IOC_WRITE, 0xae93, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_SET_VCPU_EVENTS", _IOC_WRITE, 0xaea0, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_SET_XCRS", _IOC_WRITE, 0xaea7, 0x188 },
|
||||
{ "linux/kvm.h", "KVM_SET_XSAVE", _IOC_WRITE, 0xaea5, 0x1000 },
|
||||
{ "linux/kvm.h", "KVM_SIGNAL_MSI", _IOC_WRITE, 0xaea5, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_SMI", _IOC_NONE, 0xaeb7, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_TPR_ACCESS_REPORTING", _IOC_READ|_IOC_WRITE, 0xae92, 0x28 },
|
||||
{ "linux/kvm.h", "KVM_TRANSLATE", _IOC_READ|_IOC_WRITE, 0xae85, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_UNREGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae68, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_X86_GET_MCE_CAP_SUPPORTED", _IOC_READ, 0xae9d, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_X86_SETUP_MCE", _IOC_WRITE, 0xae9c, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_X86_SET_MCE", _IOC_WRITE, 0xae9e, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_XEN_HVM_CONFIG", _IOC_WRITE, 0xae7a, 0x38 },
|
||||
{ "linux/lightnvm.h", "NVM_DEV_CREATE", _IOC_WRITE, 0x4c22, 0x80 },
|
||||
{ "linux/lightnvm.h", "NVM_DEV_FACTORY", _IOC_WRITE, 0x4c25, 0x24 },
|
||||
{ "linux/lightnvm.h", "NVM_DEV_INIT", _IOC_WRITE, 0x4c24, 0x2c },
|
||||
@ -1418,30 +1323,14 @@
|
||||
{ "linux/lightnvm.h", "NVM_INFO", _IOC_READ|_IOC_WRITE, 0x4c20, 0x1000 },
|
||||
{ "linux/lirc.h", "LIRC_GET_FEATURES", _IOC_READ, 0x6900, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_LENGTH", _IOC_READ, 0x690f, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_MAX_FILTER_PULSE", _IOC_READ, 0x690b, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_MAX_FILTER_SPACE", _IOC_READ, 0x690d, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_MAX_TIMEOUT", _IOC_READ, 0x6909, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_MIN_FILTER_PULSE", _IOC_READ, 0x690a, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_MIN_FILTER_SPACE", _IOC_READ, 0x690c, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_MIN_TIMEOUT", _IOC_READ, 0x6908, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_REC_CARRIER", _IOC_READ, 0x6904, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_REC_DUTY_CYCLE", _IOC_READ, 0x6906, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_REC_MODE", _IOC_READ, 0x6902, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_REC_RESOLUTION", _IOC_READ, 0x6907, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_SEND_CARRIER", _IOC_READ, 0x6903, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_SEND_DUTY_CYCLE", _IOC_READ, 0x6905, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_GET_SEND_MODE", _IOC_READ, 0x6901, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_NOTIFY_DECODE", _IOC_NONE, 0x6920, 0x00 },
|
||||
{ "linux/lirc.h", "LIRC_SETUP_END", _IOC_NONE, 0x6922, 0x00 },
|
||||
{ "linux/lirc.h", "LIRC_SETUP_START", _IOC_NONE, 0x6921, 0x00 },
|
||||
{ "linux/lirc.h", "LIRC_SET_MEASURE_CARRIER_MODE", _IOC_WRITE, 0x691d, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_CARRIER", _IOC_WRITE, 0x6914, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_CARRIER_RANGE", _IOC_WRITE, 0x691f, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_DUTY_CYCLE", _IOC_WRITE, 0x6916, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_DUTY_CYCLE_RANGE", _IOC_WRITE, 0x691e, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_FILTER", _IOC_WRITE, 0x691c, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_FILTER_PULSE", _IOC_WRITE, 0x691a, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_FILTER_SPACE", _IOC_WRITE, 0x691b, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_MODE", _IOC_WRITE, 0x6912, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_TIMEOUT", _IOC_WRITE, 0x6918, 0x04 },
|
||||
{ "linux/lirc.h", "LIRC_SET_REC_TIMEOUT_REPORTS", _IOC_WRITE, 0x6919, 0x04 },
|
||||
@ -1553,19 +1442,21 @@
|
||||
{ "linux/ndctl.h", "ND_IOCTL_SMART", _IOC_READ|_IOC_WRITE, 0x4e01, 0x84 },
|
||||
{ "linux/ndctl.h", "ND_IOCTL_SMART_THRESHOLD", _IOC_READ|_IOC_WRITE, 0x4e02, 0x0c },
|
||||
{ "linux/ndctl.h", "ND_IOCTL_VENDOR", _IOC_READ|_IOC_WRITE, 0x4e09, 0x08 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_CHANGE_CPMODE", _IOC_WRITE, 0x6e80, 0x10 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_CLEAN_SEGMENTS", _IOC_WRITE, 0x6e88, 0x78 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_DELETE_CHECKPOINT", _IOC_WRITE, 0x6e81, 0x08 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_GET_BDESCS", _IOC_READ|_IOC_WRITE, 0x6e87, 0x18 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_GET_CPINFO", _IOC_READ, 0x6e82, 0x18 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_GET_CPSTAT", _IOC_READ, 0x6e83, 0x18 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_GET_SUINFO", _IOC_READ, 0x6e84, 0x18 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_GET_SUSTAT", _IOC_READ, 0x6e85, 0x30 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_GET_VINFO", _IOC_READ|_IOC_WRITE, 0x6e86, 0x18 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_RESIZE", _IOC_WRITE, 0x6e8b, 0x08 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_SET_ALLOC_RANGE", _IOC_WRITE, 0x6e8c, 0x10 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_SET_SUINFO", _IOC_WRITE, 0x6e8d, 0x18 },
|
||||
{ "linux/nilfs2_fs.h", "NILFS_IOCTL_SYNC", _IOC_READ, 0x6e8a, 0x08 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_CHANGE_CPMODE", _IOC_WRITE, 0x6e80, 0x10 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_CLEAN_SEGMENTS", _IOC_WRITE, 0x6e88, 0x78 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_DELETE_CHECKPOINT", _IOC_WRITE, 0x6e81, 0x08 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_GET_BDESCS", _IOC_READ|_IOC_WRITE, 0x6e87, 0x18 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_GET_CPINFO", _IOC_READ, 0x6e82, 0x18 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_GET_CPSTAT", _IOC_READ, 0x6e83, 0x18 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_GET_SUINFO", _IOC_READ, 0x6e84, 0x18 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_GET_SUSTAT", _IOC_READ, 0x6e85, 0x30 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_GET_VINFO", _IOC_READ|_IOC_WRITE, 0x6e86, 0x18 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_RESIZE", _IOC_WRITE, 0x6e8b, 0x08 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_SET_ALLOC_RANGE", _IOC_WRITE, 0x6e8c, 0x10 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_SET_SUINFO", _IOC_WRITE, 0x6e8d, 0x18 },
|
||||
{ "linux/nilfs2_api.h", "NILFS_IOCTL_SYNC", _IOC_READ, 0x6e8a, 0x08 },
|
||||
{ "linux/nsfs.h", "NS_GET_PARENT", _IOC_NONE, 0xb702, 0x00 },
|
||||
{ "linux/nsfs.h", "NS_GET_USERNS", _IOC_NONE, 0xb701, 0x00 },
|
||||
{ "linux/nvme_ioctl.h", "NVME_IOCTL_ADMIN_CMD", _IOC_READ|_IOC_WRITE, 0x4e41, 0x48 },
|
||||
{ "linux/nvme_ioctl.h", "NVME_IOCTL_ID", _IOC_NONE, 0x4e40, 0x00 },
|
||||
{ "linux/nvme_ioctl.h", "NVME_IOCTL_IO_CMD", _IOC_READ|_IOC_WRITE, 0x4e43, 0x48 },
|
||||
@ -1739,6 +1630,17 @@
|
||||
{ "linux/raw.h", "RAW_SETBIND", _IOC_NONE, 0xac00, 0x00 },
|
||||
{ "linux/reiserfs_fs.h", "REISERFS_IOC_UNPACK", _IOC_WRITE, 0xcd01, 0x08 },
|
||||
{ "linux/rfkill.h", "RFKILL_IOCTL_NOINPUT", _IOC_NONE, 0x5201, 0x00 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_ACCEPT", _IOC_READ|_IOC_WRITE, 0x6307, 0x08 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_BIND", _IOC_WRITE, 0x6305, 0x08 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_CLOSE", _IOC_WRITE, 0x6304, 0x02 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_CONNECT", _IOC_WRITE, 0x6308, 0x08 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_CREATE", _IOC_READ|_IOC_WRITE, 0x6303, 0x02 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_LISTEN", _IOC_WRITE, 0x6306, 0x02 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_RECEIVE", _IOC_READ|_IOC_WRITE, 0x630a, 0x10 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_SEND", _IOC_WRITE, 0x6309, 0x10 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_EP_GET_LIST", _IOC_READ|_IOC_WRITE, 0x6302, 0x04 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_EP_GET_LIST_SIZE", _IOC_READ|_IOC_WRITE, 0x6301, 0x04 },
|
||||
{ "linux/rio_cm_cdev.h", "RIO_CM_MPORT_GET_LIST", _IOC_READ|_IOC_WRITE, 0x630b, 0x04 },
|
||||
{ "linux/rio_mport_cdev.h", "RIO_ALLOC_DMA", _IOC_READ|_IOC_WRITE, 0x6d13, 0x18 },
|
||||
{ "linux/rio_mport_cdev.h", "RIO_DEV_ADD", _IOC_WRITE, 0x6d17, 0x20 },
|
||||
{ "linux/rio_mport_cdev.h", "RIO_DEV_DEL", _IOC_WRITE, 0x6d18, 0x20 },
|
||||
@ -1849,6 +1751,7 @@
|
||||
{ "linux/sockios.h", "SIOCGMIIPHY", 0, 0x8947, 0 },
|
||||
{ "linux/sockios.h", "SIOCGMIIREG", 0, 0x8948, 0 },
|
||||
{ "linux/sockios.h", "SIOCGRARP", 0, 0x8961, 0 },
|
||||
{ "linux/sockios.h", "SIOCGSKNS", 0, 0x894C, 0 },
|
||||
{ "linux/sockios.h", "SIOCOUTQNSD", 0, 0x894B, 0 },
|
||||
{ "linux/sockios.h", "SIOCPROTOPRIVATE", 0, 0x89E0, 0 },
|
||||
{ "linux/sockios.h", "SIOCRTMSG", 0, 0x890D, 0 },
|
||||
@ -2244,6 +2147,8 @@
|
||||
{ "linux/vhost.h", "VHOST_SET_VRING_ERR", _IOC_WRITE, 0xaf22, 0x08 },
|
||||
{ "linux/vhost.h", "VHOST_SET_VRING_KICK", _IOC_WRITE, 0xaf20, 0x08 },
|
||||
{ "linux/vhost.h", "VHOST_SET_VRING_NUM", _IOC_WRITE, 0xaf10, 0x08 },
|
||||
{ "linux/vhost.h", "VHOST_VSOCK_SET_GUEST_CID", _IOC_WRITE, 0xaf60, 0x08 },
|
||||
{ "linux/vhost.h", "VHOST_VSOCK_SET_RUNNING", _IOC_WRITE, 0xaf61, 0x04 },
|
||||
{ "linux/videodev2.h", "VIDIOC_CREATE_BUFS", _IOC_READ|_IOC_WRITE, 0x565c, 0x100 },
|
||||
{ "linux/videodev2.h", "VIDIOC_CROPCAP", _IOC_READ|_IOC_WRITE, 0x563a, 0x2c },
|
||||
{ "linux/videodev2.h", "VIDIOC_DBG_G_CHIP_INFO", _IOC_READ|_IOC_WRITE, 0x5666, 0xc8 },
|
||||
@ -2348,7 +2253,6 @@
|
||||
{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_SOCKETS_VERSION", _IOC_NONE, 0x07b4, 0x00 },
|
||||
{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_VERSION", _IOC_NONE, 0x079f, 0x00 },
|
||||
{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_VERSION2", _IOC_NONE, 0x07a7, 0x00 },
|
||||
{ "linux/vsp1.h", "VIDIOC_VSP1_LUT_CONFIG", _IOC_READ|_IOC_WRITE, 0x56c1, 0x400 },
|
||||
{ "linux/vt.h", "VT_ACTIVATE", 0, 0x5606, 0 },
|
||||
{ "linux/vt.h", "VT_DISALLOCATE", 0, 0x5608, 0 },
|
||||
{ "linux/vt.h", "VT_GETHIFONTMASK", 0, 0x560D, 0 },
|
||||
@ -2365,6 +2269,7 @@
|
||||
{ "linux/vt.h", "VT_UNLOCKSWITCH", 0, 0x560C, 0 },
|
||||
{ "linux/vt.h", "VT_WAITACTIVE", 0, 0x5607, 0 },
|
||||
{ "linux/vt.h", "VT_WAITEVENT", 0, 0x560E, 0 },
|
||||
{ "linux/vtpm_proxy.h", "VTPM_PROXY_IOC_NEW_DEV", _IOC_READ|_IOC_WRITE, 0xa100, 0x14 },
|
||||
{ "linux/watchdog.h", "WDIOC_GETBOOTSTATUS", _IOC_READ, 0x5702, 0x04 },
|
||||
{ "linux/watchdog.h", "WDIOC_GETPRETIMEOUT", _IOC_READ, 0x5709, 0x04 },
|
||||
{ "linux/watchdog.h", "WDIOC_GETSTATUS", _IOC_READ, 0x5701, 0x04 },
|
||||
@ -2764,6 +2669,7 @@
|
||||
{ "staging/android/ion.h", "ION_IOC_ALLOC", _IOC_READ|_IOC_WRITE, 0x4900, 0x20 },
|
||||
{ "staging/android/ion.h", "ION_IOC_CUSTOM", _IOC_READ|_IOC_WRITE, 0x4906, 0x10 },
|
||||
{ "staging/android/ion.h", "ION_IOC_FREE", _IOC_READ|_IOC_WRITE, 0x4901, 0x04 },
|
||||
{ "staging/android/ion.h", "ION_IOC_HEAP_QUERY", _IOC_READ|_IOC_WRITE, 0x4908, 0x18 },
|
||||
{ "staging/android/ion.h", "ION_IOC_IMPORT", _IOC_READ|_IOC_WRITE, 0x4905, 0x08 },
|
||||
{ "staging/android/ion.h", "ION_IOC_MAP", _IOC_READ|_IOC_WRITE, 0x4902, 0x08 },
|
||||
{ "staging/android/ion.h", "ION_IOC_SHARE", _IOC_READ|_IOC_WRITE, 0x4904, 0x08 },
|
||||
@ -2771,8 +2677,6 @@
|
||||
{ "staging/android/ion_test.h", "ION_IOC_TEST_DMA_MAPPING", _IOC_WRITE, 0x49f1, 0x20 },
|
||||
{ "staging/android/ion_test.h", "ION_IOC_TEST_KERNEL_MAPPING", _IOC_WRITE, 0x49f2, 0x20 },
|
||||
{ "staging/android/ion_test.h", "ION_IOC_TEST_SET_FD", _IOC_NONE, 0x49f0, 0x00 },
|
||||
{ "staging/android/sw_sync.h", "SW_SYNC_IOC_CREATE_FENCE", _IOC_READ|_IOC_WRITE, 0x5700, 0x28 },
|
||||
{ "staging/android/sw_sync.h", "SW_SYNC_IOC_INC", _IOC_WRITE, 0x5701, 0x04 },
|
||||
{ "video/da8xx-fb.h", "FBIGET_BRIGHTNESS", _IOC_READ, 0x4603, 0x04 },
|
||||
{ "video/da8xx-fb.h", "FBIGET_COLOR", _IOC_READ, 0x4605, 0x04 },
|
||||
{ "video/da8xx-fb.h", "FBIOGET_CONTRAST", _IOC_READ, 0x4601, 0x04 },
|
||||
@ -2813,6 +2717,7 @@
|
||||
{ "xen/evtchn.h", "IOCTL_EVTCHN_BIND_VIRQ", _IOC_NONE, 0x4500, 0x04 },
|
||||
{ "xen/evtchn.h", "IOCTL_EVTCHN_NOTIFY", _IOC_NONE, 0x4504, 0x04 },
|
||||
{ "xen/evtchn.h", "IOCTL_EVTCHN_RESET", _IOC_NONE, 0x4505, 0x00 },
|
||||
{ "xen/evtchn.h", "IOCTL_EVTCHN_RESTRICT_DOMID", _IOC_NONE, 0x4506, 0x02 },
|
||||
{ "xen/evtchn.h", "IOCTL_EVTCHN_UNBIND", _IOC_NONE, 0x4503, 0x04 },
|
||||
{ "xen/gntdev.h", "IOCTL_GNTDEV_GET_OFFSET_FOR_VADDR", _IOC_NONE, 0x4702, 0x18 },
|
||||
{ "xen/gntdev.h", "IOCTL_GNTDEV_GRANT_COPY", _IOC_NONE, 0x4708, 0x10 },
|
||||
|
@ -1,5 +1,5 @@
|
||||
[ 0] = { 2, 0, SEN(io_setup), "io_setup" },
|
||||
[ 1] = { 1, 0, SEN(io_destroy), "io_destroy" },
|
||||
[ 0] = { 2, TM, SEN(io_setup), "io_setup" },
|
||||
[ 1] = { 1, TM, SEN(io_destroy), "io_destroy" },
|
||||
[ 2] = { 3, 0, SEN(io_submit), "io_submit" },
|
||||
[ 3] = { 3, 0, SEN(io_cancel), "io_cancel" },
|
||||
[ 4] = { 5, 0, SEN(io_getevents), "io_getevents" },
|
||||
@ -260,14 +260,17 @@
|
||||
[274] = { 3, 0, SEN(sched_setattr), "sched_setattr" },
|
||||
[275] = { 4, 0, SEN(sched_getattr), "sched_getattr" },
|
||||
[276] = { 5, TD|TF, SEN(renameat2), "renameat2" },
|
||||
[277] = { 3, 0, SEN(seccomp), "seccomp", },
|
||||
[278] = { 3, 0, SEN(getrandom), "getrandom", },
|
||||
[279] = { 2, TD, SEN(memfd_create), "memfd_create", },
|
||||
[280] = { 3, TD, SEN(bpf), "bpf", },
|
||||
[281] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", },
|
||||
[282] = { 1, TD, SEN(userfaultfd), "userfaultfd", },
|
||||
[283] = { 2, 0, SEN(membarrier), "membarrier", },
|
||||
[277] = { 3, 0, SEN(seccomp), "seccomp" },
|
||||
[278] = { 3, 0, SEN(getrandom), "getrandom" },
|
||||
[279] = { 2, TD, SEN(memfd_create), "memfd_create" },
|
||||
[280] = { 3, TD, SEN(bpf), "bpf" },
|
||||
[281] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" },
|
||||
[282] = { 1, TD, SEN(userfaultfd), "userfaultfd" },
|
||||
[283] = { 2, 0, SEN(membarrier), "membarrier" },
|
||||
[284] = { 3, TM, SEN(mlock2), "mlock2" },
|
||||
[285] = { 6, TD, SEN(copy_file_range), "copy_file_range" },
|
||||
[286] = { 6, TD, SEN(preadv2), "preadv2" },
|
||||
[287] = { 6, TD, SEN(pwritev2), "pwritev2" },
|
||||
[288] = { 4, TM|SI, SEN(pkey_mprotect), "pkey_mprotect" },
|
||||
[289] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" },
|
||||
[290] = { 1, 0, SEN(pkey_free), "pkey_free" },
|
||||
|
@ -28,7 +28,7 @@ static union {
|
||||
#define arm_regs arm_regs_union.arm_r
|
||||
|
||||
uint64_t *const aarch64_sp_ptr = (uint64_t *) &aarch64_regs.sp;
|
||||
uint32_t *const arm_sp_ptr = (uint32_t *) &arm_regs.ARM_sp;
|
||||
uint32_t *const arm_sp_ptr = &arm_regs.ARM_sp;
|
||||
static struct iovec aarch64_io = {
|
||||
.iov_base = &arm_regs_union
|
||||
};
|
||||
|
@ -2,7 +2,7 @@
|
||||
static int
|
||||
arch_get_scno(struct tcb *tcp)
|
||||
{
|
||||
long scno = 0;
|
||||
kernel_ulong_t scno = 0;
|
||||
|
||||
switch (aarch64_io.iov_len) {
|
||||
case sizeof(aarch64_regs):
|
||||
|
25
linux/aarch64/set_error.c
Normal file
25
linux/aarch64/set_error.c
Normal file
@ -0,0 +1,25 @@
|
||||
#define arch_set_error arm_set_error
|
||||
#define arch_set_success arm_set_success
|
||||
#include "arm/set_error.c"
|
||||
#undef arch_set_success
|
||||
#undef arch_set_error
|
||||
|
||||
static int
|
||||
arch_set_error(struct tcb *tcp)
|
||||
{
|
||||
if (aarch64_io.iov_len == sizeof(arm_regs))
|
||||
return arm_set_error(tcp);
|
||||
|
||||
aarch64_regs.regs[0] = -tcp->u_error;
|
||||
return set_regs(tcp->pid);
|
||||
}
|
||||
|
||||
static int
|
||||
arch_set_success(struct tcb *tcp)
|
||||
{
|
||||
if (aarch64_io.iov_len == sizeof(arm_regs))
|
||||
return arm_set_success(tcp);
|
||||
|
||||
aarch64_regs.regs[0] = tcp->u_rval;
|
||||
return set_regs(tcp->pid);
|
||||
}
|
22
linux/aarch64/set_scno.c
Normal file
22
linux/aarch64/set_scno.c
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef NT_ARM_SYSTEM_CALL
|
||||
# define NT_ARM_SYSTEM_CALL 0x404
|
||||
#endif
|
||||
/*
|
||||
* NT_ARM_SYSTEM_CALL regset is supported by linux kernel
|
||||
* starting with commit v3.19-rc1~59^2~16.
|
||||
*/
|
||||
|
||||
static int
|
||||
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
|
||||
{
|
||||
unsigned int n = (uint16_t) scno;
|
||||
const struct iovec io = {
|
||||
.iov_base = &n,
|
||||
.iov_len = sizeof(n)
|
||||
};
|
||||
int rc = ptrace(PTRACE_SETREGSET, tcp->pid, NT_ARM_SYSTEM_CALL, &io);
|
||||
if (rc && errno != ESRCH)
|
||||
perror_msg("arch_set_scno: NT_ARM_SYSTEM_CALL pid:%d scno:%#x",
|
||||
tcp->pid, n);
|
||||
return rc;
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
long
|
||||
getrval2(struct tcb *tcp)
|
||||
{
|
||||
long r20;
|
||||
unsigned long r20;
|
||||
if (upeek(tcp->pid, 20, &r20) < 0)
|
||||
return -1;
|
||||
return r20;
|
||||
|
@ -1,3 +1,3 @@
|
||||
static long alpha_r0;
|
||||
static long alpha_a3;
|
||||
static unsigned long alpha_r0;
|
||||
static unsigned long alpha_a3;
|
||||
#define ARCH_PC_PEEK_ADDR REG_PC
|
||||
|
@ -1,13 +1,13 @@
|
||||
static void
|
||||
arch_sigreturn(struct tcb *tcp)
|
||||
{
|
||||
long addr;
|
||||
unsigned long addr;
|
||||
|
||||
if (upeek(tcp->pid, REG_FP, &addr) < 0)
|
||||
return;
|
||||
addr += offsetof(struct sigcontext, sc_mask);
|
||||
|
||||
tprints("{mask=");
|
||||
print_sigset_addr_len(tcp, addr, NSIG / 8);
|
||||
print_sigset_addr_len(tcp, addr, NSIG_BYTES);
|
||||
tprints("}");
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
static int
|
||||
arch_get_scno(struct tcb *tcp)
|
||||
{
|
||||
long scno = 0;
|
||||
kernel_ulong_t scno = 0;
|
||||
|
||||
if (upeek(tcp->pid, REG_A3, &alpha_a3) < 0)
|
||||
return -1;
|
||||
@ -13,10 +13,10 @@ arch_get_scno(struct tcb *tcp)
|
||||
* Do some sanity checks to figure out if it's
|
||||
* really a syscall entry
|
||||
*/
|
||||
if (!SCNO_IN_RANGE(scno)) {
|
||||
if (alpha_a3 == 0 || alpha_a3 == -1) {
|
||||
if (!scno_in_range(scno)) {
|
||||
if (alpha_a3 == 0 || alpha_a3 == -1UL) {
|
||||
if (debug_flag)
|
||||
error_msg("stray syscall exit: r0 = %ld", scno);
|
||||
error_msg("stray syscall exit: r0 = %lu", scno);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
13
linux/alpha/set_error.c
Normal file
13
linux/alpha/set_error.c
Normal file
@ -0,0 +1,13 @@
|
||||
static int
|
||||
arch_set_error(struct tcb *tcp)
|
||||
{
|
||||
alpha_r0 = tcp->u_error;
|
||||
return upoke(tcp->pid, REG_R0, alpha_r0);
|
||||
}
|
||||
|
||||
static int
|
||||
arch_set_success(struct tcb *tcp)
|
||||
{
|
||||
return upoke(tcp->pid, REG_A3, (alpha_a3 = 0))
|
||||
|| upoke(tcp->pid, REG_R0, (alpha_r0 = tcp->u_rval));
|
||||
}
|
5
linux/alpha/set_scno.c
Normal file
5
linux/alpha/set_scno.c
Normal file
@ -0,0 +1,5 @@
|
||||
static int
|
||||
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
|
||||
{
|
||||
return upoke(tcp->pid, REG_R0, scno);
|
||||
}
|
@ -361,8 +361,8 @@
|
||||
[395] = { 3, 0, SEN(sched_setaffinity), "sched_setaffinity" },
|
||||
[396] = { 3, 0, SEN(sched_getaffinity), "sched_getaffinity" },
|
||||
[397] = { 5, 0, SEN(tuxcall), "tuxcall" },
|
||||
[398] = { 2, 0, SEN(io_setup), "io_setup" },
|
||||
[399] = { 1, 0, SEN(io_destroy), "io_destroy" },
|
||||
[398] = { 2, TM, SEN(io_setup), "io_setup" },
|
||||
[399] = { 1, TM, SEN(io_destroy), "io_destroy" },
|
||||
[400] = { 5, 0, SEN(io_getevents), "io_getevents" },
|
||||
[401] = { 3, 0, SEN(io_submit), "io_submit" },
|
||||
[402] = { 3, 0, SEN(io_cancel), "io_cancel" },
|
||||
@ -417,7 +417,7 @@
|
||||
[452] = { 4, TD|TF, SEN(mknodat), "mknodat" },
|
||||
[453] = { 5, TD|TF, SEN(fchownat), "fchownat" },
|
||||
[454] = { 3, TD|TF, SEN(futimesat), "futimesat" },
|
||||
[455] = { 4, TD|TF, SEN(newfstatat), "fstatat64" },
|
||||
[455] = { 4, TD|TF, SEN(fstatat64), "fstatat64" },
|
||||
[456] = { 3, TD|TF, SEN(unlinkat), "unlinkat" },
|
||||
[457] = { 4, TD|TF, SEN(renameat), "renameat" },
|
||||
[458] = { 5, TD|TF, SEN(linkat), "linkat" },
|
||||
@ -473,6 +473,6 @@
|
||||
[508] = { 3, 0, SEN(sched_setattr), "sched_setattr" },
|
||||
[509] = { 4, 0, SEN(sched_getattr), "sched_getattr" },
|
||||
[510] = { 5, TD|TF, SEN(renameat2), "renameat2" },
|
||||
[511] = { 3, 0, SEN(getrandom), "getrandom", },
|
||||
[512] = { 2, TD, SEN(memfd_create), "memfd_create", },
|
||||
[513] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", },
|
||||
[511] = { 3, 0, SEN(getrandom), "getrandom" },
|
||||
[512] = { 2, TD, SEN(memfd_create), "memfd_create" },
|
||||
[513] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" },
|
||||
|
@ -2,7 +2,7 @@
|
||||
static int
|
||||
get_syscall_args(struct tcb *tcp)
|
||||
{
|
||||
long *arc_args = &arc_regs.scratch.r0;
|
||||
unsigned long *arc_args = &arc_regs.scratch.r0;
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < MAX_ARGS; ++i)
|
||||
|
13
linux/arc/set_error.c
Normal file
13
linux/arc/set_error.c
Normal file
@ -0,0 +1,13 @@
|
||||
static int
|
||||
arch_set_error(struct tcb *tcp)
|
||||
{
|
||||
arc_regs.scratch.r0 = -tcp->u_error;
|
||||
return set_regs(tcp->pid);
|
||||
}
|
||||
|
||||
static int
|
||||
arch_set_success(struct tcb *tcp)
|
||||
{
|
||||
arc_regs.scratch.r0 = tcp->u_rval;
|
||||
return set_regs(tcp->pid);
|
||||
}
|
6
linux/arc/set_scno.c
Normal file
6
linux/arc/set_scno.c
Normal file
@ -0,0 +1,6 @@
|
||||
static int
|
||||
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
|
||||
{
|
||||
arc_regs.scratch.r8 = scno;
|
||||
return set_regs(tcp->pid);
|
||||
}
|
@ -1,6 +1,8 @@
|
||||
#define sys_ARCH_mmap sys_mmap_pgoff
|
||||
#include "32/syscallent.h"
|
||||
/* [244 ... 259] are arch specific */
|
||||
[244] = { 3, 0, SEN(printargs), "arc_cacheflush"},
|
||||
[244] = { 3, 0, SEN(printargs), "cacheflush" },
|
||||
[245] = { 1, 0, SEN(printargs), "arc_settls" },
|
||||
[246] = { 0, 0, SEN(printargs), "arc_gettls" },
|
||||
[247] = { 3, 0, SEN(sysfs), "sysfs" },
|
||||
[248] = { 3, 0, SEN(printargs), "arc_usr_cmpxchg"},
|
||||
|
@ -1,5 +1,5 @@
|
||||
static struct pt_regs arm_regs;
|
||||
long *const arm_sp_ptr = &arm_regs.ARM_sp;
|
||||
unsigned long *const arm_sp_ptr = (unsigned long *) &arm_regs.ARM_sp;
|
||||
|
||||
#define ARCH_REGS_FOR_GETREGS arm_regs
|
||||
#define ARCH_PC_REG arm_regs.ARM_pc
|
||||
|
@ -1 +1 @@
|
||||
extern long *const arm_sp_ptr;
|
||||
extern unsigned long *const arm_sp_ptr;
|
||||
|
@ -5,7 +5,7 @@ arch_sigreturn(struct tcb *tcp)
|
||||
#define SIZEOF_STRUCT_SIGCONTEXT (21 * 4)
|
||||
#define OFFSETOF_STRUCT_UCONTEXT_UC_SIGMASK (5 * 4 + SIZEOF_STRUCT_SIGCONTEXT)
|
||||
|
||||
const long addr =
|
||||
const unsigned long addr =
|
||||
#ifdef AARCH64
|
||||
tcp->currpers == 0 ?
|
||||
(*aarch64_sp_ptr + SIZEOF_STRUCT_SIGINFO +
|
||||
@ -14,6 +14,6 @@ arch_sigreturn(struct tcb *tcp)
|
||||
(*arm_sp_ptr +
|
||||
OFFSETOF_STRUCT_UCONTEXT_UC_SIGMASK);
|
||||
tprints("{mask=");
|
||||
print_sigset_addr_len(tcp, addr, NSIG / 8);
|
||||
print_sigset_addr_len(tcp, addr, NSIG_BYTES);
|
||||
tprints("}");
|
||||
}
|
||||
|
@ -31,7 +31,7 @@
|
||||
static int
|
||||
arch_get_scno(struct tcb *tcp)
|
||||
{
|
||||
long scno = 0;
|
||||
kernel_ulong_t scno = 0;
|
||||
|
||||
/* Note: we support only 32-bit CPUs, not 26-bit */
|
||||
|
||||
@ -47,7 +47,7 @@ arch_get_scno(struct tcb *tcp)
|
||||
if (errno)
|
||||
return -1;
|
||||
/* EABI syscall convention? */
|
||||
if ((unsigned long) scno != 0xef000000) {
|
||||
if (scno != 0xef000000) {
|
||||
/* No, it's OABI */
|
||||
if ((scno & 0x0ff00000) != 0x0f900000) {
|
||||
error_msg("pid %d unknown syscall trap 0x%08lx",
|
||||
@ -72,7 +72,7 @@ arch_get_scno(struct tcb *tcp)
|
||||
* Do some sanity checks to figure out
|
||||
* whether it's really a syscall entry.
|
||||
*/
|
||||
if (arm_regs.ARM_ip && !SCNO_IN_RANGE(scno)) {
|
||||
if (arm_regs.ARM_ip && !scno_in_range(scno)) {
|
||||
if (debug_flag)
|
||||
error_msg("pid %d stray syscall exit:"
|
||||
" ARM_ip = %ld, scno = %ld",
|
||||
|
@ -1,2 +1,89 @@
|
||||
/* Generated by ioctls_gen.sh from definitions found in $linux/arch/arm/include/ tree. */
|
||||
{ "asm/ioctls.h", "FIOQSIZE", 0, 0x545E, 0 },
|
||||
{ "linux/kvm.h", "KVM_ARM_PREFERRED_TARGET", _IOC_READ, 0xaeaf, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_ARM_SET_DEVICE_ADDR", _IOC_WRITE, 0xaeab, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_ARM_VCPU_INIT", _IOC_WRITE, 0xaeae, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_ASSIGN_DEV_IRQ", _IOC_WRITE, 0xae70, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_ASSIGN_PCI_DEVICE", _IOC_READ, 0xae69, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_ASSIGN_SET_INTX_MASK", _IOC_WRITE, 0xaea4, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_ENTRY", _IOC_WRITE, 0xae74, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_NR", _IOC_WRITE, 0xae73, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_CHECK_EXTENSION", _IOC_NONE, 0xae03, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_CREATE_DEVICE", _IOC_READ|_IOC_WRITE, 0xaee0, 0x0c },
|
||||
{ "linux/kvm.h", "KVM_CREATE_IRQCHIP", _IOC_NONE, 0xae60, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_CREATE_PIT", _IOC_NONE, 0xae64, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_CREATE_PIT2", _IOC_WRITE, 0xae77, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_CREATE_VCPU", _IOC_NONE, 0xae41, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_CREATE_VM", _IOC_NONE, 0xae01, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_DEASSIGN_DEV_IRQ", _IOC_WRITE, 0xae75, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_DEASSIGN_PCI_DEVICE", _IOC_WRITE, 0xae72, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_DIRTY_TLB", _IOC_WRITE, 0xaeaa, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_ENABLE_CAP", _IOC_WRITE, 0xaea3, 0x68 },
|
||||
{ "linux/kvm.h", "KVM_GET_API_VERSION", _IOC_NONE, 0xae00, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_GET_CLOCK", _IOC_READ, 0xae7c, 0x30 },
|
||||
{ "linux/kvm.h", "KVM_GET_DEVICE_ATTR", _IOC_WRITE, 0xaee2, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_GET_DIRTY_LOG", _IOC_WRITE, 0xae42, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_GET_FPU", _IOC_READ, 0xae8c, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_GET_IRQCHIP", _IOC_READ|_IOC_WRITE, 0xae62, 0x208 },
|
||||
{ "linux/kvm.h", "KVM_GET_MP_STATE", _IOC_READ, 0xae98, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_GET_NR_MMU_PAGES", _IOC_NONE, 0xae45, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_GET_ONE_REG", _IOC_WRITE, 0xaeab, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_GET_REGS", _IOC_READ, 0xae81, 0x98 },
|
||||
{ "linux/kvm.h", "KVM_GET_REG_LIST", _IOC_READ|_IOC_WRITE, 0xaeb0, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_GET_SREGS", _IOC_READ, 0xae83, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_GET_TSC_KHZ", _IOC_NONE, 0xaea3, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_GET_VCPU_MMAP_SIZE", _IOC_NONE, 0xae04, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_HAS_DEVICE_ATTR", _IOC_WRITE, 0xaee3, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_INTERRUPT", _IOC_WRITE, 0xae86, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_IOEVENTFD", _IOC_WRITE, 0xae79, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_IRQFD", _IOC_WRITE, 0xae76, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_IRQ_LINE", _IOC_WRITE, 0xae61, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_IRQ_LINE_STATUS", _IOC_READ|_IOC_WRITE, 0xae67, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_KVMCLOCK_CTRL", _IOC_NONE, 0xaead, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_NMI", _IOC_NONE, 0xae9a, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_PPC_ALLOCATE_HTAB", _IOC_READ|_IOC_WRITE, 0xaea7, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_PPC_GET_PVINFO", _IOC_WRITE, 0xaea1, 0x80 },
|
||||
{ "linux/kvm.h", "KVM_PPC_GET_SMMU_INFO", _IOC_READ, 0xaea6, 0x250 },
|
||||
{ "linux/kvm.h", "KVM_REGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae67, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_REINJECT_CONTROL", _IOC_NONE, 0xae71, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_RUN", _IOC_NONE, 0xae80, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_S390_ENABLE_SIE", _IOC_NONE, 0xae06, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_S390_GET_IRQ_STATE", _IOC_WRITE, 0xaeb6, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_S390_GET_SKEYS", _IOC_WRITE, 0xaeb2, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_S390_INITIAL_RESET", _IOC_NONE, 0xae97, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_S390_INTERRUPT", _IOC_WRITE, 0xae94, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_S390_IRQ", _IOC_WRITE, 0xaeb4, 0x48 },
|
||||
{ "linux/kvm.h", "KVM_S390_MEM_OP", _IOC_WRITE, 0xaeb1, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_S390_SET_INITIAL_PSW", _IOC_WRITE, 0xae96, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_S390_SET_IRQ_STATE", _IOC_WRITE, 0xaeb5, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_S390_SET_SKEYS", _IOC_WRITE, 0xaeb3, 0x40 },
|
||||
{ "linux/kvm.h", "KVM_S390_STORE_STATUS", _IOC_WRITE, 0xae95, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_S390_UCAS_MAP", _IOC_WRITE, 0xae50, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_S390_UCAS_UNMAP", _IOC_WRITE, 0xae51, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_S390_VCPU_FAULT", _IOC_WRITE, 0xae52, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_SET_BOOT_CPU_ID", _IOC_NONE, 0xae78, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_SET_CLOCK", _IOC_WRITE, 0xae7b, 0x30 },
|
||||
{ "linux/kvm.h", "KVM_SET_DEVICE_ATTR", _IOC_WRITE, 0xaee1, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_SET_FPU", _IOC_WRITE, 0xae8d, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_SET_GSI_ROUTING", _IOC_WRITE, 0xae6a, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_SET_GUEST_DEBUG", _IOC_WRITE, 0xae9b, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_SET_IDENTITY_MAP_ADDR", _IOC_WRITE, 0xae48, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_SET_IRQCHIP", _IOC_READ, 0xae63, 0x208 },
|
||||
{ "linux/kvm.h", "KVM_SET_MEMORY_REGION", _IOC_WRITE, 0xae40, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_SET_MP_STATE", _IOC_WRITE, 0xae99, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_SET_NR_MMU_PAGES", _IOC_NONE, 0xae44, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_SET_ONE_REG", _IOC_WRITE, 0xaeac, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_SET_REGS", _IOC_WRITE, 0xae82, 0x98 },
|
||||
{ "linux/kvm.h", "KVM_SET_SIGNAL_MASK", _IOC_WRITE, 0xae8b, 0x04 },
|
||||
{ "linux/kvm.h", "KVM_SET_SREGS", _IOC_WRITE, 0xae84, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_SET_TSC_KHZ", _IOC_NONE, 0xaea2, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_SET_TSS_ADDR", _IOC_NONE, 0xae47, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_SET_USER_MEMORY_REGION", _IOC_WRITE, 0xae46, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_SET_VAPIC_ADDR", _IOC_WRITE, 0xae93, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_SIGNAL_MSI", _IOC_WRITE, 0xaea5, 0x20 },
|
||||
{ "linux/kvm.h", "KVM_SMI", _IOC_NONE, 0xaeb7, 0x00 },
|
||||
{ "linux/kvm.h", "KVM_TPR_ACCESS_REPORTING", _IOC_READ|_IOC_WRITE, 0xae92, 0x28 },
|
||||
{ "linux/kvm.h", "KVM_TRANSLATE", _IOC_READ|_IOC_WRITE, 0xae85, 0x18 },
|
||||
{ "linux/kvm.h", "KVM_UNREGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae68, 0x10 },
|
||||
{ "linux/kvm.h", "KVM_X86_GET_MCE_CAP_SUPPORTED", _IOC_READ, 0xae9d, 0x08 },
|
||||
{ "linux/kvm.h", "KVM_X86_SETUP_MCE", _IOC_WRITE, 0xae9c, 0x08 },
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user