Skip to content

restart_block: Prepare the ground for dumping timeout

Dmitry Safonov linux-fsdevel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9futex: Remove unused uaddr2 in restart_blockinclude/linux/restart_block.h+0 -10 replies
2/9restart_block: Prevent userspace set part of the blockinclude/linux/restart_block.h kernel/time/hrtimer.c kernel/time/posix-cpu-timers.c +2 more+22 -120 replies
3/9select: Convert __esimate_accuracy() to ktime_tfs/select.c+13 -200 replies
4/9select: Micro-optimise __estimate_accuracy()fs/select.c+4 -55 replies
5/9select: Convert select_estimate_accuracy() to take ktime_tfs/eventpoll.c fs/select.c include/linux/poll.h+15 -290 replies
6/9select: Extract common code into do_sys_ppoll()fs/select.c+32 -620 replies
7/9select: Use ktime_t in do_sys_poll() and do_poll()fs/select.c+23 -240 replies
8/9select/restart_block: Convert poll's timeout to u64fs/select.c include/linux/restart_block.h+8 -232 replies
9/9restart_block: Make common timeoutfs/select.c include/linux/restart_block.h kernel/futex.c +3 more+22 -240 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/9] restart_block: Prepare the ground for dumping timeout

Hi,

I'm trying to address an issue in CRIU (Checkpoint Restore In Userspace) about timed syscalls restart. It's not possible to use restart_syscall() as the majority of applications does, as after restore the kernel doesn't know anything about a syscall that may have been interrupted on checkpoint. That's because the tasks are re-created from scratch and so there isn't task_struct::restart_block set on a new task.

As a preparation, unify timeouts for different syscalls in restart_block.

On contrary, I'm struggling with patches that introduce the new ptrace() request API. I'll speak about difficulties of designing new ptrace operation on Containers Microconference at Plumbers [with a hope to find the sensible solution].

Cc Adrian Reber <[email protected]>
Cc Alexander Viro <[email protected]>
Cc Andrei Vagin <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Cyrill Gorcunov <[email protected]>
Cc Dmitry Safonov <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Oleg Nesterov <[email protected]>
Cc Pavel Emelyanov <[email protected]>
Cc Thomas Gleixner <[email protected]>

Dmitry Safonov (9):
futex: Remove unused uaddr2 in restart_block
restart_block: Prevent userspace set part of the block
select: Convert __esimate_accuracy() to ktime_t
select: Micro-optimise __estimate_accuracy()
select: Convert select_estimate_accuracy() to take ktime_t
select: Extract common code into do_sys_ppoll()
select: Use ktime_t in do_sys_poll() and do_poll() select/restart_block: Convert poll's timeout to u64
restart_block: Make common timeout

 fs/eventpoll.c                 |   4 +-
 fs/select.c                    | 214 ++++++++++++---------------------
 include/linux/poll.h           |   2 +-
 include/linux/restart_block.h  |  11 +-
 kernel/futex.c                 |  14 +--
 kernel/time/alarmtimer.c       |   6 +-
 kernel/time/hrtimer.c          |  14 ++-
 kernel/time/posix-cpu-timers.c |  10 +-
 kernel/time/posix-stubs.c      |   8 +-
 kernel/time/posix-timers.c     |   8 +-
 10 files changed, 115 insertions(+), 176 deletions(-)
Signature · 1 line
2.23.0