1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
|
diff -Naur valgrind-1.0.4.orig/vg_syscall_mem.c valgrind-1.0.4/vg_syscall_mem.c
--- valgrind-1.0.4.orig/vg_syscall_mem.c 2002-10-13 17:04:49.000000000 +0200
+++ valgrind-1.0.4/vg_syscall_mem.c 2003-03-03 07:34:50.000000000 +0100
@@ -2323,6 +2323,336 @@
sizeof(struct cdrom_msf));
KERNEL_DO_SYSCALL(tid,res);
break;
+
+ /* DVB (Digital Video Broadcasting) related stuff
+ * http://www.linuxtv.org
+ */
+ case AUDIO_STOP:
+ case AUDIO_PLAY:
+ case AUDIO_PAUSE:
+ case AUDIO_CONTINUE:
+ case AUDIO_SELECT_SOURCE:
+ case AUDIO_SET_MUTE:
+ case AUDIO_SET_AV_SYNC:
+ case AUDIO_SET_BYPASS_MODE:
+ case AUDIO_CHANNEL_SELECT:
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case AUDIO_GET_STATUS:
+ must_be_writable(tst, "ioctl(AUDIO_GET_STATUS)", arg3,
+ sizeof(audio_status_t));
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res) && res == 0)
+ make_readable (arg3, sizeof(audio_status_t));
+ break;
+ case AUDIO_GET_CAPABILITIES:
+ must_be_writable(tst, "ioctl(AUDIO_GET_CAPABILITIES)", arg3,
+ sizeof(unsigned int));
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res) && res == 0)
+ make_readable (arg3, sizeof(unsigned int));
+ break;
+ case AUDIO_CLEAR_BUFFER:
+ case AUDIO_SET_ID:
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case AUDIO_SET_MIXER:
+ must_be_readable(tst, "ioctl(AUDIO_SET_MIXER)", arg3,
+ sizeof(audio_mixer_t));
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case AUDIO_SET_STREAMTYPE:
+ case AUDIO_SET_EXT_ID:
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case AUDIO_SET_ATTRIBUTES:
+ must_be_readable(tst, "ioctl(AUDIO_SET_ATTRIBUTES)", arg3,
+ sizeof(audio_attributes_t));
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case AUDIO_SET_KARAOKE:
+ must_be_readable(tst, "ioctl(AUDIO_SET_KARAOKE)", arg3,
+ sizeof(audio_karaoke_t));
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case CA_RESET:
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case CA_GET_CAP:
+ must_be_writable(tst, "ioctl(CA_GET_CAP)", arg3,
+ sizeof(ca_caps_t));
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res) && res == 0)
+ make_readable (arg3, sizeof(ca_caps_t));
+ break;
+ case CA_GET_SLOT_INFO:
+ must_be_writable(tst, "ioctl(CA_GET_SLOT_INFO)", arg3,
+ sizeof(ca_slot_info_t));
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res) && res == 0)
+ make_readable (arg3, sizeof(ca_slot_info_t));
+ break;
+ case CA_GET_DESCR_INFO:
+ must_be_writable(tst, "ioctl(CA_GET_DESCR_INFO)", arg3,
+ sizeof(ca_descr_info_t));
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res) && res == 0)
+ make_readable (arg3, sizeof(ca_descr_info_t));
+ break;
+ case CA_GET_MSG:
+ must_be_writable(tst, "ioctl(CA_GET_MSG)", arg3,
+ sizeof(ca_msg_t));
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res) && res == 0)
+ make_readable (arg3, sizeof(ca_msg_t));
+ break;
+ case CA_SEND_MSG:
+ must_be_readable(tst, "ioctl(CA_SEND_MSG)", arg3,
+ sizeof(ca_msg_t));
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case CA_SET_DESCR:
+ must_be_readable(tst, "ioctl(CA_SET_DESCR)", arg3,
+ sizeof(ca_descr_t));
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case CA_SET_PID:
+ must_be_readable(tst, "ioctl(CA_SET_PID)", arg3,
+ sizeof(ca_pid_t));
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case DMX_START:
+ case DMX_STOP:
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case DMX_SET_FILTER:
+ must_be_readable(tst, "ioctl(DMX_SET_FILTER)", arg3,
+ sizeof(struct dmx_sct_filter_params));
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case DMX_SET_PES_FILTER:
+ must_be_readable(tst, "ioctl(DMX_SET_PES_FILTER)", arg3,
+ sizeof(struct dmx_pes_filter_params));
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case DMX_SET_BUFFER_SIZE:
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case DMX_GET_EVENT:
+ must_be_writable(tst, "ioctl(DMX_GET_EVENT)", arg3,
+ sizeof(struct dmx_event));
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res) && res == 0)
+ make_readable (arg3, sizeof(struct dmx_event));
+ break;
+ case DMX_GET_PES_PIDS:
+ must_be_writable(tst, "ioctl(DMX_GET_PES_PIDS)", arg3,
+ 5*sizeof(uint16_t));
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res) && res == 0)
+ make_readable (arg3, 5*sizeof(uint16_t));
+ break;
+ case DMX_GET_CAPS:
+ must_be_writable(tst, "ioctl(DMX_GET_CAPS)", arg3,
+ sizeof(dmx_caps_t));
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res) && res == 0)
+ make_readable (arg3, sizeof(dmx_caps_t));
+ break;
+ case DMX_SET_SOURCE:
+ must_be_readable(tst, "ioctl(DMX_SET_SOURCE)", arg3,
+ sizeof(dmx_source_t));
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case FE_GET_INFO:
+ must_be_writable(tst, "ioctl(FE_GET_INFO)", arg3,
+ sizeof(struct dvb_frontend_info));
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res) && res == 0)
+ make_readable (arg3, sizeof(struct dvb_frontend_info));
+ break;
+ case FE_DISEQC_RESET_OVERLOAD:
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case FE_DISEQC_SEND_MASTER_CMD:
+ must_be_readable(tst, "ioctl(FE_DISEQC_SEND_MASTER_CMD)", arg3,
+ sizeof(struct dvb_diseqc_master_cmd));
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case FE_DISEQC_RECV_SLAVE_REPLY:
+ must_be_writable(tst, "ioctl(FE_DISEQC_RECV_SLAVE_REPLY)", arg3,
+ sizeof(struct dvb_diseqc_slave_reply));
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res) && res == 0)
+ make_readable (arg3, sizeof(struct dvb_diseqc_slave_reply));
+ break;
+ case FE_DISEQC_SEND_BURST:
+ case FE_SET_TONE:
+ case FE_SET_VOLTAGE:
+ case FE_ENABLE_HIGH_LNB_VOLTAGE:
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case FE_READ_STATUS:
+ must_be_writable(tst, "ioctl(FE_READ_STATUS)", arg3,
+ sizeof(fe_status_t));
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res) && res == 0)
+ make_readable (arg3, sizeof(fe_status_t));
+ break;
+ case FE_READ_BER:
+ must_be_writable(tst, "ioctl(FE_READ_BER)", arg3,
+ sizeof(uint32_t));
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res) && res == 0)
+ make_readable (arg3, sizeof(uint32_t));
+ break;
+ case FE_READ_SIGNAL_STRENGTH:
+ must_be_writable(tst, "ioctl(FE_READ_SIGNAL_STRENGTH)", arg3,
+ sizeof(uint16_t));
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res) && res == 0)
+ make_readable (arg3, sizeof(uint16_t));
+ break;
+ case FE_READ_SNR:
+ must_be_writable(tst, "ioctl(FE_READ_SNR)", arg3,
+ sizeof(uint16_t));
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res) && res == 0)
+ make_readable (arg3, sizeof(uint16_t));
+ break;
+ case FE_READ_UNCORRECTED_BLOCKS:
+ must_be_writable(tst, "ioctl(FE_READ_UNCORRECTED_BLOCKS)", arg3,
+ sizeof(uint32_t));
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res) && res == 0)
+ make_readable (arg3, sizeof(uint32_t));
+ break;
+ case FE_SET_FRONTEND:
+ must_be_readable(tst, "ioctl(FE_SET_FRONTEND)", arg3,
+ sizeof(struct dvb_frontend_parameters));
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case FE_GET_FRONTEND:
+ must_be_writable(tst, "ioctl(FE_GET_FRONTEND)", arg3,
+ sizeof(struct dvb_frontend_parameters));
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res) && res == 0)
+ make_readable (arg3, sizeof(struct dvb_frontend_parameters));
+ break;
+ case FE_GET_EVENT:
+ must_be_writable(tst, "ioctl(FE_GET_EVENT)", arg3,
+ sizeof(struct dvb_frontend_event));
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res) && res == 0)
+ make_readable (arg3, sizeof(struct dvb_frontend_event));
+ break;
+ case NET_ADD_IF:
+ must_be_readable(tst, "ioctl(NET_ADD_IF (pid, uint16_t))",
+ (int) &(((struct dvb_net_if *) arg3)->pid),
+ sizeof(((struct dvb_net_if *) arg3)->pid));
+ must_be_writable(tst, "ioctl(NET_ADD_IF (if_num, uint16_t))",
+ (int) &(((struct dvb_net_if *) arg3)->if_num),
+ sizeof(((struct dvb_net_if *) arg3)->if_num));
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res) && res == 0)
+ make_readable (arg3, sizeof(struct dvb_net_if));
+ break;
+ case NET_REMOVE_IF:
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case NET_GET_IF:
+ must_be_readable(tst, "ioctl(NET_GET_IF (if_num, uint16_t))",
+ (int) &(((struct dvb_net_if *) arg3)->if_num),
+ sizeof(((struct dvb_net_if *) arg3)->if_num));
+ must_be_writable(tst, "ioctl(NET_GET_IF (pid, uint16_t))",
+ (int) &(((struct dvb_net_if *) arg3)->pid),
+ sizeof(((struct dvb_net_if *) arg3)->pid));
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res) && res == 0)
+ make_readable (arg3, sizeof(struct dvb_net_if));
+ break;
+ case OSD_SEND_CMD:
+ must_be_readable(tst, "ioctl(OSD_SEND_CMD)", arg3,
+ sizeof(osd_cmd_t));
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case VIDEO_STOP:
+ case VIDEO_PLAY:
+ case VIDEO_FREEZE:
+ case VIDEO_CONTINUE:
+ case VIDEO_SELECT_SOURCE:
+ case VIDEO_SET_BLANK:
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case VIDEO_GET_STATUS:
+ must_be_writable(tst, "ioctl(VIDEO_GET_STATUS)", arg3,
+ sizeof(struct video_status));
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res) && res == 0)
+ make_readable (arg3, sizeof(struct video_status));
+ break;
+ case VIDEO_GET_EVENT:
+ must_be_writable(tst, "ioctl(VIDEO_GET_EVENT)", arg3,
+ sizeof(struct video_event));
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res) && res == 0)
+ make_readable (arg3, sizeof(struct video_event));
+ break;
+ case VIDEO_SET_DISPLAY_FORMAT:
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case VIDEO_STILLPICTURE:
+ must_be_readable(tst, "ioctl(VIDEO_STILLPICTURE)", arg3,
+ sizeof(struct video_still_picture));
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case VIDEO_FAST_FORWARD:
+ case VIDEO_SLOWMOTION:
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case VIDEO_GET_CAPABILITIES:
+ must_be_writable(tst, "ioctl(VIDEO_GET_CAPABILITIES)", arg3,
+ sizeof(unsigned int));
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res) && res == 0)
+ make_readable (arg3, sizeof(unsigned int));
+ break;
+ case VIDEO_CLEAR_BUFFER:
+ case VIDEO_SET_ID:
+ case VIDEO_SET_STREAMTYPE:
+ case VIDEO_SET_FORMAT:
+ case VIDEO_SET_SYSTEM:
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case VIDEO_SET_HIGHLIGHT:
+ must_be_readable(tst, "ioctl(VIDEO_SET_HIGHLIGHT)", arg3,
+ sizeof(video_highlight_t));
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case VIDEO_SET_SPU:
+ must_be_readable(tst, "ioctl(VIDEO_SET_SPU)", arg3,
+ sizeof(video_spu_t));
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case VIDEO_SET_SPU_PALETTE:
+ must_be_readable(tst, "ioctl(VIDEO_SET_SPU_PALETTE)", arg3,
+ sizeof(video_spu_palette_t));
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+ case VIDEO_GET_NAVI:
+ must_be_writable(tst, "ioctl(VIDEO_GET_NAVI)", arg3,
+ sizeof(video_navi_pack_t));
+ KERNEL_DO_SYSCALL(tid,res);
+ if (!VG_(is_kerror)(res) && res == 0)
+ make_readable (arg3, sizeof(video_navi_pack_t));
+ break;
+#if 0
+ /* FIXME: conflicts with NET_REMOVE_IF - both are _IO('o', 53) */
+ case VIDEO_SET_ATTRIBUTES:
+ KERNEL_DO_SYSCALL(tid,res);
+ break;
+#endif
+
/* We don't have any specific information on it, so
try to do something reasonable based on direction and
size bits. The encoding scheme is described in
diff -Naur valgrind-1.0.4.orig/vg_unsafe.h valgrind-1.0.4/vg_unsafe.h
--- valgrind-1.0.4.orig/vg_unsafe.h 2002-09-17 16:31:08.000000000 +0200
+++ valgrind-1.0.4/vg_unsafe.h 2003-03-03 06:12:23.000000000 +0100
@@ -86,6 +86,13 @@
#include <sys/poll.h>
+#include <linux/dvb/audio.h>
+#include <linux/dvb/ca.h>
+#include <linux/dvb/dmx.h>
+#include <linux/dvb/frontend.h>
+#include <linux/dvb/net.h>
+#include <linux/dvb/osd.h>
+#include <linux/dvb/video.h>
/*--------------------------------------------------------------------*/
/*--- end vg_unsafe.h ---*/
|