<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/kern/sys_process.c, branch releng/14.3</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>execve_block(): a mechanism for mutual exclusion with execve() on the process</title>
<updated>2026-06-30T02:32:01+00:00</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2026-05-26T17:36:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=6772a8ece2c01362e37d25be00967f815b9c2b62'/>
<id>6772a8ece2c01362e37d25be00967f815b9c2b62</id>
<content type='text'>
(cherry picked from commit e1a84b7708c2514769625c2af6c5034694013b6a)
(cherry picked from commit dc94d15a7136c4cfe3342c005d8a319f0583ed9a)

proc: Allow to make proc_rwmem() operate on a consistent address space

(cherry picked from commit e1b0d051bbf7e4e730470cbd6622f71a639834c3)
(cherry picked from commit e7578e37d832ecf1eee8cd3fed10df0e0cb1aa7e)

kern_proc.c: ensure stability of the vmspace we read the strings from

(cherry picked from commit a22c044cce41864a32af6b8281a3c416a2664d7f)
(cherry picked from commit 1f062247ef4e920e7fdd1ebe91b4600d69fe1e91)

kern_proc.c: ensure stability of the vmspace for sysctl kern.proc.vmmap

(cherry picked from commit 5fe6e08d2db56b530f0df2903ef24cfabab7b8ea)
(cherry picked from commit e856c10a4d6dfe30a730246b2050d9dd438085db)

kern_proc.c: ensure stability of the vmspace for sysctl kern.proc.vm_layout

(cherry picked from commit 31fa677e4af00b795bf671847b4dc72960c90f14)
(cherry picked from commit da1398dd6962b458fdcf25799fcb512f4d9c070d)

kern_proc.c: make kern.proc.osrel atomic

(cherry picked from commit 80626f34ee985671bb8c60ee986b89587b7a1511)
(cherry picked from commit b3f99ce653d456c9c829359b0dc83c4867f044b7)

kern_proc.c: disallow execve around sysctl kern.proc.kstacks

(cherry picked from commit 8b5abd9027b8b1f6290c756730ee3adebed007f4)
(cherry picked from commit 197f367cdda7919578d15b1562225d6db462c5ad)

kern_proc.c: disallow execve around sysctl kern.proc.rlimit

(cherry picked from commit 5a91fa5a7656c99e527fe7e6f6bf6bd9e85ab589)
(cherry picked from commit 35b95beb06cab0b10a7e3a697931851315fe3dc2)

kern_event: block the target process from execing for sysctl kern.proc.kqueue

(cherry picked from commit 79b384bd8fdff4869ce4799edb0342ff5c25b6fa)
(cherry picked from commit adb14791b752cf0f07dce44d840f01340aa6d6cb)

kern_resource.c: disallow execve around sysctl kern.proc.rlimitusage

(cherry picked from commit 836749817036b90b60af0584fa21f2d9dbd60ff7)
(cherry picked from commit 190d6677b11a1deed6bd0ef14fd4f990eea20f5b)

kern_procctl(PROC_WX_MAPPINGS_PERMIT): ensure stability of the target vmspace

(cherry picked from commit 6a572920f251ac8ac6a80a55d4d039736ea7dd65)
(cherry picked from commit 23ebf0c97ac5fcd6adb6cda8a8707b99257721a6)

linux_prlimit(): block execve for the target

(cherry picked from commit e41c28e67fac9cd22a85b160c5c9d0477ed03600)
(cherry picked from commit a11c4f036c1136ba90fbfda5d2025d18116562d8)

pfs_readdir(): block the target process from execing

(cherry picked from commit 4c0a0909f928baac982b7de4bfa5b5ca7de5291a)
(cherry picked from commit caa2e5cf7cfb07c115d143023ffb21546a60556a)

pseudofs: ensure that the target process vmspace is stable for VOP_READ/WRITE

(cherry picked from commit a4993bac41350e85bc9affb862d2974a1a09bb5e)
(cherry picked from commit ec0d7d01d6c45eff4043cf178addf65d1933d62a)

procfs, linprocfs: ensure target process vmspace stability

(cherry picked from commit 5db31f1b47b586a5091eb41fc957236f28b78dba)
(cherry picked from commit d7d5337291c983ba969e24c95df0bcab46b44621)

sys_set*id(9): wait for the execblocks to pass

(cherry picked from commit d0384f50dad25d3358d76f7556969ea1d515ba68)
(cherry picked from commit 34b95f53e7ac3a055b3d866d101a79e85d0022c4)

kern_exec.c: explicitly include sys/limits.h for UINT_MAX

(cherry picked from commit f5fce0bcc370a9700249e64901eabf2e0be4ecb0)
(cherry picked from commit bb1154f3ea20291b0c02821743084a6f1a7dd844)

Approved by:	so
Security:	FreeBSD-SA-26:39.execve
Security:	CVE-2026-49415
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit e1a84b7708c2514769625c2af6c5034694013b6a)
(cherry picked from commit dc94d15a7136c4cfe3342c005d8a319f0583ed9a)

proc: Allow to make proc_rwmem() operate on a consistent address space

(cherry picked from commit e1b0d051bbf7e4e730470cbd6622f71a639834c3)
(cherry picked from commit e7578e37d832ecf1eee8cd3fed10df0e0cb1aa7e)

kern_proc.c: ensure stability of the vmspace we read the strings from

(cherry picked from commit a22c044cce41864a32af6b8281a3c416a2664d7f)
(cherry picked from commit 1f062247ef4e920e7fdd1ebe91b4600d69fe1e91)

kern_proc.c: ensure stability of the vmspace for sysctl kern.proc.vmmap

(cherry picked from commit 5fe6e08d2db56b530f0df2903ef24cfabab7b8ea)
(cherry picked from commit e856c10a4d6dfe30a730246b2050d9dd438085db)

kern_proc.c: ensure stability of the vmspace for sysctl kern.proc.vm_layout

(cherry picked from commit 31fa677e4af00b795bf671847b4dc72960c90f14)
(cherry picked from commit da1398dd6962b458fdcf25799fcb512f4d9c070d)

kern_proc.c: make kern.proc.osrel atomic

(cherry picked from commit 80626f34ee985671bb8c60ee986b89587b7a1511)
(cherry picked from commit b3f99ce653d456c9c829359b0dc83c4867f044b7)

kern_proc.c: disallow execve around sysctl kern.proc.kstacks

(cherry picked from commit 8b5abd9027b8b1f6290c756730ee3adebed007f4)
(cherry picked from commit 197f367cdda7919578d15b1562225d6db462c5ad)

kern_proc.c: disallow execve around sysctl kern.proc.rlimit

(cherry picked from commit 5a91fa5a7656c99e527fe7e6f6bf6bd9e85ab589)
(cherry picked from commit 35b95beb06cab0b10a7e3a697931851315fe3dc2)

kern_event: block the target process from execing for sysctl kern.proc.kqueue

(cherry picked from commit 79b384bd8fdff4869ce4799edb0342ff5c25b6fa)
(cherry picked from commit adb14791b752cf0f07dce44d840f01340aa6d6cb)

kern_resource.c: disallow execve around sysctl kern.proc.rlimitusage

(cherry picked from commit 836749817036b90b60af0584fa21f2d9dbd60ff7)
(cherry picked from commit 190d6677b11a1deed6bd0ef14fd4f990eea20f5b)

kern_procctl(PROC_WX_MAPPINGS_PERMIT): ensure stability of the target vmspace

(cherry picked from commit 6a572920f251ac8ac6a80a55d4d039736ea7dd65)
(cherry picked from commit 23ebf0c97ac5fcd6adb6cda8a8707b99257721a6)

linux_prlimit(): block execve for the target

(cherry picked from commit e41c28e67fac9cd22a85b160c5c9d0477ed03600)
(cherry picked from commit a11c4f036c1136ba90fbfda5d2025d18116562d8)

pfs_readdir(): block the target process from execing

(cherry picked from commit 4c0a0909f928baac982b7de4bfa5b5ca7de5291a)
(cherry picked from commit caa2e5cf7cfb07c115d143023ffb21546a60556a)

pseudofs: ensure that the target process vmspace is stable for VOP_READ/WRITE

(cherry picked from commit a4993bac41350e85bc9affb862d2974a1a09bb5e)
(cherry picked from commit ec0d7d01d6c45eff4043cf178addf65d1933d62a)

procfs, linprocfs: ensure target process vmspace stability

(cherry picked from commit 5db31f1b47b586a5091eb41fc957236f28b78dba)
(cherry picked from commit d7d5337291c983ba969e24c95df0bcab46b44621)

sys_set*id(9): wait for the execblocks to pass

(cherry picked from commit d0384f50dad25d3358d76f7556969ea1d515ba68)
(cherry picked from commit 34b95f53e7ac3a055b3d866d101a79e85d0022c4)

kern_exec.c: explicitly include sys/limits.h for UINT_MAX

(cherry picked from commit f5fce0bcc370a9700249e64901eabf2e0be4ecb0)
(cherry picked from commit bb1154f3ea20291b0c02821743084a6f1a7dd844)

Approved by:	so
Security:	FreeBSD-SA-26:39.execve
Security:	CVE-2026-49415
</pre>
</div>
</content>
</entry>
<entry>
<title>ptrace: Do not pass a negative resid to proc_rwmem()</title>
<updated>2025-04-15T02:25:24+00:00</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2025-03-29T08:54:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=74a0b890848362f1a4115972262a518f3d83f504'/>
<id>74a0b890848362f1a4115972262a518f3d83f504</id>
<content type='text'>
While here, avoid truncting uio_resid in proc_rwmem().

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

(cherry picked from commit 1a80a157cbe823ba75bb88823dbf1b245fe87c99)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While here, avoid truncting uio_resid in proc_rwmem().

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

(cherry picked from commit 1a80a157cbe823ba75bb88823dbf1b245fe87c99)
</pre>
</div>
</content>
</entry>
<entry>
<title>ptrace(2): expand ability to fetch syscall parameters</title>
<updated>2025-04-07T01:28:22+00:00</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2025-03-20T01:52:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=fdbf48835da5d38fa7d156bdd3e899c7664c7e08'/>
<id>fdbf48835da5d38fa7d156bdd3e899c7664c7e08</id>
<content type='text'>
(cherry picked from commit fd5bc306ff3d8f908f36703d6ab714322f9f3c75)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit fd5bc306ff3d8f908f36703d6ab714322f9f3c75)
</pre>
</div>
</content>
</entry>
<entry>
<title>kern: Fix a typo in a source code comment</title>
<updated>2024-12-31T09:32:24+00:00</updated>
<author>
<name>Gordon Bergling</name>
<email>gbe@FreeBSD.org</email>
</author>
<published>2024-12-28T06:39:50+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=13bd8f011116e29311e300321f002af97cc73667'/>
<id>13bd8f011116e29311e300321f002af97cc73667</id>
<content type='text'>
- s/explicity/explicitly/

(cherry picked from commit 15ce9a0544e9d850fb332b4bae3313ff38584d61)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- s/explicity/explicitly/

(cherry picked from commit 15ce9a0544e9d850fb332b4bae3313ff38584d61)
</pre>
</div>
</content>
</entry>
<entry>
<title>ptrace(PT_VM_ENTRY): report max protection</title>
<updated>2024-10-15T14:50:16+00:00</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2024-10-07T07:53:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=32b3b01083ce4e7d8df4200ecb2ef21e4a2763b7'/>
<id>32b3b01083ce4e7d8df4200ecb2ef21e4a2763b7</id>
<content type='text'>
(cherry picked from commit e90b2b7d6c173e27dccdb894bb4e34ad30273e22)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit e90b2b7d6c173e27dccdb894bb4e34ad30273e22)
</pre>
</div>
</content>
</entry>
<entry>
<title>Support dynamically sized register sets</title>
<updated>2023-08-23T14:32:56+00:00</updated>
<author>
<name>Andrew Turner</name>
<email>andrew@FreeBSD.org</email>
</author>
<published>2023-08-23T14:32:56+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=676386b5563f60739d5ea2244cd0d770b390a1d7'/>
<id>676386b5563f60739d5ea2244cd0d770b390a1d7</id>
<content type='text'>
We don't always know the size of the register set at compile time,
e.g. on arm64 the size of the SVE registers need to be queried on boot.
To support register sets that needs to be calculated at run time
query the correct size when it is zero.

Reviewed by:	markj, kib (earlier version)
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D41302
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We don't always know the size of the register set at compile time,
e.g. on arm64 the size of the SVE registers need to be queried on boot.
To support register sets that needs to be calculated at run time
query the correct size when it is zero.

Reviewed by:	markj, kib (earlier version)
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D41302
</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>ptrace: Clear TDB_BORN during PT_DETACH.</title>
<updated>2023-06-07T19:28:36+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2023-06-07T19:26:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=653738e895ba022be1179a95a85089e7bc66dbbe'/>
<id>653738e895ba022be1179a95a85089e7bc66dbbe</id>
<content type='text'>
If a debugger detaches from a process that has a new thread that has
not yet executed, the new thread will raise a SIGTRAP signal to report
it's thread birth event even after the detach.  With the debugger
detached, this results in a SIGTRAP sent to the process and typically
a core dump.  Fix this by clearing TDB_BORN from any new threads
during detach.

Bump __FreeBSD_version for debuggers to notice when the fix is
present.

Reported by:	GDB's testsuite
Reviewed by:	kib, markj (previous version)
Differential Revision:	https://reviews.freebsd.org/D39856
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a debugger detaches from a process that has a new thread that has
not yet executed, the new thread will raise a SIGTRAP signal to report
it's thread birth event even after the detach.  With the debugger
detached, this results in a SIGTRAP sent to the process and typically
a core dump.  Fix this by clearing TDB_BORN from any new threads
during detach.

Bump __FreeBSD_version for debuggers to notice when the fix is
present.

Reported by:	GDB's testsuite
Reviewed by:	kib, markj (previous version)
Differential Revision:	https://reviews.freebsd.org/D39856
</pre>
</div>
</content>
</entry>
<entry>
<title>ptrace(2): add PT_SC_REMOTE remote syscall request</title>
<updated>2022-12-22T21:11:35+00:00</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2022-11-30T08:45:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=140ceb5d956bb8795a77c23d3fd5ef047b0f3c68'/>
<id>140ceb5d956bb8795a77c23d3fd5ef047b0f3c68</id>
<content type='text'>
Reviewed by:	markj
Discussed with:	jhb
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D37590
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed by:	markj
Discussed with:	jhb
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D37590
</pre>
</div>
</content>
</entry>
<entry>
<title>sys: rename td_coredump to td_remotereq</title>
<updated>2022-12-22T21:11:35+00:00</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2022-11-30T08:48:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e6feeae2f915c76275b83b7365ae966a8f8dd016'/>
<id>e6feeae2f915c76275b83b7365ae966a8f8dd016</id>
<content type='text'>
and TDB_COREDUMPRQ to TDB_COREDUMPREQ

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D37590
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
and TDB_COREDUMPRQ to TDB_COREDUMPREQ

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D37590
</pre>
</div>
</content>
</entry>
</feed>
