]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
3 years agoAdd Xrefs to the new VOP_SETLABEL(9) from mac(9) and vnode(9).
Robert Watson [Sat, 27 Feb 2021 16:53:53 +0000 (16:53 +0000)]
Add Xrefs to the new VOP_SETLABEL(9) from mac(9) and vnode(9).

MFC after: 3 days

3 years agoProvide a man page for VOP_SETLABEL(9).
Robert Watson [Sat, 27 Feb 2021 16:51:00 +0000 (16:51 +0000)]
Provide a man page for VOP_SETLABEL(9).

MFC after: 3 days

3 years agoAdd a comment on why the call to mac_vnode_relabel() might be in the wrong
Robert Watson [Sat, 27 Feb 2021 16:22:26 +0000 (16:22 +0000)]
Add a comment on why the call to mac_vnode_relabel() might be in the wrong
place -- in the VOP rather than vn_setexttr() -- and that it is for historic
reasons.  We might wish to relocate it in due course, but this way at least
we document the asymmetry.

3 years agoMicro-optimize OOA queue processing.
Alexander Motin [Sat, 27 Feb 2021 15:14:05 +0000 (10:14 -0500)]
Micro-optimize OOA queue processing.

- Move ctl_get_cmd_entry() calls from every OOA traversal to when
  the requests first inserted, storing seridx in struct ctl_scsiio.
- Move some checks out of the loop in ctl_check_ooa().
- Replace checks for errors that can not happen with asserts.
- Transpose ctl_serialize_table, so that any OOA traversal accessed
  only one row (cache line).  Compact it from enum to uint8_t.
- Optimize static branch predictions in hottest places.

Due to O(n) nature on deep LUN queues this can be the hottest code
path in CTL, and additional 20% of IOPS I see in some 4KB I/O tests
are good to have in reserve.  About 50% of CPU time here according
to the profiles is now spent in two memory accesses per traversed
request in OOA.

Sponsored by: iXsystems, Inc.
MFC after: 2 weeks

3 years agoloader: use display pixel density for font autoselection
Toomas Soome [Sat, 20 Feb 2021 08:51:28 +0000 (10:51 +0200)]
loader: use display pixel density for font autoselection

Calculate font size from 16 density independent pixels (dp) by using:
size = 16 * ppi/160 * display_factor

We are specifying font size 16dp, and assuming 1dp = 160ppi.
Also apply scaling factor 2 (display_factor).

MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D28849

3 years agocardbus: Be sure to acquire Giant when calling into newbus
Warner Losh [Sat, 27 Feb 2021 07:00:52 +0000 (00:00 -0700)]
cardbus: Be sure to acquire Giant when calling into newbus

Acquire Giant in cardbus_detach_card. This used to be done above us, but no
more.

Tested by: kargl@
MFC After: 3 days

3 years agozfs: add missing checks for unsupported features
Martin Matuska [Fri, 26 Feb 2021 21:52:41 +0000 (22:52 +0100)]
zfs: add missing checks for unsupported features

After the merge of OpenZFS master-9312e0fd1 it has become possible to
import ZFS pools witn an active org.illumos:edonr feature on FreeBSD,
leading to a panic.

In addition, "zpool status" reported all pools without edonr as upgradable
and "zpool upgrade -v" lists edonr in the list of upgradable features.

This is an accepted but not yet included bugfix by upstream.

Obtained from: https://github.com/openzfs/zfs/pull/11653
Differential Revision: https://reviews.freebsd.org/D28935
Reported by: garga (on freebsd-current@)
Reviewed by: freqlabs
X-MFC-with: ba27dd8be821792e15bdabfac69fd6cab0cf9dd3

3 years agoInclude new data sent in PRR calculation
Richard Scheffenegger [Fri, 26 Feb 2021 21:30:33 +0000 (22:30 +0100)]
Include new data sent in PRR calculation

Reviewed By: #transport, kbowling
MFC after: 3 days
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D28941

3 years agoinetd: Add examples from manual page and other sources
Daniel Ebdrup Jensen [Fri, 26 Feb 2021 19:05:46 +0000 (20:05 +0100)]
inetd: Add examples from manual page and other sources

The manual page lists a bunch of examples, some of which already exist
in this file. Since it's both easier to remember when all examples are
listed in the same location, move examples so they get installed into
/etc/inetd.conf

This also means users won't have to copy-paste, but can simply
uncomment one or more services to use them.

As such, it also becomes necessary to remove the examples from the
manual page, so instead add a note explaining where the previous
examples as well as others may be found.
Cross-references, including to ports, have also been added where
applicable.

The rsync example has lived in the bug tracker for too long,
considering how useful it can situationally be, for example when
backup jobs on client devices are run through periodic(8) weekly.

The microsoft-ds entry is necessary for Windows 10 compatibility
(this can be confirmed with packet capturing, as it is not readily
documented at time of writing).

While here, remove two examples for which compatible daemons could not
be found in ports.

Submitted by: David Yeske <dyeske at gmail.com> (in part, prev ver)
PR: 122037
Reviewed by: kevans, brueffer, lwhsu, yuripv
Differential Revision: https://reviews.freebsd.org/D28882

3 years agocam: add new ASC and ASCQ values related to drive depopulation
Warner Losh [Fri, 26 Feb 2021 18:43:35 +0000 (11:43 -0700)]
cam: add new ASC and ASCQ values related to drive depopulation

Add 04/25 Depopulation restoration in progress, 31/04 Depopulation failed, and
31/05 Depopulation restoration failed.

These are defined in SPC-6r2 (though 31/4 was added in an earlier draft). They
relate to different aspects of in-progress or failed depopulation removal and
restoration commands.

3 years agonvi: fix catalog generation
dankm [Fri, 26 Feb 2021 15:32:01 +0000 (16:32 +0100)]
nvi: fix catalog generation

Upstream broke catalog generation with some over-eagre style cleanups.
This brings in my pull request.

Obtained from: https://github.com/lichray/nvi2/pull/88
Differential Revision: https://reviews.freebsd.org/D28594

3 years agofortune: add a tip about gstat
Alan Somers [Fri, 26 Feb 2021 15:06:07 +0000 (08:06 -0700)]
fortune: add a tip about gstat

MFC after: 3 weeks

3 years agoetc/shells: Add a reference to the ftpd manpage
ceri [Thu, 25 Feb 2021 17:24:19 +0000 (17:24 +0000)]
etc/shells: Add a reference to the ftpd manpage

While here, also fix incorrect capitalizaiton

3 years agodialog: guard macros definition to avoid redifinition
Baptiste Daroussin [Fri, 26 Feb 2021 10:13:43 +0000 (11:13 +0100)]
dialog: guard macros definition to avoid redifinition

This unbreaks building libdpv

3 years agodialog: finish update to 1.3-20210117
Baptiste Daroussin [Fri, 26 Feb 2021 09:13:13 +0000 (10:13 +0100)]
dialog: finish update to 1.3-20210117

patch dialog.c which requires stddef for the usage of offsetof
catchup on the config header

3 years agodialog: import dialog 1.3-20210117
Baptiste Daroussin [Fri, 26 Feb 2021 09:16:49 +0000 (10:16 +0100)]
dialog: import dialog 1.3-20210117

3 years agodialog: vendor import version 1.3-20210117
Baptiste Daroussin [Fri, 26 Feb 2021 09:05:35 +0000 (10:05 +0100)]
dialog: vendor import version 1.3-20210117

3 years agocxgbe(4): Read the rx 'c' channel for a port and make it available.
Navdeep Parhar [Fri, 26 Feb 2021 02:10:52 +0000 (18:10 -0800)]
cxgbe(4): Read the rx 'c' channel for a port and make it available.

MFC after: 1 week
Sponsored by: Chelsio Communications

3 years agorc: save and restore $IFS
Cy Schubert [Fri, 26 Feb 2021 05:39:18 +0000 (21:39 -0800)]
rc: save and restore $IFS

Fix another bug in 77e1ccbee3ed6c837929e4e232fd07f95bfc8294. $IFS
should be fully restored for its other users.

PR: 249192
Reported by: jkim
MFC after: 3 weeks
X-MFC with: 77e1ccbee3ed6c837929e4e232fd07f95bfc8294

3 years agojail: Add safety around prison_deref() flags.
Jamie Gritton [Fri, 26 Feb 2021 04:10:42 +0000 (20:10 -0800)]
jail: Add safety around prison_deref() flags.

do_jail_attach() now only uses the PD_XXX flags that refer to lock
status, so make sure that something else like PD_KILL doesn't slip
through.

Add a KASSERT() in prison_deref() to catch any further PD_KILL misuse.

3 years agojail: Fix locking on an early jail_set error.
Jamie Gritton [Fri, 26 Feb 2021 03:52:58 +0000 (19:52 -0800)]
jail: Fix locking on an early jail_set error.

I had locked allprison_lock without immediately setting PD_LIST_LOCKED.

3 years agoRemove stale references to opt_sio.h
Mitchell Horne [Thu, 25 Feb 2021 21:37:42 +0000 (17:37 -0400)]
Remove stale references to opt_sio.h

The sio(4) driver was removed entirely in 2019, commit 71f0077631fa.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D28929

3 years agoRemove pointless lun->be_lun checks.
Alexander Motin [Fri, 26 Feb 2021 00:45:59 +0000 (19:45 -0500)]
Remove pointless lun->be_lun checks.

There is no such thing as LUN without backend, at least for years.

MFC after: 1 week

3 years agopmap: Fix largemap restart checks in the kernel_maps sysctl handler
Mark Johnston [Thu, 25 Feb 2021 23:49:47 +0000 (18:49 -0500)]
pmap: Fix largemap restart checks in the kernel_maps sysctl handler

The purpose of these checks is to ensure that the address of the
next-level page table page is valid, since nothing is synchronizing with
a concurrent update of the large map and large map PTPs are freed to the
system.  However, if PG_PS is set, there is no next level.

Reported by: rpokala
Reviewed by: kib
Tested by: rpokala
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D28922

3 years agoktls: Use COUNTER_U64_DEFINE_EARLY for the ktls_toe_chacha20 counter.
John Baldwin [Sat, 20 Feb 2021 00:33:46 +0000 (16:33 -0800)]
ktls: Use COUNTER_U64_DEFINE_EARLY for the ktls_toe_chacha20 counter.

I missed updating this counter when rebasing the changes in
9c64fc40290e08f6dc6b75aa04084b04e48a61af after the switch to
COUNTER_U64_DEFINE_EARLY in 1755b2b9891bb1bfa7a58383ef5126821f7e46e3.

Fixes: 9c64fc40290e Add Chacha20-Poly1305 as a KTLS cipher suite.
Sponsored by: Netflix

3 years agopf: Fix incorrect fragment handling
Kristof Provost [Thu, 25 Feb 2021 07:07:36 +0000 (08:07 +0100)]
pf: Fix incorrect fragment handling

A sequence of overlapping IPv4 fragments could crash the kernel in
pf due to an assertion.

Reported by: Alexander Bluhm
Obtained from: OpenBSD
MFC after: 3 days
Sponsored by: Rubicon Communications, LLC ("Netgate")

3 years agoncurses: fix generation of term.h
Baptiste Daroussin [Thu, 25 Feb 2021 21:46:24 +0000 (22:46 +0100)]
ncurses: fix generation of term.h

All variable were not properly expanded

Submitted by: cy (initial version)

3 years agoncurses: fix patch date
Baptiste Daroussin [Thu, 25 Feb 2021 21:40:07 +0000 (22:40 +0100)]
ncurses: fix patch date

Submitted by: cy

3 years ago[ar71xx] Fix routerstation / routerstation pro redboot FIS probing
Adrian Chadd [Thu, 25 Feb 2021 21:06:03 +0000 (13:06 -0800)]
[ar71xx] Fix routerstation / routerstation pro redboot FIS probing

Some changes back in ye olde times somewhere has changed the default
block size the flash device exposes.  So, the default geom redboot
FIS probing (to find the partition table structure in flash!)
is no longer finding it.

So, force it to probe at the last 64k of flash regardless of the
underlying flash block size.

Tested:

* Ubiquiti Routerstation pro, boots -HEAD MIPS

3 years ago[PowerPC64LE] pseries: Fix input buffering logic.
Brandon Bergren [Thu, 25 Feb 2021 18:55:58 +0000 (12:55 -0600)]
[PowerPC64LE] pseries: Fix input buffering logic.

In uart_phyp_get(), when the internal buffer is empty, we make a
hypercall to retrieve up to 16 bytes of input data from the
hypervisor. As this is specified to be returned in BE format, we need
to do a 64-bit byte swap on the first and second half of the data.

If the buffer being passed in was insufficient to return the fetched
data, we store the remainder in the internal buffer and use it to
satisfy the following calls to uart_phyp_get() until it is drained.

However, in this case, we were accidentally byteswapping the internal
buffer again.

Move the byteswapping code to just after the hypercall so it only gets
swapped when we're filling the buffer.

Fixes arrow keys in qemu on pseries, among other console oddities.

Sponsored by: Tag1 Consulting, Inc.
MFC after: 3 days

3 years agoClose races in vm object chain traversal for unlock
Ryan Libby [Thu, 25 Feb 2021 20:11:19 +0000 (12:11 -0800)]
Close races in vm object chain traversal for unlock

We were unlocking the vm object before reading the backing_object field.
In the meantime, the object could be freed and reused.  This could cause
us to go off the rails in the object chain traversal, failing to unlock
the rest of the objects in the original chain and corrupting the lock
state of the victim chain.

Reviewed by: bdrewery, kib, markj, vangyzen
MFC after: 3 days
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D28926

3 years agorc: fix rc script parsing
Cy Schubert [Thu, 25 Feb 2021 19:04:50 +0000 (11:04 -0800)]
rc: fix rc script parsing

77e1ccbee3ed6c837929e4e232fd07f95bfc8294 introduced a bug whereby
rc scripts in etc/rc.d and $local_startup failed to parse output
from called commands because IFS was set to " " instead of the
default " \t\n". This caused parsing of output that contains any
whitespace character, such as tabs and newlines, not matching just a
space to fail.

PR: 249192
MFC after: 3 weeks
X-MFC with: 77e1ccbee3ed6c837929e4e232fd07f95bfc8294

3 years agoInstall links for zpool feature compat aliases
Ryan Moeller [Thu, 25 Feb 2021 19:16:09 +0000 (14:16 -0500)]
Install links for zpool feature compat aliases

The alias links were missed when this feature was introduced to the
FreeBSD build system in 10f57cb98fd61b2669640a84aa73ad118601f281.

Reviewed by: mm
MFC after: 1 week
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D28925

3 years agolibifconfig: Add missing symbols to map
Ryan Moeller [Thu, 25 Feb 2021 18:54:16 +0000 (13:54 -0500)]
libifconfig: Add missing symbols to map

Regenerate the list of generated symbols for libifconfig:

```
grep -hr ^ifconfig_sfp_ /usr/obj/usr/src/amd64.amd64/lib/libifconfig \
| sed 's/(.*/;/' | sort -u
```

Spotted by build failures caused by a missing symbol while working on
upgrading libifconfig from internal to private.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D28927

3 years agoModify lock_delay() to increase the delay time after spinning
Edward Tomasz Napierala [Thu, 25 Feb 2021 18:48:50 +0000 (18:48 +0000)]
Modify lock_delay() to increase the delay time after spinning

Modify lock_delay() to increase the delay time after spinning,
not before.  Previously we would spin at least twice instead of once.
In NetApp's benchmarks this fixes a performance regression compared
to FreeBSD 10, which called cpu_spinwait() directly.

Reviewed By: mjg
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D27331

3 years agocamcontrol(8): remove unnecessary CCB zeroing
Edward Tomasz Napierala [Wed, 24 Feb 2021 23:00:25 +0000 (23:00 +0000)]
camcontrol(8): remove unnecessary CCB zeroing

After 3e404b8c53d, cam_getccb(3) clears the returned CCB, making
a number of calls to CCB_CLEAR_ALL_EXCEPT_HDR(3) unnecessary.

Reviewed By: imp
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D27812

3 years agocamcontrol: stop pretending cam_cmd is a bitmask
Edward Tomasz Napierala [Thu, 25 Feb 2021 18:39:22 +0000 (18:39 +0000)]
camcontrol: stop pretending cam_cmd is a bitmask

Cleanup only, no functional changes.

Reviewed By: imp
Sponsored By: NetApp, Inc.
Sponsored By: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D27813

3 years agoncurses: update configuration header after update
Baptiste Daroussin [Thu, 25 Feb 2021 18:28:31 +0000 (19:28 +0100)]
ncurses: update configuration header after update

3 years agoncurses: ensure we prefer the generated ncurses_dll.h
Baptiste Daroussin [Thu, 25 Feb 2021 18:27:29 +0000 (19:27 +0100)]
ncurses: ensure we prefer the generated ncurses_dll.h

3 years agoncurses: import version 6.2-20210220
Baptiste Daroussin [Thu, 25 Feb 2021 18:26:18 +0000 (19:26 +0100)]
ncurses: import version 6.2-20210220

3 years agoncurses: Silence MKuserdefs.sh call
Renato Botelho [Thu, 25 Feb 2021 18:15:39 +0000 (15:15 -0300)]
ncurses: Silence MKuserdefs.sh call

Remove -x flag from sh used to execute MKuserdefs.sh during ncurses
build and stop polluting make -s output

Reviewed by: bapt, manu
Approved by: bapt
Differential Revision: https://reviews.freebsd.org/D28885

3 years agoA TCP server has to take into consideration, if TCP_NOOPT is preventing
Richard Scheffenegger [Thu, 25 Feb 2021 18:10:55 +0000 (19:10 +0100)]
A TCP server has to take into consideration, if TCP_NOOPT is preventing
the negotiation of TCP features. This affects most TCP options but
adherance to RFC7323 with the timestamp option will prevent a session
from getting established.

PR: 253576
Reviewed By: tuexen, #transport
MFC after: 3 days
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D28652

3 years agoPRR: Avoid accounting left-edge twice in partial ACK.
Richard Scheffenegger [Thu, 25 Feb 2021 17:36:49 +0000 (18:36 +0100)]
PRR: Avoid accounting left-edge twice in partial ACK.

Reviewed By: #transport, kbowling
MFC after: 3 days
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D28819

3 years agoAddress two incorrect calculations and enhance readability of PRR code
Richard Scheffenegger [Thu, 25 Feb 2021 16:59:45 +0000 (17:59 +0100)]
Address two incorrect calculations and enhance readability of PRR code

- address second instance of cwnd potentially becoming zero
- fix sublte bug due to implicit int to uint typecase in max()
- fix bug due to typo in hand-coded CEILING() function by using howmany() macro
- use int instead of long, and add a missing long typecast
- replace if conditionals with easier to read imax/imin (as in pseudocode)

Reviewed By: #transport, kbowling
MFC after: 3 days
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D28813

3 years agoVendor import ncurses 6.2-20210220
Baptiste Daroussin [Thu, 25 Feb 2021 17:22:00 +0000 (18:22 +0100)]
Vendor import ncurses 6.2-20210220

3 years agomkimg: Add support for offset if the source is an image
Emmanuel Vadot [Thu, 25 Feb 2021 17:10:19 +0000 (18:10 +0100)]
mkimg: Add support for offset if the source is an image

This allow us to create image with the following format:
mkimg -v -o sdcard -s gpt -p efi:=esp_aarch64.img:1M -p freebsd-ufs::1G

Which will add a efi partition at a 1M offset on the image with its content
coming from the esp_aarch64.img file.

MFC after: 3 days

3 years agoAdd if_wg.4 MLINK
Li-Wen Hsu [Thu, 25 Feb 2021 16:43:15 +0000 (00:43 +0800)]
Add if_wg.4 MLINK

3 years agoAdd UPDATING entry for PIE default
Ed Maste [Thu, 25 Feb 2021 15:59:54 +0000 (10:59 -0500)]
Add UPDATING entry for PIE default

As of commit 9a227a2fd642 PIE is on by default for 64-bit architectures.

Relnotes: yes

3 years agomkimg: We always want the last block of the last inserted partition
Emmanuel Vadot [Thu, 25 Feb 2021 15:34:28 +0000 (16:34 +0100)]
mkimg: We always want the last block of the last inserted partition

Even with an absolute offset we want to know the last block the partition
otherwise we endup with an image the size of the metadata.
This allow to create image with the ESP placed at a specific position which
is useful on arm/arm64 where u-boot have always a hard time to read the ESP
if it's not aligned on 512k.
mkimg -v -o sdcard -s gpt -p efi::54M:1M -p freebsd-ufs::1G
now works.

MFC after: 3 days

3 years agobuf: Fix the dirtybufthresh check
Mark Johnston [Thu, 25 Feb 2021 15:04:44 +0000 (10:04 -0500)]
buf: Fix the dirtybufthresh check

dirtybufthresh is a watermark, slightly below the high watermark for
dirty buffers.  When a delayed write is issued, the dirtying thread will
start flushing buffers if the dirtybufthresh watermark is reached.  This
helps ensure that the high watermark is not reached, otherwise
performance will degrade as clustering and other optimizations are
disabled (see buf_dirty_count_severe()).

When the buffer cache was partitioned into "domains", the dirtybufthresh
threshold checks were not updated.  Fix this.

Reported by: Shrikanth R Kamath <kshrikanth@juniper.net>
Reviewed by: rlibby, mckusick, kib, bdrewery
Sponsored by: Juniper Networks, Inc., Klara, Inc.
Fixes: 3cec5c77d6
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D28901

3 years agosendfile: Use the pager size to determine the file extent when possible
Mark Johnston [Thu, 25 Feb 2021 15:04:44 +0000 (10:04 -0500)]
sendfile: Use the pager size to determine the file extent when possible

Previously sendfile would issue a VOP_GETATTR and use the returned size,
i.e., the file size.  When paging in file data, sendfile_swapin() will
use the pager to determine whether it needs to zero-fill, most often
because of a hole in a sparse file.  An attempt to page in beyond the
end of a file is treated this way, and occurs when the requested page is
past the end of the pager.  In other words, both the file size and pager
size were used interchangeably.

With ZFS, updates to the pager and file sizes are not synchronized by
the exclusive vnode lock, at least partially due to its use of
MNTK_SHARED_WRITES.  In particular, the pager size is updated after the
file size, so in the presence of a writer concurrently extending the
file, sendfile could incorrectly instantiate "holes" in the page cache
pages backing the file, which manifests as data corruption when reading
the file back from the page cache.  The on-disk copy is unaffected.

Fix this by consistently using the pager size when available.

Reported by: dumbbell
Reviewed by: chs, kib
Tested by: dumbbell, pho
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D28811

3 years agoipfw: make algo name argument optional for some table types
Andrey V. Elsukov [Thu, 25 Feb 2021 13:57:47 +0000 (16:57 +0300)]
ipfw: make algo name argument optional for some table types

Most of table types currently supported by ipfw have only one
algorithm implementation. When user creates such tables, allow
to omit algo name in arguments. E.g. now it is possible:
ipfw table T1 create type number
ipfw table T2 create type iface
ipfw table T3 create type flow

PR: 233072
MFC after: 1 week
Sponsored by: Yandex LLC

3 years agobootstrap: fix a last edit typo
Baptiste Daroussin [Thu, 25 Feb 2021 13:52:43 +0000 (14:52 +0100)]
bootstrap: fix a last edit typo

Reported by: cy

3 years agoterminfo: add terminfo database
Baptiste Daroussin [Tue, 23 Feb 2021 16:17:32 +0000 (17:17 +0100)]
terminfo: add terminfo database

Tested by: manu, jbeich

3 years agobootstrap: add tic to the bootstrap tools
Baptiste Daroussin [Tue, 23 Feb 2021 06:21:52 +0000 (07:21 +0100)]
bootstrap: add tic to the bootstrap tools

tic is necessary early in the build to be able to build the terminfo
database later on.

Tested by: manu, jbeich

3 years agoncurses: Add support for terminfo database
Baptiste Daroussin [Tue, 12 Jan 2021 16:34:49 +0000 (17:34 +0100)]
ncurses: Add support for terminfo database

Along with the termcap database, ncurses will now lookup for the
terminfo database, note that the terminfo database is being looked
up first and then it fallsback on the termcap one.

While here drop our custom reader for the termcap database, over the
time it is needed maintenance to be able to catchup with changes on ncurses
side.

Install the ncurses tools which are needed to deal with the terminfo
database: tic, infocmp, toe

Replace our termcap only aware tools with the ncurses counterpart:
tput, tabs, tset, clear and reset

In particular they can your the extra capabilities described in the
terminfo database, which does not exist in termcap

Note that to add a new terminfo information to the database from ports
the ports will just need to add their extra information into:
/usr/local/share/site-terminfo/<firstletteroftheterm>/<term>

Tested by: jbeich, manu

3 years agoLimit when we call DELAY from KCSAN on amd64
Andrew Turner [Fri, 5 Feb 2021 11:41:17 +0000 (11:41 +0000)]
Limit when we call DELAY from KCSAN on amd64

In some cases the DELAY implementation on amd64 can recurse on a spin
mutex in the i8254 early delay code. Detect when this is going to
happen and don't call delay in this case. It is safe to not delay here
with the only issue being KCSAN may not detect data races.

Reviewed by: kib
Tested by: arichardson
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D28895

3 years agoUse pmap_qenter in the N1SDP PCIe driver
Andrew Turner [Tue, 23 Feb 2021 12:34:45 +0000 (12:34 +0000)]
Use pmap_qenter in the N1SDP PCIe driver

In the Neoverse N1 SDP PCIe driver we need to map a page shared
between the firmware and the kernel. Previously we would use
pmap_kenter for this, however as this is not standardised between
architectures switch to the common pmap_qenter.

While here fix the error handling code to clean up on failure.

Reviewed by: br
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D28890

3 years agobridge tests: Test that we also forward on some interfaces
Kristof Provost [Wed, 24 Feb 2021 15:40:37 +0000 (16:40 +0100)]
bridge tests: Test that we also forward on some interfaces

Ensure that we not only block on some interfaces, but also forward on
some. Without the previous commit we wound up discarding on all ports,
rather than only on the ports needed to break the loop.

MFC after: 1 week
Sponsored by: Orange Business Services
Differential Revision: https://reviews.freebsd.org/D28917

3 years agobridgestp: Ensure we send STP on VLAN interfaces
Kristof Provost [Wed, 24 Feb 2021 15:38:53 +0000 (16:38 +0100)]
bridgestp: Ensure we send STP on VLAN interfaces

Reviewed by: donner@
MFC after: 1 week
X-MFC-with: 711ed156b94562c3dcb2ee9c1b3f240f960a75d2
Sponsored by: Orange Business Services
Differential Revision: https://reviews.freebsd.org/D28916

3 years agonet: remove legacy in_addmulti()
Kristof Provost [Tue, 23 Feb 2021 19:21:19 +0000 (20:21 +0100)]
net: remove legacy in_addmulti()

Despite the comment to the contrary neither pf nor carp use
in_addmulti(). Nothing does, so get rid of it.

Carp stopped using it in 08b68b0e4c6b132127919cfbaf7275c727ca7843
(2011). It's unclear when pf stopped using it, but before
d6d3f01e0a3395c1fae34a3c4be7b051cb2d7581 (2012).

Reviewed by: bz@, melifaro@
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D28918

3 years agojail: re-commit 811e27fa3c44 with fixes
Jamie Gritton [Thu, 25 Feb 2021 05:54:49 +0000 (21:54 -0800)]
jail: re-commit 811e27fa3c44 with fixes

Make sure PD_KILL isn't passed to do_jail_attach, where it might end
up trying to kill the caller's prison (even prison0).

Fix the child jail loop in prison_deref_kill, which was doing the
post-order part during the pre-order part.  That's not a system-
killer, but make jails not always die correctly.

3 years agoDisable PIE for MIPS BERI boot loader
Marcin Wojtas [Thu, 25 Feb 2021 05:41:35 +0000 (06:41 +0100)]
Disable PIE for MIPS BERI boot loader

MIPS BERI boot loader is built with -mno-abicalls and -fno-pic
so prevent adding PIE-related build flags.

Fix build after 9a227a2fd642 ("Enable PIE by default on 64-bit architectures")

Obtained from: Semihalf
Sponsored by: Stormshield

3 years agojail: back out 811e27fa3c44 until it doesn't break Jenkins
Jamie Gritton [Thu, 25 Feb 2021 05:10:47 +0000 (21:10 -0800)]
jail: back out 811e27fa3c44 until it doesn't break Jenkins

Reported by: arichardson

3 years agoUse makefs(8) in release VM-image generation instead of md(4) and newfs.
Nathan Whitehorn [Thu, 25 Feb 2021 02:16:56 +0000 (21:16 -0500)]
Use makefs(8) in release VM-image generation instead of md(4) and newfs.

Using makefs instead reduces the privileges needed to build VM images,
simplifies the script (no need to copy files to a fresh image at the end),
and improves portability by allowing generation of cross-endian images.
As a result of the last, this patch also adds support for generation of
powerpc64 and powerpc64le VM images.

No other changes to the output. Tested and working for both amd64 and
powerpc64 targets.

Reviewed by: gjb
Differential Revision: https://reviews.freebsd.org/D28912

3 years agoFix powerpc build after 6dd69f0064f1
Marcin Wojtas [Thu, 25 Feb 2021 01:29:33 +0000 (02:29 +0100)]
Fix powerpc build after 6dd69f0064f1

Commit 6dd69f0064f1 ("iflib: introduce isc_dma_width")
failed to build on powerpc due to implicit type conversion
error. Fix that.

Submitted by: Artur Rojek <ar@semihalf.com>
Obtained from: Semihalf
Sponsored by: Amazon, Inc.

3 years agoofed: quiet gcc -Wint-in-bool-context
Ryan Libby [Wed, 24 Feb 2021 23:56:16 +0000 (15:56 -0800)]
ofed: quiet gcc -Wint-in-bool-context

The int in the argument to the ternary triggered -Wint-in-bool-context
from gcc.  Upstream linux has a larger and more entangled patch,
12f727721eee61b3d19dedb95cb893b2baa9fe41, which doesn't apply cleanly.
When we eventually sync that, we can just drop this change.

Reviewed by: hselasky, imp, kib
MFC after: 3 days
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D28762

3 years agoddb: just move cursor when the lexer backs up
Ryan Libby [Wed, 24 Feb 2021 23:56:16 +0000 (15:56 -0800)]
ddb: just move cursor when the lexer backs up

Get rid of db_look_char because it's not compatible with db_get_line().
This fixes the following issue:

db> script lockinfo=show alllocks
db> run lockinfo
db:0:lockinfo> how alllocks
No such command; use "help" to list available commands

Reported by: markj
Reviewed by: markj
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D28725

3 years agoddb: reliably fail with ambiguous commands
Ryan Libby [Wed, 24 Feb 2021 23:56:16 +0000 (15:56 -0800)]
ddb: reliably fail with ambiguous commands

db_cmd_match had an even/odd bug, where if a third command was partially
matched (or any odd number greater than one) the search result would be
set back from CMD_AMBIGUOUS to CMD_FOUND, causing the last command in
the list to be executed instead of failing the match.

Reported by: mlaier
Reviewed by: markj, mlaier, vangyzen
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D28659

3 years agovm pqbatch: move unmanaged page assert under pagequeue lock
Max Laier [Wed, 24 Feb 2021 23:56:16 +0000 (15:56 -0800)]
vm pqbatch: move unmanaged page assert under pagequeue lock

This KASSERT is overzealous because of the following race condition:
 1) A managed page which is currently in PQ_LAUNDRY is freed.
    vm_page_free_prep calls vm_page_dequeue_deferred()

    The page state is:
       PQ_LAUNDRY, PGA_DEQUEUE|PGA_ENQUEUED

 2) The laundry worker comes around and pick up the page and calls
    vm_pageout_defer(m, PQ_LAUNDRY, true) to check if page is still in the
    queue.  We do a vm_page_astate_load and get
       PQ_LAUNDRY, PGA_DEQUEUE|PGA_ENQUEUED
    as per above.

 3) The laundry worker is pre-empted and another thread allocates our page
    from the free pool.  For example vm_page_alloc_domain_after calls
    vm_page_dequeue() and sets VPO_UNMANAGED because we are allocating for
    an OBJT_UNMANAGED object.

    The page state is:
       PQ_NONE, 0 - VPO_UNMANAGED

 4) The laundry worker resumes, and processes vm_pageout_defer based on the
    stale astate which leads to a call to vm_page_pqbatch_submit, which will
    trip on the KASSERT.

Submitted by: mlaier
Reviewed by: markj, rlibby
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D28563

3 years agoEnable PIE by default on 64-bit architectures
Marcin Wojtas [Fri, 22 Jan 2021 12:13:03 +0000 (13:13 +0100)]
Enable PIE by default on 64-bit architectures

This patch adds Position Independent Executables (PIE)
flags for building OS. It allows to enable the ASLR
feature based only on the sysctl knobs, without
need to rebuild the image. Tests showed that
no problems with stability / performance degradation
were seen when using PIEs with ASLR disabled.

The change is limited only for 64-bit architectures.

Use bsd.opts.mk instead of the src.opts.mk in order
to satisfy all build dependencies related to MK_PIE.

Reviewed by: emaste, imp
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D28328

3 years agoDisable PIE for powerpc bootloaders.
Marcin Wojtas [Tue, 23 Feb 2021 12:42:26 +0000 (13:42 +0100)]
Disable PIE for powerpc bootloaders.

Bootloaders for powerpc are not built as position independent
code. Since bsd.prog.mk is used for building, when PIE is enabled,
the PIE flags are added and that causes the build to fail.
Adding MK_PIE=no stops bsd.prog.mk from adding PIE specific flags.

Submitted by: Dawid Gorecki <dgr@semihalf.com>
Reviewed by: emaste
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D28893

3 years agoDisable PIE for MIPS ubldr
Marcin Wojtas [Fri, 12 Feb 2021 15:41:49 +0000 (16:41 +0100)]
Disable PIE for MIPS ubldr

When performing buildworld for MIPS with PIE enabled, the build fails
with "position-independent code requires '-mabicalls'" message.
-mno-abicalls and -fno-pic flags are explicitly set in MIPS ubldr
makefile, so to work around this problem, set MK_PIE=no for MIPS
ubldr.

Submitted by: Dawid Gorecki <dgr@semihalf.com>
Reviewed by: emaste
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D28370

3 years agoiflib: introduce isc_dma_width
Marcin Wojtas [Wed, 24 Feb 2021 22:56:45 +0000 (23:56 +0100)]
iflib: introduce isc_dma_width

Some DMA controllers are unable to address the full host memory space
and are instead limited to a subset of address range (e.g. 48-bit).

Allow the driver to specify the maximum allowed DMA addressing width
(in bits) for the NIC hardware, by introducing a new field in
if_softc_ctx.

If said field is omitted (set to 0), the lowaddr of DMA window bounds
defaults to BUS_SPACE_MAXADDR.

Submitted by: Artur Rojek <ar@semihalf.com>
Obtained from: Semihalf
Sponsored by: Amazon, Inc.
Differential Revision: https://reviews.freebsd.org/D28706

3 years agoFix crash with rtadv-originated multipath IPv6 routes.
Alexander V. Chernikov [Wed, 24 Feb 2021 16:42:48 +0000 (16:42 +0000)]
Fix crash with rtadv-originated multipath IPv6 routes.

PR: 253800
Reported by: Frederic Denis <freebsdml at hecian.net>
MFC after: immediately

3 years agoatomic: add atomic_interrupt_fence()
Konstantin Belousov [Tue, 23 Feb 2021 22:12:29 +0000 (00:12 +0200)]
atomic: add atomic_interrupt_fence()

with the semantic following C11 signal_fence, that is, it establishes
ordering between its place and any interrupt handler executing on the
same CPU.

Reviewed by: markj, mjg, rlibby
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D28909

3 years agopwm_backlight: Add MODULE_DEPEND on backlight
Brett Mastbergen [Mon, 22 Feb 2021 10:28:28 +0000 (10:28 +0000)]
pwm_backlight: Add MODULE_DEPEND on backlight

Make the pwm_backlight module depend on backlight, so it
has access to the backlight interface symbols.  Otherwise you'll
get an error like:

link_elf: symbol backlight_get_info_desc undefined

Signed-off-by: Brett Mastbergen <brett.mastbergen@gmail.com>
MFC after: 3 days
PR:  253765

3 years agoAdd GPT PREP-boot type to mkimg(1) from geom_gpt.
Nathan Whitehorn [Wed, 24 Feb 2021 15:31:44 +0000 (10:31 -0500)]
Add GPT PREP-boot type to mkimg(1) from geom_gpt.

This partition type can be used to boot some PowerKVM VMs. We don't
support it well because of some limitations in SLOF, but it's worth at
least have feature parity in geom and mkimg.

3 years agoiflib: Avoid double counting in rxeof
Mark Johnston [Wed, 24 Feb 2021 15:08:53 +0000 (10:08 -0500)]
iflib: Avoid double counting in rxeof

iflib_rxeof() was counting everything twice.  This was introduced when
pfil hooks were added to the iflib receive path.  We want to count rx
packets/bytes before the pfil hooks are executed, so remove the counter
adjustments that are executed after.

PR: 253583
Reviewed by: gallatin, erj
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D28900

3 years agoMount the ESP on /boot/efi in VM images.
Nathan Whitehorn [Wed, 24 Feb 2021 13:18:07 +0000 (08:18 -0500)]
Mount the ESP on /boot/efi in VM images.

This follows an earlier change (0b7472b3d8d2) for mounting the ESP from
systems set up through the installer and should be MFC'ed with it.

3 years agoCall softdep_prealloc() before taking ffs_lock_ea(), if unlock is committing
Konstantin Belousov [Sun, 21 Feb 2021 10:11:54 +0000 (12:11 +0200)]
Call softdep_prealloc() before taking ffs_lock_ea(), if unlock is committing

softdep_prealloc() must be called to ensure enough journal space is
available, before ffs_extwrite(). Also it must be done before taking
ffs_lock_ea(), because it calls ffs_syncvnode(), potentially dropping
the vnode lock.

Reviewed by: mckusick
Tested by: pho
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation

3 years agoffs_close_ea: do not relock vnode under lock_ea
Konstantin Belousov [Sun, 21 Feb 2021 10:10:06 +0000 (12:10 +0200)]
ffs_close_ea: do not relock vnode under lock_ea

ffs_lock_ea is after the vnode lock, so vnode must not be relocked under
lock_ea. Move ffs_truncate() call in ffs_close_ea() after the lock_ea is
dropped, and only truncate to length zero, since this is the only mode
supported by ffs_truncate() for EAs. Previously code did truncation and
then write.

Zero the part of the ext area that is unused, if truncation is due but not
done because ea area is not zero-length.

Reviewed by: mckusick
Tested by: pho
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation

3 years agoffs_vnops.c: style
Konstantin Belousov [Sat, 20 Feb 2021 17:01:40 +0000 (19:01 +0200)]
ffs_vnops.c: style

Use local var to shorten ap->a_vp expression.

Reviewed by: mckusick
Tested by: pho
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

3 years agoffs: do not call softdep_prealloc() from UFS_BALLOC()
Konstantin Belousov [Thu, 18 Feb 2021 14:51:50 +0000 (16:51 +0200)]
ffs: do not call softdep_prealloc() from UFS_BALLOC()

Do it in ffs_write(), where we can gracefuly handle relock and its
consequences. In particular, recheck the v_data to see if the vnode
reclamation ended, and return EBADF when we cannot proceed with the
write.

Reviewed by: mckusick
Reported by: pho
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

3 years agoffs_reallocblks: change the guard for softdep_prealloc() call to DOINGSUJ()
Konstantin Belousov [Fri, 19 Feb 2021 12:37:12 +0000 (14:37 +0200)]
ffs_reallocblks: change the guard for softdep_prealloc() call to DOINGSUJ()

instead of DOINGSOFTDEP().  The softdep_prealloc() function does nothing
in SU case.

Note that the call should be safe with regard to the vnode relock,
because it is called with MNT_NOWAIT, which does not descend into fsync.

Reviewed by: mckusick
Tested by: pho
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

3 years agorc: fix parse of $local_startup
Cy Schubert [Wed, 24 Feb 2021 05:12:49 +0000 (21:12 -0800)]
rc: fix parse of $local_startup

77e1ccbee3ed6c837929e4e232fd07f95bfc8294 introduced parallel execution
of rc. It separated groups with line feeds (\n) and elements within
groups using spaces. This is a natural separation due to rcorder
using spaces and lines to separate elements within groups with groups
of services separated by line feeds.

77e1ccbee3ed6c837929e4e232fd07f95bfc8294 parses the output from rcorder
by setting $IFS. However it failed to reset $IFS to default ' \t\n'
prior to calling find_local_scripts_new(), causing find_local_scripts_new()
to fail parsing $local_startup for site-specific local rc scripts, i.e.
${LOCALBASE}/etc/rc.d. This caused daemons from ports and packages such
as postfix, dovecot, nut, and others in ${LOCALBASE} not to be started.

PR: 249192
MFC after: 3 week
X-MFC with: 77e1ccbee3ed6c837929e4e232fd07f95bfc8294

3 years agoUpdate manpage for AMD 10GbE driver
Rajesh Kumar M A [Wed, 24 Feb 2021 05:01:10 +0000 (05:01 +0000)]
Update manpage for AMD 10GbE driver

Approved by: vmaffione, gallatin

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

MFC after: 1 week

3 years agoDelete memstick images for PowerPC.
Nathan Whitehorn [Wed, 24 Feb 2021 03:17:20 +0000 (22:17 -0500)]
Delete memstick images for PowerPC.

These images only ever worked on Apple Powermacs, which are now a very
old platform, and did so only for a very loose definition of "worked"
(they booted on a small subset of supported machines). Moreover, all
the machines they *did* boot on also would boot from a memstick made
by dd'ing an CD image to a flash drive. Since a flash drive prepared
in this way would also boot all the newer systems we support, the
memstick images were strictly less functional than the CD images, even
for booting from memory sticks.
Reviewed by: jhibbits
MFC after: 1 week

3 years agormlock: Add a required compiler membar to the rlock slow path
Mark Johnston [Wed, 24 Feb 2021 02:15:50 +0000 (21:15 -0500)]
rmlock: Add a required compiler membar to the rlock slow path

The tracker flags need to be loaded only after the tracker is removed
from its per-CPU queue.  Otherwise, readers may fail to synchronize with
pending writers attempting to propagate priority to active readers, and
readers and writers deadlock on each other.  This was observed in a
stable/12-based armv7 kernel where the compiler had reordered the load
of rmp_flags to before the stores updating the queue.

Reviewed by: rlibby, scottl
Discussed with: kib
Sponsored by: Rubicon Communications, LLC ("Netgate")
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D28821

3 years agopam_login_access: Fix negative entry matching logic
Mark Johnston [Tue, 23 Feb 2021 22:01:29 +0000 (17:01 -0500)]
pam_login_access: Fix negative entry matching logic

PR: 252194
Approved by: so
Security: CVE-2020-25580
Security: FreeBSD-SA-21:03.pam_login_access

3 years agoRevert "ipmi_smbios: Deduplicate smbios entry point discovery logic"
Allan Jude [Tue, 23 Feb 2021 22:48:42 +0000 (22:48 +0000)]
Revert "ipmi_smbios: Deduplicate smbios entry point discovery logic"

This depends on another commit that has not landed yet, and broke the build

This reverts commit ba6e37e47f41484fc61cc034619267b82ddd056c.

3 years agoRevert "ipmi_smbios: remove unused smbios_cksum function"
Allan Jude [Tue, 23 Feb 2021 22:48:37 +0000 (22:48 +0000)]
Revert "ipmi_smbios: remove unused smbios_cksum function"

This reverts commit d2589dc3d56ce063b28b54df11c950c3758d9578.

3 years agoFix nd6 rib_action() handling.
Alexander V. Chernikov [Tue, 23 Feb 2021 22:31:07 +0000 (22:31 +0000)]
Fix nd6 rib_action() handling.

rib_action() guarantees valid rc filling IFF it returns without error.
Check rib_action() return code instead of checking rc fields.

PR: 253800
Reported by: Frederic Denis <freebsdml@hecian.net>
MFC after: immediately

3 years agoig4: Add PCI IDs for Intel Gemini Lake I2C controller.
Vladimir Kondratyev [Tue, 23 Feb 2021 22:20:36 +0000 (01:20 +0300)]
ig4: Add PCI IDs for Intel Gemini Lake I2C controller.

Submitted by: Dmitry Luhtionov
MFC after: 2 weeks

3 years agorc.conf(5): Add note about parallel startup variable
Daniel Ebdrup Jensen [Tue, 23 Feb 2021 21:25:44 +0000 (22:25 +0100)]
rc.conf(5): Add note about parallel startup variable

The commit below added parallel service startup, and it needs to be
documented, so people know about it.

PR: 249192
MFC with: 77e1ccbee3ed

Reviewed by: yuripv
Differential Revision: https://reviews.freebsd.org/D28898

3 years agoipmi_smbios: remove unused smbios_cksum function
Allan Jude [Tue, 23 Feb 2021 21:24:12 +0000 (21:24 +0000)]
ipmi_smbios: remove unused smbios_cksum function

Sponsored By: Ampere Computing LLC
Submitted By: Klara Inc.
Differential Revision: https://reviews.freebsd.org/D28751

3 years agoMount the EFI system partition (ESP) on newly-installed systems.
Nathan Whitehorn [Tue, 23 Feb 2021 21:16:52 +0000 (16:16 -0500)]
Mount the EFI system partition (ESP) on newly-installed systems.

Per hier(7), the ESP will be mounted at /boot/efi. On UFS systems,
any existing ESP will be reused and mounted there; otherwise, a new one
will be made. On ZFS systems, space for an ESP is allocated on all disks
in the root pool, but only the partition actually used to boot is set up
and mounted.

This makes future upgrades of the EFI loader easier (upgrade scripts can
just change /boot/efi) and also greatly simplifies the parts of the
installer involved in initialization of the ESP. It also makes the
installer's behavior correspond to the documentation in hier(7).

Reviewed by: imp, tsoome
MFC after: 1 week
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D28897

3 years agoipmi_smbios: Deduplicate smbios entry point discovery logic
Allan Jude [Tue, 23 Feb 2021 21:17:37 +0000 (21:17 +0000)]
ipmi_smbios: Deduplicate smbios entry point discovery logic

Sponsored by: Ampere Computing LLC
Submitted by: Klara Inc.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D28743

3 years agosmbios: Move smbios driver out from x86 machdep code
Allan Jude [Tue, 23 Feb 2021 21:14:18 +0000 (21:14 +0000)]
smbios: Move smbios driver out from x86 machdep code

Add it to the x86 GENERIC and MINIMAL kernels

Sponsored by: Ampere Computing LLC
Submitted by: Klara Inc.
Reviewed by: rpokala
Differential Revision: https://reviews.freebsd.org/D28738

3 years agoBuild lib/msun tests with compiler builtins disabled
Dimitry Andric [Tue, 23 Feb 2021 20:03:32 +0000 (21:03 +0100)]
Build lib/msun tests with compiler builtins disabled

This forces the compiler to emit calls to libm functions, instead of
possibly substituting pre-calculated results at compile time, which
should help to actually test those functions.

Reviewed by: emaste, arichardson, ngie
Differential Revision: https://reviews.freebsd.org/D28577
MFC after: 3 days