From: no-reply@sashiko.virtuozzo.com
To: Eva Kurchatova <eva.kurchatova@virtuozzo.com>, khorenko@virtuozzo.com
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 v5 4/5] ms/timens: Remove dependency on the vDSO
Date: Wed, 21 Oct 2026 04:16:02 +0000 [thread overview]
Message-ID: <010701a15cac5e45-c0bbdeb0-cde1-42a5-8fca-4a4eee19e245-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261021040939.2103947-5-eva.kurchatova@virtuozzo.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] timens: frozen_offsets never set when TIME_NS=y and GENERIC_GETTIMEOFDAY=n
--
commit 8205eb8956867db8592649aad1330d2fd6faffba
Author: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
ms/timens: Remove dependency on the vDSO
This commit drops the "depends on GENERIC_GETTIMEOFDAY" line from
TIME_NS, so time namespaces can be enabled without the generic vDSO.
It adds a TIME_NS_VDSO symbol, and the vvar page handling and
timens_commit() are compiled only when that symbol is set.
Link: https://patch.msgid.link/20260326-vdso-timens-decoupling-v2-2-c82693a7775f@linutronix.de
> diff --git a/include/linux/time_namespace.h b/include/linux/time_namespace.h
> --- a/include/linux/time_namespace.h
> +++ b/include/linux/time_namespace.h
[ ... ]
> +#ifdef CONFIG_TIME_NS_VDSO
> +extern void timens_commit(struct task_struct *tsk, struct time_namespace *ns);
> +struct page *find_timens_vvar_page(struct vm_area_struct *vma);
> +#else /* !CONFIG_TIME_NS_VDSO */
> +static inline void timens_commit(struct task_struct *tsk, struct time_namespace *ns)
> +{
> +}
[Severity: Medium]
With TIME_NS=y and GENERIC_GETTIMEOFDAY=n, this empty timens_commit()
stub is what runs when a task joins a time namespace. The only place
that sets the freeze flag is timens_set_vvar_page() in namespace_vdso.c:
ns->frozen_offsets = true;
That function is reached only through timens_commit(), and
namespace_vdso.c is now built only under CONFIG_TIME_NS_VDSO.
As a result, frozen_offsets stays false after tasks have joined the
namespace. The guard in proc_timens_set_offset() in namespace.c never
triggers on these configurations:
if (time_ns->frozen_offsets) {
err = -EACCES;
goto out_unlock;
}
Can this let the monotonic and boottime offsets be rewritten through
/proc/<pid>/timens_offsets after tasks have entered the namespace?
Readers such as timens_ktime_to_host() read ns->offsets without
timens_offset_lock. Could they then see offsets that change while tasks
are running, or torn timespec64 values?
Should the freeze be done outside the vDSO-only path, for example from
the !CONFIG_TIME_NS_VDSO timens_commit() stub?
The only follow-up patch in the series (b20653c3) just adds
CONFIG_TIME_NS_VDSO=y to config.vz10.minimal and does not change this.
The upstream commit has the same behaviour.
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261021040939.2103947-1-eva.kurchatova@virtuozzo.com?part=4
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-10-21 4:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 4:08 [Devel] [PATCH hci-8.1 v5 0/5] timens: " Eva Kurchatova
2026-10-21 4:08 ` [Devel] [PATCH hci-8.1 v5 1/5] timens: make offset_lock private to namespace.c again Eva Kurchatova
2026-10-21 4:13 ` no-reply
2026-10-21 4:08 ` [Devel] [PATCH hci-8.1 v5 2/5] ms/vdso: Drop Kconfig GENERIC_VDSO_TIME_NS Eva Kurchatova
2026-10-21 4:14 ` no-reply
2026-10-21 4:26 ` Eva Kurchatova (Virtuozzo)
2026-10-21 4:08 ` [Devel] [PATCH hci-8.1 v5 3/5] ms/vdso/timens: Move functions to new file Eva Kurchatova
2026-10-21 4:15 ` no-reply
2026-10-21 4:08 ` [Devel] [PATCH hci-8.1 v5 4/5] ms/timens: Remove dependency on the vDSO Eva Kurchatova
2026-10-21 4:16 ` no-reply [this message]
2026-10-21 4:24 ` Eva Kurchatova (Virtuozzo)
2026-10-21 4:08 ` [Devel] [PATCH hci-8.1 v5 5/5] config: follow the TIME_NS Kconfig change in config.vz10.minimal Eva Kurchatova
2026-10-21 4:16 ` no-reply
2026-10-21 4:19 ` [Devel] [PATCH hci-8.1 v5 0/5] timens: Remove dependency on the vDSO Eva Kurchatova (Virtuozzo)
2026-10-21 12:29 ` Konstantin Khorenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=010701a15cac5e45-c0bbdeb0-cde1-42a5-8fca-4a4eee19e245-000000@eu-central-1.amazonses.com \
--to=no-reply@sashiko.virtuozzo.com \
--cc=devel@openvz.org \
--cc=eva.kurchatova@virtuozzo.com \
--cc=khorenko@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.