On Wed, Apr 14, 2021 at 08:46:40AM +0200, Jann Horn wrote:
> On Wed, Apr 14, 2021 at 7:59 AM Andrei Vagin wrote:
> > We already have process_vm_readv and process_vm_writev to read and write
> > to a process memory faster than we can do this with ptrace. And now it
> > is tim
: ptrace_vm_exec
# selftests: process_vm_exec: process_vm_exec_syscall
# 1..1
# ok 1 write works as expectd
# # Totals: pass:1 fail:0 xfail:0 xpass:0 skip:0 error:0
ok 4 selftests: process_vm_exec: process_vm_exec_syscall
Signed-off-by: Andrei Vagin
---
.../selftests/process_vm_exec/Makefile
and if it is set
process_vm_exec will execute a system call with arguments from sigcontext.
process_vm_exec retuns 0 if the system call has been executed and an error
code in other cases.
A return code of the system call can be found in a proper register in
sigcontext.
Signed-off-by: Andrei Vagin
It will be used to implement process_vm_exec.
Signed-off-by: Andrei Vagin
---
arch/x86/kernel/signal.c | 78 ++--
1 file changed, 43 insertions(+), 35 deletions(-)
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
index be0d7d4152ec
that process_vm_exec works more than 5 times faster
than PTRACE_SYSEMU.
Signed-off-by: Andrei Vagin
---
arch/Kconfig | 15 +++
arch/x86/Kconfig | 1 +
arch/x86/entry/common.c| 16 +++
arch/x86/entry/syscalls/syscall_64.tbl | 1
: Jeff Dike
Cc: Mike Rapoport
Cc: Michael Kerrisk (man-pages)
Cc: Oleg Nesterov
Cc: Peter Zijlstra
Cc: Richard Weinberger
Cc: Thomas Gleixner
Andrei Vagin (4):
signal: add a helper to restore a process state from sigcontex
arch/x86: implement the process_vm_exec syscall
arch/x86:
t I'd really appreciate
> if it gets backported to v5.11 after v5.12 is released, so as not
> to complicate already non-simple CRIU-vdso code. Thanks!
>
> Cc: Andrei Vagin
Acked-by: Andrei Vagin
> Cc: Andy Lutomirski
> Cc: Benjamin Herrenschmidt
> Cc: Christophe Leroy
> Cc:
ns_vdso_data is next page to vdso_data, provide
> vdso_data pointer to __arch_get_timens_vdso_data() in order
> to ease the calculation on powerpc in following patches.
>
Acked-by: Andrei Vagin
> Signed-off-by: Christophe Leroy
position, knowing it is the next page in vvar.
> This avoids having to redo the mflr/bcl/mflr/mtlr dance to locate
> the page relative to running code position.
>
Acked-by: Andrei Vagin
> Signed-off-by: Christophe Leroy
lumbersconf.org/event/7/contributions/640/)
>
> With this new functionality we can resolve all the problems with
> propagation at once.
>
Thanks for picking this up. Overall it looks good for me. Here is one
comment inline.
> Cc: Eric W. Biederman
> Cc: Alexander Viro
> Cc
On Fri, Mar 26, 2021 at 11:28 AM Catalin Marinas
wrote:
>
> On Mon, Mar 22, 2021 at 03:50:50PM -0700, Andrei Vagin wrote:
> > diff --git a/arch/arm64/include/uapi/asm/ptrace.h
> > b/arch/arm64/include/uapi/asm/ptrace.h
> > index 758ae984ff97..3c118c5b0893 100644
> >
x0: 0x5
ok 3 The child exited with code 0.
# Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0
Signed-off-by: Andrei Vagin
---
tools/testing/selftests/arm64/ptrace/Makefile | 6 +
tools/testing/selftests/arm64/ptrace/lib.h| 36 ++
.../ptrace/ptrace_restart_syscall_test.c
: pass:4 fail:0 xfail:0 xpass:0 skip:0 error:0
Signed-off-by: Andrei Vagin
---
tools/testing/selftests/arm64/ptrace/Makefile | 2 +-
.../arm64/ptrace/ptrace_syscall_test.c| 158 ++
2 files changed, 159 insertions(+), 1 deletion(-)
create mode 100644 tools/testing
an origin value of the x7 register if the tracee is stopped in
a system call..
Signed-off-by: Andrei Vagin
---
arch/arm64/include/asm/ptrace.h | 1 +
arch/arm64/include/uapi/asm/ptrace.h | 1 +
arch/arm64/kernel/ptrace.c | 18 --
3 files changed, 14 insertions(+), 6
-by: Andrei Vagin
---
arch/arm64/include/asm/ptrace.h | 2 +-
arch/arm64/include/uapi/asm/ptrace.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h
index e58bca832dff..d4cdf98ac003 100644
--- a/arch/arm64
Cc: Dave Martin
Cc: Keno Fischer
Cc: Oleg Nesterov
Cc: Will Deacon
Andrei Vagin (4):
arm64: expose orig_x0 in the user_pt_regs structure
arm64/ptrace: introduce orig_x7 in the user_pt_regs structure
selftest/arm64/ptrace: add a test for orig_x0
selftest/arm64/ptrace: add a test
On Thu, Feb 04, 2021 at 03:23:34PM +, Will Deacon wrote:
> On Mon, Feb 01, 2021 at 11:40:10AM -0800, Andrei Vagin wrote:
> > ip/r12 for AArch32 and x7 for AArch64 is used to indicate whether or not
> > the stop has been signalled from syscall entry or syscall exit.
On Mon, Feb 01, 2021 at 07:11:12PM -0500, Keno Fischer wrote:
> Hi Andrei,
>
> > This series introduces the PTRACE_O_ARM64_RAW_REGS option. If it is set,
> > PTRACE_GETREGSET returns values of all registers, and PTRACE_SETREGSET
> > allows to change any of them.
>
> thanks for picking this up. I
On Thu, Feb 04, 2021 at 03:36:15PM +, Will Deacon wrote:
> On Mon, Feb 01, 2021 at 11:40:11AM -0800, Andrei Vagin wrote:
> > We have some ABI weirdness in the way that we handle syscall
> > exit stops because we indicate whether or not the stop has been
> > signall
and to introduce a new
ptrace option to get the full set of registers.
Signed-off-by: Andrei Vagin
---
arch/arm64/include/asm/ptrace.h | 5 ++
arch/arm64/kernel/ptrace.c | 104
2 files changed, 69 insertions(+), 40 deletions(-)
diff --git a/arch/arm64/include/asm
: arm64/ptrace: ptrace_syscall_regs_test
# 1..3
# ok 1 x7: 0
# ok 2 x7: 1
# ok 3 The child exited with code 0.
# # Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0
ok 2 selftests: arm64/ptrace: ptrace_syscall_regs_test
Signed-off-by: Andrei Vagin
---
tools/testing/selftests/arm64
PTRACE_O_ARM64_RAW_REGS. If it
is set, PTRACE_GETREGSET returns values of all registers without
clobbering r12 or x7 and PTRACE_SETREGSE sets all registers even if a
process has been stopped in syscall-enter or syscall-exit.
Signed-off-by: Andrei Vagin
---
arch/arm64/include/uapi/asm/ptrace.h | 4 ++
arch
Cc: Oleg Nesterov
Cc: Will Deacon
Andrei Vagin (3):
arm64/ptrace: don't clobber task registers on syscall entry/exit traps
arm64/ptrace: introduce PTRACE_O_ARM64_RAW_REGS
selftest/arm64/ptrace: add tests for PTRACE_O_ARM64_RAW_REGS
v2: use the ptrace option instead of adding a new regset
On Wed, Jan 27, 2021 at 02:53:07PM +, Dave Martin wrote:
> On Tue, Jan 19, 2021 at 02:06:36PM -0800, Andrei Vagin wrote:
> > This is an alternative to NT_PRSTATUS that clobbers ip/r12 on AArch32,
> > x7 on AArch64 when a tracee is stopped in syscall entry or syscall
On Tue, Jan 19, 2021 at 2:08 PM Andrei Vagin wrote:
>
> Right now, ip/r12 for AArch32 and x7 for AArch64 is used to indicate
> whether or not the stop has been signalled from syscall entry or syscall
> exit. This means that:
>
> - Any writes by the tracer to this regist
, it is critical to
have access to the full set of registers in any moment. For example,
they need to change values of all registers to emulate rt_sigreturn and
they need to have the full set of registers to build a signal frame.
Andrei Vagin (3):
arm64/ptrace: don't clobber task registers on syscall entry
This is an alternative to NT_PRSTATUS that clobbers ip/r12 on AArch32,
x7 on AArch64 when a tracee is stopped in syscall entry or syscall exit
traps.
Signed-off-by: Andrei Vagin
---
arch/arm64/kernel/ptrace.c | 39 ++
include/uapi/linux/elf.h | 1 +
2
: ptrace_syscall_regs_test
Signed-off-by: Andrei Vagin
---
tools/testing/selftests/arm64/Makefile| 2 +-
tools/testing/selftests/arm64/ptrace/Makefile | 6 +
.../arm64/ptrace/ptrace_syscall_regs_test.c | 147 ++
3 files changed, 154 insertions(+), 1 deletion(-)
create
and to introduce a new
NT_ARM_PRSTATUS command to get the full set of registers.
Signed-off-by: Andrei Vagin
---
arch/arm64/include/asm/ptrace.h | 5 ++
arch/arm64/kernel/ptrace.c | 104 +++-
2 files changed, 67 insertions(+), 42 deletions(-)
diff --git a/arch/arm64
On Mon, Dec 28, 2020 at 1:54 PM Alexey Dobriyan wrote:
>
> Signed-off-by: Alexey Dobriyan
Acked-by: Andrei Vagin
Thanks,
Andrei
> ---
>
> kernel/time/namespace.c |6 --
> 1 file changed, 6 deletions(-)
>
> --- a/kernel/time/namespace.c
> +++ b/kernel/t
oottime() in 'time_namespace.h' to provide
> better coder readability/consistency.
>
Reviewed-by: Andrei Vagin
Thanks,
Andrei
The following commit has been merged into the timers/urgent branch of tip:
Commit-ID: c2f7d08cccf4af2ce6992feaabb9e68e4ae0bff3
Gitweb:
https://git.kernel.org/tip/c2f7d08cccf4af2ce6992feaabb9e68e4ae0bff3
Author:Andrei Vagin
AuthorDate:Thu, 15 Oct 2020 09:00:19 -07:00
The following commit has been merged into the timers/urgent branch of tip:
Commit-ID: a4fd8414659bf470e2146b352574bbd274e54b7a
Gitweb:
https://git.kernel.org/tip/a4fd8414659bf470e2146b352574bbd274e54b7a
Author:Andrei Vagin
AuthorDate:Thu, 15 Oct 2020 09:00:20 -07:00
On Thu, Oct 15, 2020 at 04:13:42PM +0200, Thomas Gleixner wrote:
> On Thu, Oct 15 2020 at 14:26, Dmitry Safonov wrote:
>
> > On 10/15/20 8:29 AM, Andrei Vagin wrote:
> >> For all commands except FUTEX_WAIT, timeout is interpreted as an
> >> absolute value. This absol
ns van der Laan
Signed-off-by: Andrei Vagin
---
v2:
* check FUTEX_CLOCK_REALTIME properly
* fix futex_time32 too
kernel/futex.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/kernel/futex.c b/kernel/futex.c
index a5876694a60e..32056d2d4171 100644
--- a/kernel/futex.c
+++ b/kernel/futex.
Output on success:
1..2
ok 1 futex with the 0 clockid
ok 2 futex with the 1 clockid
# Totals: pass:2 fail:0 xfail:0 xpass:0 skip:0 error:0
Signed-off-by: Andrei Vagin
---
v2: extend the test to check FUTEX_CLOCK_REALTIME
tools/testing/selftests/timens/Makefile | 2 +-
tools/testing
The following commit has been merged into the timers/urgent branch of tip:
Commit-ID: 4cdf42596216e08051c0ccc4c896dcb8b2d22f10
Gitweb:
https://git.kernel.org/tip/4cdf42596216e08051c0ccc4c896dcb8b2d22f10
Author:Andrei Vagin
AuthorDate:Thu, 15 Oct 2020 00:29:09 -07:00
The following commit has been merged into the timers/urgent branch of tip:
Commit-ID: 06764291690f8650a9f96dea42cc0dd4138d47d5
Gitweb:
https://git.kernel.org/tip/06764291690f8650a9f96dea42cc0dd4138d47d5
Author:Andrei Vagin
AuthorDate:Thu, 15 Oct 2020 00:29:08 -07:00
On Sun, Oct 11, 2020 at 04:59:23PM +0200, Michael Weiß wrote:
> @@ -79,6 +80,20 @@ static u64 get_iowait_time(struct kernel_cpustat *kcs, int
> cpu)
>
> #endif
>
> +static void get_boottime(struct timespec64 *ts)
> +{
> + ktime_t boottime;
> +
> + /* get kernel internal system boot
ns van der Laan
Signed-off-by: Andrei Vagin
---
kernel/futex.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/futex.c b/kernel/futex.c
index a5876694a60e..9ff2b8c5a506 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -39,6 +39,7 @@
#include
#include
#include
+#include
Output on success:
$ ./futex
1..1
ok 1 futex
# Totals: pass:1 fail:0 xfail:0 xpass:0 skip:0 error:0
Signed-off-by: Andrei Vagin
---
tools/testing/selftests/timens/Makefile | 2 +-
tools/testing/selftests/timens/futex.c | 107
2 files changed, 108 insertions(+), 1
On Fri, Oct 09, 2020 at 03:28:15PM +0200, Christian Brauner wrote:
> On Thu, Oct 08, 2020 at 07:39:42AM +0200, Michael Weiß wrote:
> > getboottime64() provides the time stamp of system boot. In case of
> > time namespaces, the offset to the boot time stamp was not applied
> > earlier. However,
On Fri, Aug 14, 2020 at 01:01:00AM +1000, Eugene Lubarsky wrote:
> On Wed, 12 Aug 2020 00:51:35 -0700
> Andrei Vagin wrote:
>
> > Maybe we need resurrect the task_diag series instead of inventing
> > another less-effective interface...
>
> I would certainly welcome th
On Fri, Aug 14, 2020 at 06:11:58PM +0300, Kirill Tkhai wrote:
> On 14.08.2020 04:16, Andrei Vagin wrote:
> > On Thu, Aug 13, 2020 at 11:12:45AM +0300, Kirill Tkhai wrote:
> >> On 12.08.2020 20:53, Andrei Vagin wrote:
> >>> On Tue, Aug 11, 2020 at 01:23:
On Thu, Aug 13, 2020 at 11:12:45AM +0300, Kirill Tkhai wrote:
> On 12.08.2020 20:53, Andrei Vagin wrote:
> > On Tue, Aug 11, 2020 at 01:23:35PM +0300, Kirill Tkhai wrote:
> >> On 10.08.2020 20:34, Andrei Vagin wrote:
> >>> On Fri, Aug 07, 2020 at 11:47:
On Wed, Aug 12, 2020 at 10:47:32PM -0600, David Ahern wrote:
> On 8/12/20 1:51 AM, Andrei Vagin wrote:
> >
> > I rebased the task_diag patches on top of v5.8:
> > https://github.com/avagin/linux-task-diag/tree/v5.8-task-diag
>
> Thanks for updating the patches.
>
On Tue, Aug 11, 2020 at 01:23:35PM +0300, Kirill Tkhai wrote:
> On 10.08.2020 20:34, Andrei Vagin wrote:
> > On Fri, Aug 07, 2020 at 11:47:57AM +0300, Kirill Tkhai wrote:
> >> On 06.08.2020 11:05, Andrei Vagin wrote:
> >>> On Mon, Aug 03, 2020 at 01:03:
On Tue, Aug 11, 2020 at 12:58:47AM +1000, Eugene Lubarsky wrote:
> This is an idea for substantially reducing the number of syscalls needed
> by monitoring tools whilst mostly re-using the existing API.
>
> The proposed files in this proof-of-concept patch set are:
>
> * /proc/all/stat
> A
On Fri, Aug 07, 2020 at 11:47:57AM +0300, Kirill Tkhai wrote:
> On 06.08.2020 11:05, Andrei Vagin wrote:
> > On Mon, Aug 03, 2020 at 01:03:17PM +0300, Kirill Tkhai wrote:
> >> On 31.07.2020 01:13, Eric W. Biederman wrote:
> >>> Kirill Tkhai writes:
> >&
On Mon, Aug 03, 2020 at 01:03:17PM +0300, Kirill Tkhai wrote:
> On 31.07.2020 01:13, Eric W. Biederman wrote:
> > Kirill Tkhai writes:
> >
> >> On 30.07.2020 17:34, Eric W. Biederman wrote:
> >>> Kirill Tkhai writes:
> >>>
> Currently, there is no a way to list or iterate all or subset of
On Thu, Jul 30, 2020 at 06:01:20PM +0300, Kirill Tkhai wrote:
> On 30.07.2020 17:34, Eric W. Biederman wrote:
> > Kirill Tkhai writes:
> >
> >> Currently, there is no a way to list or iterate all or subset of namespaces
> >> in the system. Some namespaces are exposed in /proc/[pid]/ns/
On Fri, Jul 24, 2020 at 06:26:23PM +0100, Catalin Marinas wrote:
> On Wed, 24 Jun 2020 01:33:16 -0700, Andrei Vagin wrote:
> > Currently the vdso has no awareness of time namespaces, which may
> > apply distinct offsets to processes in different namespaces. To handle
> >
On Wed, Jul 22, 2020 at 07:15:06PM +0100, Catalin Marinas wrote:
> On Mon, Jul 13, 2020 at 06:57:43PM -0700, Andrei Vagin wrote:
> > On Sat, Jul 04, 2020 at 11:40:55PM -0700, Andrei Vagin wrote:
> > > On Wed, Jun 24, 2020 at 01:33:15AM -0700, Andrei Vagin wrote:
> > > &g
On Sat, Jul 04, 2020 at 11:40:55PM -0700, Andrei Vagin wrote:
> On Wed, Jun 24, 2020 at 01:33:15AM -0700, Andrei Vagin wrote:
> > Allocate the time namespace page among VVAR pages and add the logic
> > to handle faults on VVAR properly.
> >
> > If a task belongs to a t
On Wed, Jun 24, 2020 at 01:33:15AM -0700, Andrei Vagin wrote:
> Allocate the time namespace page among VVAR pages and add the logic
> to handle faults on VVAR properly.
>
> If a task belongs to a time namespace then the VVAR page which contains
> the system wide VDSO d
tomically
> problematic. This is now fixed so support CLONE_NEWTIME with setns()
>
> Cc: Thomas Gleixner
> Cc: Michael Kerrisk
> Cc: Serge Hallyn
> Cc: Dmitry Safonov
> Cc: Andrei Vagin
> Signed-off-by: Christian Brauner
Hi Christian,
I have reviewed this series and
ens()
> > could still fail which made switching to multiple namespaces atomically
> > problematic. This is now fixed so support CLONE_NEWTIME with setns()
> >
> > Cc: Thomas Gleixner
> > Cc: Michael Kerrisk
> > Cc: Serge Hallyn
> > Cc: Dmitry Safonov
&
On Wed, Jun 24, 2020 at 05:18:01PM +0200, Christian Brauner wrote:
> On Wed, Jun 24, 2020 at 01:33:17AM -0700, Andrei Vagin wrote:
> > The order of vvar pages depends on whether a task belongs to the root
> > time namespace or not. In the root time namespace, a task doesn't
()'ed.
Reviewed-by: Vincenzo Frascino
Reviewed-by: Dmitry Safonov
Signed-off-by: Andrei Vagin
---
arch/arm64/kernel/vdso.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c
index be9ca8c46cff..8be6bd6625db 100644
--- a/arch
-by: Andrei Vagin
---
arch/arm64/kernel/vdso.c | 25 +++--
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c
index 4e016574bd91..7c4620451fa5 100644
--- a/arch/arm64/kernel/vdso.c
+++ b/arch/arm64/kernel/vdso.c
If a task belongs to a time namespace then the VVAR page which contains
the system wide VDSO data is replaced with a namespace specific page
which has the same layout as the VVAR page.
Reviewed-by: Vincenzo Frascino
Reviewed-by: Dmitry Safonov
Signed-off-by: Andrei Vagin
---
arch/arm64/kernel
CONFIG_TIME_NS is dependes on GENERIC_VDSO_TIME_NS.
Reviewed-by: Vincenzo Frascino
Reviewed-by: Dmitry Safonov
Signed-off-by: Andrei Vagin
---
arch/arm64/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index a4a094bedcb2..38d3180adf78 100644
p_page_range
doesn't require mmap_write_lock.
Reviewed-by: Vincenzo Frascino
Reviewed-by: Dmitry Safonov
Cc: Thomas Gleixner
Cc: Dmitry Safonov
v5 on github (if someone prefers `git pull` to `git am`):
https://github.com/avagin/linux-task-diag/tree/arm64/timens-v5
Andrei Vagin (6):
arm
erent kernel configs.
Cc: Mark Rutland
Reviewed-by: Vincenzo Frascino
Reviewed-by: Dmitry Safonov
Signed-off-by: Andrei Vagin
---
arch/arm64/include/asm/vdso.h | 2 ++
.../include/asm/vdso/compat_gettimeofday.h| 12
arch/arm64/include/asm/vdso/gettimeofd
nov
Signed-off-by: Andrei Vagin
---
arch/arm64/kernel/vdso.c | 31 +++
1 file changed, 31 insertions(+)
diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c
index 7c4620451fa5..bdf492a17dff 100644
--- a/arch/arm64/kernel/vdso.c
+++ b/arch/arm64/kernel/vds
On Tue, Jun 23, 2020 at 11:30:30AM -0700, Peter Oskolkov wrote:
...
> > > /**
> > > +static int futex_swap(u32 __user *uaddr, unsigned int flags, u32
> > > val,
> > > + ktime_t *abs_time, u32 __user *uaddr2)
> > > +{
> > > + u32 bitset = FUTEX_BITSET_MATCH_ANY;
> > > + struct
On Fri, Jun 19, 2020 at 05:38:12PM +0200, Christian Brauner wrote:
> On Tue, Jun 16, 2020 at 12:55:41AM -0700, Andrei Vagin wrote:
> > The VVAR page layout depends on whether a task belongs to the root or
> > non-root time namespace. Whenever a task changes its namespace, the VVAR
On Tue, Jun 16, 2020 at 11:59:20AM +0100, Mark Rutland wrote:
> On Tue, Jun 16, 2020 at 12:55:40AM -0700, Andrei Vagin wrote:
> > This is required to support time namespaces where a time namespace data
> > page is different for each namespace.
>
> Can you please give a bit mo
On Tue, Jun 16, 2020 at 10:22:26AM -0700, Peter Oskolkov wrote:
> From 6fbe0261204692a7f488261ab3c4ac696b91db5c Mon Sep 17 00:00:00 2001
> From: Peter Oskolkov
> Date: Tue, 9 Jun 2020 16:03:14 -0700
> Subject: [RFC PATCH 1/3 v2] futex: introduce FUTEX_SWAP operation
>
> This is an RFC!
>
> As
If a task belongs to a time namespace then the VVAR page which contains
the system wide VDSO data is replaced with a namespace specific page
which has the same layout as the VVAR page.
Reviewed-by: Vincenzo Frascino
Reviewed-by: Dmitry Safonov
Signed-off-by: Andrei Vagin
---
arch/arm64/kernel
am`):
https://github.com/avagin/linux-task-diag/tree/arm64/timens-v4
Andrei Vagin (6):
arm64/vdso: use the fault callback to map vvar pages
arm64/vdso: Zap vvar pages when switching to a time namespace
arm64/vdso: Add time namespace page
arm64/vdso: Handle faults on timens page
arm64/vdso: Restri
This is required to support time namespaces where a time namespace data
page is different for each namespace.
Reviewed-by: Vincenzo Frascino
Reviewed-by: Dmitry Safonov
Signed-off-by: Andrei Vagin
---
arch/arm64/kernel/vdso.c | 24 +++-
1 file changed, 15 insertions(+), 9
()'ed.
Reviewed-by: Vincenzo Frascino
Reviewed-by: Dmitry Safonov
Signed-off-by: Andrei Vagin
---
arch/arm64/kernel/vdso.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c
index 21bdd0d74f40..68e021324113 100644
--- a/arch
CONFIG_TIME_NS is dependes on GENERIC_VDSO_TIME_NS.
Reviewed-by: Vincenzo Frascino
Reviewed-by: Dmitry Safonov
Signed-off-by: Andrei Vagin
---
arch/arm64/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 31380da53689..e3956cbfd8a9 100644
time getter function which retrieves the real VVAR page, reads host time
and then adds the offset for the requested clock which is stored in the
special VVAR page.
Cc: Mark Rutland
Reviewed-by: Vincenzo Frascino
Reviewed-by: Dmitry Safonov
Signed-off-by: Andrei Vagin
---
arch/arm64/includ
-off-by: Andrei Vagin
---
arch/arm64/kernel/vdso.c | 32
1 file changed, 32 insertions(+)
diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c
index b0aec4e8c9b4..df4bb736d28a 100644
--- a/arch/arm64/kernel/vdso.c
+++ b/arch/arm64/kernel/vdso.c
On Tue, Jun 09, 2020 at 06:14:27PM +0200, Christian Brauner wrote:
> On Tue, Jun 09, 2020 at 09:06:27AM -0700, Andrei Vagin wrote:
> > On Tue, Jun 09, 2020 at 09:44:22AM +0200, Christian Brauner wrote:
> > > On Mon, Jun 08, 2020 at 08:42:21PM -0700,
On Tue, Jun 09, 2020 at 09:44:22AM +0200, Christian Brauner wrote:
> On Mon, Jun 08, 2020 at 08:42:21PM -0700, Andrei Vagin wrote:
> > On Wed, Jun 03, 2020 at 06:23:26PM +0200, Adrian Reber wrote:
> > > This patch introduces CAP_CHECKPOINT_RESTORE, a new capability
On Wed, Jun 03, 2020 at 06:23:26PM +0200, Adrian Reber wrote:
> This patch introduces CAP_CHECKPOINT_RESTORE, a new capability facilitating
> checkpoint/restore for non-root users.
>
> Over the last years, The CRIU (Checkpoint/Restore In Userspace) team has been
> asked numerous times if it is
> >
> > I would argue that setting the current process exe file check should just
> > be reduced to a "can you ptrace a children" check.
> > Here's why: any process can masquerade into another executable with ptrace.
> > One can fork a child, ptrace it, have the child execve("target_exe"), then
On Fri, Jun 05, 2020 at 11:49:04AM +0100, Mark Rutland wrote:
> Hi Andrei,
>
> As a heads up, in mainline the arm64 vdso code has been refactored since
> v5.7, and this series will need to be rebased atop. Given we're in the
> middle of the merge window, I would suggest waiting until rc1 before
>
time getter function which retrieves the real VVAR page, reads host time
and then adds the offset for the requested clock which is stored in the
special VVAR page.
Cc: Mark Rutland
Reviewed-by: Vincenzo Frascino
Reviewed-by: Dmitry Safonov
Signed-off-by: Andrei Vagin
---
v4: - fix an issue reporte
This is required to support time namespaces where a time namespace data
page is different for each namespace.
Reviewed-by: Vincenzo Frascino
Signed-off-by: Andrei Vagin
---
arch/arm64/kernel/vdso.c | 24 +++-
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git
` to `git am`):
https://github.com/avagin/linux-task-diag/tree/arm64/timens-v3
Andrei Vagin (6):
arm64/vdso: use the fault callback to map vvar pages
arm64/vdso: Zap vvar pages when switching to a time namespace
arm64/vdso: Add time napespace page
arm64/vdso: Handle faults on timens page
CONFIG_TIME_NS is dependes on GENERIC_VDSO_TIME_NS.
Reviewed-by: Vincenzo Frascino
Signed-off-by: Andrei Vagin
---
arch/arm64/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 5d513f461957..27d7e4ed1c93 100644
--- a/arch/arm64/Kconfig
If a task belongs to a time namespace then the VVAR page which contains
the system wide VDSO data is replaced with a namespace specific page
which has the same layout as the VVAR page.
Reviewed-by: Vincenzo Frascino
Signed-off-by: Andrei Vagin
---
arch/arm64/kernel/vdso.c | 57
time getter function which retrieves the real VVAR page, reads host time
and then adds the offset for the requested clock which is stored in the
special VVAR page.
Cc: Mark Rutland
Reviewed-by: Vincenzo Frascino
Signed-off-by: Andrei Vagin
---
arch/arm64/include/asm/vdso.h | 6 +
The VVAR page layout depends on whether a task belongs to the root or
non-root time namespace. Whenever a task changes its namespace, the VVAR
page tables are cleared and then they will be re-faulted with a
corresponding layout.
Reviewed-by: Vincenzo Frascino
Signed-off-by: Andrei Vagin
()'ed.
Reviewed-by: Vincenzo Frascino
Signed-off-by: Andrei Vagin
---
arch/arm64/kernel/vdso.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c
index f3baecd8edfb..8b17d7d10729 100644
--- a/arch/arm64/kernel/vdso.c
+++ b/arch
On Fri, May 22, 2020 at 09:40:37AM -0700, Casey Schaufler wrote:
> On 5/21/2020 10:53 PM, Adrian Reber wrote:
> > There are probably a few more things guarded by CAP_SYS_ADMIN required
> > to run checkpoint/restore as non-root,
>
> If you need CAP_SYS_ADMIN anyway you're not gaining anything by
>
On Fri, May 22, 2020 at 09:53:31AM +0200, Christian Brauner wrote:
> On Fri, May 22, 2020 at 07:53:50AM +0200, Adrian Reber wrote:
> >
> > There are probably a few more things guarded by CAP_SYS_ADMIN required
> > to run checkpoint/restore as non-root, but by applying this patch I can
> > already
This can happen if a testing node doesn't have RTC (real time clock)
hardware or it doesn't support alarms.
Fixes: 61c57676035d ("selftests/timens: Add Time Namespace test for supported
clocks")
Acked-by: Vincenzo Frascino
Reported-by: Vincenzo Frascino
Signed-off-by: Andrei Vagin
-
On Thu, Oct 17, 2019 at 04:47:48PM -0700, Andrei Vagin wrote:
>
> In my table, the "before" column is actually for the upstream kernel
> with the 18-th patch. Here is the table with the real "before" column:
>
> | before| with 18/33 | CONFIG_TIME_
On Thu, Oct 17, 2019 at 11:24:45AM +0200, Thomas Gleixner wrote:
> On Fri, 11 Oct 2019, Dmitry Safonov wrote:
> > We wrote two small benchmarks. The first one gettime_perf.c calls
> > clock_gettime() in a loop for 3 seconds. It shows us performance with
> > a hot CPU cache (more clock_gettime()
On Wed, Oct 16, 2019 at 12:39:11PM +0200, Thomas Gleixner wrote:
> On Wed, 16 Oct 2019, Vincenzo Frascino wrote:
>
> < Trim 250+ lines ( 3+ pages) of pointlessly wasted electrons >
>
> > > --- a/init/Kconfig
> > > +++ b/init/Kconfig
> > > @@ -1096,6 +1096,13 @@ config UTS_NS
> > > In this
gh VDSO and
> > by entering the kernel with implicit syscall.
> >
> > Introduce a new timens directory in selftests framework for
> > the next timens tests.
> >
> > Co-developed-by: Andrei Vagin
> > Signed-off-by: Andrei Vagin
> > Signed-off-by: Dm
On Thu, Aug 15, 2019 at 07:19:12PM +0200, Thomas Gleixner wrote:
> Dmitry,
>
> On Thu, 15 Aug 2019, Dmitry Safonov wrote:
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index 420567d1519a..97b7737f5aba 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -12898,6 +12898,8 @@ T: git
> >
On Mon, Aug 12, 2019 at 2:03 PM Adrian Reber wrote:
>
> On Mon, Aug 12, 2019 at 01:43:53PM -0700, Andrei Vagin wrote:
> > On Mon, Aug 12, 2019 at 1:10 PM Adrian Reber wrote:
> > >
> > > The main motivation to add set_tid to clone3() is CRIU.
> > >
> >
On Mon, Aug 12, 2019 at 1:10 PM Adrian Reber wrote:
>
> The main motivation to add set_tid to clone3() is CRIU.
>
> To restore a process with the same PID/TID CRIU currently uses
> /proc/sys/kernel/ns_last_pid. It writes the desired (PID - 1) to
> ns_last_pid and then (quickly) does a clone().
On Wed, Aug 07, 2019 at 08:04:10AM +0200, Thomas Gleixner wrote:
> On Mon, 29 Jul 2019, Dmitry Safonov wrote:
> > /**
> > @@ -869,8 +871,10 @@ static int __init alarmtimer_init(void)
> > /* Initialize alarm bases */
> > alarm_bases[ALARM_REALTIME].base_clockid = CLOCK_REALTIME;
> >
1 - 100 of 535 matches
Mail list logo