<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/amd64/include/atomic.h, branch stable/13</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=stable%2F13</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=stable%2F13'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2025-01-17T12:24:53Z</updated>
<entry>
<title>x86 atomics: Remove unused WANT_FUNCTIONS</title>
<updated>2025-01-17T12:24:53Z</updated>
<author>
<name>Olivier Certner</name>
<email>olce@FreeBSD.org</email>
</author>
<published>2024-12-09T16:13:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b6a3bda9bc2eebbc7630ec7a9ccb27ca923ef596'/>
<id>urn:sha1:b6a3bda9bc2eebbc7630ec7a9ccb27ca923ef596</id>
<content type='text'>
This macro has not been in use since commit "inline atomics and allow tied
modules to inline locks" (r335873, f4b3640475cec929).

Reviewed by:    markj, kib, emaste, imp
MFC after:      5 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D48061

(cherry picked from commit fa368cc86cebe7185b3a99d4f6083033da377eee)
</content>
</entry>
<entry>
<title>atomics: Constify loads</title>
<updated>2025-01-17T12:24:48Z</updated>
<author>
<name>Olivier Certner</name>
<email>olce@FreeBSD.org</email>
</author>
<published>2024-07-19T15:23:19Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e6e9e70e51d987c54535b8714dc040fae68ac148'/>
<id>urn:sha1:e6e9e70e51d987c54535b8714dc040fae68ac148</id>
<content type='text'>
In order to match reality, allow using these functions with pointers on
const objects, and bring us closer to C11.

Remove the '+' modifier in the atomic_load_acq_64_i586()'s inline asm
statement's constraint for '*p' (the value to load).  CMPXCHG8B always
writes back some value, even when the value exchange does not happen in
which case what was read is written back.  atomic_load_acq_64_i586()
further takes care of the operation atomically writing back the same
value that was read in any case.  All in all, this makes the inline
asm's write back undetectable by any other code, whether executing on
other CPUs or code on the same CPU before and after the call to
atomic_load_acq_64_i586(), except for the fact that CMPXCHG8B will
trigger a #GP(0) if the memory address is part of a read-only mapping.
This unfortunate property is however out of scope of the C abstract
machine, and in particular independent of whether the 'uint64_t' pointed
to is declared 'const' or not.

Approved by:    markj (mentor)
MFC after:      5 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D46887

(cherry picked from commit 5e9a82e898d55816c366cfa3ffbca84f02569fe5)
</content>
</entry>
<entry>
<title>sys: Remove $FreeBSD$: two-line .h pattern</title>
<updated>2023-08-23T17:43:20Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-22T01:31:02Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f8167e0404dab9ffeaca95853dd237ab7c587f82'/>
<id>urn:sha1:f8167e0404dab9ffeaca95853dd237ab7c587f82</id>
<content type='text'>
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/

Similar commit in current:
(cherry picked from commit 95ee2897e98f)
</content>
</entry>
<entry>
<title>spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD</title>
<updated>2023-07-25T15:13:49Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-05-10T15:40:58Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=caa41f641755c935b036e17440a3b49329c904ed'/>
<id>urn:sha1:caa41f641755c935b036e17440a3b49329c904ed</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

(cherry picked from commit 4d846d260e2b9a3d4d0a701462568268cbfe7a5b)
</content>
</entry>
<entry>
<title>Simplify kernel sanitizer interceptors</title>
<updated>2022-11-14T19:23:40Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2021-07-19T20:09:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=2b76d0699ed46ef956628c9509ecab56c55d2dde'/>
<id>urn:sha1:2b76d0699ed46ef956628c9509ecab56c55d2dde</id>
<content type='text'>
KASAN and KCSAN implement interceptors for various primitive operations
that are not instrumented by the compiler.  KMSAN requires them as well.
Rather than adding new cases for each sanitizer which requires
interceptors, implement the following protocol:
- When interceptor definitions are required, define
  SAN_NEEDS_INTERCEPTORS and SANITIZER_INTERCEPTOR_PREFIX.
- In headers that declare functions which need to be intercepted by a
  sanitizer runtime, use SANITIZER_INTERCEPTOR_PREFIX to provide
  declarations.
- When SAN_RUNTIME is defined, do not redefine the names of intercepted
  functions.  This is typically the case in files which implement
  sanitizer runtimes but is also needed in, for example, files which
  define ifunc selectors for intercepted operations.

MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit a90d053b84223a4e5cb65852a9b6193570ab1c7d)
</content>
</entry>
<entry>
<title>x86 atomic.h: remove obsoleted comment</title>
<updated>2022-02-11T10:52:55Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2022-02-03T17:46:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d07bca9b93fdb046af15b54f5b689c200ffab446'/>
<id>urn:sha1:d07bca9b93fdb046af15b54f5b689c200ffab446</id>
<content type='text'>
(cherry picked from commit 9596b349bb57e50a2baec8497ced9f712f08f147)
</content>
</entry>
<entry>
<title>x86 atomics: use lock prefix unconditionally</title>
<updated>2022-02-11T10:52:55Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2022-02-03T09:51:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9d1361ef0a3131d27c113893195642e53aea0043'/>
<id>urn:sha1:9d1361ef0a3131d27c113893195642e53aea0043</id>
<content type='text'>
(cherry picked from commit 9c0b759bf9b520537616d026f21a0a98d70acd11)
</content>
</entry>
<entry>
<title>x86 atomic.h: cleanup comments for preprocessor directives</title>
<updated>2022-02-11T10:52:55Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2022-02-03T09:25:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=725225a72a2a859762e8237b8202cc605a1dcac7'/>
<id>urn:sha1:725225a72a2a859762e8237b8202cc605a1dcac7</id>
<content type='text'>
(cherry picked from commit cbf999e75d61c6efadeed8d32212eefa4dfb3dcb)
</content>
</entry>
<entry>
<title>Generalize bus_space(9) and atomic(9) sanitizer interceptors</title>
<updated>2021-11-01T14:16:39Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2021-03-23T01:44:55Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=bf0986b742abaa493ed572391c798791468c702f'/>
<id>urn:sha1:bf0986b742abaa493ed572391c798791468c702f</id>
<content type='text'>
Make it easy to define interceptors for new sanitizer runtimes, rather
than assuming KCSAN.  Lay a bit of groundwork for KASAN and KMSAN.

When a sanitizer is compiled in, atomic(9) and bus_space(9) definitions
in atomic_san.h are used by default instead of the inline
implementations in the platform's atomic.h.  These definitions are
implemented in the sanitizer runtime, which includes
machine/{atomic,bus}.h with SAN_RUNTIME defined to pull in the actual
implementations.

No functional change intended.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 3ead60236fd25ce64fece7ae4a453318ca18c119)
</content>
</entry>
<entry>
<title>Rename _cscan_atomic.h and _cscan_bus.h to atomic_san.h and bus_san.h</title>
<updated>2021-03-15T15:39:11Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2021-03-08T17:39:06Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=980da033a8686bbe40ffb01435c0803af15b4a65'/>
<id>urn:sha1:980da033a8686bbe40ffb01435c0803af15b4a65</id>
<content type='text'>
Other kernel sanitizers (KMSAN, KASAN) require interceptors as well, so
put these in a more generic place as a step towards importing the other
sanitizers.

No functional change intended.

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D29103

(cherry picked from commit 435c7cfb2418fdac48fa53e29e38ef03646b817d)
</content>
</entry>
</feed>
