From: "tip-bot2 for Thomas Weißschuh" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: thomas.weissschuh@linutronix.de,
Thomas Gleixner <tglx@kernel.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: timers/vdso] vdso/datastore: Simplify the mapping logic for VDSO_TIME_PAGE_OFFSET
Date: Tue, 07 Jul 2026 21:54:49 -0000 [thread overview]
Message-ID: <178346128997.744054.6259325533634025124.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260630-vdso-mlockall-v4-6-6c93708ce723@linutronix.de>
The following commit has been merged into the timers/vdso branch of tip:
Commit-ID: 0b50763e8439b171d8fe2c6df0d27705fa89f21a
Gitweb: https://git.kernel.org/tip/0b50763e8439b171d8fe2c6df0d27705fa89f21a
Author: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
AuthorDate: Tue, 30 Jun 2026 09:32:00 +02:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Tue, 07 Jul 2026 23:52:53 +02:00
vdso/datastore: Simplify the mapping logic for VDSO_TIME_PAGE_OFFSET
The logic for CONFIG_GENERIC_GETTIMEOFDAY=n and !timens_page is
identical now.
Use this to simplify the logic a bit.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260630-vdso-mlockall-v4-6-6c93708ce723@linutronix.de
---
lib/vdso/datastore.c | 28 +++++++++++++---------------
1 file changed, 13 insertions(+), 15 deletions(-)
diff --git a/lib/vdso/datastore.c b/lib/vdso/datastore.c
index d7ab077..1426bf4 100644
--- a/lib/vdso/datastore.c
+++ b/lib/vdso/datastore.c
@@ -76,22 +76,20 @@ static vm_fault_t vvar_fault(const struct vm_special_mapping *sm,
switch (vmf->pgoff) {
case VDSO_TIME_PAGE_OFFSET:
- if (!IS_ENABLED(CONFIG_GENERIC_GETTIMEOFDAY))
+ if (!IS_ENABLED(CONFIG_GENERIC_GETTIMEOFDAY) || !timens_page)
break;
- if (timens_page) {
- /*
- * Fault in VVAR page too, since it will be accessed
- * to get clock data anyway.
- */
- unsigned long addr;
- vm_fault_t err;
-
- addr = vmf->address + VDSO_TIMENS_PAGE_OFFSET * PAGE_SIZE;
- err = vmf_insert_page(vma, addr, page);
- if (unlikely(err & VM_FAULT_ERROR))
- return err;
- page = timens_page;
- }
+ /*
+ * Fault in VVAR page too, since it will be accessed
+ * to get clock data anyway.
+ */
+ unsigned long addr;
+ vm_fault_t err;
+
+ addr = vmf->address + VDSO_TIMENS_PAGE_OFFSET * PAGE_SIZE;
+ err = vmf_insert_page(vma, addr, page);
+ if (unlikely(err & VM_FAULT_ERROR))
+ return err;
+ page = timens_page;
break;
case VDSO_TIMENS_PAGE_OFFSET:
/*
prev parent reply other threads:[~2026-07-07 21:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 7:31 [PATCH v4 0/6] vdso/datastore: Allow prefaulting by mlockall() Thomas Weißschuh
2026-06-30 7:31 ` [PATCH v4 1/6] vdso/datastore: Rename data pages variable Thomas Weißschuh
2026-07-07 21:54 ` [tip: timers/vdso] " tip-bot2 for Thomas Weißschuh
2026-06-30 7:31 ` [PATCH v4 2/6] vdso/datastore: Map pages in terms of the faults pgoff Thomas Weißschuh
2026-07-07 21:54 ` [tip: timers/vdso] " tip-bot2 for Thomas Weißschuh
2026-06-30 7:31 ` [PATCH v4 3/6] vdso/datastore: Map zeroed pages for unavailable data Thomas Weißschuh
2026-07-07 21:54 ` [tip: timers/vdso] " tip-bot2 for Thomas Weißschuh
2026-06-30 7:31 ` [PATCH v4 4/6] vdso/datastore: Explicitly prevent remote access to timens vvar page Thomas Weißschuh
2026-07-07 21:54 ` [tip: timers/vdso] " tip-bot2 for Thomas Weißschuh
2026-06-30 7:31 ` [PATCH v4 5/6] vdso/datastore: Allow prefaulting by mlockall() Thomas Weißschuh
2026-07-07 21:54 ` [tip: timers/vdso] " tip-bot2 for Thomas Weißschuh
2026-06-30 7:32 ` [PATCH v4 6/6] vdso/datastore: Simplify the mapping logic for VDSO_TIME_PAGE_OFFSET Thomas Weißschuh
2026-07-07 21:54 ` tip-bot2 for Thomas Weißschuh [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=178346128997.744054.6259325533634025124.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=tglx@kernel.org \
--cc=thomas.weissschuh@linutronix.de \
--cc=x86@kernel.org \
/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®