]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
3 years agoTHIS BRANCH IS OBSOLETE, PLEASE READ: master
Ulrich Spörlein [Wed, 30 Dec 2020 10:29:55 +0000 (11:29 +0100)]
THIS BRANCH IS OBSOLETE, PLEASE READ:

Dear all,
the FreeBSD project has switched their source of truth repository from
Subversion to Git on 2020-12-23. The previously published commit hashes
were missing required merge commits and were thus unsuitable to be the
basis of the source of truth repository.

They had to be changed (aka "force pushed"). We're sorry for the
inconvenience this causes.

The `master` branch will no longer see any updates and we will push to
`main` going forward. The `stable/X` and `releng/X` branches will see a
force-push directly.

To transplant your work, it is recommended to head over to the wiki at
https://github.com/freebsd/git_conv/wiki for instructions on how to
rebase or remerge your in-flight work. A short outline will be provided
below.

Please note that the actual git "trees" are of course identical between
the old and new conversions, so it's relatively easy to craft git
commits that merge or rebase the work w/o any merge conflicts. Please
reach out to git@FreeBSD.org or file an issue under
https://github.com/freebsd/git_conv/issues if you need assistance.

The mapping of the old to new commit hashes (for the same tree) are
given below. We have archived a copy of the legacy repo under
https://github.com/freebsd/freebsd-legacy which you can add as a remote
to always have a reference to the old `master` or `stable/X` branches
and names.

This is a merge commit that brings both histories together, giving you
common history ancestors, which should help with later merging.
You should be able to cleanly merge into this "legacy" master, and then
merge into "main" following from that. All the following commands assume
you've checked out your own workbranch.

-- Merge from master to main --

$ git remote add freebsd-legacy https://github.com/freebsd/freebsd-legacy.git
$ git fetch --all
$ git merge freebsd-legacy/master  (this convenience commit)
$ git merge origin/main

-- Merge for stable/X or releng/Y branches --

$ git remote add freebsd-legacy https://github.com/freebsd/freebsd-legacy.git
$ git fetch --all
$ git merge freebsd-legacy/stable/X  (to get to the legacy hashes from below)
$ git merge -s ours --allow-unrelated-histories <new-hash-from-below> (this is guaranteed conflict free)
$ git merge origin/stable/X

PLEASE NOTE: You'll end up with twice the history and git log output
will show old history twice and will likely confuse you. Please make an
effort to migrate your work over to a fresh branch based off of main.
A git replace --graft can be used to at least patch up git log output.

-- Rebase your work --

Only for folks that always rebase their local work on top of an origin
branch.

$ git remote add freebsd-legacy https://github.com/freebsd/freebsd-legacy.git
$ git fetch --all
$ git branch -u freebsd-legacy/master
$ git rebase --onto origin/main <your_rebased_work_branch>

-- Old to new hash mappings --

   BRANCH                    LEGACY HASH                                    NEW HASH
master / main   9e4440ca5ba7072e6b8c4d0d9799fb9d82c5ad49    3cc0c0d66a065554459bd2f9b4f80cc07426464a
stable/10       10f4a6c225ee83ceae8013937d720abc6d55a42b    3ad46d07830bba44c479e2d19ce376212e52e9af
stable/11       a76e2a369a53c030aca4a52b694102e99aadbb2f    46062cb1a2d980ab8fc52a36a418bb44c06fe95f
stable/12       f262e04c92d7b7a409e91c21a09ea09d54619099    f4d0bc6aa6b90cbb0ea6cb993d9a10e36f5f4a4c
releng/10.0     fcf03644270b915aec5f010cd84202ad00ce746d    0099f6f89a1325dc504096aecbdcbddad498310e
releng/10.1     a5b8a0cee842e12aa090449e042788b9eabc35da    a9b4be204689211fddaab97ddd6df73b8f44d222
releng/10.2     14e67f3152c63dff2a97a5fcd9b3fa03a6625f31    2a3488342441b3296995c8a9eca705a468d0eff0
releng/10.3     57fbb64699be1ef57f413a39f3d6920bb192ee7f    8411c9ac24aabdbbde468778b35da58dc3c15178
releng/10.4     976886d4ea7217ba54d00b10afc0c0a3e59cc552    d869f4ade283f4691dc249e435376a5883824be2
releng/11.0     bc72ed658ec8c6cef0ceb206e8e29ed67a58af03    8d2708de5d6112a492744d367cfdfb8fd219227a
releng/11.1     d3b778b791f4e4d8afc69698b2097efdf2f79de7    3e9337c6b211e778829ed3af783cd41447a8721b
releng/11.2     24e863807ab509af9c38e84b4e5df34ff4fdf9e2    c0d2bc3b0336fb6825302f44adabff0893d25aed
releng/11.3     b43bbc16b05f1b7e0770ac18bc2be0b3805a994e    9e63140d5a00c9d691d88c5a650c2f74a63105ff
releng/11.4     9332e027885d3d785a45dfcf3f7bd2f7c8181d0a    4adbf1f6686ffdc4c0555a018e14ec63b5981534
releng/12.0     58cdccde6ac7b22cc1ca42fbca6460a58304077f    12b769ed36a115da3b5013c92cdf294a3a5de98d
releng/12.1     c522014dbaadf4b1d7431093f91c52cbf1d3ca62    e30782bbdad59b00537d9c44c17e3fb5b3cec95b
releng/12.2     30ef47ef8fb0026951af8501fe30d33f3b4a7090    2120d07af09cb830873554ba5405c5d3e51b41cc

--

Again, we're sorry for the inconvenience, please reach out via GitHub
issues and the mailing list to get further help in transplanting your
work onto the one true, canonical, source of truth.

Good luck in 2021!
Ulrich Spörlein, on behalf of the FreeBSD Git working group.

3 years agoMark the repository as being converted to Git.
lwhsu [Sun, 20 Dec 2020 02:59:44 +0000 (02:59 +0000)]
Mark the repository as being converted to Git.

This is the last Subversion commit to src.

Sponsored by: The FreeBSD Foundation

3 years agoMark the repository as being converted to Git.
Li-Wen Hsu [Sun, 20 Dec 2020 02:59:44 +0000 (02:59 +0000)]
Mark the repository as being converted to Git.

This is the last Subversion commit to src.

Sponsored by: The FreeBSD Foundation

3 years agoFilter TCP connections to SO_REUSEPORT_LB listen sockets by NUMA domain
gallatin [Sat, 19 Dec 2020 22:04:46 +0000 (22:04 +0000)]
Filter TCP connections to SO_REUSEPORT_LB listen sockets by NUMA domain

In order to efficiently serve web traffic on a NUMA
machine, one must avoid as many NUMA domain crossings as
possible. With SO_REUSEPORT_LB, a number of workers can share a
listen socket. However, even if a worker sets affinity to a core
or set of cores on a NUMA domain, it will receive connections
associated with all NUMA domains in the system. This will lead to
cross-domain traffic when the server writes to the socket or
calls sendfile(), and memory is allocated on the server's local
NUMA node, but transmitted on the NUMA node associated with the
TCP connection. Similarly, when the server reads from the socket,
he will likely be reading memory allocated on the NUMA domain
associated with the TCP connection.

This change provides a new socket ioctl, TCP_REUSPORT_LB_NUMA. A
server can now tell the kernel to filter traffic so that only
incoming connections associated with the desired NUMA domain are
given to the server. (Of course, in the case where there are no
servers sharing the listen socket on some domain, then as a
fallback, traffic will be hashed as normal to all servers sharing
the listen socket regardless of domain). This allows a server to
deal only with traffic that is local to its NUMA domain, and
avoids cross-domain traffic in most cases.

This patch, and a corresponding small patch to nginx to use
TCP_REUSPORT_LB_NUMA allows us to serve 190Gb/s of kTLS encrypted
https media content from dual-socket Xeons with only 13% (as
measured by pcm.x) cross domain traffic on the memory controller.

Reviewed by: jhb, bz (earlier version), bcr (man page)
Tested by: gonzo
Sponsored by: Netfix
Differential Revision: https://reviews.freebsd.org/D21636

3 years agoFilter TCP connections to SO_REUSEPORT_LB listen sockets by NUMA domain
Andrew Gallatin [Sat, 19 Dec 2020 22:04:46 +0000 (22:04 +0000)]
Filter TCP connections to SO_REUSEPORT_LB listen sockets by NUMA domain

In order to efficiently serve web traffic on a NUMA
machine, one must avoid as many NUMA domain crossings as
possible. With SO_REUSEPORT_LB, a number of workers can share a
listen socket. However, even if a worker sets affinity to a core
or set of cores on a NUMA domain, it will receive connections
associated with all NUMA domains in the system. This will lead to
cross-domain traffic when the server writes to the socket or
calls sendfile(), and memory is allocated on the server's local
NUMA node, but transmitted on the NUMA node associated with the
TCP connection. Similarly, when the server reads from the socket,
he will likely be reading memory allocated on the NUMA domain
associated with the TCP connection.

This change provides a new socket ioctl, TCP_REUSPORT_LB_NUMA. A
server can now tell the kernel to filter traffic so that only
incoming connections associated with the desired NUMA domain are
given to the server. (Of course, in the case where there are no
servers sharing the listen socket on some domain, then as a
fallback, traffic will be hashed as normal to all servers sharing
the listen socket regardless of domain). This allows a server to
deal only with traffic that is local to its NUMA domain, and
avoids cross-domain traffic in most cases.

This patch, and a corresponding small patch to nginx to use
TCP_REUSPORT_LB_NUMA allows us to serve 190Gb/s of kTLS encrypted
https media content from dual-socket Xeons with only 13% (as
measured by pcm.x) cross domain traffic on the memory controller.

Reviewed by: jhb, bz (earlier version), bcr (man page)
Tested by: gonzo
Sponsored by: Netfix
Differential Revision: https://reviews.freebsd.org/D21636

3 years agoOptionally bind ktls threads to NUMA domains
gallatin [Sat, 19 Dec 2020 21:46:09 +0000 (21:46 +0000)]
Optionally bind ktls threads to NUMA domains

When ktls_bind_thread is 2, we pick a ktls worker thread that is
bound to the same domain as the TCP connection associated with
the socket. We use roughly the same code as netinet/tcp_hpts.c to
do this. This allows crypto to run on the same domain as the TCP
connection is associated with. Assuming TCP_REUSPORT_LB_NUMA
(D21636) is in place & in use, this ensures that the crypto source
and destination buffers are local to the same NUMA domain as we're
running crypto on.

This change (when TCP_REUSPORT_LB_NUMA, D21636, is used) reduces
cross-domain traffic from over 37% down to about 13% as measured
by pcm.x on a dual-socket Xeon using nginx and a Netflix workload.

Reviewed by: jhb
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D21648

3 years agoOptionally bind ktls threads to NUMA domains
Andrew Gallatin [Sat, 19 Dec 2020 21:46:09 +0000 (21:46 +0000)]
Optionally bind ktls threads to NUMA domains

When ktls_bind_thread is 2, we pick a ktls worker thread that is
bound to the same domain as the TCP connection associated with
the socket. We use roughly the same code as netinet/tcp_hpts.c to
do this. This allows crypto to run on the same domain as the TCP
connection is associated with. Assuming TCP_REUSPORT_LB_NUMA
(D21636) is in place & in use, this ensures that the crypto source
and destination buffers are local to the same NUMA domain as we're
running crypto on.

This change (when TCP_REUSPORT_LB_NUMA, D21636, is used) reduces
cross-domain traffic from over 37% down to about 13% as measured
by pcm.x on a dual-socket Xeon using nginx and a Netflix workload.

Reviewed by: jhb
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D21648

3 years agolibc: Fix most issues reported by mandoc
gbe [Sat, 19 Dec 2020 14:54:28 +0000 (14:54 +0000)]
libc: Fix most issues reported by mandoc

- varios "new sentence, new line" warnings
- varios "sections out of conventional order" warnings
- varios "unusual Xr order" warnings
- varios "missing section argument" warnings
- varios "no blank before trailing delimiter" warnings
- varios "normalizing date format" warnings

MFC after: 1 month

3 years agolibc: Fix most issues reported by mandoc
Gordon Bergling [Sat, 19 Dec 2020 14:54:28 +0000 (14:54 +0000)]
libc: Fix most issues reported by mandoc

- varios "new sentence, new line" warnings
- varios "sections out of conventional order" warnings
- varios "unusual Xr order" warnings
- varios "missing section argument" warnings
- varios "no blank before trailing delimiter" warnings
- varios "normalizing date format" warnings

MFC after: 1 month

3 years agotrim(8): Fix a few issues reported by mandoc
gbe [Sat, 19 Dec 2020 13:56:19 +0000 (13:56 +0000)]
trim(8): Fix a few issues reported by mandoc

- new sentence, new line
- unusual Xr order: ioctl(2) after da(4)
- unusual Xr order: sysexits(3) after nda(4)

MFC after: 1 week

3 years agotrim(8): Fix a few issues reported by mandoc
Gordon Bergling [Sat, 19 Dec 2020 13:56:19 +0000 (13:56 +0000)]
trim(8): Fix a few issues reported by mandoc

- new sentence, new line
- unusual Xr order: ioctl(2) after da(4)
- unusual Xr order: sysexits(3) after nda(4)

MFC after: 1 week

3 years agozonectl(8): Fix a few issues reported by mandoc
gbe [Sat, 19 Dec 2020 13:51:46 +0000 (13:51 +0000)]
zonectl(8): Fix a few issues reported by mandoc

- Add missing quotation mark for a comment above the .Dd
- inserting missing end of block: Sh breaks Bd
- skipping paragraph macro: Pp before Bl
- skipping paragraph macro: Pp before Bd
- empty block: Bd

MFC after: 1 week

3 years agozonectl(8): Fix a few issues reported by mandoc
Gordon Bergling [Sat, 19 Dec 2020 13:51:46 +0000 (13:51 +0000)]
zonectl(8): Fix a few issues reported by mandoc

- Add missing quotation mark for a comment above the .Dd
- inserting missing end of block: Sh breaks Bd
- skipping paragraph macro: Pp before Bl
- skipping paragraph macro: Pp before Bd
- empty block: Bd

MFC after: 1 week

3 years agonfsv4(4): Fix a few issues reported by mandoc
gbe [Sat, 19 Dec 2020 13:45:39 +0000 (13:45 +0000)]
nfsv4(4): Fix a few issues reported by mandoc

- new sentence, new line
- function name without markup: rtalloc()
- function name without markup: VOP_RECLAIM()

MFC after: 1 week

3 years agonfsv4(4): Fix a few issues reported by mandoc
Gordon Bergling [Sat, 19 Dec 2020 13:45:39 +0000 (13:45 +0000)]
nfsv4(4): Fix a few issues reported by mandoc

- new sentence, new line
- function name without markup: rtalloc()
- function name without markup: VOP_RECLAIM()

MFC after: 1 week

3 years agobluetooth: Fix a mandoc related issues
gbe [Sat, 19 Dec 2020 13:36:59 +0000 (13:36 +0000)]
bluetooth: Fix a mandoc related issues

- new sentence, new line
- sections out of conventional order: Sh FILES
- unusual Xr order: bthost(1) after bthidd(8)
- no blank before trailing delimiter
- whitespace at end of input line
- sections out of conventional order: Sh EXIT STATUS

MFC after: 1 week

3 years agobluetooth: Fix a mandoc related issues
Gordon Bergling [Sat, 19 Dec 2020 13:36:59 +0000 (13:36 +0000)]
bluetooth: Fix a mandoc related issues

- new sentence, new line
- sections out of conventional order: Sh FILES
- unusual Xr order: bthost(1) after bthidd(8)
- no blank before trailing delimiter
- whitespace at end of input line
- sections out of conventional order: Sh EXIT STATUS

MFC after: 1 week

3 years agompsutil(8): Remove trailing whitespace
gbe [Sat, 19 Dec 2020 13:23:26 +0000 (13:23 +0000)]
mpsutil(8): Remove trailing whitespace

MFC after: 1 week

3 years agompsutil(8): Remove trailing whitespace
Gordon Bergling [Sat, 19 Dec 2020 13:23:26 +0000 (13:23 +0000)]
mpsutil(8): Remove trailing whitespace

MFC after: 1 week

3 years agobhyvectl(8): Normalize the man page date
gbe [Sat, 19 Dec 2020 13:21:40 +0000 (13:21 +0000)]
bhyvectl(8): Normalize the man page date

MFC after: 1 week

3 years agobhyvectl(8): Normalize the man page date
Gordon Bergling [Sat, 19 Dec 2020 13:21:40 +0000 (13:21 +0000)]
bhyvectl(8): Normalize the man page date

MFC after: 1 week

3 years agocamdd(8): Fix the man page date
gbe [Sat, 19 Dec 2020 13:17:25 +0000 (13:17 +0000)]
camdd(8): Fix the man page date

The comment before the .Dd macro was missing a quotation mark, so that
the date of the man page was always today.

MFC after: 3 days

3 years agocamdd(8): Fix the man page date
Gordon Bergling [Sat, 19 Dec 2020 13:17:25 +0000 (13:17 +0000)]
camdd(8): Fix the man page date

The comment before the .Dd macro was missing a quotation mark, so that
the date of the man page was always today.

MFC after: 3 days

3 years agoconfig: Fix a few mandoc related errors
gbe [Sat, 19 Dec 2020 13:11:44 +0000 (13:11 +0000)]
config: Fix a few mandoc related errors

- new sentence, new line
- no blank before trailing delimiter

MFC after: 1 week

3 years agoconfig: Fix a few mandoc related errors
Gordon Bergling [Sat, 19 Dec 2020 13:11:44 +0000 (13:11 +0000)]
config: Fix a few mandoc related errors

- new sentence, new line
- no blank before trailing delimiter

MFC after: 1 week

3 years agodevctl(8): Correct "sections out of conventional order" error
gbe [Sat, 19 Dec 2020 13:05:54 +0000 (13:05 +0000)]
devctl(8): Correct "sections out of conventional order" error

MFC after: 1 week

3 years agodevctl(8): Correct "sections out of conventional order" error
Gordon Bergling [Sat, 19 Dec 2020 13:05:54 +0000 (13:05 +0000)]
devctl(8): Correct "sections out of conventional order" error

MFC after: 1 week

3 years agopatch(1): Fix a few mandoc related issues
gbe [Sat, 19 Dec 2020 13:00:17 +0000 (13:00 +0000)]
patch(1): Fix a few mandoc related issues

- no blank before trailing delimiter

MFC after: 1 week

3 years agopatch(1): Fix a few mandoc related issues
Gordon Bergling [Sat, 19 Dec 2020 13:00:17 +0000 (13:00 +0000)]
patch(1): Fix a few mandoc related issues

- no blank before trailing delimiter

MFC after: 1 week

3 years agouname(1): Fix a typo in the man page date
gbe [Sat, 19 Dec 2020 12:55:27 +0000 (12:55 +0000)]
uname(1): Fix a typo in the man page date

MFC after: 3 days

3 years agouname(1): Fix a typo in the man page date
Gordon Bergling [Sat, 19 Dec 2020 12:55:27 +0000 (12:55 +0000)]
uname(1): Fix a typo in the man page date

MFC after: 3 days

3 years agoident(1): Normalizing date format
gbe [Sat, 19 Dec 2020 12:54:00 +0000 (12:54 +0000)]
ident(1): Normalizing date format

MFC after: 3 days

3 years agoident(1): Normalizing date format
Gordon Bergling [Sat, 19 Dec 2020 12:54:00 +0000 (12:54 +0000)]
ident(1): Normalizing date format

MFC after: 3 days

3 years agoipfw(8): Fix a few mandoc related issues
gbe [Sat, 19 Dec 2020 12:47:40 +0000 (12:47 +0000)]
ipfw(8): Fix a few mandoc related issues

- no blank before trailing delimiter
- missing section argument: Xr inet_pton
- skipping paragraph macro: Pp before Ss
- unusual Xr order: syslogd after sysrc
- tab in filled text

There were a few multiline NAT examples which used the .Dl macro with
tabs. I converted them to .Bd, which is a more suitable macro for that case.

MFC after: 1 week

3 years agoipfw(8): Fix a few mandoc related issues
Gordon Bergling [Sat, 19 Dec 2020 12:47:40 +0000 (12:47 +0000)]
ipfw(8): Fix a few mandoc related issues

- no blank before trailing delimiter
- missing section argument: Xr inet_pton
- skipping paragraph macro: Pp before Ss
- unusual Xr order: syslogd after sysrc
- tab in filled text

There were a few multiline NAT examples which used the .Dl macro with
tabs. I converted them to .Bd, which is a more suitable macro for that case.

MFC after: 1 week

3 years agoping(8): Fix a mandoc related issue
gbe [Sat, 19 Dec 2020 11:57:47 +0000 (11:57 +0000)]
ping(8): Fix a mandoc related issue

- unusual Xr punctuation: none before traceroute6(8)

3 years agoping(8): Fix a mandoc related issue
Gordon Bergling [Sat, 19 Dec 2020 11:57:47 +0000 (11:57 +0000)]
ping(8): Fix a mandoc related issue

- unusual Xr punctuation: none before traceroute6(8)

3 years agonvmecontrol(8): Fix a few mandoc related issues and add a SEE ALSO section
gbe [Sat, 19 Dec 2020 11:47:38 +0000 (11:47 +0000)]
nvmecontrol(8): Fix a few mandoc related issues and add a SEE ALSO section

- inserting missing end of block: Ss breaks Bl
- skipping paragraph macro: Pp before Ss
- referenced manual not found: Xr nvme 4 (2 times)
- unknown standard specifier: St The

The macro .St can only be used for standards known by mdoc(7). So add a
SEE ALSO section and add a reference to the NVM Express Base Specification.

MFC after: 2 weeks

3 years agonvmecontrol(8): Fix a few mandoc related issues and add a SEE ALSO section
Gordon Bergling [Sat, 19 Dec 2020 11:47:38 +0000 (11:47 +0000)]
nvmecontrol(8): Fix a few mandoc related issues and add a SEE ALSO section

- inserting missing end of block: Ss breaks Bl
- skipping paragraph macro: Pp before Ss
- referenced manual not found: Xr nvme 4 (2 times)
- unknown standard specifier: St The

The macro .St can only be used for standards known by mdoc(7). So add a
SEE ALSO section and add a reference to the NVM Express Base Specification.

MFC after: 2 weeks

3 years agoEnsure a minimum packet length before creating a mbuf in if_ure.
hselasky [Sat, 19 Dec 2020 11:03:54 +0000 (11:03 +0000)]
Ensure a minimum packet length before creating a mbuf in if_ure.

Sponsored by: Mellanox Technologies // NVIDIA Networking

3 years agoEnsure a minimum packet length before creating a mbuf in if_ure.
Hans Petter Selasky [Sat, 19 Dec 2020 11:03:54 +0000 (11:03 +0000)]
Ensure a minimum packet length before creating a mbuf in if_ure.

Sponsored by: Mellanox Technologies // NVIDIA Networking

3 years agodevd.conf(5): Fix a mandoc related issue
gbe [Sat, 19 Dec 2020 11:03:04 +0000 (11:03 +0000)]
devd.conf(5): Fix a mandoc related issue

- sections out of conventional order: Sh SEE ALSO

MFC after: 1 week

3 years agodevd.conf(5): Fix a mandoc related issue
Gordon Bergling [Sat, 19 Dec 2020 11:03:04 +0000 (11:03 +0000)]
devd.conf(5): Fix a mandoc related issue

- sections out of conventional order: Sh SEE ALSO

MFC after: 1 week

3 years agoMove SYSCTL_ADD_PROC() to unlocked context in if_ure to avoid lock order reversal.
hselasky [Sat, 19 Dec 2020 11:00:11 +0000 (11:00 +0000)]
Move SYSCTL_ADD_PROC() to unlocked context in if_ure to avoid lock order reversal.

MFC after: 1 week
Reported by: Mark Millard <marklmi@yahoo.com>
Sponsored by: Mellanox Technologies // NVIDIA Networking

3 years agoMove SYSCTL_ADD_PROC() to unlocked context in if_ure to avoid lock order reversal.
Hans Petter Selasky [Sat, 19 Dec 2020 11:00:11 +0000 (11:00 +0000)]
Move SYSCTL_ADD_PROC() to unlocked context in if_ure to avoid lock order reversal.

MFC after: 1 week
Reported by: Mark Millard <marklmi@yahoo.com>
Sponsored by: Mellanox Technologies // NVIDIA Networking

3 years agosysctl(9): Fix a few mandoc related issues
gbe [Sat, 19 Dec 2020 10:31:25 +0000 (10:31 +0000)]
sysctl(9): Fix a few mandoc related issues

- missing comma before name: Nm SYSCTL_UQUAD
- bad NAME section content: text

MFC after: 1 week

3 years agosysctl(9): Fix a few mandoc related issues
Gordon Bergling [Sat, 19 Dec 2020 10:31:25 +0000 (10:31 +0000)]
sysctl(9): Fix a few mandoc related issues

- missing comma before name: Nm SYSCTL_UQUAD
- bad NAME section content: text

MFC after: 1 week

3 years agoofw_bus_status_okay(9): Fix a few mandoc related issues
gbe [Sat, 19 Dec 2020 10:26:40 +0000 (10:26 +0000)]
ofw_bus_status_okay(9): Fix a few mandoc related issues

- missing comma before name: Nm ofw_bus_status_okay
- missing comma before name: Nm ofw_bus_node_status_okay
- skipping paragraph macro: Pp after Sh

MFC after: 1 week

3 years agoofw_bus_status_okay(9): Fix a few mandoc related issues
Gordon Bergling [Sat, 19 Dec 2020 10:26:40 +0000 (10:26 +0000)]
ofw_bus_status_okay(9): Fix a few mandoc related issues

- missing comma before name: Nm ofw_bus_status_okay
- missing comma before name: Nm ofw_bus_node_status_okay
- skipping paragraph macro: Pp after Sh

MFC after: 1 week

3 years agoofw_bus_is_compatible(9): Fix a few mandoc related issues
gbe [Sat, 19 Dec 2020 10:24:36 +0000 (10:24 +0000)]
ofw_bus_is_compatible(9): Fix a few mandoc related issues

- missing comma before name: Nm ofw_bus_is_compatible_strict
- missing comma before name: Nm ofw_bus_node_is_compatible
- missing comma before name: Nm ofw_bus_search_compatible
- skipping paragraph macro: Pp after Sh

MFC after: 1 week

3 years agoofw_bus_is_compatible(9): Fix a few mandoc related issues
Gordon Bergling [Sat, 19 Dec 2020 10:24:36 +0000 (10:24 +0000)]
ofw_bus_is_compatible(9): Fix a few mandoc related issues

- missing comma before name: Nm ofw_bus_is_compatible_strict
- missing comma before name: Nm ofw_bus_node_is_compatible
- missing comma before name: Nm ofw_bus_search_compatible
- skipping paragraph macro: Pp after Sh

MFC after: 1 week

3 years agofail(9): Fix a few mandoc related issues
gbe [Sat, 19 Dec 2020 10:20:22 +0000 (10:20 +0000)]
fail(9): Fix a few mandoc related issues

- function name without markup: return()
- function name without markup: print()

MFC after: 1 week

3 years agofail(9): Fix a few mandoc related issues
Gordon Bergling [Sat, 19 Dec 2020 10:20:22 +0000 (10:20 +0000)]
fail(9): Fix a few mandoc related issues

- function name without markup: return()
- function name without markup: print()

MFC after: 1 week

3 years agodriver(9): Fix a mandoc related issue
gbe [Sat, 19 Dec 2020 10:18:21 +0000 (10:18 +0000)]
driver(9): Fix a mandoc related issue

- sections out of conventional order: Sh SEE ALSO

MFC after: 1 week

3 years agodriver(9): Fix a mandoc related issue
Gordon Bergling [Sat, 19 Dec 2020 10:18:21 +0000 (10:18 +0000)]
driver(9): Fix a mandoc related issue

- sections out of conventional order: Sh SEE ALSO

MFC after: 1 week

3 years agobhnd_erom(9): Fix a few mandoc related issues
gbe [Sat, 19 Dec 2020 10:15:58 +0000 (10:15 +0000)]
bhnd_erom(9): Fix a few mandoc related issues

- skipping paragraph macro: Pp before Bl
- skipping paragraph macro: Pp after Ss
- skipping paragraph macro: Pp at the end of Ss
- unusual Xr punctuation: none before bhnd_driver_get_erom_class(9)
- unusual Xr punctuation: none before bus_space(9)

MFC after: 1 week

3 years agobhnd_erom(9): Fix a few mandoc related issues
Gordon Bergling [Sat, 19 Dec 2020 10:15:58 +0000 (10:15 +0000)]
bhnd_erom(9): Fix a few mandoc related issues

- skipping paragraph macro: Pp before Bl
- skipping paragraph macro: Pp after Ss
- skipping paragraph macro: Pp at the end of Ss
- unusual Xr punctuation: none before bhnd_driver_get_erom_class(9)
- unusual Xr punctuation: none before bus_space(9)

MFC after: 1 week

3 years agobhnd(9): Fix a few mandoc related issues
gbe [Sat, 19 Dec 2020 10:11:37 +0000 (10:11 +0000)]
bhnd(9): Fix a few mandoc related issues

- skipping paragraph macro: Pp before Bl
- skipping paragraph macro: Pp at the end of Ss
- missing section argument: Xr device_set_desc
- unusual Xr punctuation: none before bhnd_erom(9)

MFC after: 1 week

3 years agobhnd(9): Fix a few mandoc related issues
Gordon Bergling [Sat, 19 Dec 2020 10:11:37 +0000 (10:11 +0000)]
bhnd(9): Fix a few mandoc related issues

- skipping paragraph macro: Pp before Bl
- skipping paragraph macro: Pp at the end of Ss
- missing section argument: Xr device_set_desc
- unusual Xr punctuation: none before bhnd_erom(9)

MFC after: 1 week

3 years agodisk(9): Fix a few mandoc related errors
gbe [Sat, 19 Dec 2020 09:55:02 +0000 (09:55 +0000)]
disk(9): Fix a few mandoc related errors

- function name without markup: g_io_deliver()
- function name without markup: disk_gone()
- sections out of conventional order: Sh SEE ALSO
- referenced manual not found: Xr MAKE_DEV 9

Actually the man page of MAKE_DEV has never existed.

MFC after: 3 days

3 years agodisk(9): Fix a few mandoc related errors
Gordon Bergling [Sat, 19 Dec 2020 09:55:02 +0000 (09:55 +0000)]
disk(9): Fix a few mandoc related errors

- function name without markup: g_io_deliver()
- function name without markup: disk_gone()
- sections out of conventional order: Sh SEE ALSO
- referenced manual not found: Xr MAKE_DEV 9

Actually the man page of MAKE_DEV has never existed.

MFC after: 3 days

3 years agoaccept_filter(9): Fix a mandoc related error
gbe [Sat, 19 Dec 2020 09:40:05 +0000 (09:40 +0000)]
accept_filter(9): Fix a mandoc related error

- no blank before trailing delimiter

3 years agoaccept_filter(9): Fix a mandoc related error
Gordon Bergling [Sat, 19 Dec 2020 09:40:05 +0000 (09:40 +0000)]
accept_filter(9): Fix a mandoc related error

- no blank before trailing delimiter

3 years agortld-elf: link udivmoddi4 from compiler_rt
rlibby [Sat, 19 Dec 2020 08:38:31 +0000 (08:38 +0000)]
rtld-elf: link udivmoddi4 from compiler_rt

This fixes the gcc9 build of rtld-elf32 on amd64, which needed an
implementation of udivmoddi4.

rtld-elf uses certain functions normally found in libc, and so it
includes certain files from libc in its own build.  It has two
mechanisms to include files from libc: one that rebuilds source files in
the rtld-elf environment, and one that extracts object files from a
purpose-built no-SSP PIC archive.

In addition to libc functions, rtld-elf may need to link functions
normally found in libcompiler_rt (formerly libgcc).  Now, add an ability
to rebuild libcompiler_rt source files in the rtld-elf environment.  We
don't yet have a need for an object file extraction mechanism.

libcompiler_rt could also supply udivdi3 and umoddi3, but leave them
alone for now.

Reviewed by: arichardson, kib
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D27665

3 years agortld-elf: link udivmoddi4 from compiler_rt
Ryan Libby [Sat, 19 Dec 2020 08:38:31 +0000 (08:38 +0000)]
rtld-elf: link udivmoddi4 from compiler_rt

This fixes the gcc9 build of rtld-elf32 on amd64, which needed an
implementation of udivmoddi4.

rtld-elf uses certain functions normally found in libc, and so it
includes certain files from libc in its own build.  It has two
mechanisms to include files from libc: one that rebuilds source files in
the rtld-elf environment, and one that extracts object files from a
purpose-built no-SSP PIC archive.

In addition to libc functions, rtld-elf may need to link functions
normally found in libcompiler_rt (formerly libgcc).  Now, add an ability
to rebuild libcompiler_rt source files in the rtld-elf environment.  We
don't yet have a need for an object file extraction mechanism.

libcompiler_rt could also supply udivdi3 and umoddi3, but leave them
alone for now.

Reviewed by: arichardson, kib
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D27665

3 years agortld-libc: fix incremental build
rlibby [Sat, 19 Dec 2020 08:38:27 +0000 (08:38 +0000)]
rtld-libc: fix incremental build

ar cr is an update of an archive, not a creation of a new one.  During
incremental builds (e.g. with meta mode) the archive was not getting
cleaned, and so could retain now-deleted objects from previous builds.
Now, delete the archive before creating/updating it.

Reviewed by: arichardson, bdrewery, kib
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D27663

3 years agortld-libc: fix incremental build
Ryan Libby [Sat, 19 Dec 2020 08:38:27 +0000 (08:38 +0000)]
rtld-libc: fix incremental build

ar cr is an update of an archive, not a creation of a new one.  During
incremental builds (e.g. with meta mode) the archive was not getting
cleaned, and so could retain now-deleted objects from previous builds.
Now, delete the archive before creating/updating it.

Reviewed by: arichardson, bdrewery, kib
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D27663

3 years agokern: cpuset: allow jails to modify child jails' roots
kevans [Sat, 19 Dec 2020 03:30:06 +0000 (03:30 +0000)]
kern: cpuset: allow jails to modify child jails' roots

This partially lifts a restriction imposed by r191639 ("Prevent a superuser
inside a jail from modifying the dedicated root cpuset of that jail") that's
perhaps beneficial after r192895 ("Add hierarchical jails."). Jails still
cannot modify their own cpuset, but they can modify child jails' roots to
further restrict them or widen them back to the modifying jails' own mask.

As a side effect of this, the system root may once again widen the mask of
jails as long as they're still using a subset of the parent jails' mask.
This was previously prevented by the fact that cpuset_getroot of a root set
will return that root, rather than the root's parent -- cpuset_modify uses
cpuset_getroot since it was introduced in r327895, previously it was just
validating against set->cs_parent which allowed the system root to widen
jail masks.

Reviewed by: jamie
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D27352

3 years agokern: cpuset: allow jails to modify child jails' roots
Kyle Evans [Sat, 19 Dec 2020 03:30:06 +0000 (03:30 +0000)]
kern: cpuset: allow jails to modify child jails' roots

This partially lifts a restriction imposed by r191639 ("Prevent a superuser
inside a jail from modifying the dedicated root cpuset of that jail") that's
perhaps beneficial after r192895 ("Add hierarchical jails."). Jails still
cannot modify their own cpuset, but they can modify child jails' roots to
further restrict them or widen them back to the modifying jails' own mask.

As a side effect of this, the system root may once again widen the mask of
jails as long as they're still using a subset of the parent jails' mask.
This was previously prevented by the fact that cpuset_getroot of a root set
will return that root, rather than the root's parent -- cpuset_modify uses
cpuset_getroot since it was introduced in r327895, previously it was just
validating against set->cs_parent which allowed the system root to widen
jail masks.

Reviewed by: jamie
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D27352

3 years agologin(1): when exporting variables check the result of setenv(3)
pfg [Sat, 19 Dec 2020 03:07:38 +0000 (03:07 +0000)]
login(1): when exporting variables check the result of setenv(3)

When exporting a variable we correctly check all the preconditions that
could make setenv(3) fail. Checking the setenv(3) return value seems
redundant, but given that login(1) is critical, it doesn't hurt to have
a post-check.

This change is based on the "Principles of Secure Coding" course by
Matthew Bishop, PhD., which specifically discusses this code in FreeBSD.

(This change redoes r368776 due to a silly mistake)

3 years agologin(1): when exporting variables check the result of setenv(3)
Pedro F. Giffuni [Sat, 19 Dec 2020 03:07:38 +0000 (03:07 +0000)]
login(1): when exporting variables check the result of setenv(3)

When exporting a variable we correctly check all the preconditions that
could make setenv(3) fail. Checking the setenv(3) return value seems
redundant, but given that login(1) is critical, it doesn't hurt to have
a post-check.

This change is based on the "Principles of Secure Coding" course by
Matthew Bishop, PhD., which specifically discusses this code in FreeBSD.

(This change redoes r368776 due to a silly mistake)

3 years agoRevert r368776:
pfg [Sat, 19 Dec 2020 02:42:14 +0000 (02:42 +0000)]
Revert r368776:
login(1): when exporting variables check the result of setenv(3)

mismatch: the return value upon error is -1, so the code was not
doing nothing.

3 years agoRevert r368776:
Pedro F. Giffuni [Sat, 19 Dec 2020 02:42:14 +0000 (02:42 +0000)]
Revert r368776:
login(1): when exporting variables check the result of setenv(3)

mismatch: the return value upon error is -1, so the code was not
doing nothing.

3 years agologin(1): when exporting variables check the result of setenv(3)
pfg [Sat, 19 Dec 2020 02:23:53 +0000 (02:23 +0000)]
login(1): when exporting variables check the result of setenv(3)

When exporting a variable we correctly check all the preconditions that
could make setenv(3) fail. Checking the setenv(3) return value seems
redundant, but given that login(1) is critical, it doesn't hurt to have
a post-check.

This change is based on the "Principles of Secure Coding" course by
Matthew Bishop, PhD., which specifically discusses this code in FreeBSD.

Differential Revision: https://reviews.freebsd.org/D26966

3 years agologin(1): when exporting variables check the result of setenv(3)
Pedro F. Giffuni [Sat, 19 Dec 2020 02:23:53 +0000 (02:23 +0000)]
login(1): when exporting variables check the result of setenv(3)

When exporting a variable we correctly check all the preconditions that
could make setenv(3) fail. Checking the setenv(3) return value seems
redundant, but given that login(1) is critical, it doesn't hurt to have
a post-check.

This change is based on the "Principles of Secure Coding" course by
Matthew Bishop, PhD., which specifically discusses this code in FreeBSD.

Differential Revision: https://reviews.freebsd.org/D26966

3 years agoRemove redundand redefinion, fixing build.
kib [Sat, 19 Dec 2020 01:46:47 +0000 (01:46 +0000)]
Remove redundand redefinion, fixing build.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

3 years agoRemove redundand redefinion, fixing build.
Konstantin Belousov [Sat, 19 Dec 2020 01:46:47 +0000 (01:46 +0000)]
Remove redundand redefinion, fixing build.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

3 years agousb: Replace ITUNERNET vendor with MICROCHIP and improve product names
jrtc27 [Fri, 18 Dec 2020 23:31:36 +0000 (23:31 +0000)]
usb: Replace ITUNERNET vendor with MICROCHIP and improve product names

These Mini-Box LCDs are using Microchip components and sub-licensed product
IDs. Whilst here, update the constant names and descriptions for the products
to use the names listed on the manufacturer's website rather than vague ones.
The picoLCD 4x20 is named that on the manufacturer's website so prefer that
name, even though linux-usb.org lists it with the numbers reversed as one might
expect.

Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D27670

3 years agousb: Replace ITUNERNET vendor with MICROCHIP and improve product names
Jessica Clarke [Fri, 18 Dec 2020 23:31:36 +0000 (23:31 +0000)]
usb: Replace ITUNERNET vendor with MICROCHIP and improve product names

These Mini-Box LCDs are using Microchip components and sub-licensed product
IDs. Whilst here, update the constant names and descriptions for the products
to use the names listed on the manufacturer's website rather than vague ones.
The picoLCD 4x20 is named that on the manufacturer's website so prefer that
name, even though linux-usb.org lists it with the numbers reversed as one might
expect.

Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D27670

3 years agoRename pass4check() to freeblock() and move from pass4.c to inode.c.
mckusick [Fri, 18 Dec 2020 23:28:27 +0000 (23:28 +0000)]
Rename pass4check() to freeblock() and move from pass4.c to inode.c.
The new name more accurately describes what it does and the file move
puts it with other similar functions. Done in preparation for future
cleanups. No functional differences intended.

Sponsored by: Netflix
Historic Footnote: my last FreeBSD svn commit

3 years agoRename pass4check() to freeblock() and move from pass4.c to inode.c.
Kirk McKusick [Fri, 18 Dec 2020 23:28:27 +0000 (23:28 +0000)]
Rename pass4check() to freeblock() and move from pass4.c to inode.c.
The new name more accurately describes what it does and the file move
puts it with other similar functions. Done in preparation for future
cleanups. No functional differences intended.

Sponsored by: Netflix
Historic Footnote: my last FreeBSD svn commit

3 years agoAdd ELF flag to disable ASLR stack gap.
kib [Fri, 18 Dec 2020 23:14:39 +0000 (23:14 +0000)]
Add ELF flag to disable ASLR stack gap.

Also centralize and unify checks to enable ASLR stack gap in a new
helper exec_stackgap().

PR: 239873
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

3 years agoAdd ELF flag to disable ASLR stack gap.
Konstantin Belousov [Fri, 18 Dec 2020 23:14:39 +0000 (23:14 +0000)]
Add ELF flag to disable ASLR stack gap.

Also centralize and unify checks to enable ASLR stack gap in a new
helper exec_stackgap().

PR: 239873
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

3 years agoproc.h: Reformat P_ and P2_ definitions.
kib [Fri, 18 Dec 2020 23:11:27 +0000 (23:11 +0000)]
proc.h: Reformat P_ and P2_ definitions.

Use traditional explicit leading zero format for hex numbers.
Align P2_ hex values.
Wrap long lines by splitting comments.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

3 years agoproc.h: Reformat P_ and P2_ definitions.
Konstantin Belousov [Fri, 18 Dec 2020 23:11:27 +0000 (23:11 +0000)]
proc.h: Reformat P_ and P2_ definitions.

Use traditional explicit leading zero format for hex numbers.
Align P2_ hex values.
Wrap long lines by splitting comments.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

3 years agostrerror.3: Fix whitespace issue introduced in r368714
jrtc27 [Fri, 18 Dec 2020 22:10:17 +0000 (22:10 +0000)]
strerror.3: Fix whitespace issue introduced in r368714

MFC with: 368714

3 years agostrerror.3: Fix whitespace issue introduced in r368714
Jessica Clarke [Fri, 18 Dec 2020 22:10:17 +0000 (22:10 +0000)]
strerror.3: Fix whitespace issue introduced in r368714

MFC with: 368714

3 years agoSwitch direct rt fields access in rtsock.c to newly-create field acessors.
melifaro [Fri, 18 Dec 2020 22:00:57 +0000 (22:00 +0000)]
Switch direct rt fields access in rtsock.c to newly-create field acessors.

rtsock code was build around the assumption that each rtentry record
 in the system radix tree is a ready-to-use sockaddr. This assumptions
 turned out to be not quite true:
* masks have their length tweaked, so we have rtsock_fix_netmask() hack
* IPv6 addresses have their scope embedded, so we have another explicit
 deembedding hack.

Change the code to decouple rtentry internals from rtsock code using
 newly-created rtentry accessors. This will allow to eventually eliminate
 both of the hacks and change rtentry dst/mask format.

Differential Revision: https://reviews.freebsd.org/D27451

3 years agoSwitch direct rt fields access in rtsock.c to newly-create field acessors.
Alexander V. Chernikov [Fri, 18 Dec 2020 22:00:57 +0000 (22:00 +0000)]
Switch direct rt fields access in rtsock.c to newly-create field acessors.

rtsock code was build around the assumption that each rtentry record
 in the system radix tree is a ready-to-use sockaddr. This assumptions
 turned out to be not quite true:
* masks have their length tweaked, so we have rtsock_fix_netmask() hack
* IPv6 addresses have their scope embedded, so we have another explicit
 deembedding hack.

Change the code to decouple rtentry internals from rtsock code using
 newly-created rtentry accessors. This will allow to eventually eliminate
 both of the hacks and change rtentry dst/mask format.

Differential Revision: https://reviews.freebsd.org/D27451

3 years agoSkip the vm.pmap.kernel_maps sysctl by default.
jhb [Fri, 18 Dec 2020 20:41:23 +0000 (20:41 +0000)]
Skip the vm.pmap.kernel_maps sysctl by default.

This sysctl node can generate very verbose output, so don't trigger it
for sysctl -a or sysctl vm.pmap.

Reviewed by: markj, kib
Differential Revision: https://reviews.freebsd.org/D27504

3 years agoSkip the vm.pmap.kernel_maps sysctl by default.
John Baldwin [Fri, 18 Dec 2020 20:41:23 +0000 (20:41 +0000)]
Skip the vm.pmap.kernel_maps sysctl by default.

This sysctl node can generate very verbose output, so don't trigger it
for sysctl -a or sysctl vm.pmap.

Reviewed by: markj, kib
Differential Revision: https://reviews.freebsd.org/D27504

3 years agoriscv: report additional known SBI implementations
mhorne [Fri, 18 Dec 2020 20:10:30 +0000 (20:10 +0000)]
riscv: report additional known SBI implementations

These implementation IDs are defined in the SBI spec, so we should print
their name if detected.

Submitted by: Danjel Qyteza <danq1222@gmail.com>
Reviewed by: jhb, kp
Differential Revision: https://reviews.freebsd.org/D27660

3 years agoriscv: report additional known SBI implementations
Mitchell Horne [Fri, 18 Dec 2020 20:10:30 +0000 (20:10 +0000)]
riscv: report additional known SBI implementations

These implementation IDs are defined in the SBI spec, so we should print
their name if detected.

Submitted by: Danjel Qyteza <danq1222@gmail.com>
Reviewed by: jhb, kp
Differential Revision: https://reviews.freebsd.org/D27660

3 years agoarm64: rk3399: Export the watchdog clock
manu [Fri, 18 Dec 2020 16:55:54 +0000 (16:55 +0000)]
arm64: rk3399: Export the watchdog clock

This clock is used by the watchdog IP and can be controlled only
in the secure world.

3 years agoarm64: rk3399: Export the watchdog clock
Emmanuel Vadot [Fri, 18 Dec 2020 16:55:54 +0000 (16:55 +0000)]
arm64: rk3399: Export the watchdog clock

This clock is used by the watchdog IP and can be controlled only
in the secure world.

3 years agoamd64: use register macros for gdb_cpu_getreg()
mhorne [Fri, 18 Dec 2020 16:16:03 +0000 (16:16 +0000)]
amd64: use register macros for gdb_cpu_getreg()

Prefer these newly-added definitions to bare values.

MFC after: 2 weeks
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.

3 years agoamd64: use register macros for gdb_cpu_getreg()
Mitchell Horne [Fri, 18 Dec 2020 16:16:03 +0000 (16:16 +0000)]
amd64: use register macros for gdb_cpu_getreg()

Prefer these newly-added definitions to bare values.

MFC after: 2 weeks
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.

3 years agoamd64: allow gdb(4) to write to most registers
mhorne [Fri, 18 Dec 2020 16:09:24 +0000 (16:09 +0000)]
amd64: allow gdb(4) to write to most registers

Similar to the recent patch to arm's gdb stub in r368414, allow GDB to
update the contents of most general purpose registers.

Reviewed by: cem, jhb, markj
MFC after: 2 weeks
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
NetApp PR: 44
Differential Revision: https://reviews.freebsd.org/D27642

3 years agoamd64: allow gdb(4) to write to most registers
Mitchell Horne [Fri, 18 Dec 2020 16:09:24 +0000 (16:09 +0000)]
amd64: allow gdb(4) to write to most registers

Similar to the recent patch to arm's gdb stub in r368414, allow GDB to
update the contents of most general purpose registers.

Reviewed by: cem, jhb, markj
MFC after: 2 weeks
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
NetApp PR: 44
Differential Revision: https://reviews.freebsd.org/D27642

3 years agoacpi: Ensure that adjacent memory affinity table entries are coalesced
markj [Fri, 18 Dec 2020 16:04:48 +0000 (16:04 +0000)]
acpi: Ensure that adjacent memory affinity table entries are coalesced

The SRAT may contain multiple distinct entries that together describe a
contiguous region of physical memory.  In this case we were not
coalescing the corresponding entries in the memory affinity table, which
led to fragmented phys_avail[] entries.  Since r338431 the vm_phys_segs[]
entries derived from phys_avail[] will be coalesced, resulting in a
situation where vm_phys_segs[] entries do not have a covering
phys_avail[] entry.  vm_page_startup() will not add such segments to the
physical memory allocator, leaving them unused.

Reported by: Don Morris <dgmorris@earthlink.net>
Reviewed by: kib, vangyzen
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D27620