<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/libkern, branch stable/14</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>libkern: Use proper prototype for SYSINIT functions</title>
<updated>2026-01-31T18:25:03+00:00</updated>
<author>
<name>Zhenlei Huang</name>
<email>zlei@FreeBSD.org</email>
</author>
<published>2025-10-13T10:12:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=5d1cf19810bb46afe3ed487a71971a2163f710d8'/>
<id>5d1cf19810bb46afe3ed487a71971a2163f710d8</id>
<content type='text'>
MFC after:	1 week

(cherry picked from commit 850a88e8db761c55b9aa56c2cf4da258dc61dec5)
(cherry picked from commit 2b27541988072b3c1e5f2f901e622f38af0be4c9)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MFC after:	1 week

(cherry picked from commit 850a88e8db761c55b9aa56c2cf4da258dc61dec5)
(cherry picked from commit 2b27541988072b3c1e5f2f901e622f38af0be4c9)
</pre>
</div>
</content>
</entry>
<entry>
<title>libkern: Avoid a one-byte OOB access in strndup()</title>
<updated>2025-12-15T14:12:39+00:00</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2025-12-08T14:08:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f6ad204da856e722b4995f929a09c96ccc38d537'/>
<id>f6ad204da856e722b4995f929a09c96ccc38d537</id>
<content type='text'>
If the length of the string is maxlen, we would end up copying maxlen+1
bytes, which violates the contract of the function.  The result is the
same since that extra byte is overwritten.

Reported by:	Kevin Day &lt;kevin@your.org&gt;
Reviewed by:	imp, kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54093

(cherry picked from commit 73586fcea630c2c4fb83e966920c039aee8a5fc9)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the length of the string is maxlen, we would end up copying maxlen+1
bytes, which violates the contract of the function.  The result is the
same since that extra byte is overwritten.

Reported by:	Kevin Day &lt;kevin@your.org&gt;
Reviewed by:	imp, kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54093

(cherry picked from commit 73586fcea630c2c4fb83e966920c039aee8a5fc9)
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix possible out of bounds read in armv8_crc32c</title>
<updated>2025-10-10T21:00:12+00:00</updated>
<author>
<name>Zhongqi Zhao</name>
<email>zz479@cam.ac.uk</email>
</author>
<published>2025-09-10T14:21:38+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=5660178fd14b9d45743231358f25dcbe801d090f'/>
<id>5660178fd14b9d45743231358f25dcbe801d090f</id>
<content type='text'>
Reviewed by:	andrew
Obtained from:	CheriBSD
Differential Revision:	https://reviews.freebsd.org/D52401

(cherry picked from commit f48b1a34ef859ca17de0cc9149cc22e07364ef85)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed by:	andrew
Obtained from:	CheriBSD
Differential Revision:	https://reviews.freebsd.org/D52401

(cherry picked from commit f48b1a34ef859ca17de0cc9149cc22e07364ef85)
</pre>
</div>
</content>
</entry>
<entry>
<title>libkern: Drop incorrect qsort optimization</title>
<updated>2025-08-27T18:49:58+00:00</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2025-08-15T18:01:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=935c26dbe3a6ce77cda9bd802fa45cdb938610a6'/>
<id>935c26dbe3a6ce77cda9bd802fa45cdb938610a6</id>
<content type='text'>
See 5205b32de3fb for details.

PR:		287089
MFC after:	1 week
Reviewed by:	jlduran
Differential Revision:	https://reviews.freebsd.org/D51919

(cherry picked from commit ef8f3e913156aa268e07ae1daa68e3bc3f1c4d29)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See 5205b32de3fb for details.

PR:		287089
MFC after:	1 week
Reviewed by:	jlduran
Differential Revision:	https://reviews.freebsd.org/D51919

(cherry picked from commit ef8f3e913156aa268e07ae1daa68e3bc3f1c4d29)
</pre>
</div>
</content>
</entry>
<entry>
<title>libkern: strdup.c, strndup.c: Prefer memcpy() over bcopy()</title>
<updated>2025-03-03T14:56:34+00:00</updated>
<author>
<name>Zhenlei Huang</name>
<email>zlei@FreeBSD.org</email>
</author>
<published>2025-02-17T15:37:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=588838aa2484619c93231aedb22c24e761d244da'/>
<id>588838aa2484619c93231aedb22c24e761d244da</id>
<content type='text'>
The newly allocated memory can not overlap with the string if the string
is properly null-terminated or the maxlen is a valid lengh, i.e no out
of bounds reads. Prefer memcpy() over memmove(), aka bcopy(), for slight
performance gain.

No functional change intended.

Reviewed by:	kib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D49026

(cherry picked from commit 90a3b6a7a4e4c8201ba1bb90fb8e2b088f3a5788)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The newly allocated memory can not overlap with the string if the string
is properly null-terminated or the maxlen is a valid lengh, i.e no out
of bounds reads. Prefer memcpy() over memmove(), aka bcopy(), for slight
performance gain.

No functional change intended.

Reviewed by:	kib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D49026

(cherry picked from commit 90a3b6a7a4e4c8201ba1bb90fb8e2b088f3a5788)
</pre>
</div>
</content>
</entry>
<entry>
<title>arm64: Mark the armv8 crc32c as supporting BTI</title>
<updated>2024-02-19T13:17:47+00:00</updated>
<author>
<name>Andrew Turner</name>
<email>andrew@FreeBSD.org</email>
</author>
<published>2023-11-14T15:01:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e7d2a96f4f9bf579e5fde5870772a39fb6ffac2a'/>
<id>e7d2a96f4f9bf579e5fde5870772a39fb6ffac2a</id>
<content type='text'>
This is built into a test so needs the BTI elf note for the rest of the
test to be built with BTI support enabled.

As the assembly uses the ENTRY macro it already supports BTI, so mark
it as such.

Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D42595

(cherry picked from commit 25d0310ed881e86cec9ab5cf37dd8471e88ad554)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is built into a test so needs the BTI elf note for the rest of the
test to be built with BTI support enabled.

As the assembly uses the ENTRY macro it already supports BTI, so mark
it as such.

Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D42595

(cherry picked from commit 25d0310ed881e86cec9ab5cf37dd8471e88ad554)
</pre>
</div>
</content>
</entry>
<entry>
<title>sys: Remove $FreeBSD$: one-line sh pattern</title>
<updated>2023-08-16T17:54:58+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=031beb4e239bfce798af17f5fe8dba8bcaf13d99'/>
<id>031beb4e239bfce798af17f5fe8dba8bcaf13d99</id>
<content type='text'>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</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>sys: Remove $FreeBSD$: one-line .h pattern</title>
<updated>2023-08-16T17:54:18+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=2ff63af9b88c7413b7d71715b5532625752a248e'/>
<id>2ff63af9b88c7413b7d71715b5532625752a248e</id>
<content type='text'>
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>sys: Remove $FreeBSD$: two-line .h pattern</title>
<updated>2023-08-16T17:54:11+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:11+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=95ee2897e98f5d444f26ed2334cc7c439f9c16c6'/>
<id>95ee2897e98f5d444f26ed2334cc7c439f9c16c6</id>
<content type='text'>
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
</pre>
</div>
</content>
</entry>
</feed>
