<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/amd64/linux/linux_vdso_gtod.c, branch stable/14</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>linux(4): Add a write syscall wrapper</title>
<updated>2023-08-20T07:36:29+00:00</updated>
<author>
<name>Dmitry Chagin</name>
<email>dchagin@FreeBSD.org</email>
</author>
<published>2023-08-20T07:36:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e58ff66464ac313296b683992c9131d7a85047de'/>
<id>e58ff66464ac313296b683992c9131d7a85047de</id>
<content type='text'>
Adding a write syscall wrapper is needed due to Linux family of write
syscalls doesn't distinguish between in kernel blocking operations
and always returns EAGAIN while FreeBSD can return ENOBUFS.

MFC after:		1 month
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adding a write syscall wrapper is needed due to Linux family of write
syscalls doesn't distinguish between in kernel blocking operations
and always returns EAGAIN while FreeBSD can return ENOBUFS.

MFC after:		1 month
</pre>
</div>
</content>
</entry>
<entry>
<title>linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743</title>
<updated>2023-08-18T10:12:02+00:00</updated>
<author>
<name>Dmitry Chagin</name>
<email>dchagin@FreeBSD.org</email>
</author>
<published>2023-08-18T10:12:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3460fab5fced39c7ea597cc7de0ebc3e4c88989a'/>
<id>3460fab5fced39c7ea597cc7de0ebc3e4c88989a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>sys: Remove $FreeBSD$: one-line .c pattern</title>
<updated>2023-08-16T17:54:36+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=685dc743dc3b5645e34836464128e1c0558b404b'/>
<id>685dc743dc3b5645e34836464128e1c0558b404b</id>
<content type='text'>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD</title>
<updated>2023-05-12T16:44:03+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-05-10T15:40:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=4d846d260e2b9a3d4d0a701462568268cbfe7a5b'/>
<id>4d846d260e2b9a3d4d0a701462568268cbfe7a5b</id>
<content type='text'>
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
</pre>
</div>
</content>
</entry>
<entry>
<title>linux(4): Rename linux_timer.h to linux_time.h</title>
<updated>2023-02-14T14:46:33+00:00</updated>
<author>
<name>Dmitry Chagin</name>
<email>dchagin@FreeBSD.org</email>
</author>
<published>2023-02-14T14:46:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c8a79231a5a74fc4263ec3d18c6519a974efb529'/>
<id>c8a79231a5a74fc4263ec3d18c6519a974efb529</id>
<content type='text'>
To avoid confusing people, rename linux_timer.h to linux_time.h,
as linux_timer.c is the implementation of timer syscalls only,
while linux_time.c contains implementation of all stuff declared
in linux_time.h.

MFC after:		2 weeks
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To avoid confusing people, rename linux_timer.h to linux_time.h,
as linux_timer.c is the implementation of timer syscalls only,
while linux_time.c contains implementation of all stuff declared
in linux_time.h.

MFC after:		2 weeks
</pre>
</div>
</content>
</entry>
<entry>
<title>linux(4): Implement vdso getcpu for x86.</title>
<updated>2022-05-08T14:20:52+00:00</updated>
<author>
<name>Dmitry Chagin</name>
<email>dchagin@FreeBSD.org</email>
</author>
<published>2022-05-08T14:20:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=5a6a4fb284b1a9c4b4105fd6ab8143356f3ef3f7'/>
<id>5a6a4fb284b1a9c4b4105fd6ab8143356f3ef3f7</id>
<content type='text'>
This is modeled after f2395455 (by kib@).

MFC after:		2 weeks
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is modeled after f2395455 (by kib@).

MFC after:		2 weeks
</pre>
</div>
</content>
</entry>
<entry>
<title>linux(4): Refactor vdso_gettc_x86 includes.</title>
<updated>2022-05-08T14:20:51+00:00</updated>
<author>
<name>Dmitry Chagin</name>
<email>dchagin@FreeBSD.org</email>
</author>
<published>2022-05-08T14:20:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=332eca05b557f4f9d108480688d9c0933f6ed06b'/>
<id>332eca05b557f4f9d108480688d9c0933f6ed06b</id>
<content type='text'>
Factor out includes from common vdso_gettc_x86 file to the corresponding
MD files.

MFC after:		2 weeks
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Factor out includes from common vdso_gettc_x86 file to the corresponding
MD files.

MFC after:		2 weeks
</pre>
</div>
</content>
</entry>
<entry>
<title>linux(4): Fix gcc buld.</title>
<updated>2021-07-29T06:52:33+00:00</updated>
<author>
<name>Dmitry Chagin</name>
<email>dchagin@FreeBSD.org</email>
</author>
<published>2021-07-29T06:52:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f33794014468562100f6f02ab8147b58bd9f82c0'/>
<id>f33794014468562100f6f02ab8147b58bd9f82c0</id>
<content type='text'>
gcc failed as it didn't inlined the builtins and generates calls to
the libgcc, ld can't find libgcc as cross-toolchain libgcc is not installed.
To avoid this add internal vDSO ffs functions without optimized builtins.

Reported by:		jhb
MFC after:		2 weeks
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gcc failed as it didn't inlined the builtins and generates calls to
the libgcc, ld can't find libgcc as cross-toolchain libgcc is not installed.
To avoid this add internal vDSO ffs functions without optimized builtins.

Reported by:		jhb
MFC after:		2 weeks
</pre>
</div>
</content>
</entry>
<entry>
<title>linux(4); Almost complete the vDSO.</title>
<updated>2021-07-20T07:01:18+00:00</updated>
<author>
<name>Dmitry Chagin</name>
<email>dchagin@FreeBSD.org</email>
</author>
<published>2021-07-20T07:01:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=9931033bbfbe56a037723638cf3712366c6d943f'/>
<id>9931033bbfbe56a037723638cf3712366c6d943f</id>
<content type='text'>
The vDSO (virtual dynamic shared object) is a small shared library that the
kernel maps R/O into the address space of all Linux processes on image
activation. The vDSO is a fully formed ELF image, shared by all processes
with the same ABI, has no process private data.

The primary purpose of the vDSO:
- non-executable stack, signal trampolines not copied to the stack;
- signal trampolines unwind, mandatory for the NPTL;
- to avoid contex-switch overhead frequently used system calls can be
  implemented in the vDSO: for now gettimeofday, clock_gettime.

The first two have been implemented, so add the implementation of system
calls.

System calls implemenation based on a native timekeeping code with some
limitations:
- ifunc can't be used, as vDSO r/o mapped to the process VA and rtld
  can't relocate symbols;
- reading HPET memory is not implemented for now (TODO).

In case on any error vDSO system calls fallback to the kernel system
calls. For unimplemented vDSO system calls added prototypes which call
corresponding kernel system call.

Tested by:		trasz (arm64)
Differential revision:  https://reviews.freebsd.org/D30900
MFC after:              2 weeks
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The vDSO (virtual dynamic shared object) is a small shared library that the
kernel maps R/O into the address space of all Linux processes on image
activation. The vDSO is a fully formed ELF image, shared by all processes
with the same ABI, has no process private data.

The primary purpose of the vDSO:
- non-executable stack, signal trampolines not copied to the stack;
- signal trampolines unwind, mandatory for the NPTL;
- to avoid contex-switch overhead frequently used system calls can be
  implemented in the vDSO: for now gettimeofday, clock_gettime.

The first two have been implemented, so add the implementation of system
calls.

System calls implemenation based on a native timekeeping code with some
limitations:
- ifunc can't be used, as vDSO r/o mapped to the process VA and rtld
  can't relocate symbols;
- reading HPET memory is not implemented for now (TODO).

In case on any error vDSO system calls fallback to the kernel system
calls. For unimplemented vDSO system calls added prototypes which call
corresponding kernel system call.

Tested by:		trasz (arm64)
Differential revision:  https://reviews.freebsd.org/D30900
MFC after:              2 weeks
</pre>
</div>
</content>
</entry>
</feed>
