cf6ff85f glebius Jan. 29, 2021, 7:46 p.m.
as they are in sys/mbuf.h
9d4104b2 jhb Jan. 29, 2021, 6:53 p.m.
- Use libelf to parse ELF data structures and remove code duplication
  for ELF32.

- Don't require the OSABI field to be set to the FreeBSD OSABI for
  shared libraries.  Both AArch64 and RISC-V leave it set to "none"
  and instead depend on the ABI tag note.  For ldd, this means falling
  back to walking the notes in PT_NOTE segments to find the ABI tag
  note to determine if an ELF shared library without OSABI set in the
  header file is a FreeBSD shared library.

Reviewed by:	kib
MFC after:	5 days
Sponsored by:	DARPA
Differential Revision:
e25ee296 kevans Jan. 29, 2021, 6:47 p.m.
This eliminates a lot of stat() calls that happen when lualoader renders the
menu with the default settings, and greatly speeds up rendering on my

ftype is nil if loader/loader.efi hasn't been updated yet, falling back to
lfs.attributes() to test.

This is technically incompatible with lfs, but not in a particularly
terrible way.

Reviewed-by:	cem
MFC-after:	4 days
Differential Revision:
80a840b8 emaste Jan. 29, 2021, 4:22 p.m.
This reverts commit fcb4797c90f3f62a18b67542ae5b576a1271e6d4.
With `CIRRUS_CLONE_DEPTH` unspecified (using the default of 50) the
time to clone the repo increased from a little under 2 minutes to over
6 minutes, possibly due to additional processing required by GitHub.

We will want to watch out for occasional `Failed to force reset to
SHA: object not found!` errors.
f17fc543 emaste Jan. 29, 2021, 2:37 p.m.
Previously Cirrus was skipped on svn_head to avoid running CI on two
different branches with identical content.  With the transition to git
this serves no purpose.

Reported by:	kevans
Sponsored by:	The FreeBSD Foundation
fcb4797c emaste Jan. 29, 2021, 2:29 p.m.
Which is `50`.  I saw a few errors like
`Failed to force reset to SHA: object not found!` which seems is
happening because the SHA is not available because there were two
commits pushed almost simultaneously and the second from the top fails
with this error because the SHA is not in the history.

Pull Request:
b6d85a5f royger Jan. 29, 2021, 2:23 p.m.
There's a currently ad-hoc protocol to hand off the FreeBSD kernel
payload between the loader and the kernel itself when Xen is in the
middle of the picture. Such protocol wasn't very resilient to changes
to the loader itself, because it relied on moving metadata around to
package it using a certain layout. This has proven to be fragile, so
replace it with a more robust version.

The new protocol requires using a xen_header structure that will be
used to pass data between the FreeBSD loader and the FreeBSD kernel
when booting in dom0 mode. At the moment the only data conveyed is the
offset of the start of the module metadata relative to the start of the
module itself.

This is a slightly disruptive change since it also requires a change
to the kernel which is contained in this patch. In order to update
with this change the kernel must be updated before updating the
loader, as described in the handbook. Note this is only required when
booting a FreeBSD/Xen dom0. This change doesn't affect the normal
FreeBSD boot protocol.

This fixes booting FreeBSD/Xen in dom0 mode after

Sponsored by:		Citrix Systems R&D
MFC after:		3 days
Reviewed by:		tsoome
Differential Revision:
ebc61c86 donner Jan. 29, 2021, 11:34 a.m.
Change the queuing framework from ifq to mbufq.

Reported by:	glebius
Reviewed by:	glebius, kp
Approved by:	kp (mentor)
MFC after:	2 weeks
Differential Revision:
45e1f854 mjg Jan. 29, 2021, 11:23 a.m.
This follows select by eleminating the use of filedesc lock.
This is a win for single-threaded processes and a mixed bag for others
as at small concurrency it is faster to take the lock instead of
refing/unrefing each file descriptor.

Nonetheless, removal of shared lock usage is a step towards a
mtx-protected fd table.
6affe1b7 mjg Jan. 29, 2021, 11:23 a.m.
Since most select users are single-threaded this avoid a lot of work
in the common case.

For example select of 16 fds (ops/s):
before:	2114536
after:	2991010
eaad8d13 mjg Jan. 29, 2021, 11:23 a.m.
This can be used by single-threaded processes which don't share a file
descriptor table to access their file objects without having to
reference them.

For example select consumers tend to match the requirement and have
several file descriptors to inspect.
abd61904 bz Jan. 29, 2021, 11 a.m.
Update the reference of which file to update in the doc tree when
bumping __FreeBSD_version.
1d15bcea arichardson Jan. 29, 2021, 9:30 a.m.
This fixes one of the sys/audit tests when running them on tmpfs.

Reviewed By:	delphij, kib
Differential Revision:
892a05ee arichardson Jan. 29, 2021, 9:29 a.m.
This tests fork()s, so if there is still data in the stdout buffer on fork
it will print it again in the child process. This was happening in the
CheriBSD CI and caused the test to complain about malformed TAP output.

Reviewed By:	ngie
Differential Revision:
4d2edf3a arichardson Jan. 29, 2021, 9:28 a.m.
Reviewed By:	lwhsu
Differential Revision: