Commit 90f175b
tests: userspace: test syscall buffer validation
Tests system call memory buffer read/write validation using the
k_pipe_get() and k_pipe_put() calls from a userspace thread.
Specifically, this tests _SYSCALL_MEMORY_READ/WRITE checks
by the system call handler by attempting to read/write to a
kernel object.
write_kobject_user_pipe() attempts to write over a kernel object
by using the kernel object's location as the buffer to place
the data read from the pipe.
read_kobject_user_pipe() attempts to read a kernel object by using
the kernel object's location as the location of data to be placed
into the pipe.
Tested on qemu_x86 and frdm_k64, passes on both.
Signed-off-by: Joshua Domagalski <[email protected]>1 parent 3ad0207 commit 90f175b
1 file changed
+36
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
356 | 358 | | |
357 | 359 | | |
358 | 360 | | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
359 | 391 | | |
360 | 392 | | |
361 | 393 | | |
362 | 394 | | |
363 | 395 | | |
364 | 396 | | |
365 | | - | |
| 397 | + | |
366 | 398 | | |
367 | 399 | | |
368 | 400 | | |
| |||
383 | 415 | | |
384 | 416 | | |
385 | 417 | | |
386 | | - | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
387 | 421 | | |
388 | 422 | | |
389 | 423 | | |
0 commit comments