Commit 6487d1d
committed
ptrace: Return the signal to continue with from ptrace_stop
The signal a task should continue with after a ptrace stop is
inconsistently read, cleared, and sent. Solve this by reading and
clearing the signal to be sent in ptrace_stop.
In an ideal world everything except ptrace_signal would share a common
implementation of continuing with the signal, so ptracers could count
on the signal they ask to continue with actually being delivered. For
now retain bug compatibility and just return with the signal number
the ptracer requested the code continue with.
Link: https://lkml.kernel.org/r/875yoe7qdp.fsf_-_@email.froward.int.ebiederm.org
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>1 parent 336d4b8 commit 6487d1d
2 files changed
Lines changed: 25 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
| 422 | + | |
422 | 423 | | |
423 | 424 | | |
424 | 425 | | |
425 | 426 | | |
426 | | - | |
| 427 | + | |
| 428 | + | |
427 | 429 | | |
428 | 430 | | |
429 | 431 | | |
430 | 432 | | |
431 | 433 | | |
432 | 434 | | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
| 435 | + | |
| 436 | + | |
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2188 | 2188 | | |
2189 | 2189 | | |
2190 | 2190 | | |
2191 | | - | |
2192 | | - | |
| 2191 | + | |
| 2192 | + | |
| 2193 | + | |
2193 | 2194 | | |
2194 | | - | |
| 2195 | + | |
2195 | 2196 | | |
2196 | 2197 | | |
2197 | 2198 | | |
2198 | 2199 | | |
2199 | 2200 | | |
| 2201 | + | |
2200 | 2202 | | |
2201 | 2203 | | |
2202 | 2204 | | |
| |||
2305 | 2307 | | |
2306 | 2308 | | |
2307 | 2309 | | |
| 2310 | + | |
2308 | 2311 | | |
2309 | | - | |
| 2312 | + | |
2310 | 2313 | | |
2311 | 2314 | | |
2312 | 2315 | | |
| |||
2316 | 2319 | | |
2317 | 2320 | | |
2318 | 2321 | | |
| 2322 | + | |
| 2323 | + | |
2319 | 2324 | | |
2320 | 2325 | | |
| 2326 | + | |
2321 | 2327 | | |
2322 | 2328 | | |
2323 | 2329 | | |
| |||
2328 | 2334 | | |
2329 | 2335 | | |
2330 | 2336 | | |
| 2337 | + | |
2331 | 2338 | | |
2332 | 2339 | | |
2333 | | - | |
| 2340 | + | |
2334 | 2341 | | |
2335 | 2342 | | |
2336 | 2343 | | |
| |||
2341 | 2348 | | |
2342 | 2349 | | |
2343 | 2350 | | |
2344 | | - | |
| 2351 | + | |
2345 | 2352 | | |
2346 | 2353 | | |
2347 | | - | |
| 2354 | + | |
2348 | 2355 | | |
| 2356 | + | |
| 2357 | + | |
2349 | 2358 | | |
2350 | 2359 | | |
2351 | 2360 | | |
2352 | 2361 | | |
2353 | 2362 | | |
2354 | | - | |
| 2363 | + | |
2355 | 2364 | | |
| 2365 | + | |
2356 | 2366 | | |
2357 | 2367 | | |
2358 | 2368 | | |
| |||
2511 | 2521 | | |
2512 | 2522 | | |
2513 | 2523 | | |
2514 | | - | |
2515 | 2524 | | |
2516 | 2525 | | |
2517 | 2526 | | |
| |||
2564 | 2573 | | |
2565 | 2574 | | |
2566 | 2575 | | |
2567 | | - | |
| 2576 | + | |
2568 | 2577 | | |
2569 | 2578 | | |
2570 | | - | |
2571 | 2579 | | |
2572 | 2580 | | |
2573 | 2581 | | |
2574 | | - | |
2575 | | - | |
2576 | 2582 | | |
2577 | 2583 | | |
2578 | 2584 | | |
| |||
0 commit comments