]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 months agoncal: Error out if writing to stdout failed.
Dag-Erling Smørgrav [Thu, 4 May 2023 17:26:54 +0000 (17:26 +0000)]
ncal: Error out if writing to stdout failed.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans, imp
Differential Revision: https://reviews.freebsd.org/D39958

(cherry picked from commit 5903d9c00b75f17f09404d1001ee5aaae7603a61)

14 months agolocal-unbound-setup: Disable the libc subscriber.
Dag-Erling Smørgrav [Fri, 24 Mar 2023 20:45:24 +0000 (21:45 +0100)]
local-unbound-setup: Disable the libc subscriber.

This is the correct way to prevent resolvconf from updating resolv.conf.

Reviewed by: cy
Differential Revision: https://reviews.freebsd.org/D39262

(cherry picked from commit 9b20ab1e1ef7d3de672ec20a62f26a605db8d3d0)

14 months agoAllow a comma-separated list in login class capabilities,
Sean Eric Fagan [Sat, 14 Jan 2023 18:37:31 +0000 (10:37 -0800)]
Allow a comma-separated list in login class capabilities,
by adding a version of strcspn that allows quoting.

PR: 236204
Differential Revision: https://reviews.freebsd.org/D25368

(cherry picked from commit f32db406504ece1b28f43dc816736e081fe22826)

14 months agoriscv timer: use stimecmp CSR when available
Mitchell Horne [Thu, 25 May 2023 17:07:49 +0000 (14:07 -0300)]
riscv timer: use stimecmp CSR when available

The Sstc extension defines a new stimecmp CSR, allowing supervisor
software to set the timer, rather than just read it. When supported,
using this avoids the frequent trips through the SBI every time the
CPU's timer expires.

Reviewed by: jhb
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40241

(cherry picked from commit cadaabcc720bb20d6d604c4792acb29072d2882d)

14 months agoriscv: S-mode extension parsing
Mitchell Horne [Thu, 25 May 2023 17:07:26 +0000 (14:07 -0300)]
riscv: S-mode extension parsing

There are now several Supervisor-mode extensions that have entered the
'ratified' status, so begin parsing and reporting a few of these.

Recognize the following extensions:
 - Sstc: stimecmp/vstimecmp CSR
 - Svnapot: NAPOT* translation contiguity
 - Svpbmt: page-based memory types
 - Svinval: fine-grained TLB invalidation instructions
 - Sscofpmf: performance counter overflow

*i.e. "naturally aligned power-of-2" page granularity

For now, provide globals for Sstc and Sscofpmf, as we will make use of
these in the near future.

Plus, update the copyright statement after my recent work on this file.

Reviewed by: jhb
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40240

(cherry picked from commit 8bebb786820f634d47522711b8cd56a66db3785d)

14 months agoriscv: Print less CPU info
Mitchell Horne [Mon, 22 May 2023 23:54:36 +0000 (20:54 -0300)]
riscv: Print less CPU info

Change the reporting strategy to more closely follow what arm64
implements:
 - Always print the one-line CPU summary when a core comes online
 - Only print the additional fields (e.g. ISA) when they differ from the
   CPU before it

In the common case of identical CPUs this results in informative but
non-repetitive output. For example, in QEMU:

  CPU 0  : Vendor=Unspecified Core=Unknown (Hart 0)
    marchid=0x80032, mimpid=0x80032
    MMU: 0x7<Sv39,Sv48,Sv57>
    ISA: 0x112d<Atomic,Compressed,Double,Float,Mult/Div>
  real memory  = 8589934592 (8192 MB)
  avail memory = 8332300288 (7946 MB)
  FreeBSD/SMP: Multiprocessor System Detected: 6 CPUs
  CPU 1  : Vendor=Unspecified Core=Unknown (Hart 1)
  CPU 2  : Vendor=Unspecified Core=Unknown (Hart 2)
  CPU 3  : Vendor=Unspecified Core=Unknown (Hart 3)

Reviewed by: markj
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40024

(cherry picked from commit 940e6d36de1ef010f731e290c9b2b08535fff424)

14 months agoriscv: MMU detection
Mitchell Horne [Mon, 22 May 2023 23:53:43 +0000 (20:53 -0300)]
riscv: MMU detection

Detect and report the supported MMU for each CPU. Export the
capabilities to the rest of the kernel and use it in pmap_bootstrap() to
check for Sv48 support.

Reviewed by: markj
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39814

(cherry picked from commit 7245ffd10eda4ff604840350943d762f70657983)

14 months agoriscv: Print ISA extensions
Mitchell Horne [Mon, 22 May 2023 23:52:28 +0000 (20:52 -0300)]
riscv: Print ISA extensions

Report the CPU's single-letter ISA extensions in printcpuinfo().

Reviewed by: markj
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39813

(cherry picked from commit 78a3420c20e075ca8c44a4670ab5ca5afe6bbdf5)

14 months agoriscv: Rework CPU identification (second part)
Mitchell Horne [Mon, 22 May 2023 23:51:44 +0000 (20:51 -0300)]
riscv: Rework CPU identification (second part)

Modify when and how we perform parsing and reporting. Most notably,
everything now executes on CPU 0.

The de-facto standard way to enumerate CPU features (ISA extensions) on
RISC-V is by parsing each CPU's ISA string. We currently obtain this
information from the device tree, and in the future will be able to pull
it from ACPI tables.

Eliminate the SYSINIT from identcpu.c. We still need to walk the /cpus
list in the device tree, but now do this one CPU at a time, as a step in
the identify_cpu() procedure. This is slightly less error prone, and
allows us to parse ISA features for CPU 0 much earlier.

Make use of the SMP hooks cpu_mp_start() and cpu_mp_announce() to
identify and print secondary CPU info, respectively. This causes
secondary processor identification to be printed much earlier in boot;
everything is done by SI_SUB_CPU, SI_ORDER_THIRD. Adjust some other
printf() calls so that we get enough useful info to debug under
bootverbose.

Reviewed by: markj (slightly earlier version)
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39811

(cherry picked from commit b37dc0903332c4e3b593f1c92df986e8d367d697)

14 months agoriscv: Call identify_cpu() earlier for CPU 0
Mitchell Horne [Mon, 22 May 2023 23:50:09 +0000 (20:50 -0300)]
riscv: Call identify_cpu() earlier for CPU 0

It is advantageous to have knowledge of ISA features as early as
possible. For example, the presence of newer virtual memory extensions
may be useful to pmap_bootstrap().

To achieve this, split out the printf() parts of identify_cpu() into a
separate function, printcpuinfo(). This latter function will be called
later in boot after the console has been initialized.

Reviewed by: markj
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39810

(cherry picked from commit b0d45b023e8c9af50312c7b56c4be9c39657afcb)

14 months agoriscv: Rework CPU identification (first part)
Mitchell Horne [Mon, 22 May 2023 23:48:41 +0000 (20:48 -0300)]
riscv: Rework CPU identification (first part)

Make better use of the RISC-V identification CSRs: mvendorid, marchid,
and mimpid. This code was written before these registers were
well-specified, or even available to the kernel. It currently fails to
recognize any CPU or platform.

Per the privileged specification, mvendorid contains the JEDEC vendor ID,
or zero.

The marchid register denotes the CPU microarchitecture. This is either
one of the globally allocated open-source implementation IDs, or the
field has a custom encoding. Therefore, for known vendors (SiFive) we
can also maintain a list of known marchid values. If we can not give a
name to the CPU but marchid is non-zero, then just print its value in
the report.

The mimpid (implementation ID) could be used in the future to more
uniquely identify the micro-architecture, but it really remains to be
seen how it gets used. For now we just print its value.

Thank you to Danjel Qyteza <danq1222@gmail.com> who submitted an early
version of this change to me, although it has been almost entirely
rewritten.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39809

(cherry picked from commit 88b4d124efc5a2d45660551fe0750acc0be6d3cd)

14 months agolib/csu: do not compile the body of handle_static_init() for PIC build at all
Konstantin Belousov [Sun, 12 Mar 2023 01:45:37 +0000 (03:45 +0200)]
lib/csu: do not compile the body of handle_static_init() for PIC build at all

(cherry picked from commit c383f4857f1696c4beb782db36323f46f0c4f6de)

14 months agolibc/csu: add powerpcspe
Konstantin Belousov [Sun, 12 Mar 2023 09:59:16 +0000 (11:59 +0200)]
libc/csu: add powerpcspe

(cherry picked from commit 94e3409e2d02ce3e4817d1a94051dc798e520745)

14 months agolibc/csu: rename ignore_init.c to libc_start1.c
Konstantin Belousov [Sat, 11 Mar 2023 22:56:46 +0000 (00:56 +0200)]
libc/csu: rename ignore_init.c to libc_start1.c

(cherry picked from commit c5c9d980c4b0ca3866cb2ad67ec3f7111f5c4285)

14 months agolibc: move declaration of 'char **environ' to common private header
Konstantin Belousov [Sun, 6 Nov 2022 04:08:36 +0000 (06:08 +0200)]
libc: move declaration of 'char **environ' to common private header

(cherry picked from commit 0c6f0c0db75ea5a1e89a68a163fc555bdd7d00f5)

14 months agox86: microoptimize static PIE startup
Konstantin Belousov [Tue, 1 Nov 2022 01:42:50 +0000 (03:42 +0200)]
x86: microoptimize static PIE startup

(cherry picked from commit 0303938539f3f12da65128fc67f883efe82dc125)

14 months agocsu: move common code to libc
Konstantin Belousov [Sun, 30 Oct 2022 23:47:44 +0000 (01:47 +0200)]
csu: move common code to libc

For MFC purposes, keep lib/csu code intact, only add lib/libc/csu bits.
This allows stable/13 to run simple binaries compiled on 14.

(cherry picked from commit 51015e6d0f570239b0c2088dc6cf2b018928375d)

14 months agolib/csu: Get rid of unused fptr typedef on amd64.
Gleb Popov [Thu, 22 Jul 2021 15:28:21 +0000 (18:28 +0300)]
lib/csu: Get rid of unused fptr typedef on amd64.

(cherry picked from commit feac06569a381dd7fec92c7d490fc34ef0bbdda5)

14 months agonfsuserd: Improve failure message when running in a jail
Rick Macklem [Mon, 29 May 2023 20:38:07 +0000 (13:38 -0700)]
nfsuserd: Improve failure message when running in a jail

If a jail is not correctly configured to run nfsd(8)
in the jail, nfsuserd(8) cannot run.
This patch improves the failure message for this case.

(cherry picked from commit a94018e2003b83c10e8fb814f7a8d47e2513da95)

14 months agortld: fix typo in comment
Konstantin Belousov [Sat, 10 Jun 2023 01:35:14 +0000 (04:35 +0300)]
rtld: fix typo in comment

(cherry picked from commit a254f671025f3da313e1d02646b6402f54006e14)

14 months agortld: fix allocate_module_tls() variant I fallback to static allocation
Konstantin Belousov [Fri, 9 Jun 2023 00:51:32 +0000 (03:51 +0300)]
rtld: fix allocate_module_tls() variant I fallback to static allocation

(cherry picked from commit e9a38ed2fa61fd264a80f24ceb35f39b0ac6463d)

14 months agortld: do not allow both dynamic DTV index and static TLS offset
Konstantin Belousov [Mon, 5 Jun 2023 00:54:46 +0000 (03:54 +0300)]
rtld: do not allow both dynamic DTV index and static TLS offset

(cherry picked from commit 91880e07f605edb90339685bc934699a4344de3b)

14 months agortld: rename tls_done to tls_static
Konstantin Belousov [Mon, 5 Jun 2023 00:43:55 +0000 (03:43 +0300)]
rtld: rename tls_done to tls_static

(cherry picked from commit 283a4f409731ba3a4eb1be41e151c20e8a960c03)

14 months agortld_tls.h: style
Konstantin Belousov [Mon, 5 Jun 2023 01:15:31 +0000 (04:15 +0300)]
rtld_tls.h: style

(cherry picked from commit a7bca6949252f32bb39440cb2914ba23e1c01551)

14 months agogssd: Improve failure message when running in a jail
Rick Macklem [Sun, 28 May 2023 18:06:27 +0000 (11:06 -0700)]
gssd: Improve failure message when running in a jail

If a jail is not correctly configured to run nfsd(8)
in the jail, gssd(8) cannot run.
This patch improves the failure message for this case.

(cherry picked from commit 697727110b68e483c320d834bcbcdf01c01142a1)

14 months agorc(8): document how to reload rc's configuration
Mina Galić [Fri, 2 Jun 2023 18:01:03 +0000 (19:01 +0100)]
rc(8): document how to reload rc's configuration

The fact that rc(8) only reads its configuration once is in the man
page, but how to trigger a reload is only in the code.

Discovered while trying to make cloud-init disable and stop syslogd.

Thanks to RhodiumToad for providing the words.

Reviewed by:           debdrup, grahamperrin
Approved by:           grahamperrin, imp
Sponsored by:          The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D40329

(cherry picked from commit 0981275c75d5678172eb9dd8fbc89ef61c05c979)

14 months agolibpmc: expand PMC_OP* defines
Mitchell Horne [Thu, 1 Jun 2023 18:19:22 +0000 (15:19 -0300)]
libpmc: expand PMC_OP* defines

When performing the syscall, specify the full name of the desired
operation. This improves grep-ability.

No functional change.

Reviewed by: jkoshy
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40334

(cherry picked from commit be75e578549fcc1da3754a29fc0e7b63672e7b44)

14 months agobcm2835_gpio: Handle BCM2711 pin configuration
Tetsuya Uemura [Sun, 28 May 2023 12:56:21 +0000 (09:56 -0300)]
bcm2835_gpio: Handle BCM2711 pin configuration

Add support for GPIO internal pull up/down configuration on RPi4 family.

BCM2711 SoC on 4th generation Raspberry Pi changed the way to configure
its GPIO pins' internal pull up/down resistors. NetBSD already have
support for this change, and port it to FreeBSD is trivial.

This patch, based on the NetBSD commit adds the appropriate method for
BCM2711 and now we can properly configure the GPIO pins' pull status.

PR: 256372
Reviewed by: mhorne
Obtained from: NetBSD bb88cfa64ad8
Pull Request: https://github.com/freebsd/freebsd-src/pull/746

(cherry picked from commit 9d35469e9a6892b3845f66d3513f5c528fe68a77)

14 months agohier(7): fix a couple mandoc warnings
Mitchell Horne [Wed, 10 May 2023 13:26:35 +0000 (10:26 -0300)]
hier(7): fix a couple mandoc warnings

These references are rendered correctly without the zero-width space.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 031049cf3262ec5981cebc35d9b70623177a84bd)

14 months agohier(7): document /home/ and /usr/home/
Mitchell Horne [Wed, 10 May 2023 12:53:56 +0000 (09:53 -0300)]
hier(7): document /home/ and /usr/home/

Reviewed by: imp
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40002

(cherry picked from commit 36db6b04962a01ff7b21592def02d4c570dac939)

14 months agohier(7): drop list of /usr/share/doc subdirectories
Mitchell Horne [Wed, 10 May 2023 12:53:40 +0000 (09:53 -0300)]
hier(7): drop list of /usr/share/doc subdirectories

Several entries are outdated, several new ones are missing. I do not
think there is much value added in maintaining this.

Reviewed by: imp, emaste
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40001

(cherry picked from commit 1bc55f58393ffd9714ebfd1ad4e9555cff76e8f6)

14 months agohier(7): drop list of /usr/include subdirectories
Mitchell Horne [Wed, 10 May 2023 12:52:47 +0000 (09:52 -0300)]
hier(7): drop list of /usr/include subdirectories

It is nice to have, however, the location of this information means that
it will naturally be missed by developers adding or removing directories
to the layout, so it trends out-of-date and it is out-of-date.

The target audience for hier(7) is users and administrators. It is not
expected to be a place that programmers should go to learn about the
purposes of the different C headers provided by FreeBSD.

Program authors needing FreeBSD-specific interfaces or libraries
(#include <sys/queue.h>, for instance) will either be following a more
detailed man page, or consulting the header contents directly. Folks
targeting standardized headers (#include <sys/time.h>) will not need
hier(7) to tell them where those headers are under /usr/include.

In other words, this is more detail than necessary for this document.
I'd go as far as to say that many of the existing entries in this list
do little more than parrot the name of the directory.

With all this in mind, let's drop the maintenance burden.

Reviewed by: imp, emaste
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40000

(cherry picked from commit c3b611e153e0480a354559f82fe5dc4c455bad4e)

14 months agoriscv: Use PMAP_MAPDEV_EARLY_SIZE in locore and pmap_bootstrap
Alfredo Mazzinghi [Thu, 25 May 2023 15:33:12 +0000 (16:33 +0100)]
riscv: Use PMAP_MAPDEV_EARLY_SIZE in locore and pmap_bootstrap

Use PMAP_MAPDEV_EARLY_SIZE instead of assuming that its value is always
L2_SIZE. Add compile-time assertions to check that the size matches the
expectations in locore.

Reviewed by: mhorne
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D40110

(cherry picked from commit ef0a711fd5d0d389205c18c869c78b9a4d639ddb)

14 months agoarm64/disassem.c: Add shifted register instruction definitions
Mykola Hohsadze [Thu, 25 May 2023 14:41:55 +0000 (11:41 -0300)]
arm64/disassem.c: Add shifted register instruction definitions

Add disassembly support for the following shifted register instructions:
 * adds
 * subs
 * sub
 * neg
 * negs
 * cmp
 * cmn

The 'Mandatory Tokens' checks are relaxed to allow for the alias
instructions (e.g. cmp) which hard-code one or more registers as xzr.

Reviewed by: mhorne
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D40006

(cherry picked from commit ffa75b573f043951c7958c200c1e0e1b1f703740)

14 months agoarm64/disassem.c: Make output lowercase
Mykola Hohsadze [Thu, 25 May 2023 14:40:38 +0000 (11:40 -0300)]
arm64/disassem.c: Make output lowercase

Update the few uppercase fields fields to be consistent with others.

Reviewed by: mhorne
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D39820

(cherry picked from commit 8a852d3e9ff7c4d6f93b65beba8d674127109fc4)

14 months agoarm64/disassem.c: Add detection of xzr and sp
Mykola Hohsadze [Mon, 8 May 2023 13:39:09 +0000 (10:39 -0300)]
arm64/disassem.c: Add detection of xzr and sp

Added support to distinguish between XZR/WZR and SP/WSP registers.

Add new OP_ flags to indicate if the instruction allows the use of SP
for a given register field. "wSP" and "SP" are removed from w_reg and
x_reg, and helper functions are introduced for this purpose of detecting
the correct name of the x31 register.

mhorne: While here, adjust some whitespace issues from a previous
commit.

Reviewed by: mhorne
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D39862

(cherry picked from commit 9f60b8ce6085049c3886c3e2eb8d4034cef56627)

14 months agoofw_cpu: quiet secondary CPU devices
Mitchell Horne [Wed, 24 May 2023 13:27:55 +0000 (10:27 -0300)]
ofw_cpu: quiet secondary CPU devices

We already do plenty to announce the different CPUs in dmesg. Follow the
ACPI CPU strategy of reporting the first CPU device, but quieting the
rest for non-verbose boot. This cuts down slightly on dmesg output.

Reviewed by: manu, jhb
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40243

(cherry picked from commit 08637d5d1580af743f4ed6504104d038e017f918)

14 months agoofw_cpu: whitespace cleanup
Mitchell Horne [Wed, 24 May 2023 13:27:34 +0000 (10:27 -0300)]
ofw_cpu: whitespace cleanup

Reviewed by: jhb, emaste
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40242

(cherry picked from commit 5edffecc4b4ec6c3e1f09174f155a3abdd928d01)

14 months agohwpmc: remove stub pmd_switch_{in,out} methods
Mitchell Horne [Fri, 5 May 2023 21:59:41 +0000 (18:59 -0300)]
hwpmc: remove stub pmd_switch_{in,out} methods

Most platforms (non-x86) don't require these methods and implement stub
versions. If we initialize the pmc_mdep structure to always point to the
generic versions, then we can purge the duplicate stubs.

Reviewed by: jkoshy
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39913

(cherry picked from commit fa88954fd8f16ef60084a73d446a23e791ed22e5)

14 months agohwpmc: remove pmd_pcpu_{init,fini} callbacks
Mitchell Horne [Fri, 5 May 2023 21:59:33 +0000 (18:59 -0300)]
hwpmc: remove pmd_pcpu_{init,fini} callbacks

These are unused on all platforms.

Reviewed by: jkoshy, emaste
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39912

(cherry picked from commit 772b2dc3abc5072743e7598d35e0a8ad621e7b0d)

14 months agohwpmc: pass pmc pointer to more class methods
Mitchell Horne [Fri, 5 May 2023 22:00:02 +0000 (19:00 -0300)]
hwpmc: pass pmc pointer to more class methods

In many cases this avoids an extra lookup, since the callers always have
pm at hand. We can also eliminate several assertions, mostly for pm !=
NULL. The class methods are an internal interface, and the callers
already handle such a scenario. No functional change intended.

Reviewed by: jkoshy
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39915

(cherry picked from commit 39f92a76a99a2ceb747250da4f2d627b9c317f8c)

14 months agohwpmc: unused/diagused annotations in tsc class
Mitchell Horne [Fri, 5 May 2023 21:59:53 +0000 (18:59 -0300)]
hwpmc: unused/diagused annotations in tsc class

These are preferred over casts to void. No functional change.

Reviewed by: jkoshy
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39914

(cherry picked from commit a35453b9c7644f11df83d0c7e73da488f521e56e)

14 months agopmcstat: augment an error message
Mitchell Horne [Fri, 5 May 2023 21:58:23 +0000 (18:58 -0300)]
pmcstat: augment an error message

It also applies to the -t argument.

Reviewed by: jkoshy
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39907

(cherry picked from commit bf66159342e86b1dba02f1c463b47dd96fb09969)

14 months agohwpmc: use kstack_contains()
Mitchell Horne [Fri, 5 May 2023 21:59:01 +0000 (18:59 -0300)]
hwpmc: use kstack_contains()

This existing helper function is preferable to the hand-rolled
calculation of the kstack bounds.

Make some small style improvements while here. Notably, rename every
instance of "r", the return address, to "ra". Tidy the includes in the
affected files.

Reviewed by: jkoshy
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39909

(cherry picked from commit aba91805aa92a47b2f3f01741a55ff9f07c42d04)

14 months agohwpmc: purge EOL release compatibility
Elliott Mitchell [Thu, 8 Sep 2022 16:16:03 +0000 (16:16 +0000)]
hwpmc: purge EOL release compatibility

(cherry picked from commit cb6abe87cf1c178ea1b9cd8a385e53459aef96e8)

14 months agohwpmc: simplify arm64 kernel stack unwinding
Mitchell Horne [Fri, 5 May 2023 21:58:40 +0000 (18:58 -0300)]
hwpmc: simplify arm64 kernel stack unwinding

Use the unwind_frame() function, which properly validates the frame
pointer and uses ADDR_MAKE_CANONICAL() for the pc, required when PAC is
enabled.

Reviewed by: andrew, markj, jkoshy
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39934

(cherry picked from commit 5387495773e9e92441b795c0eb8c2a3ecc25708a)

14 months agohwpmc_logging: less macro magic for type names
Mitchell Horne [Fri, 5 May 2023 21:59:27 +0000 (18:59 -0300)]
hwpmc_logging: less macro magic for type names

Provide the log type names in their entirely, rather than relying on the
macro to prepend the prefix. This improves their searchability; for
example, if I see PMCLOG_TYPE_PMCALLOCATE in libpmc I will now be able
to find where that is emitted in the kernel with a simple grep.

Reviewed by: jkoshy, emaste
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39911

(cherry picked from commit 3a7c9fc01bdae13edbd5724745b748e6a61065eb)

14 months agohwpmc: don't use deprecated copystr(9)
Mitchell Horne [Fri, 5 May 2023 21:59:15 +0000 (18:59 -0300)]
hwpmc: don't use deprecated copystr(9)

It is just wrapper around strlcpy(), but results in more complicated
code. Clean this up to use strlcpy() or snprintf() as appropriate.

Reviewed by: jkoshy
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39910

(cherry picked from commit 31610e34b7e39d573d927ea98346c88f23cabdab)

14 months agohwpmc: formatting of CPU and class lists
Mitchell Horne [Fri, 5 May 2023 21:58:13 +0000 (18:58 -0300)]
hwpmc: formatting of CPU and class lists

The end result is much more legible in both cases.

Reviewed by: jkoshy
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39906

(cherry picked from commit 7253dc57a0b400ff745a43017928304ff8dcf33f)

14 months agohwpmc: trim obsolete Intel CPU and class defs
Mitchell Horne [Fri, 5 May 2023 21:57:38 +0000 (18:57 -0300)]
hwpmc: trim obsolete Intel CPU and class defs

No functional change.

Reviewed by: jkoshy
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39904

(cherry picked from commit ca43b2ae3ef2ed86b0df36296464d7830b61b944)

14 months agopmccontrol: drop Pentium 4 special case
Mitchell Horne [Fri, 5 May 2023 21:57:23 +0000 (18:57 -0300)]
pmccontrol: drop Pentium 4 special case

This is dead code; we no longer support Pentium hardware in libpmc or
hwpmc.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 8bd4459560f39bdbccba76a21539136a7a44b9d7)

14 months agopmc_events.h: event list formatting
Mitchell Horne [Fri, 5 May 2023 21:57:14 +0000 (18:57 -0300)]
pmc_events.h: event list formatting

Improve the legibility of the list. Bump overall indentation, fix some
whitespace, and sort the IAF block.

Reviewed by: jkoshy
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39903

(cherry picked from commit b6c9d2a3f892169d4a6acc92869f9d9db52876ea)

14 months agopmc_events.h: update event list comment
Mitchell Horne [Fri, 5 May 2023 21:56:55 +0000 (18:56 -0300)]
pmc_events.h: update event list comment

This comment is no longer in sync with the contents of __PMC_EVENTS().
Update to reflect the removal of various Intel event definitions from
this list; these event definitions now come from Linux and live in
lib/libpmc/pmu-events/.

Reviewed by: jkoshy
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39902

(cherry picked from commit 6bdf067890ed1d1515ad0dbd105848bb11711210)

14 months agohwpmc: remove remaining UCP event definitions
Mitchell Horne [Fri, 5 May 2023 21:56:34 +0000 (18:56 -0300)]
hwpmc: remove remaining UCP event definitions

Although this block has remained in __PMC_EVENTS(), there is no handling
of UCP in libpmc/libpmc.c, so it is not possible to select one of these
events. It should therefore be impossible to trigger the code removed
from ucp_start_pmc(). Note that the GQ_SNOOP_MSF MSR exists only for
Nehalem and Westmere architectures, and the related events do not exist
for later generations.

The Uncore support in hwpmc has severely atrophied in general. We have
uncore event definitions in pmu-events, but the kernel support was
written against Intel Performance Measurement Architecture version 2,
and is disabled for processor generations later than Westmere. Nehalem
and Westmere lack uncore event definitions in pmu-events. I'd be
surprised if Uncore support is usable on any machine in its current
state.

Reviewed by: jkoshy
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39901

(cherry picked from commit d71a439020721a9abea5c353b9e03b5dc29d253e)

14 months agohwpmc: drop vestigial IAP event definitions
Mitchell Horne [Fri, 5 May 2023 21:55:54 +0000 (18:55 -0300)]
hwpmc: drop vestigial IAP event definitions

These are maintained elsewhere. No functional change.

Reviewed by: jkoshy
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39900

(cherry picked from commit 1be8ef26794dcf93e2f4851474808dc3b34dbcbd)

14 months agoprintf(9): clarify the description of %b
Mitchell Horne [Tue, 25 Apr 2023 20:26:36 +0000 (17:26 -0300)]
printf(9): clarify the description of %b

The bit values are numbers given in octal representation, not decimal,
as one might assume from the description. Same goes for the base,
although this has an example.

Reviewed by: emaste
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39815

(cherry picked from commit 82bc33d5ad2e00179ea7026c496a35b00550da15)

14 months agoarm64/disassem.c: Fix typo sxts to sxts and amount for TYPE_02
Mykola Hohsadze [Tue, 18 Apr 2023 15:50:58 +0000 (12:50 -0300)]
arm64/disassem.c: Fix typo sxts to sxts and amount for TYPE_02

The current implementation is wrong, since it unconditionally sets the
amount equal to the <size> field of the instruction. However, when the
<S> bit (scale) is not set, it must be zero.

Also fix a typo, sxts to sxtx, according to the Arm64 documentation.

Reviewed by: mhorne
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D39334

(cherry picked from commit cb923f03faa068f0c8ed5ffa7c3485ad7918be10)

14 months agoarm64/disassem.c: Add support str/strb/strh instructions
Mykola Hohsadze [Tue, 18 Apr 2023 15:51:15 +0000 (12:51 -0300)]
arm64/disassem.c: Add support str/strb/strh instructions

Added disassembly support for each type of str/strb/strh instruction
encoding.

Reviewed by: mhorne
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D39336

(cherry picked from commit 7edb7adf8c8b0615c6d845ca789d4f527f8b18a3)

14 months agoarm64/disassem.c: style and formatting
Mykola Hohsadze [Tue, 18 Apr 2023 15:50:33 +0000 (12:50 -0300)]
arm64/disassem.c: style and formatting

Reviewed by: mhorne
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D38899

(cherry picked from commit 5b61ad4b005d73b497537fcb41e3557314d18ddd)

14 months agotop: Use a cpuset_t to represent a CPU mask
Mark Johnston [Fri, 26 May 2023 19:14:21 +0000 (15:14 -0400)]
top: Use a cpuset_t to represent a CPU mask

The code attempts to detect holes in the CPU ID space, but previously
this would only work for up to sizeof(long)*8 CPUs.

MFC after: 2 weeks

(cherry picked from commit e96ed177465ee59fcc43dd0696106e5342e28c27)

14 months agoktrace: Make sys/ktrace.h self-contained
Mark Johnston [Thu, 1 Jun 2023 21:10:44 +0000 (17:10 -0400)]
ktrace: Make sys/ktrace.h self-contained

MFC after: 2 weeks

(cherry picked from commit c8a383396888d897d057088d7f84fb57de40807e)

14 months agosysarch: Add includes required for ktrcapfail() calls to be compiled
Mark Johnston [Thu, 1 Jun 2023 21:13:09 +0000 (17:13 -0400)]
sysarch: Add includes required for ktrcapfail() calls to be compiled

Reported by: jfree
MFC after: 1 week

(cherry picked from commit 18282c4772fb68a0e076d17f30de9749190542f4)

14 months agox86: Mark the CPU idle function table as const
Mark Johnston [Fri, 2 Jun 2023 17:22:32 +0000 (13:22 -0400)]
x86: Mark the CPU idle function table as const

No functional change intended.

MFC after: 1 week

(cherry picked from commit 7266f5249848512b99d4dc78256af148f9df986e)

14 months agoipsec: Make algorithm tables read-only
Mark Johnston [Fri, 2 Jun 2023 17:22:56 +0000 (13:22 -0400)]
ipsec: Make algorithm tables read-only

No functional change intended.

MFC after: 1 week

(cherry picked from commit 056305d3aa2bdb93e57c7a3d369e5742b1b404b8)

14 months agontp: import ntp-4.2.8p17
Cy Schubert [Tue, 6 Jun 2023 12:43:04 +0000 (05:43 -0700)]
ntp: import ntp-4.2.8p17

Fixes two small bugs including one regression.

Merge commit 'ab1f1aa8333369a83ff284848fc3fc2e52d5f29f'

(cherry picked from commit e6bfd18d21b225af6a0ed67ceeaf1293b7b9eba5)

ntp: Fix build

Two files used to obtain time from reference clocks did not include
ntp_types.h resulting in an undefined NONEMPTY_TRANSLATION_UNIT.

Fixes: e6bfd18d21b2

(cherry picked from commit 82aa1470c94c55db31c0168d65f8a08fa1d41378)

14 months agousr.bin/bc: fix build issue of version 6.6.0 on MIPS
Stefan Eßer [Thu, 8 Jun 2023 14:45:11 +0000 (16:45 +0200)]
usr.bin/bc: fix build issue of version 6.6.0 on MIPS

The update removed MIPS and POWERPC64 from the list of architectures
that cannot use LTO to build this software.

Restore the previous exception list and do not use LTO on MIPS,
MIPS64, POWERPC64, and RISCV64. This is necessary due to differences
in compiler support for LTO in -CURRENT vs. 13-STABLE.

14 months agosignal: Make the signal disposition table const
Mark Johnston [Thu, 1 Jun 2023 21:11:55 +0000 (17:11 -0400)]
signal: Make the signal disposition table const

No functional change intended.

MFC after: 1 week

(cherry picked from commit 0d3f1b4f25150c3c5afaa669715421821323ead1)

14 months agoktrace: Make the data lengths table const
Mark Johnston [Thu, 1 Jun 2023 21:12:42 +0000 (17:12 -0400)]
ktrace: Make the data lengths table const

No functional change intended.

MFC after: 1 week

(cherry picked from commit 3080f82b8b644809d8731c4f5c72f1530c400eb3)

14 months agovendor/bc: import version 6.3.1
Stefan Eßer [Fri, 24 Feb 2023 22:14:58 +0000 (23:14 +0100)]
vendor/bc: import version 6.3.1

This version adds a command to dc to query whether extended registers
are enabled or not.

(cherry picked from commit 103d7cdfb7435591049413e1bc39482cb316efb7)

contrib/bc: import version 6.5.0

This release that fixes an infinite loop bug in the (non-standard)
extended math library functions root() and cbrt(), fixes a bug with
BC_LINE_LENGTH=0, and adds the fib() function to the extended math
library to calculate Fibonacci numbers.

(cherry picked from commit 8c48f4c5377ddc3dc55388f181f23111145f7099)

contrib/bc: upgrade to version 6.6.0

This update removes printing of a leading zero in scientific or
engineering output modes (which are an extended feature of this
implementation).

(cherry picked from commit 76238846ad3e9e271a3d1f792f72beab727fd153)

15 months agonfsstat.1: Add a missing argument to -w
Mateusz Piotrowski [Mon, 5 Jun 2023 12:32:46 +0000 (14:32 +0200)]
nfsstat.1: Add a missing argument to -w

MFC after: 3 days
Sponsored by: Klara Inc.

(cherry picked from commit 979754a15ae4c507cd739163331cbaef7b100e23)

15 months agoUpdates to UFS/FFS superblock integrity checks when reading a superblock.
Kirk McKusick [Wed, 7 Jun 2023 23:12:12 +0000 (16:12 -0700)]
Updates to UFS/FFS superblock integrity checks when reading a superblock.

Reported-by: Robert Morris
PR:           271351
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit c79a1416955a260424a5dd2013b114ff864bc926)

15 months agoFix a bug in fsck_ffs(8) triggered by corrupted filesystems.
Kirk McKusick [Mon, 29 May 2023 21:58:20 +0000 (14:58 -0700)]
Fix a bug in fsck_ffs(8) triggered by corrupted filesystems.

Reported-by: Robert Morris
PR:           271414
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 6a71277c3037df2c3a70464c2e2bf20dec2c128a)

15 months agoCleanups to fsck_ffs(8).
Kirk McKusick [Mon, 29 May 2023 21:54:52 +0000 (14:54 -0700)]
Cleanups to fsck_ffs(8).

Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 5267120645fa52eac771c9bd8e28d68620a3bb89)

15 months agoFix a bug in fsck_ffs(8) triggered by corrupted filesystems.
Kirk McKusick [Sun, 28 May 2023 22:23:16 +0000 (15:23 -0700)]
Fix a bug in fsck_ffs(8) triggered by corrupted filesystems.

Reported-by: Robert Morris
PR:           271383
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit b796bfce48698449470b751de6b0d96ae7047202)

15 months agoFix a bug in fsck_ffs(8) triggered by corrupted filesystems.
Kirk McKusick [Sun, 28 May 2023 00:09:02 +0000 (17:09 -0700)]
Fix a bug in fsck_ffs(8) triggered by corrupted filesystems.

Reported-by: Robert Morris
PR:           271378
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 101a9ac07128a17d8797cc3e93978d2cfa457e99)

15 months agoFix a bug in fsck_ffs(8) triggered by corrupted filesystems.
Kirk McKusick [Sat, 27 May 2023 23:07:09 +0000 (16:07 -0700)]
Fix a bug in fsck_ffs(8) triggered by corrupted filesystems.

The last valid inode in the filesystem is maxino - 1, not maxino.
Thus validity checks should ino < maxino, not ino <= maxino.

Reported-by: Robert Morris
PR:           271312
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 11ce203e0535c1c8f520c9bda81ab9326cf5db80)

15 months agoCorrect two bugs in fsck_ffs(8) triggered by corrupted filesystems.
Kirk McKusick [Sat, 27 May 2023 05:41:57 +0000 (22:41 -0700)]
Correct two bugs in fsck_ffs(8) triggered by corrupted filesystems.

Reported-by: Robert Morris
PR:           271310
PR:           271354
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 03a8680202ef7d7e68adc70625633c490b4ed637)

15 months agoDo not try to adjust a directory depth when its reconnection is declined.
Kirk McKusick [Sat, 27 May 2023 05:55:11 +0000 (22:55 -0700)]
Do not try to adjust a directory depth when its reconnection is declined.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 49943856eb2710c6a6debdfa40d89d31d3fdb8ea)

15 months agoAdd the ability to adjust directory depths to background fsck_ffs(8).
Kirk McKusick [Fri, 26 May 2023 02:27:04 +0000 (19:27 -0700)]
Add the ability to adjust directory depths to background fsck_ffs(8).

Sponsored by: The FreeBSD Foundation

(cherry picked from commit e4a905d1e0d94ddb8e15de50d37e67f13e058047)

15 months agossh: fix leak and apply style(9) to hostname canonicalization
Ed Maste [Wed, 8 Feb 2023 13:16:53 +0000 (08:16 -0500)]
ssh: fix leak and apply style(9) to hostname canonicalization

Fixes: bf2e2524a2ce ("ssh: canonicize the host name before...")
Fixes: 3e74849a1ee2 ("ssh: canonicize the host name before...")
Reviewed by: rew
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38441

(cherry picked from commit 19aba210e1a1b5999bff10cccab5a277060c4d46)

15 months agoCirrus-CI: move arch and toolchain to beginning of task names
Ed Maste [Fri, 26 May 2023 17:58:04 +0000 (13:58 -0400)]
Cirrus-CI: move arch and toolchain to beginning of task names

This is the key difference between the tasks, so make it the most
prominent.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 98c5211847afbfef54cf7446a4a94a6aad6a31bd)

15 months agoCirrus-CI: switch to -lite LLVM package for native run
Ed Maste [Wed, 17 May 2023 18:16:06 +0000 (14:16 -0400)]
Cirrus-CI: switch to -lite LLVM package for native run

This reduces CI cycle time (a small amount).

Suggested by: brooks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40136

(cherry picked from commit f326a83c857066754cbc92c59e1904a68af37deb)

15 months agoCirrus-CI: hide manual tasks from official runs
Ed Maste [Thu, 11 May 2023 15:16:51 +0000 (11:16 -0400)]
Cirrus-CI: hide manual tasks from official runs

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 9244506a1b314d9ad5bcb1bd5cc0b75939464174)

15 months agoCirrus-CI: move QEMU pkg installation to test script
Ed Maste [Wed, 7 Sep 2022 14:12:37 +0000 (10:12 -0400)]
Cirrus-CI: move QEMU pkg installation to test script

Occasionally the QEMU package fails to build and isn't available on
-CURRENT using the Latest package set.  Move the package installation
to the test script, so that if the package isn't available we at least
still perform a build test.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 612f254c82468d037fccb6c26dc0a7e37a73a53e)

15 months agoCirrus-CI: add gcc12 automatic task on primary GitHub mirror
Ed Maste [Tue, 9 May 2023 18:26:47 +0000 (14:26 -0400)]
Cirrus-CI: add gcc12 automatic task on primary GitHub mirror

We want to get GCC coverage via Cirrus-CI, but don't want to trigger
excessive runs across all forks and branches.  Create a duplicate gcc12
task to run automatically for freebsd/freebsd-src.

Reviewed by: jhb
Sponsored by: The FreeBSD Foundation

(cherry picked from commit f5f1b9a9828a4fdf5b0ba51b291e0e1e7ac7b55f)

15 months agonproc.1: Fix "first appeared in" details
Mateusz Piotrowski [Fri, 2 Jun 2023 16:49:36 +0000 (18:49 +0200)]
nproc.1: Fix "first appeared in" details

nproc(1) has been MFC'ed into 13-STABLE and made it into 13.2-RELEASE.

MFC after: 3 days

(cherry picked from commit 1e078fb6021ebb5ccfb092fe9e5befcf4054ac0b)

15 months agops: Add libxo to usage message
Mateusz Piotrowski [Tue, 25 Apr 2023 11:55:17 +0000 (13:55 +0200)]
ps: Add libxo to usage message

MFC after: 1 week
Sponsored by: Klara Inc.

(cherry picked from commit 820ac126795b8b1c55009676fad3dfe5c7834b0b)

15 months agops: Fix synopsis
Mateusz Piotrowski [Tue, 25 Apr 2023 11:38:10 +0000 (13:38 +0200)]
ps: Fix synopsis

In the -L mode, the -L flag is not optional.

MFC after: 3 days
Sponsored by: Klara Inc.

(cherry picked from commit 3f46bf40a1b26c49b53df4ec504757c5d8c9f921)

15 months agocd9660.5: Fix the history section
Mateusz Piotrowski [Tue, 25 Apr 2023 17:36:34 +0000 (19:36 +0200)]
cd9660.5: Fix the history section

MFC after: 7 days
Sponsored by: Klara Inc.

(cherry picked from commit 5212225753e965c87ae4a7fe5f8a7d9a8b6d04af)

15 months agoopen(2): fix typo
Konstantin Belousov [Tue, 30 May 2023 09:17:26 +0000 (12:17 +0300)]
open(2): fix typo

(cherry picked from commit 1fc174cba6e0b949f7499d195dc36bf8df15df4f)

15 months ago__acl_get_fd(2), __acl_aclcheck_fd(2): enable for O_PATH filedescriptors
Konstantin Belousov [Mon, 29 May 2023 15:07:18 +0000 (18:07 +0300)]
__acl_get_fd(2), __acl_aclcheck_fd(2): enable for O_PATH filedescriptors

PR: 271704

(cherry picked from commit 7a292504bad8467915f072f0576b2a07c76de1f5)

15 months agoreapkill: handle possible pid reuse after the pid was recorded as signalled
Konstantin Belousov [Fri, 12 May 2023 22:36:52 +0000 (01:36 +0300)]
reapkill: handle possible pid reuse after the pid was recorded as signalled

(cherry picked from commit 8164032a495b53b9176814f7b08e093961fabdca)

15 months agounr(9): document iterators
Konstantin Belousov [Sun, 14 May 2023 01:40:08 +0000 (04:40 +0300)]
unr(9): document iterators

(cherry picked from commit ea95173dbb3b67019a83155e55f798d4618f18c7)

15 months agounr(9) iterator: add naive test
Konstantin Belousov [Sat, 13 May 2023 01:32:25 +0000 (04:32 +0300)]
unr(9) iterator: add naive test

(cherry picked from commit 12db3c914fe0a985de1e393ee964c9cda5b3e0ca)

15 months agounr(9): add 'show unrhdr_iter' command
Konstantin Belousov [Thu, 25 May 2023 18:09:27 +0000 (21:09 +0300)]
unr(9): add 'show unrhdr_iter' command

(cherry picked from commit c4cc0cab1ea619e07b52ce4c3825e7941996cb49)

15 months agounr(9): add iterator interface
Konstantin Belousov [Fri, 12 May 2023 22:49:29 +0000 (01:49 +0300)]
unr(9): add iterator interface

(cherry picked from commit a014e0a3987a277a0e56c7fa5b9d895f735a8d1e)

15 months agounr(9): add 'show unrhdr' ddb command
Konstantin Belousov [Thu, 25 May 2023 11:14:19 +0000 (14:14 +0300)]
unr(9): add 'show unrhdr' ddb command

(cherry picked from commit f386b27736fe6dee535a530d5c7610d8a9827758)

15 months agounr(9): document clean_unrhdr()
Konstantin Belousov [Sun, 14 May 2023 00:43:54 +0000 (03:43 +0300)]
unr(9): document clean_unrhdr()

(cherry picked from commit f8c37080853c13ada935e7fe3d53286c1d9220f1)

15 months agosubr_unit.c: explain first/last special ranges
Konstantin Belousov [Sun, 14 May 2023 23:11:17 +0000 (02:11 +0300)]
subr_unit.c: explain first/last special ranges

(cherry picked from commit d44f477038d3ede5fe62fa19c9301b43455cd8f1)

15 months agokern/subr_unit.c: more uses for is_bitmap()
Konstantin Belousov [Fri, 12 May 2023 22:39:35 +0000 (01:39 +0300)]
kern/subr_unit.c: more uses for is_bitmap()

(cherry picked from commit 36b1f8a81ef96b42ce446efb79cffd577f1819f7)