mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maoyi Xie <maoyixie.tju@gmail.com>
To: Elizabeth Figura <zfigura@codeweavers.com>,
	Thomas Gleixner <tglx@kernel.org>
Cc: Anna-Maria Behnsen <anna-maria@linutronix.de>,
	Frederic Weisbecker <frederic@kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: ntsync: absolute MONOTONIC timeout ignores time namespace offset
Date: Thu, 21 May 2026 23:39:28 +0800	[thread overview]
Message-ID: <20260521153928.3724328-1-maoyixie.tju@gmail.com> (raw)
In-Reply-To: <CAHPEe=G7A3qcsNJmXpF71iP2UTaQA_p630oYSPNhz4Sob4kJxg@mail.gmail.com>

Hi all,

Elizabeth confirmed this bug yesterday. Before I send a fix I would
like to check the export plan with the time namespace folks.

The fix calls timens_ktime_to_host(clock, timeout) on the non-REALTIME
branch in ntsync_schedule(). The helper is an inline in
<linux/time_namespace.h>. It references init_time_ns and
do_timens_ktime_to_host. Neither is exported.

All current users of the inline (timerfd, posix-timers, alarmtimer,
posix-stubs, futex, io_uring) are built-in. ntsync is tristate
(default m), so it is the first module that needs the helper.
Without the exports, modpost reports both symbols unresolved and
ntsync.ko does not load.

I was planning to send:

  1/2 time/namespace: export init_time_ns and do_timens_ktime_to_host
  2/2 ntsync: honour caller's time namespace for absolute MONOTONIC
              timeouts

I also considered these but they look weaker:

  - Flip CONFIG_NTSYNC to bool. Breaks module users.
  - Add a new exported wrapper that hides init_time_ns. Cleaner
    ABI but adds a helper for one caller.

If the export plan is OK I will send the series. If you prefer
something else please let me know and I will follow that.

Thanks for taking a look,
Maoyi

      parent reply	other threads:[~2026-05-21 15:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-18 10:21 Maoyi Xie
2026-05-21  3:44 ` Elizabeth Figura
2026-05-21 15:39 ` Maoyi Xie [this message]

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=20260521153928.3724328-1-maoyixie.tju@gmail.com \
    --to=maoyixie.tju@gmail.com \
    --cc=anna-maria@linutronix.de \
    --cc=arnd@arndb.de \
    --cc=frederic@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@kernel.org \
    --cc=zfigura@codeweavers.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®