<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-next.git/lib/vdso, branch master</title>
<subtitle>Linux kernel latest source</subtitle>
<id>http://mirrors.hust.edu.cn/git/linux-next.git/atom?h=master</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/linux-next.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/'/>
<updated>2026-07-15T08:49:03+00:00</updated>
<entry>
<title>vdso: Rename HAVE_GENERIC_VDSO to VDSO_DATASTORE</title>
<updated>2026-07-15T08:49:03+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2026-07-09T07:28:42+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=ecacc9c8d3ed0f63065f4a1e94bfd8bf65a3ffaf'/>
<id>urn:sha1:ecacc9c8d3ed0f63065f4a1e94bfd8bf65a3ffaf</id>
<content type='text'>
Over time the meaning of HAVE_GENERIC_VDSO has become off.
Today it only controls the availability of the vDSO datastore.

Rename the symbol to match its function.

Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Reviewed-by: Vincenzo Frascino &lt;vincenzo.frascino@arm.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@oss.qualcomm.com&gt;
Link: https://patch.msgid.link/20260709-vdso-have_generic_vdso-v1-6-d2e1061f268b@linutronix.de
</content>
</entry>
<entry>
<title>vdso: Automatically select HAVE_GENERIC_VDSO if necessary</title>
<updated>2026-07-15T08:49:02+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2026-07-09T07:28:40+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=faeff8d416c4c324030d1296a545024c44ddac51'/>
<id>urn:sha1:faeff8d416c4c324030d1296a545024c44ddac51</id>
<content type='text'>
gettimeofday() and getrandom() in the vDSO require the vDSO datastore.

Enable it automatically if either one of them is enabled so the
architecture code doesn't need to know this.

Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Reviewed-by: Vincenzo Frascino &lt;vincenzo.frascino@arm.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@oss.qualcomm.com&gt;
Link: https://patch.msgid.link/20260709-vdso-have_generic_vdso-v1-4-d2e1061f268b@linutronix.de
</content>
</entry>
<entry>
<title>vdso/gettimeofday: Verify COMPAT_32BIT_TIME interactions</title>
<updated>2026-07-07T21:52:54+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2026-07-02T08:21:33+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=369cecd238ac8317cccd27cf2452a8a6b6da1581'/>
<id>urn:sha1:369cecd238ac8317cccd27cf2452a8a6b6da1581</id>
<content type='text'>
If CONFIG_COMPAT_32BIT_TIME is disabled then the vDSO should not
provide any 32-bit time related functionality.

Add some build-time validations to make sure the architecture-specific
glue satisfies this requirement.

Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@oss.qualcomm.com&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Link: https://patch.msgid.link/20260702-vdso-compat_32bit_time-v3-9-db9f36d8d432@linutronix.de
</content>
</entry>
<entry>
<title>vdso/gettimeofday: Validate system call existence for time() and gettimeofday()</title>
<updated>2026-07-07T21:52:53+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2026-07-02T08:21:26+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=f8b946772554ea11380fe03fc446376794a81a36'/>
<id>urn:sha1:f8b946772554ea11380fe03fc446376794a81a36</id>
<content type='text'>
Not all architectures have the system calls for time() and
gettimeofday(). When the system call is missing, the vDSO function
should also not be present.

Validate that.

Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@oss.qualcomm.com&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Link: https://patch.msgid.link/20260702-vdso-compat_32bit_time-v3-2-db9f36d8d432@linutronix.de
</content>
</entry>
<entry>
<title>vdso/datastore: Simplify the mapping logic for VDSO_TIME_PAGE_OFFSET</title>
<updated>2026-07-07T21:52:53+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2026-06-30T07:32:00+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=0b50763e8439b171d8fe2c6df0d27705fa89f21a'/>
<id>urn:sha1:0b50763e8439b171d8fe2c6df0d27705fa89f21a</id>
<content type='text'>
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 &lt;thomas.weissschuh@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Link: https://patch.msgid.link/20260630-vdso-mlockall-v4-6-6c93708ce723@linutronix.de
</content>
</entry>
<entry>
<title>vdso/datastore: Allow prefaulting by mlockall()</title>
<updated>2026-07-07T21:52:52+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2026-06-30T07:31:59+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=c27e727c9a60e6303088a956eea45b6b5c02cef3'/>
<id>urn:sha1:c27e727c9a60e6303088a956eea45b6b5c02cef3</id>
<content type='text'>
While mlockall() is meant to lock page *memory*, effectively it will
also create and lock the corresponding page table entries.
Latency-sensitive applications expect not to experience any pagefaults
after calling mlockall(). However mlockall() ignores VM_IO mappings,
which is used by the generic vDSO datastore.
While the fault handler itself is very fast, going through the full
pagefault exception handling is much slower, on the order of 20us in a
test machine.

Since the memory behind the datastore mappings is always present and
accessible it is not necessary to use VM_IO for them.

The data page mapping is now also aligned with the architecture-specific
code pages. Some architecture-specific data pages, like the x86 VCLOCK
pages, continue to use VM_IO as they are not always mappable. They will
require their own special handling later when the general approach has
been agreed upon.

As a side-effect this will allow GUP on these pages and allow more ways
to access the data in them. This is fine, as all data in this mapping
is globally visible anyways. Either because it is mapped into all tasks,
or in the case of the time namespace pages, can be read from procfs.

Regular mlock() would also work, but userspace does not know the boundaries
of the vDSO.

Reported-by: Nam Cao &lt;namcao@linutronix.de&gt;
Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Tested-by: Nam Cao &lt;namcao@linutronix.de&gt;
Link: https://patch.msgid.link/20260630-vdso-mlockall-v4-5-6c93708ce723@linutronix.de
</content>
</entry>
<entry>
<title>vdso/datastore: Explicitly prevent remote access to timens vvar page</title>
<updated>2026-07-07T21:52:52+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2026-06-30T07:31:58+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=9ab500d47f5f1b8c463a4fd8f345a8756da625ab'/>
<id>urn:sha1:9ab500d47f5f1b8c463a4fd8f345a8756da625ab</id>
<content type='text'>
The fault handler for the timens page does not have access to the target
task and therefore can not be invoked remotely.
Currently the handler relies on the fact that the vvar mapping is marked as
VM_IO and VM_PFNMAP for which the mm core always prevents remote access.
However the VM_IO and VM_PFNMAP flags are going to be removed.

Add an explicit check to prevent remote access to the mapping.

Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Tested-by: Nam Cao &lt;namcao@linutronix.de&gt;
Link: https://patch.msgid.link/20260630-vdso-mlockall-v4-4-6c93708ce723@linutronix.de
</content>
</entry>
<entry>
<title>vdso/datastore: Map zeroed pages for unavailable data</title>
<updated>2026-07-07T21:52:52+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2026-06-30T07:31:57+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=43648f9f3a67125ba649027a5be00bc005065482'/>
<id>urn:sha1:43648f9f3a67125ba649027a5be00bc005065482</id>
<content type='text'>
mlockall() stops if a page in a VMA is unmappable. As the datastore VMA
can contain holes, mlockall() would not process all data pages.

Replace the mapping error VM_FAULT_SIGBUS by just mapping the underlying
unused and zeroed-out data page. The vDSO will not access these pages in
any case and for other userspace these pages have undefined contents.

This will allow mlockall() to process all pages within the VMA as soon
as VM_IO is removed from the VMA.

Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Tested-by: Nam Cao &lt;namcao@linutronix.de&gt;
Link: https://patch.msgid.link/20260630-vdso-mlockall-v4-3-6c93708ce723@linutronix.de
</content>
</entry>
<entry>
<title>vdso/datastore: Map pages in terms of the faults pgoff</title>
<updated>2026-07-07T21:52:52+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2026-06-30T07:31:56+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=7557273419dd618df6d83ed37449b0e5918fd501'/>
<id>urn:sha1:7557273419dd618df6d83ed37449b0e5918fd501</id>
<content type='text'>
To support mlockall() on the datapages the VMA can have no holes where
inner pages return VM_FAULT_SIGBUS. An upcoming change will avoid these
holes by mapping a zeroed pages into these holes. That logic will be
simpler when the mapping logic is based on vmf-&gt;pgoff instead of the
vdso_k_ symbols.

Switch to the equivalent vmf-&gt;pgoff logic.

Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Tested-by: Nam Cao &lt;namcao@linutronix.de&gt;
Link: https://patch.msgid.link/20260630-vdso-mlockall-v4-2-6c93708ce723@linutronix.de
</content>
</entry>
<entry>
<title>vdso/datastore: Rename data pages variable</title>
<updated>2026-07-07T21:52:52+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2026-06-30T07:31:55+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=ff868f43eb8faf77498efcb206b721e406714e3e'/>
<id>urn:sha1:ff868f43eb8faf77498efcb206b721e406714e3e</id>
<content type='text'>
An upcoming change will make this a file-scoped variable, for which it
should have a clearer name.

Rename the variable to prepare for that.

Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Tested-by: Nam Cao &lt;namcao@linutronix.de&gt;
Link: https://patch.msgid.link/20260630-vdso-mlockall-v4-1-6c93708ce723@linutronix.de
</content>
</entry>
</feed>
