On 6/14/19 2:42 PM, Thomas Gleixner wrote:
> On Wed, 12 Jun 2019, Dmitry Safonov wrote:
>
>> Subject: posix-timers/timens: Take into account clock offsets
>
> Please avoid that '/timens' appendix. It's not really a new subsystem or
> subfunction of posix
On 6/14/19 2:37 PM, Thomas Gleixner wrote:
> On Wed, 12 Jun 2019, Dmitry Safonov wrote:
>> ---
>> fs/timerfd.c | 3 +++
>> include/linux/time_namespace.h | 18 ++
>> kernel/time_namespace.c| 27
Hi Thomas,
Thanks much for the review,
On 6/14/19 2:32 PM, Thomas Gleixner wrote:
> Dmitry,
>
> On Wed, 12 Jun 2019, Dmitry Safonov wrote:
>
>> From: Andrei Vagin
>>
>> The callsite in common_timer_get() has already a comment:
>> /*
>>
On 6/14/19 2:11 PM, Thomas Gleixner wrote:
> On Wed, 12 Jun 2019, Dmitry Safonov wrote:
>
>> From: Andrei Vagin
>>
>> Introduce offsets for time namespace. They will contain an adjustment
>> needed to convert clocks to/from host's.
>>
>> Allocat
On 6/14/19 1:27 PM, Peter Zijlstra wrote:
> On Fri, Jun 14, 2019 at 12:50:51PM +0100, Dmitry Safonov wrote:
>> On 6/14/19 11:08 AM, Vitaly Kuznetsov wrote:
>>> Peter Zijlstra writes:
>>>
>>>> @@ -182,7 +182,7 @@ void set_hv_tsccha
On 6/14/19 11:08 AM, Vitaly Kuznetsov wrote:
> Peter Zijlstra writes:
>
>> @@ -182,7 +182,7 @@ void set_hv_tscchange_cb(void (*cb)(void))
>> struct hv_reenlightenment_control re_ctrl = {
>> .vector = HYPERV_REENLIGHTENMENT_VECTOR,
>> .enabled = 1,
>> -.t
From: Andrei Vagin
Adds boottime virtualisation for time namespace.
Introduce timespec for boottime clock into timens offsets and wire
clock_gettime() syscall.
Signed-off-by: Andrei Vagin
Co-developed-by: Dmitry Safonov
Signed-off-by: Dmitry Safonov
---
include/linux/time_namespace.h | 9
, add Kconfig dependency for arch.
Signed-off-by: Andrei Vagin
Co-developed-by: Dmitry Safonov
Signed-off-by: Dmitry Safonov
---
arch/Kconfig | 5
arch/x86/Kconfig | 1 +
arch/x86/entry/vdso/vclock_gettime.c | 43 +++
arc
n why we need a separate callback to return
clock value in ktime_t.
Suggested-by: Thomas Gleixner
Signed-off-by: Andrei Vagin
Co-developed-by: Dmitry Safonov
Signed-off-by: Dmitry Safonov
---
include/linux/posix-timers.h | 3 ++
kernel/time/alarmtimer.c | 24 ++---
kernel/tim
u.org/Time_namespace
Link: https://lists.openvz.org/pipermail/criu/2018-June/041504.html
Signed-off-by: Andrei Vagin
Co-developed-by: Dmitry Safonov
Signed-off-by: Dmitry Safonov
---
MAINTAINERS| 2 +
fs/proc/namespaces.c | 4 +
include/linux/nsproxy.h
Treat ia32/i386 objects in array the same As for 64-bit vdso objects.
This is a preparation ground to avoid code duplication on introduction
timens vdso.
Co-developed-by: Andrei Vagin
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso/Makefile | 15
Respect boottime inside time namespace for /proc/uptime
Co-developed-by: Andrei Vagin
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Safonov
---
fs/proc/uptime.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/proc/uptime.c b/fs/proc/uptime.c
index a4c2791ab70b..5a1b228964fb
From: Andrei Vagin
Make timerfd respect timens offsets.
Provide a helper timens_ktime_to_host() that is useful to wire up
timens to different kernel subsystems.
Signed-off-by: Andrei Vagin
Co-developed-by: Dmitry Safonov
Signed-off-by: Dmitry Safonov
---
fs/timerfd.c | 3
.
Co-developed-by: Andrei Vagin
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso/vdso2c.h | 2 +-
arch/x86/entry/vdso/vma.c| 113 +--
arch/x86/include/asm/vdso.h | 9 +--
3 files changed, 114 insertions(+), 10 deletions
err() message in main() is misleading: it should print `outfilename`,
which is argv[3], not argv[2].
Correct error messages to be more precise about what failed and for
which file.
Co-developed-by: Andrei Vagin
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso
From: Andrei Vagin
Wire timer_settime() syscall into time namespace virtualization.
Signed-off-by: Andrei Vagin
Co-developed-by: Dmitry Safonov
Signed-off-by: Dmitry Safonov
---
kernel/time/posix-timers.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/time/posix-timers.c b
From: Andrei Vagin
Wire up clock_nanosleep() to timens offsets.
Signed-off-by: Andrei Vagin
Co-developed-by: Dmitry Safonov
Signed-off-by: Dmitry Safonov
---
include/linux/hrtimer.h| 2 +-
kernel/time/alarmtimer.c | 2 ++
kernel/time/hrtimer.c | 8
kernel/time/posix
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso/vma.c | 28
arch/x86/include/asm/vdso.h | 1 +
kernel/time_namespace.c | 11 +++
3 files changed, 40 insertions(+)
diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c
index cc
To avoid any confusion with VVAR.
Co-developed-by: Andrei Vagin
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso/vdso2c.h | 2 +-
arch/x86/entry/vdso/vma.c| 6 +++---
arch/x86/include/asm/vdso.h | 2 +-
3 files changed, 5 insertions(+), 5 deletions
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Safonov
---
tools/testing/selftests/Makefile | 1 +
tools/testing/selftests/timens/.gitignore | 1 +
tools/testing/selftests/timens/Makefile | 5 +
tools/testing/selftests/timens/config | 1 +
tools/testing/selftests/timens
From: Andrei Vagin
API to set time namespace offsets for children processes, i.e.:
echo "clockid off_ses off_nsec" > /proc/self/timens_offsets
Signed-off-by: Andrei Vagin
Co-developed-by: Dmitry Safonov
Signed-off-by: Dmitry Safonov
---
fs/proc/base.c
From: Andrei Vagin
Check that clock_nanosleep() takes into account clock offsets.
Signed-off-by: Andrei Vagin
Co-developed-by: Dmitry Safonov
Signed-off-by: Dmitry Safonov
---
tools/testing/selftests/timens/.gitignore | 1 +
tools/testing/selftests/timens/Makefile | 2
CPU @ 2.40GHz
Co-developed-by: Dmitry Safonov
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/Makefile
index b58d34120fd8..c7bfd62d1fc3 100644
--- a
From: Andrei Vagin
Check that timer_create() takes into account clock offsets.
Signed-off-by: Andrei Vagin
Co-developed-by: Dmitry Safonov
Signed-off-by: Dmitry Safonov
---
tools/testing/selftests/timens/.gitignore | 1 +
tools/testing/selftests/timens/Makefile | 3 +-
tools/testing
Check that /proc/uptime is correct inside a new time namespace.
Co-developed-by: Andrei Vagin
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Safonov
---
tools/testing/selftests/timens/.gitignore | 1 +
tools/testing/selftests/timens/Makefile | 2 +-
tools/testing/selftests/timens
From: Andrei Vagin
Signed-off-by: Andrei Vagin
Co-developed-by: Dmitry Safonov
Signed-off-by: Dmitry Safonov
---
tools/testing/selftests/timens/.gitignore | 2 +
tools/testing/selftests/timens/Makefile | 8 +-
tools/testing/selftests/timens/gettime_perf.c | 74
From: Andrei Vagin
Signed-off-by: Andrei Vagin
Co-developed-by: Dmitry Safonov
Signed-off-by: Dmitry Safonov
---
tools/testing/selftests/timens/.gitignore | 1 +
tools/testing/selftests/timens/Makefile | 2 +-
tools/testing/selftests/timens/exec.c | 91 +++
3
by: Andrei Vagin
Co-developed-by: Dmitry Safonov
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso/vclock_gettime.c | 9 +--
arch/x86/entry/vdso/vdso-layout.lds.S | 1 +
arch/x86/entry/vdso/vdso2c.h | 11 +++-
arch/x86/entry/vdso/vma.c | 37 +++
From: Andrei Vagin
Check that timerfd_create() takes into account clock offsets.
Signed-off-by: Andrei Vagin
Co-developed-by: Dmitry Safonov
Signed-off-by: Dmitry Safonov
---
tools/testing/selftests/timens/.gitignore | 1 +
tools/testing/selftests/timens/Makefile | 2 +-
tools/testing
From: Andrei Vagin
Introduce offsets for time namespace. They will contain an adjustment
needed to convert clocks to/from host's.
Allocate one page for each time namespace that will be premapped into
userspace among vvar pages.
Signed-off-by: Andrei Vagin
Co-developed-by: Dmitry Sa
Align offsets so that time namespace will work for ia32 applications on
x86_64 host.
Co-developed-by: Andrei Vagin
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Safonov
---
include/linux/timens_offsets.h | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a
.7 | 188
The numbers gathered on Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz.
Cc: Adrian Reber
Cc: Andrei Vagin
Cc: Andy Lutomirski
Cc: Arnd Bergmann
Cc: Christian Brauner
Cc: Cyrill Gorcunov
Cc: Dmitry Safonov <0x7f454...@gmail.com>
Cc: "Eric W. Biederman"
Cc: "
space.
Co-developed-by: Andrei Vagin
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso/vdso2c.h | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/arch/x86/entry/vdso/vdso2c.h b/arch/x86/entry/vdso/vdso2c.h
index a20b134de2a8..80be339
this patch can be easily reverted.
Co-developed-by: Andrei Vagin
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso/vma.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c
index 8db1f59
From: Andrei Vagin
Add monotonic time virtualisation for time namespace.
Introduce timespec for monotionic clock into timens offsets and wire
clock_gettime() syscall.
Signed-off-by: Andrei Vagin
Co-developed-by: Dmitry Safonov
Signed-off-by: Dmitry Safonov
---
include/linux/time_namespace.h
On 6/12/19 1:00 PM, Petr Mladek wrote:
> On Wed 2019-06-12 17:36:43, Sergey Senozhatsky wrote:
>> On (06/06/19 09:10), Petr Mladek wrote:
>>> Just to be sure. I wanted to say that I like the idea with
>>> KERN_UNSUPRESSED. So, I think that we are on the same page.
>>
>> I understand. All I wanted t
p...@vger.kernel.org
Cc: x...@kernel.org
Reported-by: Prasanna Panchamukhi
Signed-off-by: Dmitry Safonov
---
arch/x86/hyperv/hv_init.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c
index 1608050e9df9..0bdd79ecbff
Hi guys,
I see that the thread is ongoing and you understand printk code much
better than me or probably anybody :)
So, feel free to reuse it. Or I can send v1 with split sysrq/printk
parts if you think it's worth being shaped further.
I think worth to mention three "features" that you might had
print the headers unsuppressed instead of changing
console_loglevel.
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: Petr Mladek
Cc: Sergey Senozhatsky
Cc: Steven Rostedt
Cc: Tetsuo Handa
Signed-off-by: Dmitry Safonov
---
(I'm not fond at all of this patch - sending as RFC just to touch
how you
On 4/25/19 7:32 PM, Jann Horn wrote:
> On Thu, Apr 25, 2019 at 6:14 PM Dmitry Safonov wrote:
>>
>> As it has been discussed on timens RFC, adding a new conditional branch
>> `if (inside_time_ns)` on VDSO for all processes is undesirable.
>> It will add a penalty for ev
On 4/25/19 7:41 PM, Jann Horn wrote:
> On Thu, Apr 25, 2019 at 6:17 PM Dmitry Safonov wrote:
>> Although, time namespace can work with VVAR VMA split, it seems worth
>> to forbid splitting VVAR resulting in stricter ABI and reducing amount
>> of corner-cases to consider
On 4/25/19 6:53 PM, Jann Horn wrote:
> On Thu, Apr 25, 2019 at 6:15 PM Dmitry Safonov wrote:
>> As it has been discussed on timens RFC, adding a new conditional branch
>> `if (inside_time_ns)` on VDSO for all processes is undesirable.
>> It will add a penalty for everybody as
From: Andrei Vagin
Add monotonic time virtualisation for time namespace.
Introduce timespec for monotionic clock into timens offsets and wire
clock_gettime() syscall.
Signed-off-by: Andrei Vagin
Co-developed-by: Dmitry Safonov
Signed-off-by: Dmitry Safonov
---
include/linux/time_namespace.h
Respect boottime inside time namespace for /proc/uptime
Signed-off-by: Dmitry Safonov
---
fs/proc/uptime.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/proc/uptime.c b/fs/proc/uptime.c
index a4c2791ab70b..5a1b228964fb 100644
--- a/fs/proc/uptime.c
+++ b/fs/proc/uptime.c
@@ -5,6
From: Andrei Vagin
Make timerfd respect timens offsets.
Provide a helper timens_ktime_to_host() that is useful to wire up
timens to different kernel subsystems.
Signed-off-by: Andrei Vagin
Co-developed-by: Dmitry Safonov
Signed-off-by: Dmitry Safonov
---
fs/timerfd.c | 8
From: Andrei Vagin
Wire timer_settime() syscall into time namespace virtualization.
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Safonov
---
kernel/time/alarmtimer.c | 3 +++
kernel/time/posix-timers.c | 2 ++
2 files changed, 5 insertions(+)
diff --git a/kernel/time/alarmtimer.c b
From: Andrei Vagin
Wire up clock_nanosleep() to timens offsets.
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Safonov
---
kernel/time/alarmtimer.c | 2 ++
kernel/time/posix-stubs.c | 8
kernel/time/posix-timers.c | 12 ++--
3 files changed, 16 insertions(+), 6
space.
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso/vdso2c.h | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/arch/x86/entry/vdso/vdso2c.h b/arch/x86/entry/vdso/vdso2c.h
index fa847a620f40..61c8bb2e5af8 100644
--- a/arch/x86/entry/vdso/vdso2c.h
+++ b/arch/x86/
this patch can be easily reverted.
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso/vma.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c
index babc4e7a519c..ff9875a4d53b 100644
--- a/arch/x86/entry/vdso/vma.c
+++ b/arc
, add Kconfig dependency for arch.
Signed-off-by: Andrei Vagin
Co-developed-by: Dmitry Safonov
Signed-off-by: Dmitry Safonov
---
arch/Kconfig | 5
arch/x86/Kconfig | 1 +
arch/x86/entry/vdso/vclock_gettime.c | 43 +++
arc
alternative approach has being considered:
to omit no-ops - memcpy() the following asm ret sequience on the place of
a function call: https://github.com/0x7f454c46/linux/commit/4cc0180f6d65
Having in mind possible issues with different toolchains, the usual
static_branch() approach was choosen.
Cc: D
To avoid any confusion with VVAR.
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso/vdso2c.h | 2 +-
arch/x86/entry/vdso/vma.c| 6 +++---
arch/x86/include/asm/vdso.h | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/x86/entry/vdso/vdso2c.h b/arch/x86/entry
.
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso/vdso2c.h | 2 +-
arch/x86/entry/vdso/vma.c| 36 +++-
arch/x86/include/asm/vdso.h | 9 +
3 files changed, 37 insertions(+), 10 deletions(-)
diff --git a/arch/x86/entry/vdso/vdso2c.h b/arch/x86
From: Andrei Vagin
Check that timerfd_create() takes into account clock offsets.
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Safonov
---
tools/testing/selftests/timens/.gitignore | 1 +
tools/testing/selftests/timens/Makefile | 2 +-
tools/testing/selftests/timens/timerfd.c
From: Andrei Vagin
API to set time namespace offsets for children processes, i.e.:
echo "clockid off_ses off_nsec" > /proc/self/timens_offsets
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Safonov
---
fs/proc/base.c | 101 +
From: Andrei Vagin
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Safonov
---
tools/testing/selftests/timens/.gitignore | 1 +
tools/testing/selftests/timens/Makefile | 2 +-
tools/testing/selftests/timens/exec.c | 91 +++
3 files changed, 93 insertions(+), 1
CPU @ 2.40GHz
Co-developed-by: Dmitry Safonov
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/Makefile
index bc0bdbf49397..9b45aafdfcfe 100644
--- a
From: Andrei Vagin
Check that clock_nanosleep() takes into account clock offsets.
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Safonov
---
tools/testing/selftests/timens/.gitignore | 1 +
tools/testing/selftests/timens/Makefile | 2 +-
.../selftests/timens
From: Andrei Vagin
Check that timer_create() takes into account clock offsets.
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Safonov
---
tools/testing/selftests/timens/.gitignore | 1 +
tools/testing/selftests/timens/Makefile | 3 +-
tools/testing/selftests/timens/timer.c| 116
Check that /proc/uptime is correct inside a new time namespace.
Co-developed-by: Andrei Vagin
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Safonov
---
tools/testing/selftests/timens/.gitignore | 1 +
tools/testing/selftests/timens/Makefile | 2 +-
tools/testing/selftests/timens
Align offsets so that time namespace will work for ia32 applications on
x86_64 host.
Signed-off-by: Dmitry Safonov
---
include/linux/timens_offsets.h | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/include/linux/timens_offsets.h b/include/linux/timens_offsets.h
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Safonov
---
tools/testing/selftests/Makefile | 1 +
tools/testing/selftests/timens/.gitignore | 1 +
tools/testing/selftests/timens/Makefile | 5 +
tools/testing/selftests/timens/config | 1 +
tools/testing/selftests/timens
From: Andrei Vagin
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Safonov
---
tools/testing/selftests/timens/.gitignore | 2 +
tools/testing/selftests/timens/Makefile | 8 +-
tools/testing/selftests/timens/gettime_perf.c | 74 +++
.../selftests/timens
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso/vma.c | 29 +
arch/x86/include/asm/vdso.h | 1 +
kernel/time_namespace.c | 11 +++
3 files changed, 41 insertions(+)
diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c
index 6a
Treat ia32/i386 objects in array the same As for 64-bit vdso objects.
This is a preparation ground to avoid code duplication on introduction
timens vdso.
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso/Makefile | 15 +--
1 file changed, 5 insertions(+), 10 deletions(-)
diff
err() message in main() is misleading: it should print `outfilename`,
which is argv[3], not argv[2].
Correct error messages to be more precise about what failed and for
which file.
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso/vdso2c.c | 4 ++--
1 file changed, 2 insertions(+), 2
d on Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz.
Cc: Adrian Reber
Cc: Andrei Vagin
Cc: Andy Lutomirski
Cc: Arnd Bergmann
Cc: Christian Brauner
Cc: Cyrill Gorcunov
Cc: Dmitry Safonov <0x7f454...@gmail.com>
Cc: "Eric W. Biederman"
Cc: "H. Peter Anvin"
Cc: Ingo Molnar
Cc
From: Andrei Vagin
Adds boottime virtualisation for time namespace.
Introduce timespec for boottime clock into timens offsets and wire
clock_gettime() syscall.
Signed-off-by: Andrei Vagin
Co-developed-by: Dmitry Safonov
Signed-off-by: Dmitry Safonov
---
include/linux/time_namespace.h | 9
From: Andrei Vagin
Introduce offsets for time namespace. They will contain an adjustment
needed to convert clocks to/from host's.
Allocate one page for each time namespace that will be premapped into
userspace among vvar pages.
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Sa
join a namespace.
This scheme allows setting clock offsets for a namespace, before any
processes appear in it.
Link: https://criu.org/Time_namespace
Link: https://lists.openvz.org/pipermail/criu/2018-June/041504.html
Signed-off-by: Andrei Vagin
Co-developed-by: Dmitry Safonov
Signed-off-by: D
On 4/2/19 3:32 PM, Ben Hutchings wrote:
> On Tue, 2019-04-02 at 15:22 +0100, Dmitry Safonov wrote:
>> Hi Ben,
>>
>> JFI: I haven't checked your tree, but the same patches set contains fixes
>> that are more important to my mind (looking at 4.9 stable tree):
>>
already in your tree)
Thanks,
Dmitry
On Tue, 2 Apr 2019 at 14:44, Ben Hutchings wrote:
>
> 3.16.65-rc1 review patch. If anyone has any objections, please let me know.
>
> --
>
> From: Dmitry Safonov
>
> commit 231f8fd0cca078bd4396dd7e380db813ac5736e2 upst
Hi Alexander,
On 4/1/19 4:40 PM, Alexander Duyck wrote:
>> @@ -333,8 +328,7 @@ static struct tnode *tnode_alloc(int bits)
>> {
>> size_t size;
>>
>> -/* verify bits is within bounds */
>> -if (bits > TNODE_VMALLOC_MAX)
>> +if ((BITS_PER_LONG <= KEYLENGTH) && unlikely(bits >= BI
On 3/26/19 3:39 PM, David Ahern wrote:
> On 3/26/19 9:30 AM, Dmitry Safonov wrote:
>> Fib trie has a hard-coded sync_pages limit to call synchronise_rcu().
>> The limit is 128 pages or 512Kb (considering common case with 4Kb
>> pages).
>>
>> Unfortunately, at Arist
On 3/4/19 3:46 PM, James Sewart wrote:
> +static inline int domain_is_initialised(struct dmar_domain *domain)
> +{
> + return domain->flags & DOMAIN_FLAG_INITIALISED;
> +}
Maybe check it in intel_iommu_domain_free(), eh?
Thanks,
Dmitry
On 2/25/19 11:31 PM, Eric Dumazet wrote:
> On 02/25/2019 03:21 PM, Dmitry Safonov wrote:
>> Well, sure - but it seems confusing that rtnl_unregister() will require
>> synchronize_rcu(), while rtnl_unregister_all() will not.
>
> rtnl_unregister_all() is a different beast,
On 2/25/19 11:21 PM, Dmitry Safonov wrote:
> Hi Eric,
>
> On 2/25/19 11:09 PM, Eric Dumazet wrote:
>> On 02/25/2019 01:27 PM, Dmitry Safonov wrote:
>>> While it's possible to document that rtnl_unregister() requires
>>> synchronize_net() afterwards - u
Hi Eric,
On 2/25/19 11:09 PM, Eric Dumazet wrote:
> On 02/25/2019 01:27 PM, Dmitry Safonov wrote:
>> While it's possible to document that rtnl_unregister() requires
>> synchronize_net() afterwards - unlike rtnl_unregister_all(), I believe
>> the module e
Fixes: 6853dd488119 ("rtnetlink: protect handler table with rcu")
Cc: "David S. Miller"
Cc: Florian Westphal
Cc: "Hannes Frederic Sowa"
Cc: net...@vger.kernel.org
Signed-off-by: Dmitry Safonov
---
net/core/rtnetlink.c | 4 +++-
1 file changed, 3 insertions(+), 1 de
On 2/8/19 9:57 AM, Thomas Gleixner wrote:
> On Thu, 7 Feb 2019, Rasmus Villemoes wrote:
>
> Cc: + Vincenzo, Will
>
>> On 06/02/2019 01.10, Dmitry Safonov wrote:
>>> As it has been discussed on timens RFC, adding a new conditional branch
>>> `if (inside_ti
Hi Rasmus,
On 2/7/19 8:31 AM, Rasmus Villemoes wrote:
> These (14-19, if I'm reading them right) seems to add quite a lot of
> complexity and fragility to the build, and other architectures would
> probably have to add something similar to their vdso builds.
>
> I'm wondering why not make the rul
From: Andrei Vagin
Add monotonic time virtualisation for time namespace.
Introduce timespec for monotionic clock into timens offsets and wire
clock_gettime() syscall.
Signed-off-by: Andrei Vagin
Co-developed-by: Dmitry Safonov
Signed-off-by: Dmitry Safonov
---
include/linux/time_namespace.h
From: Andrei Vagin
Wire timer_settime() syscall into time namespace virtualization.
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Safonov
---
kernel/time/posix-timers.c | 13 +
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/kernel/time/posix-timers.c b/kernel
Respect boottime inside time namespace for /proc/uptime
Signed-off-by: Dmitry Safonov
---
fs/proc/uptime.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/proc/uptime.c b/fs/proc/uptime.c
index a4c2791ab70b..4421ec058472 100644
--- a/fs/proc/uptime.c
+++ b/fs/proc/uptime.c
@@ -5,6
Vagin
Co-developed-by: Dmitry Safonov
Signed-off-by: Dmitry Safonov
---
fs/timerfd.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/fs/timerfd.c b/fs/timerfd.c
index 803ca070d42e..c7ae1e371912 100644
--- a/fs/timerfd.c
+++ b/fs/timerfd.c
@@ -26,6 +26,7
From: Andrei Vagin
Introduce offsets for time namespace. They will contain an adjustment
needed to convert clocks to/from host's.
Allocate one page for each time namespace that will be premapped into
userspace among vvar pages.
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Sa
err() message in main() is misleading: it should print `outfilename`,
which is argv[3], not argv[2].
Correct error messages to be more precise about what failed and for
which file.
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso/vdso2c.c | 4 ++--
1 file changed, 2 insertions(+), 2
join a namespace.
This scheme allows setting clock offsets for a namespace, before any
processes appear in it.
Link: https://criu.org/Time_namespace
Link: https://lists.openvz.org/pipermail/criu/2018-June/041504.html
Signed-off-by: Andrei Vagin
Co-developed-by: Dmitry Safonov
Signed-off-by: D
with -ffunction-sections so that VDSO entries can be
aligned on the same addresses with linker script magic.
Put ia32 functions those are written in assembly into corresponding
sections.
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso/Makefile | 2 +-
arch/x86/entry/vdso/vds
bigger in .text than VDSO for
tasks outside namespace, this parameter will be used to generate
.entries file from timens VDSO and include those aligns into linker
script for !timens VDSO building.
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso/.gitignore | 1 +
arch/x86/entry/vdso/Makefile
.
Suggested-by: Andy Lutomirski
Suggested-by: Thomas Gleixner
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso/Makefile | 28 +--
arch/x86/entry/vdso/vclock_gettime-timens.c | 6
.../entry/vdso/vdso32/vclock_gettime-timens.c | 6
3 files changed
From: Andrei Vagin
Wire up clock_nanosleep() to timens offsets.
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Safonov
---
kernel/time/hrtimer.c | 8
1 file changed, 8 insertions(+)
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index f5cfa1b73d6f..47345aea406d
space.
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso/vdso2c.h | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/arch/x86/entry/vdso/vdso2c.h b/arch/x86/entry/vdso/vdso2c.h
index fa847a620f40..61c8bb2e5af8 100644
--- a/arch/x86/entry/vdso/vdso2c.h
+++ b/arch/x86/
ed-by: Dmitry Safonov
Signed-off-by: Dmitry Safonov
---
arch/Kconfig | 5
arch/x86/Kconfig | 1 +
arch/x86/entry/vdso/vclock_gettime.c | 42 +++
arch/x86/entry/vdso/vdso-layout.lds.S | 9 +-
arch/x86/entry/vdso/vds
Initialize both 64-bit VDSO(s): host .so and timens one that has code
for adding timens offsets.
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso/vma.c | 4
arch/x86/include/asm/vdso.h | 6 ++
2 files changed, 10 insertions(+)
diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86
s for host with addresses generated from timens VDSO
(which is bigger as it has code for adding offsets).
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso/vdso-layout.lds.S | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/arch/x86/entry/vdso/vdso-layout.lds.S
b
From: Andrei Vagin
Check that timerfd_create() takes into account clock offsets.
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Safonov
---
tools/testing/selftests/timens/.gitignore | 1 +
tools/testing/selftests/timens/Makefile | 2 +-
tools/testing/selftests/timens/timerfd.c
Signed-off-by: Dmitry Safonov
---
arch/x86/entry/vdso/.gitignore | 1 +
arch/x86/entry/vdso/Makefile | 18 ++
arch/x86/entry/vdso/vdso-timens.lds.S | 7 +++
arch/x86/entry/vdso/vdso32/.gitignore | 1 +
arch/x86/entry/vds
magic to fit with entries from timens)
To adjust entries on host vdso, *.lds includes *.entries.
Those are generated by vdso2c while parsing timens vdso.
Linker doesn't allow going back on some addresses, so sort entries
to timens VDSO before writing them to .entries file.
Signed-off-by: D
From: Andrei Vagin
API to set time namespace offsets for children processes, i.e.:
echo "clockid off_ses off_nsec" > /proc/self/timens_offsets
Signed-off-by: Andrei Vagin
Signed-off-by: Dmitry Safonov
---
fs/proc/base.c | 101 +
301 - 400 of 1001 matches
Mail list logo