Commit Graph

20560 Commits

Author SHA1 Message Date
Benedict Reuschling
55ed6718c2 Fix various, mostly minor errors in man pages like:
- Abbreviated month name in .Dd
- position of HISTORY section
- alphabetical ordering within SEE ALSO section
- adding .Ed before .Sh DESCRIPTION
- remove trailing whitespaces
- Line break after a sentence stop
- Use BSD OS macros instead of hardcoded strings

No .Dd bumps as there was no actual content change made
in any of these pages.

Submitted by:	Gordon Bergling gbergling_gmail.com
Approved by:	bcr
Differential Revision:	https://reviews.freebsd.org/D24591
2020-05-03 10:15:58 +00:00
Benedict Reuschling
59e11f398e Add HISTORY sections to build(7), crypto(7),
ffs(7), growfs(7), and diskless(8).

Submitted by:	Gordon Bergling gbergling_gmail.com
Approved by:	bcr
Differential Revision:	https://reviews.freebsd.org/D24271
2020-05-03 09:54:19 +00:00
Gleb Smirnoff
49b6b60e22 Step 2.2:
o Shrink sglist(9) functions to work with multipage mbufs down from
  four functions to two.
o Don't use 'struct mbuf_ext_pgs *' as argument, use struct mbuf.
o Rename to something matching _epg.

Reviewed by:	gallatin
Differential Revision:	https://reviews.freebsd.org/D24598
2020-05-02 23:46:29 +00:00
Benedict Reuschling
2b02de2c94 Fix typo in r360492:
appeard -> appeared

Reported by:	trasz (via IRC)
2020-05-01 11:36:39 +00:00
Benedict Reuschling
1cc60ae8d8 Fix a number of the following issues in man4:
- Inconsistencies in .Dd like abbreviated month names,
"th" after numbers, or leading zeros
- No line breaks after a sentence stop
- Whitespace at the end of the line
- Use macros for BSD OS names instead of hardcoded names
- CAVEATS instead of CAVEAT in section name

No actual content change in terms of additions were made, so
no bump of the .Dd for these man pages.
All of these issues were found and fixed by Gordon Bergling.

Submitted by:	    gbergling_gmail.com
Approved by:	    bcr
Differential Revision:	https://reviews.freebsd.org/D24648
2020-05-01 10:02:38 +00:00
John Baldwin
371f3da616 Remove the SYMVER build option.
This option was added as a transition aide when symbol versioning was
first added.  It was enabled by default in 2007 and is supported even
by the old GPLv2 binutils.  Trying to disable it currently fails to
build in libc and at this point it isn't worth fixing the build.

Reported by:	Michael Dexter
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D24637
2020-04-30 22:08:40 +00:00
Ed Maste
116f7fccc0 src.conf.5: regen after WITHOUT_OPENSSL dep changes 2020-04-30 21:08:22 +00:00
Ed Maste
5ffef74b16 src.opts.mk: add WITHOUT_OPENSSL dependencies
A number of components require OpenSSL and fail to build if it is not
enabled.  As a first phase force these off under WITHOUT_OPENSSL.  A
second phase should make these more fine-grained, allowing the component
to build but without OpenSSL.

PR:		245931
Sponsored by:	The FreeBSD Foundation
2020-04-30 18:11:56 +00:00
Benedict Reuschling
dad92002df Add a new manual page for unionfs(5), written by
Gordon Bergling. Hook it up to the build by adding
it to the Makefile.

Submitted by:	    gbergling_gmail.com
Approved by:	    bcr
Differential Revision:	https://reviews.freebsd.org/D24589
2020-04-30 12:02:13 +00:00
Benedict Reuschling
8c63b2db53 Add HISTORY sections to disk(9), driver(9), and
epoch(9).

In one instance, remove a trailing whitespace while here.

Submitted by:	gbergling_gmail.com
Approved by:	bcr
Differential Revision:	https://reviews.freebsd.org/D24243
2020-04-30 11:17:29 +00:00
Ed Maste
c8c297d9a3 src.conf.5: regen after 359736, ZONEINFO_OLD_TIMEZONES_SUPPORT removal 2020-04-30 00:14:14 +00:00
Benedict Reuschling
0fbd60ebee Add HISTORY section to domain(9).
Submitted by:	gbergling_gmail.com
Approved by:	bcr
Differential Revision:	https://reviews.freebsd.org/D24150
2020-04-29 11:46:01 +00:00
Benedict Reuschling
b4e0f40c85 When copying and pasting the code in the EXAMPLE
section, it would result in the following error:

"ngctl: send msg: Invalid argument"

The reason for this is the missing whitespace to
separate the arguments. When adding the whitespace,
the example works as intended.

Submitted by:	    lutz_donnerhacke.de
Approved by:	    bcr
Differential Revision:	https://reviews.freebsd.org/D23773
2020-04-29 11:25:04 +00:00
John Baldwin
f1f9347546 Initial support for kernel offload of TLS receive.
- Add a new TCP_RXTLS_ENABLE socket option to set the encryption and
  authentication algorithms and keys as well as the initial sequence
  number.

- When reading from a socket using KTLS receive, applications must use
  recvmsg().  Each successful call to recvmsg() will return a single
  TLS record.  A new TCP control message, TLS_GET_RECORD, will contain
  the TLS record header of the decrypted record.  The regular message
  buffer passed to recvmsg() will receive the decrypted payload.  This
  is similar to the interface used by Linux's KTLS RX except that
  Linux does not return the full TLS header in the control message.

- Add plumbing to the TOE KTLS interface to request either transmit
  or receive KTLS sessions.

- When a socket is using receive KTLS, redirect reads from
  soreceive_stream() into soreceive_generic().

- Note that this interface is currently only defined for TLS 1.1 and
  1.2, though I believe we will be able to reuse the same interface
  and structures for 1.3.
2020-04-27 23:17:19 +00:00
Christian Brueffer
8f6c0a08d8 Correct efi(8) reference.
Submitted by:	Gordon Bergling
Differential Revision:	https://reviews.freebsd.org/D24441
2020-04-22 07:47:04 +00:00
Li-Wen Hsu
9157ca0fb4 Also update est(4) as r360162 and r360164
MFC after:	3 days
2020-04-21 17:17:32 +00:00
Li-Wen Hsu
62d12eab90 Update .Dd 2020-04-21 17:14:08 +00:00
Li-Wen Hsu
8e3442b724 hwpstate_intel(4): small text tweaks
The sysctl output looks like this:

dev.hwpstate_intel.0.epp: 50
dev.hwpstate_intel.0.%parent: cpu0
dev.hwpstate_intel.0.%pnpinfo:
dev.hwpstate_intel.0.%location:
dev.hwpstate_intel.0.%driver: hwpstate_intel
dev.hwpstate_intel.0.%desc: Intel Speed Shift

but all the '%' got escaped in the manual page, un-escape them.

While here:
- Move the example of dev.hwpstate_intel.%d.%parent after the description to
  align with others.
- Capitalize "CPU" (*)

Submitted by:	danfe (*)
Reviewed by:	cem
Differential Revision:	https://reviews.freebsd.org/D24520
2020-04-21 17:07:02 +00:00
John Baldwin
29fe41ddd7 Retire the CRYPTO_F_IV_GENERATE flag.
The sole in-tree user of this flag has been retired, so remove this
complexity from all drivers.  While here, add a helper routine drivers
can use to read the current request's IV into a local buffer.  Use
this routine to replace duplicated code in nearly all drivers.

Reviewed by:	cem
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D24450
2020-04-20 22:24:49 +00:00
Cy Schubert
12de77b3db Due to popular demand, revert r360102.
Reported by:	many
2020-04-19 21:38:03 +00:00
Cy Schubert
4574585e8f Conditionally install Kerberos rc files based on MK_KERBEROS_SCRIPTS
instead of MK_KERBEROS. The reason for this change is some users
prefer to build FreeBSD WITHOUT_KERBEROS, wanting to retain the
Kerberos rc scripts to start/stop MIT Kerberos or Heimdal from ports.

PR:		197337
Reported by:	Adam McDougall <ebay at looksharp.net>
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D24252
2020-04-19 17:01:21 +00:00
Alan Somers
72a600a7a1 libauditd: make it a PRIVATELIB
According to the upstream man page (which we don't install), none of
libauditd's symbols are intended to be public. Also, I can't find any
evidence for a port that uses libauditd. Therefore, we should treat it like
other such libraries and use PRIVATELIB.

Reported by:	phk
Reviewed by:	cem, emaste
MFC after:	2 weeks
2020-04-19 02:20:39 +00:00
Alan Somers
27586155ac bectl.8, beinstall.sh.8: fix man page section of beinstall.sh
Reported by:	phk
MFC after:	2 weeks
2020-04-18 19:53:47 +00:00
Warner Losh
5c68be59c8 Add deprecation notice to amr(4) 2020-04-18 02:53:19 +00:00
Warner Losh
a32311eccd twa(4) deprecation notice 2020-04-18 02:53:14 +00:00
Warner Losh
6ccdbb521a Deprecation notice for iir 2020-04-18 02:53:09 +00:00
Warner Losh
5b18755735 Add deprecation notice to mly 2020-04-18 02:53:04 +00:00
Warner Losh
dd6382d1c4 Add deprecation notice for esp(4). 2020-04-18 02:52:59 +00:00
John Baldwin
6231ed472f Document TCP_TLS_MODE_TOE. 2020-04-16 17:41:32 +00:00
Richard Scheffenegger
d7ca3f780d Reduce default TCP delayed ACK timeout to 40ms.
Reviewed by:	kbowling, tuexen
Approved by:	tuexen (mentor)
MFC after:	2 weeks
Sponsored by:	NetApp, Inc.
Differential Revision:	https://reviews.freebsd.org/D23281
2020-04-16 15:59:23 +00:00
Conrad Meyer
102acd72aa bus_dma.9: Remove erroneous usage recommendation
It is not valid to pass BUS_SPACE_UNRESTRICTED to bus_dma_tag_create()'s
nsegments parameter as it is interpreted as a very large segment count.
Subsequent allocation operations on the tag will preallocate some multiple of
that count.  BUS_SPACE_UNRESTRICTED therefore indicates something like:
malloc(infinity).

Discussed with:	bcr, jhb (earlier version)
2020-04-15 01:39:17 +00:00
Kyle Evans
879ce458f4 userland build: replace -fno-common with ${CFCOMMONFLAG}
This change allows any downstream or otherwise consumer to easily override
the new -fno-common default on a temporary basis without having to hack into
src.sys.mk, and also makes it a bit easier to search for these specific
cases where -fno-common must be overridden with -fcommon or else the build
will fail.

The gdb build, the only program requiring -fcommon on head/, is switched
over as an example usage. It will need it on all branches, so this does not
harm future mergability.

MFC after:	3 days
2020-04-10 14:01:07 +00:00
Hiroki Tagato
8eee71907e Add myself (tagattie) as ports committer
Approved by:	ehaupt (mentor)
2020-04-10 07:44:02 +00:00
Richard Scheffenegger
8f5672ada4 add myself (rscheff) as a src committer.
Reviewed by:	rgrimes (mentor), tuexen (mentor)
Approved by:	rgrimes (mentor), tuexen (mentor)
MFC after:	3 days
Sponsored by:	NetApp, Inc.
Differential Revision:	https://reviews.freebsd.org/D24318
2020-04-10 00:31:52 +00:00
Xin LI
f5b7695d2d Always install backward compatibility timezones, as they are installed
on all major Linux distributions as well as NetBSD and OpenBSD.

Remove the undocumented ZONEINFO_OLD_TIMEZONES_SUPPORT and the deprecated
OLDTIMEZONES knobs as they are now the default.

Reviewed by:		ngie, rgrimes
MFC after:		2 weeks
Differential Revision:	https://reviews.freebsd.org/D24306
2020-04-09 05:11:18 +00:00
Christian Brueffer
6b5225e433 Add a basic manpage for smbfs(5).
Submitted by:	Gordon Bergling
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D23905
2020-04-08 20:00:30 +00:00
Bryan Drewery
33ae1ff723 NO_OBJ: Always fix .OBJDIR regardless of AUTO_OBJ.
Sponsored by:	Dell EMC
MFC after:	2 weeks
2020-04-07 17:07:04 +00:00
Kyle Evans
8eb1a0ce56 Add -fno-common to all userland/kernel src builds
-fno-common will become the default in GCC10/LLVM11. Plenty of work has been
put in to make sure our world builds are no -fno-common clean, so let's slap
the build with this until it becomes the compiler default to ensure we don't
regress.

At this time, we will not be enforcing -fno-common on ports builds. I
suspect most ports will be or quickly become -fno-common clean as they're
naturally built against compilers that default to it, so this will hopefully
become a non-issue in due time. The exception to this, which is actually the
status quo, is that kmods built from ports will continue to build with
-fno-common.

As of the time of writing, I intend to also make stable/12 -fno-common
clean. What's been done will be MFC'd to stable/11 if it's easily applicable
and/or not much work to massage it into being functional, but I anticipate
adding -fcommon to stable/11 builds to maintain its ability to be built with
newer compilers for the rest of its lifetime instead of putting in a third
branch's worth of effort.
2020-04-07 17:04:24 +00:00
Kyle Evans
cddd13a4f4 Fix port/kernel builds after r359681
Submitted by:	bdrewery
Reported by:	bdrewery, sobomax, antoine
2020-04-07 15:10:04 +00:00
Maxim Sobolev
a8b8edb25e Normalize deployment tools usage and definitions by putting into one place
instead of sprinkling them out over many disjoint files. This is a follow-up
to achieve the same goal in an incomplete rev.348521.

Approved by:	imp
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D20520
2020-04-07 02:46:22 +00:00
Brooks Davis
f382bac49b Fix compilation with upstream clang builtin headers.
By using -nobuiltininc and adding the clang builtin headers resource dir
to the end of the compiler header search path, we can still find headers
such as immintrin.h but find the FreeBSD version of stddef.h/stdarg.h/..
first.

This is a workaround until we are able to settle on and complete a plan
to harmonize guard macros with LLVM.  We've mostly worked out this on
FreeBSD systems by removing select headers from the installed set of
devel/llvm*, but that isn't a good solution for cross build.

Submitted by:	arichardson
Obtained from:	CheriBSD
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D17002
2020-04-06 23:38:46 +00:00
Christian Brueffer
147052684d Add Gordon Bergling to the authors section; remove trailing whitespace.
Suggested by:	rgrimes
Approved by:	Gordon Bergling
X-MFC-with:	r359633
2020-04-06 09:59:21 +00:00
Kyle Evans
a870eaa408 src.conf(5): re-roll after r359644 (LLVM_ASSERTIONS) 2020-04-06 01:28:03 +00:00
Kyle Evans
147d7b567f llvm: add a build knob for enabling assertions
For head/, this will remain eternally default-on to maintain the status quo.
For stable/ branches, it should be flipped to default-off to maintain the
status quo.

There's value in being able to flip it one way or the other easily on head
or stable branches, whether you want to gain some performance back on head/
(for machines there's little chance you'll actually hit an assertion) or
potentially diagnose a problem with the version of llvm on an older branch.

Currently, stable branches get the CFLAGS+= -ndebug line uncommented; going
forward, they will instead have the default of LLVM_ASSERTIONS flipped.

Reviewed by:	dim, emaste, re (gjb)
MFC after:	1 week
MFC note:	flip the default of LLVM_ASSERTIONS
Differential Revision:	https://reviews.freebsd.org/D24264
2020-04-06 01:27:17 +00:00
Christian Brueffer
ff595bc3cd Add a manpage for smbios(4).
Submitted by:	Gordon Bergling
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D23714
2020-04-04 21:38:00 +00:00
Ed Maste
233c4ed93a elf.5: remove commented out leftovers 2020-04-03 19:42:16 +00:00
Ed Maste
bf38482033 elf.5: expand on NT_FREEBSD_FEATURE_CTL bit definitions
Based on suggestions from kib in review D23982.

Sponsored by:	The FreeBSD Foundation
2020-04-03 17:17:17 +00:00
Sevan Janiyan
3b8de63481 Add NetBSD 8.2 2020-04-02 11:08:19 +00:00
Ed Maste
2338bd4714 elf.5: correct and expand NT_FREEBSD_NOINIT_TAG description
Reported by:	kib
2020-04-02 01:03:27 +00:00
Ed Maste
ae62900618 elf.5: minor update to FreeBSD ELF note descriptions 2020-04-01 23:36:16 +00:00
Warner Losh
24ae19c414 Start the retirement process for ufm
This driver hasn't been relevant in almost 15 years. It was for a product on the
shelves for about 6 months in 2003/2004. I've not updated the driver since then,
and have had nobody talk to me about it since maybe 2006 or 2007. It doesn't
implement a standard interface, and can be better done with libusb. All the
action has moved to webcamd for newer, more fully featured hardware. It makes no
appearances in the nycbug dmesg archive.

Relnotes: yes
MFC After: 3 days
2020-04-01 16:22:31 +00:00
Ed Maste
51ae128421 elf.5: add definitions of FreeBSD notes
I hope to extend this with some more detail in the future but it gives
a good starting point.

Thanks to 0mp for assistance with markup.

Reviewed by:	jkoshy
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23982
2020-04-01 15:34:10 +00:00
Simon J. Gerraty
5ea556d98c Do not claim libbearssl et al are INTERNALLIB
If INTERNALLIB is defined we need PIE and bsd.incs.mk is
not included.

PR:		245189
Reviewed by:	emaste
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org//D24233
2020-04-01 05:45:12 +00:00
Warner Losh
e1b9162f48 Document universe better
Document the kernels and worlds targets. Document the TARGETS and EXTRA_TARGETS
variables.

Reviewed by: brooks, bdrewery, emaste (LGTM)
MFC After: 3 days
Differential Revision: https://reviews.freebsd.org/D24212
2020-03-31 22:41:53 +00:00
Warner Losh
a7783b5a72 Make universe configuration more consistent with rest of system
Add 'WITHOUT_WORLDS' and 'WITHOUT_KERNELS' as aliases for the inconsistently
named MAKE_JUST_KERNELS and MAKE_JUST_WORLDS respectively. I always forget the
MAKE_ part (or is it BUILD_), and it's inconsistent with everything
else. Document the new things, but leave speculation of any eventual MAKE_JUST_*
deprecation out of the manuals and comments.

Reviewed by: brooks, bdrewery, emaste (LGTM)
MFC After: 3 days
Differential Revision: https://reviews.freebsd.org/D24212
2020-03-31 22:41:43 +00:00
Simon J. Gerraty
64b522da27 Include ${.CURDIR}/local.init.mk if it exists
This is handy for making local hacks to an app
(eg to build it as tool for non-BSD host)
without making a mess of the code base.

Reviewed by:	bdrewery
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org//D24101
2020-03-31 15:59:29 +00:00
Michael Tuexen
413c3db101 Allow the TCP backhole detection to be disabled at all, enabled only
for IPv4, enabled only for IPv6, and enabled for IPv4 and IPv6.
The current blackhole detection might classify a temporary outage as
an MTU issue and reduces permanently the MSS. Since the consequences of
such a reduction due to a misclassification are much more drastically
for IPv4 than for IPv6, allow the administrator to enable it for IPv6 only.

Reviewed by:		bcr@ (man page), Richard Scheffenegger
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D24219
2020-03-31 15:54:54 +00:00
Takanori Watanabe
c30797873f Add Platform Controller Hub built-in thermal management device driver.
Differential Revision:	https://reviews.freebsd.org/D24077
2020-03-31 06:25:43 +00:00
John Baldwin
e42b096439 Document EINTEGRITY errors for many system calls.
EINTEGRITY was previously documented as a UFS-specific error for
mount(2).  This documents EINTEGRITY as a filesystem-independent error
that may be reported by the backing store of a filesystem.

While here, document EIO as a filesystem-independent error for both
mount(2) and posix_fadvise(2).  EIO was previously only documented for
UFS for mount(2).

Reviewed by:	mckusick
Suggested by:	mckusick
MFC after:	2 weeks
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D24168
2020-03-30 21:44:00 +00:00
Ed Maste
73699177ed regen src.conf.5 after WITHOUT_GDB_LIBEXEC removal r359454
... and a number of other changes since the last regen.
2020-03-30 20:08:26 +00:00
Toomas Soome
1311154d3b gallant: pound sign (0xa3) is a bit broken. Add extra glyphs.
I did add some more glyphs to provide box drawing and set of additional
glyphs to provide better support for some code pages. Still does not quite
match terminus.
2020-03-30 20:07:25 +00:00
Ed Maste
a52b0bb1d2 drop GDB_LIBEXEC option (now always true)
In-tree gdb is essentially obsolete.  We kept it for sparc64 (because
gdb in ports lacked sparc64 support) and as a fallback for crashinfo.
gdb was installed to /libexec on all archs other than sparc64, where the
WITHOUT_GDB_LIBEXEC option was default, with gdb installed to /usr/bin.
With sparc64's retirement WITH_GDB_LIBEXEC became the default for all
architectures, but it was still possible to set it off and install gdb
into /usr/bin.

As the next step in gdb's retirement, remove the option and install gdb
only into /libexec as the crashinfo fallback. We expect users to install
the gdb port or package for debugging. The in-tree gdb lacks support for
a number of supported architectures and does not support contemporary
DWARF debug info.

Reviewed by:	jhb (earlier)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D24227
2020-03-30 20:05:09 +00:00
Ed Maste
202f6d830d elf.5: table markup fixes
Suggested by 0mp in review D23982.

Submitted by:	0mp
2020-03-30 19:10:12 +00:00
Justin Hibbits
90be917249 powerpc: --secure-plt only needs to pass to ld.bfd, not ld.lld
ld.lld only supports secure-plt for powerpc, so no need to pass the argument
in.
2020-03-30 16:24:05 +00:00
Michael Tuexen
65c5bff387 Be a bit more precisly in the description of the sysctl variable
net.inet.tcp.pmtud_blackhole_detection. Also remove three entries,
which are not sysctl variables but statistic counters for TCP.
Thanks to 0mp@ for suggesting an improvement.

Reviewed by:		bcr@
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D24216
2020-03-29 15:43:00 +00:00
Ed Maste
e6f6c36ce3 arch.7: update Default Tool Chain section
All architectures use Clang, lld, and ELF Tool Chain now.
2020-03-28 15:35:47 +00:00
John Baldwin
c034143269 Refactor driver and consumer interfaces for OCF (in-kernel crypto).
- The linked list of cryptoini structures used in session
  initialization is replaced with a new flat structure: struct
  crypto_session_params.  This session includes a new mode to define
  how the other fields should be interpreted.  Available modes
  include:

  - COMPRESS (for compression/decompression)
  - CIPHER (for simply encryption/decryption)
  - DIGEST (computing and verifying digests)
  - AEAD (combined auth and encryption such as AES-GCM and AES-CCM)
  - ETA (combined auth and encryption using encrypt-then-authenticate)

  Additional modes could be added in the future (e.g. if we wanted to
  support TLS MtE for AES-CBC in the kernel we could add a new mode
  for that.  TLS modes might also affect how AAD is interpreted, etc.)

  The flat structure also includes the key lengths and algorithms as
  before.  However, code doesn't have to walk the linked list and
  switch on the algorithm to determine which key is the auth key vs
  encryption key.  The 'csp_auth_*' fields are always used for auth
  keys and settings and 'csp_cipher_*' for cipher.  (Compression
  algorithms are stored in csp_cipher_alg.)

- Drivers no longer register a list of supported algorithms.  This
  doesn't quite work when you factor in modes (e.g. a driver might
  support both AES-CBC and SHA2-256-HMAC separately but not combined
  for ETA).  Instead, a new 'crypto_probesession' method has been
  added to the kobj interface for symmteric crypto drivers.  This
  method returns a negative value on success (similar to how
  device_probe works) and the crypto framework uses this value to pick
  the "best" driver.  There are three constants for hardware
  (e.g. ccr), accelerated software (e.g. aesni), and plain software
  (cryptosoft) that give preference in that order.  One effect of this
  is that if you request only hardware when creating a new session,
  you will no longer get a session using accelerated software.
  Another effect is that the default setting to disallow software
  crypto via /dev/crypto now disables accelerated software.

  Once a driver is chosen, 'crypto_newsession' is invoked as before.

- Crypto operations are now solely described by the flat 'cryptop'
  structure.  The linked list of descriptors has been removed.

  A separate enum has been added to describe the type of data buffer
  in use instead of using CRYPTO_F_* flags to make it easier to add
  more types in the future if needed (e.g. wired userspace buffers for
  zero-copy).  It will also make it easier to re-introduce separate
  input and output buffers (in-kernel TLS would benefit from this).

  Try to make the flags related to IV handling less insane:

  - CRYPTO_F_IV_SEPARATE means that the IV is stored in the 'crp_iv'
    member of the operation structure.  If this flag is not set, the
    IV is stored in the data buffer at the 'crp_iv_start' offset.

  - CRYPTO_F_IV_GENERATE means that a random IV should be generated
    and stored into the data buffer.  This cannot be used with
    CRYPTO_F_IV_SEPARATE.

  If a consumer wants to deal with explicit vs implicit IVs, etc. it
  can always generate the IV however it needs and store partial IVs in
  the buffer and the full IV/nonce in crp_iv and set
  CRYPTO_F_IV_SEPARATE.

  The layout of the buffer is now described via fields in cryptop.
  crp_aad_start and crp_aad_length define the boundaries of any AAD.
  Previously with GCM and CCM you defined an auth crd with this range,
  but for ETA your auth crd had to span both the AAD and plaintext
  (and they had to be adjacent).

  crp_payload_start and crp_payload_length define the boundaries of
  the plaintext/ciphertext.  Modes that only do a single operation
  (COMPRESS, CIPHER, DIGEST) should only use this region and leave the
  AAD region empty.

  If a digest is present (or should be generated), it's starting
  location is marked by crp_digest_start.

  Instead of using the CRD_F_ENCRYPT flag to determine the direction
  of the operation, cryptop now includes an 'op' field defining the
  operation to perform.  For digests I've added a new VERIFY digest
  mode which assumes a digest is present in the input and fails the
  request with EBADMSG if it doesn't match the internally-computed
  digest.  GCM and CCM already assumed this, and the new AEAD mode
  requires this for decryption.  The new ETA mode now also requires
  this for decryption, so IPsec and GELI no longer do their own
  authentication verification.  Simple DIGEST operations can also do
  this, though there are no in-tree consumers.

  To eventually support some refcounting to close races, the session
  cookie is now passed to crypto_getop() and clients should no longer
  set crp_sesssion directly.

- Assymteric crypto operation structures should be allocated via
  crypto_getkreq() and freed via crypto_freekreq().  This permits the
  crypto layer to track open asym requests and close races with a
  driver trying to unregister while asym requests are in flight.

- crypto_copyback, crypto_copydata, crypto_apply, and
  crypto_contiguous_subsegment now accept the 'crp' object as the
  first parameter instead of individual members.  This makes it easier
  to deal with different buffer types in the future as well as
  separate input and output buffers.  It's also simpler for driver
  writers to use.

- bus_dmamap_load_crp() loads a DMA mapping for a crypto buffer.
  This understands the various types of buffers so that drivers that
  use DMA do not have to be aware of different buffer types.

- Helper routines now exist to build an auth context for HMAC IPAD
  and OPAD.  This reduces some duplicated work among drivers.

- Key buffers are now treated as const throughout the framework and in
  device drivers.  However, session key buffers provided when a session
  is created are expected to remain alive for the duration of the
  session.

- GCM and CCM sessions now only specify a cipher algorithm and a cipher
  key.  The redundant auth information is not needed or used.

- For cryptosoft, split up the code a bit such that the 'process'
  callback now invokes a function pointer in the session.  This
  function pointer is set based on the mode (in effect) though it
  simplifies a few edge cases that would otherwise be in the switch in
  'process'.

  It does split up GCM vs CCM which I think is more readable even if there
  is some duplication.

- I changed /dev/crypto to support GMAC requests using CRYPTO_AES_NIST_GMAC
  as an auth algorithm and updated cryptocheck to work with it.

- Combined cipher and auth sessions via /dev/crypto now always use ETA
  mode.  The COP_F_CIPHER_FIRST flag is now a no-op that is ignored.
  This was actually documented as being true in crypto(4) before, but
  the code had not implemented this before I added the CIPHER_FIRST
  flag.

- I have not yet updated /dev/crypto to be aware of explicit modes for
  sessions.  I will probably do that at some point in the future as well
  as teach it about IV/nonce and tag lengths for AEAD so we can support
  all of the NIST KAT tests for GCM and CCM.

- I've split up the exising crypto.9 manpage into several pages
  of which many are written from scratch.

- I have converted all drivers and consumers in the tree and verified
  that they compile, but I have not tested all of them.  I have tested
  the following drivers:

  - cryptosoft
  - aesni (AES only)
  - blake2
  - ccr

  and the following consumers:

  - cryptodev
  - IPsec
  - ktls_ocf
  - GELI (lightly)

  I have not tested the following:

  - ccp
  - aesni with sha
  - hifn
  - kgssapi_krb5
  - ubsec
  - padlock
  - safe
  - armv8_crypto (aarch64)
  - glxsb (i386)
  - sec (ppc)
  - cesa (armv7)
  - cryptocteon (mips64)
  - nlmsec (mips64)

Discussed with:	cem
Relnotes:	yes
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D23677
2020-03-27 18:25:23 +00:00
Brandon Bergren
4d94781b4d [PowerPC] Fix LIB32WMAKEFLAGS definition
When I modified the LIB32WMAKEFLAGS= definition, I trimmed too much off.
-m is meant to be a parameter to LD.

Reported by:	arichardson
2020-03-27 18:20:36 +00:00
Brandon Bergren
a04ec978b3 [PowerPC] Switch powerpc and powerpcspe to lld
Now that LLD 10 is out, and required patches have landed, we are now ready
to finally switch away from the ancient in-tree ld.bfd.

Special thanks to Fangrui Song for many hours of work on getting the
32-bit powerpc lld ready for prime-time.

Reviewed by:	emaste (earlier revision), jhibbits
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D24111
2020-03-27 01:00:03 +00:00
Mateusz Piotrowski
efc7180b5c Fix formatting
Previously, the whole "jail_* variables" string would be stylized
as a variable. This is incorrect.

MFC after:	3 days
2020-03-25 10:11:37 +00:00
Emmanuel Vadot
970d1bbf71 Re-apply r359267 now that tools are using the proper include path
Original commit message:
bsd.lib.mk: Do not include bsd.incs.mk for INTERNALLIB

f we're building an internal lib do not bother including bsd.incs.mk so we
will not install the headers.
This also "solves" a problem with pkgbase where a libXXX-development package
is created and due to how packages are created we add a dependency to a
libXXX package that doesn't exists.
2020-03-25 01:35:13 +00:00
Emmanuel Vadot
7dc05244c5 Revert r359267.
This is not the correct solution and I should have done a clean buildworld.
2020-03-24 01:29:18 +00:00
Emmanuel Vadot
1c93dede42 bsd.lib.mk: Do not include bsd.incs.mk for INTERNALLIB
If we're building an internal lib do not bother including bsd.incs.mk so we
will not install the headers.
This also "solves" a problem with pkgbase where a libXXX-development package
is created and due to how packages are created we add a dependency to a
libXXX package that doesn't exists.

Reported by:	pizzamig
Reviewed by:	pizzamig bapt emaste
Differential Revision:	https://reviews.freebsd.org/D24166
2020-03-24 01:09:04 +00:00
Brooks Davis
e2d6edeb99 Improve LIBADD/_DP_* for kyua libraries.
This fixes build with ld.bfd as the linker (e.g. on powerpc).

This corrects a bug in D24103.

Sponsored by:	DARPA
2020-03-23 21:21:38 +00:00
Brooks Davis
b0d29bc47d Import the kyua test framework.
Having kyua in the base system will simplify automated testing in CI and
eliminates bootstrapping issues on new platforms.

The build of kyua is controlled by WITH(OUT)_TESTS_SUPPORT.

Reviewed by:	emaste
Obtained from:	CheriBSD
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D24103
2020-03-23 19:01:23 +00:00
Brooks Davis
c697fb7f7c Add liblutok a lightweight C++ API for lua.
It is added an INTERNALLIB and not installed.  It will be used by kyua.

This is a preparatory commit for D24103.

Reviewed by:	emaste
Obtained from:	CheriBSD
Sponsored by:	DARPA
2020-03-23 18:26:23 +00:00
Ed Maste
1fc78b7e60 arch.7: remove Default Tool Chain footnote about xtoolchain
MIPS was the last arch to use external toolchain by default but uses
in-tree Clang and lld as of r359233, and now no table entries reference
the footnote.
2020-03-23 18:17:56 +00:00
Ed Maste
ce0d5fb489 arch.7: update Default Tool Chain intro text
All FreeBSD archs now use an in-tree toolchain - Clang and ELF Tool
Chain everywhere, and lld everywhere but 32-bit PowerPC (which still
uses ld.bfd).  No archs use external toolchain by default.

Sponsored by:	The FreeBSD Foundation
2020-03-23 18:14:04 +00:00
Alex Richardson
647d4c51df Update arch.7 .Dd for r359233
Suggested by:	lwhsu
2020-03-23 17:51:39 +00:00
Mateusz Piotrowski
69b77fc027 Start sentences from new lines
Also, bump date after 359244.
2020-03-23 15:39:42 +00:00
Alexander V. Chernikov
7119cdc225 Make ICMP redirect processing depend on routing daemon.
Submitted by:	 lutz at donnerhacke.de
Reviewed by:	melifaro,rgrimes
Differential Revision:	https://reviews.freebsd.org/D23329
2020-03-23 15:27:10 +00:00
Mateusz Piotrowski
f04020edc5 Sort UMA macros and create MLINKS for them
This patch is a follow-up to r344518.

Reported by:	ngie

Reviewed by:	hselasky
Differential Revision:	https://reviews.freebsd.org/D24165
2020-03-23 14:04:42 +00:00
Alex Richardson
4a4c9a0f9e Use Clang and LLD as the default toolchain for MIPS
Now that we have updated the in-tree version of LLVM to 10.0, we have all the
necessary LLVM changes to use Clang+LLD as the default toolchain for MIPS.

Relnotes:	yes
Reviewed By:	emaste, jhb, brooks, kevans
Differential Revision: https://reviews.freebsd.org/D23204
2020-03-23 10:36:32 +00:00
Carlo Strub
829a8a6550 - sort according to scan code
- adapt some alt and alt shift keys to other standard keyboards
- fix ctrl-d to issue eot

Approved by:	philip (implicit)
2020-03-22 21:41:32 +00:00
Warner Losh
980bae6980 Redo r359164 now that it's baked : Eliminate misuse of $MACHINE for userland things.
Use TARGET_ARCH and/or MACHINE_ARCH exclusively. Change all __TT uses to __T
with appropriate translations. MACHINE/TARGET is to be used only for kernel
things, and this fixes the last few stragglers.
2020-03-21 00:01:06 +00:00
Nick O'Brien
d9b252e3cb Add myself (nick) as a src committer
Reviewed by:	philip (mentor)
Approved by:	philip (mentor), kp (mentor)
Differential Revision:	https://reviews.freebsd.org/D24130
2020-03-20 17:16:21 +00:00
Ed Maste
2733d8c96c retire cx,ctau drivers
The devices supported by these drivers are obsolete ISA cards, and the
sync serial protocols they supported are essentially obsolete too.

Sponsored by:	The FreeBSD Foundation
2020-03-20 16:50:19 +00:00
Warner Losh
5e029bd788 Revert r359164.
This was in my staging tree by mistake when I pushed. Revert until it's ready.
2020-03-20 16:00:26 +00:00
Warner Losh
6f7bbb2661 Eliminate misuse of $MACHINE for userland things.
Use TARGET_ARCH and/or MACHINE_ARCH exclusively. Change all __TT uses to __T
with appropriate translations. MACHINE/TARGET is to be used only for kernel
things.
2020-03-20 15:07:21 +00:00
Warner Losh
3b7fd87cbf Remove sparc support from clang build infrastructure. Any remaining sparc files
will be mopped up in future imports.

Differential Revision: https://reviews.freebsd.org/D24128
2020-03-20 15:07:15 +00:00
Sevan Janiyan
479e1a27f2 Add DragonFly BSD 5.8 & 5.63 2020-03-20 03:15:23 +00:00
Mateusz Piotrowski
1b7ae4aa5e Document my doc bit and that bcr@ was my mentor 2020-03-19 10:20:32 +00:00
Ed Maste
5236e8d427 src.opts.mk: remove remaining support for pre-C++11 C++ compilers
Delete the conditions that forcibly disabled GOOGLETEST and LLDB for
pre-C++11 C++ compilers, since we no longer support such compilers.

Also delete the complicated method of defaulting LIBCPLUSPLUS to YES.

Prodded by:	kevans
Sponsored by:	The FreeBSD Foundation
2020-03-18 21:28:55 +00:00
Ed Maste
d64b2df932 src.opts.mk: drop C++11 compiler conditional from OPENMP
We no longer support older C++ compilers, so do not need to explicitly
test for C++11 support.

After r339946 we stopped running `cc --version` during cleandir/obj
stages, so stopped setting COMPILER_FEATURES.  This in turn meant
lib/libomp was excluded from the clean stage in a normal buildworld
(i.e., one without -DNO_CLEAN), and this is what caused recent build
failures with errors about missing ittnotify_static.c.

This commit should obviate the need for the workaround committed in
r359083.  Thanks to bdrewery for the insight and for pushing for a
correct fix.  There are more cleanups to be done, but this change is
a simplification and an improvement over r359083.

Sponsored by:	The FreeBSD Foundation
2020-03-18 21:15:45 +00:00
Hiroki Sato
c165f4ab69 -F is GNU diff specific, not implemented in BSD diff.
Reported by:	kouya@ryuhoku.jp
MFC after:	3 days
2020-03-18 08:00:46 +00:00
Brooks Davis
2e1dfb346f Support SUBDIR.${MK_FOO}.${MK_BAR} expresssions.
This allows simplification of Makefiles where some SUBDIR entries depend
on two things (e.g. something that depends on C++ and some other knob).

Discussed with:	imp, jhb
Obtained from:	CheriBSD
MFC after:	3 days
Sponsored by:	DARPA
2020-03-17 18:17:32 +00:00
Brooks Davis
564b9ff2a7 Add an internal liblua and use it in flua.
The new liblua will be used in a forthcoming import of kyua.

Reviewed by:	kevans
Obtained from:	CheriBSD
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D24090
2020-03-17 17:28:12 +00:00
Kevin Lo
61e4c924a0 Convert to the standard section 4 SYNOPSIS layout. 2020-03-17 05:33:05 +00:00
Lorenzo Salvadore
1d7a2bbe37 Add tcberner as co-mentor for salvadore
Approved by:	gerald (mentor)
2020-03-16 23:37:57 +00:00
Mateusz Piotrowski
d7ef92ffae CMSG_DATA.3: Fix formatting of printf escape sequences
Escape sequences like "\n" have to be escaped twice in examples in our
mdoc(7)-based manual pages in order to be displayed properly. The problem
is that otherwise they are interpreted by mdoc(7), which results in:

    printf("parent: received '%s'0, buf);

being shown to the user instead of:

    printf("parent: received '%s'\n", buf);

Approved by:	bcr (mentor)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D24056
2020-03-13 11:07:48 +00:00
Ed Maste
ddc9d6e55a arch.7: remove extraneous markup from header table sizing
Reported by:	0mp (in response to r358891)
2020-03-11 20:40:24 +00:00
Bjoern A. Zeeb
0f828e1415 Correctly spell TUNABLES. 2020-03-11 20:23:36 +00:00
Ed Maste
b1b09fb8cd Remove extra Sy from table header
Reported by:	0mp
2020-03-11 20:05:06 +00:00
Ed Maste
311223e017 elf.5: start documenting ELF note sections
I intend to document FreeBSD's ELF notes (see review D23982), but start
with a section documenting the format of the note section itself.

Sponsored by:	The FreeBSD Foundation
2020-03-11 18:15:18 +00:00
Jung-uk Kim
e754c10d23 Add "tigerlake" CPUTYPE for x86 to catch up with Clang 10.0. 2020-03-10 23:12:55 +00:00
Jung-uk Kim
c5672d151d - Remove CPUTYPE examples for sparc64. It is not supported since r358345.
- Clean up CPUTYPE examples for x86.  GCC 4.2.1 was removed by r358454.
2020-03-10 22:59:01 +00:00
Dimitry Andric
16b9056593 Merge ^/head r358731 through r358831. 2020-03-10 07:04:05 +00:00
Ed Maste
f87a2082dc regen src.conf.5 after r358821, AMD option removal
Also pick up LOADER_VERIEXEC_VECTX change.
2020-03-09 20:49:59 +00:00
Ed Maste
5b51d0c01c Remove WITH_AMD option, missed in r358821 2020-03-09 20:49:06 +00:00
Toomas Soome
f67d5361a8 gallant is 12x22, not 8x16
INDEX.fonts does list gallant with wrong size.
2020-03-09 19:43:28 +00:00
Ed Maste
3823477b39 arch.7: remove note about GCC 4.2.1 removal date
GCC 4.2.1 was removed in r358454.

Sponsored by:	The FreeBSD Foundation
2020-03-08 21:30:55 +00:00
Ed Maste
1458fa16a2 arch.7: remove sparc64 references
sparc64 was removed from the tree, so remove references here (except
for the supported release table).

Sponsored by:	The FreeBSD Foundation
2020-03-08 21:25:36 +00:00
Simon J. Gerraty
afc571b1a6 veloader use vectx API for kernel and modules
The vectx API, computes the hash for verifying a file as it is read.
This avoids the overhead of reading files twice - once to verify, then
again to load.

For doing an install via loader, avoiding the need to rewind
large files is critical.

This API is only used for modules, kernel and mdimage as these are the
biggest files read by the loader.
The reduction in boot time depends on how expensive the I/O is
on any given platform.  On a fast VM we see 6% improvement.

For install via loader the first file to be verified is likely to be the
kernel, so some of the prep work (finding manifest etc) done by
verify_file() needs to be factored so it can be reused for
vectx_open().

For missing or unrecognized fingerprint entries, we fail
in vectx_open() unless verifying is disabled.

Otherwise fingerprint check happens in vectx_close() and
since this API is only used for files which must be verified
(VE_MUST) we panic if we get an incorrect hash.

Reviewed by:	imp,tsoome
MFC after:	1 week
Sponsored by:	Juniper Networks
Differential Revision:	https://reviews.freebsd.org//D23827
2020-03-08 17:42:42 +00:00
Dimitry Andric
2ac6b71f31 Merge ^/head r358712 through r358730. 2020-03-07 15:09:45 +00:00
Justin Hibbits
dc0a7e1390 compat: Allow explicit overriding of COMPAT_ARCH and COMPAT_CPUTYPE
Summary:
Allow src.conf to override the inferred COMPAT_ARCH and COMPAT_CPUTYPE
variables, such that a different CPU target can be specified explicitly
for the general target vs the compat target.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D23992
2020-03-07 03:58:58 +00:00
Mark Johnston
fffcb56f7a Add COUNTER_U64_SYSINIT() and COUNTER_U64_DEFINE_EARLY().
The aim is to reduce the boilerplate needed today to define and
initialize global counters.  Also add SI_SUB_COUNTER to the sysinit
ordering.

Reviewed by:	kib
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23977
2020-03-06 19:09:01 +00:00
Dimitry Andric
e43d33d286 Merge ^/head r358466 through r358677. 2020-03-05 17:55:36 +00:00
Gleb Smirnoff
def4e701e5 Fix spelling of "dropped".
Submitted by:	Lutz Donnerhacke
Differential Revision:	https://reviews.freebsd.org/D23954
2020-03-04 22:32:40 +00:00
Justin Hibbits
c8cea9f5b7 Update ismt(4) man page for r358595.
Submitted by:	Dmitry Luhtionov
X-MFC-With:	r358595
Sponsored by:	Juniper Networks, Inc
2020-03-04 14:56:32 +00:00
Conrad Meyer
fd1efedc79 Add extremely useful calendar(1) application to FreeBSD
It does extremely useful things like execute sendmail and spew dubiously
accurate factoids.

From the feedback, it seems like it is an essential utility in a modern unix
and not at all a useless bikeshed.  How do those Linux people live without it?
Reverts r358561.
2020-03-03 00:20:08 +00:00
Conrad Meyer
3c565de33f Fix typo in r278616
FreeBSD isn't an encyclopedia.
2020-03-02 23:37:47 +00:00
Ed Maste
2495ef28e9 Add deprecation notices to ctau and cx drivers
These support outdated or obsolete ISA WAN (T1/E1) sync serial cards,
and these drivers haven't really been touched (other than in tree-wide
sweeps to keep them building) for 15+ years.

Related PCI devices ce and cp are still in the tree, with deprecation
proposed in D23928.

MFC after:	1 week
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2020-03-02 20:14:27 +00:00
Warner Losh
795140556c Remove bktr(4)
Remove the brooktree driver as discussed on arch@. Bump FreeBSD version to
1300082, though I doubt anything will care.

Relnote: yes
2020-03-01 19:15:03 +00:00
Warner Losh
94c1cb8c3d add deprecation notice for bktr driver.
We plan to remove bktr(4) in FreeBSD 13. Document that here.

Relnotes: yes
2020-02-29 21:50:08 +00:00
Ed Maste
8231202bd5 regen src.conf.5 for r358468, GPL_DTC removal 2020-02-29 17:24:02 +00:00
Ed Maste
134b378392 retire in-tree GPL dtc devicetree compiler
Now that we no longer have GCC 4.2.1 in the tree and can assume FreeBSD
is being built with a C++11 compiler available, we can use BSDL dtc
unconditionally and retire the GPL dtc.

GPL dtc now has FreeBSD CI support via Cirrus-CI to help ensure it
continues to build/work on FreeBSD and is available in the ports tree
if needed.

The copy of (copyfree licensed) libfdt that we actually use is in
sys/contrib/libfdt so the extra copy under contrib/dtc/libfdt can be
removed along with the rest of the GPL dtc.

Reviewed by:	kevans, ian, imp, manu, theraven
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23192
2020-02-29 17:10:54 +00:00
Dimitry Andric
91019ea7d4 Merge ^/head r358400 through r358465. 2020-02-29 15:08:14 +00:00
Ed Maste
83a08b7c09 src.opts.mk: simplify Clang and lld bootstrap defaults
With the retirement of GCC 4.2.1 we can assume the host compiler supports
C++11, and can simplify the Clang and LLD defaults.  Clang and lld are now
enabled by default everywhere, and are used as the bootstrap compiler and
linker for all targets except MIPS.

Sponsored by:	The FreeBSD Foundation
2020-02-29 13:15:01 +00:00
Ed Maste
bc527d9dfc regen src.conf.5 after r358460, LLVM_LIBUNWIND option retirement 2020-02-29 12:46:02 +00:00
Ed Maste
c45018041d retire the LLVM_LIBUNWIND option
LLVM's libunwind is used on all FreeBSD-supported CPU architectures and
is a required component.

Reviewed by:	brooks (earlier)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23123
2020-02-29 12:43:43 +00:00
Ed Maste
a5798ec8ce regen src.conf.5 after r358454, GCC 4.2.1 retirement 2020-02-29 03:43:18 +00:00
Ed Maste
57f804675e remove GCC 4.2.1 build infrastructure
As described in Warner's email message[1] to the FreeBSD-arch mailing
list we have reached GCC 4.2.1's retirement date.  At this time all
supported architectures either use in-tree Clang, or rely on external
toolchain (i.e., a contemporary GCC version from ports).

GCC 4.2.1 was released July 18, 2007 and was imported into FreeBSD later
that year, in r171825.  GCC has served us well, but version 4.2.1 is
obsolete and not used by default on any architecture in FreeBSD.  It
does not support modern C and does not support arm64 or RISC-V.

Thanks to everyone responsible for maintaining, updating, and testing
GCC in the FreeBSD base system over the years.

So long, and thanks for all the fish.

[1] https://lists.freebsd.org/pipermail/freebsd-arch/2020-January/019823.html

PR:		228919
Reviewed by:	brooks, imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23124
2020-02-29 03:25:51 +00:00
Dimitry Andric
75dfc66c1b Merge ^/head r358269 through r358399. 2020-02-27 19:07:10 +00:00
Warner Losh
68a229849a _Static_assert is to be preferred to CTASSERT.
Document the existing prefernce that _Static_assert be used in preference to the
old CTASSERT we used to use for compile time assertions.
2020-02-27 15:30:13 +00:00
Baptiste Daroussin
be24ad5aac Update pci_vendors to 2020.02.22
MFC after:	2 days
2020-02-27 11:23:44 +00:00
Sergio Carlavilla Delgado
757a04bf82 Add HISTORY sections to tree(3), stdarg(3) and sigevent(3)
Submitted by:	gbergling_gmail.com
Approved by:	bcr@(mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D23832
2020-02-26 19:16:23 +00:00
Ed Maste
3352b550cd src.conf.5: regen after sparc64 removal 2020-02-26 19:12:36 +00:00
Ed Maste
593d80c4a0 src.opts.mk: drop MIPS special case for disabling BINUTILS_BOOTSTRAP
Binutils has already been reduced to installing ld only on powerpc32
and as only on amd64.  (Also objdump on every arch supported by binutils
2.17.50.)  Although BINUTILS_BOOTSTRAP serves no purpose on MIPS there
is no reason to have a special case for it.

Sponsored by:	The FreeBSD Foundation
2020-02-26 19:08:23 +00:00
Warner Losh
47e9f42ea3 Remove sparc64 specific buid-system hacks
Remove all the sparc64 hacks and tweaks to the build system. We don't
need them anymore.
2020-02-26 18:49:20 +00:00
Ed Maste
59ffd5eb99 style.9: update C99 commentary
Make style.9 read as a current statement of C99 preferences, rather than a
description of ongoing changes to our preferred style.  Alsu use the short
form "ISO C99" on the 2nd and later instances rather than repeating the
unwieldy `ISO/IEC 9899:1999 ("ISO C99")` each time.

Reviewed by:	cem, imp, jhb, kib
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23648
2020-02-25 17:18:59 +00:00
Dimitry Andric
9caf7b3610 Adjust the regex used for LINKER_FREEBSD_VERSION so it captures the last
dash-separated segment from the upstream commit description.  This is
required to parse "git describe --long" output.
2020-02-24 19:11:52 +00:00
Sevan Janiyan
97b116ad0a Website announcement of the 9.0 release wasn't a Valentine's day accident. 2020-02-23 23:29:53 +00:00
Sevan Janiyan
b8bf627b18 Add NetBSD 9.0 using the date the releng announcement was made.
NetBSD-7 branch wont be receiving any more releases.
2020-02-22 23:36:10 +00:00
Lorenzo Salvadore
9b48a7bbeb Add myself (salvadore) as a ports committer
Approved by:	gerald (mentor)
2020-02-22 17:56:09 +00:00
Xin LI
f646d24c82 Actually install hwpstate_intel.4. 2020-02-20 06:45:51 +00:00
Dimitry Andric
eb834d9f1b Take LINKER_FREEBSD_VERSION from numerical field after dash
Summary:
With COMPILER_FREEBSD_VERSION, we use a numeric value that we bump each
time we make a change that requires re-bootstrapping, but with the
linker variant, we instead take the entire part after "FreeBSD", as in
this example version output:

LLD 9.0.1 (FreeBSD c1a0a213378a458fbea1a5c77b315c7dce08fd05-1300006) (compatible with GNU linkers)

E.g., LINKER_FREEBSD_VERSION is currently being set to
"c1a0a213378a458fbea1a5c77b315c7dce08fd05-1300006".  This means that
*any* new upstream lld version will cause re-bootstrapping.

We should only look at the numerical field we append after a dash
instead.  This review attempts to make it so.

The only thing I am not happy about is the post-processing of awk output
in Makefile.inc1.  I notice that our awk does not have gensub(), so it
can't substitute a numbered sub-regex with \1, \2, etc.  Suggestions
welcome. :)

MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D23691
2020-02-19 21:12:59 +00:00
Ed Maste
45181e6dba src.conf.5: regen after r358101, WITHOUT_GCOV default 2020-02-19 14:16:48 +00:00
Ed Maste
db1d8f1de4 Move GCOV option to default NO
GNU gcov will be removed along with GCC 4.2.1 at the end of the month.
Change the default to NO in preparation.
2020-02-19 14:12:59 +00:00
Sergio Carlavilla Delgado
8209febbb3 Add some HISTORY sections to manpages
environ(7) was in AT&T Version 7
ac(8): Add a HISTORY section
sa(8): Add a HISTORY section
sqrt(3): Add the actual sqrt function to the HISTORY section

Obtained from: OpenBSD

Submitted by:	gbergling@gmail.com
Approved by:	bcr@(mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D23693
2020-02-19 12:49:49 +00:00
Hiroki Sato
294de6bbd6 Add _BIX (Battery Information Extended) object support.
ACPI Control Method Batteries have a _BIF and/or _BIX object which
provide static properties of the battery.  FreeBSD acpi_cmbat module
supported _BIF object only, which was deprecated as of ACPI 4.0.
_BIX is an extended version of _BIF defined in ACPI 4.0 or later.

As of writing, _BIX has two revisions.  One is in ACPI 4.0 (rev.0) and
another is in ACPI 6.0 (rev.1).  It seems that hardware vendors still
stick to _BIF only or _BIX rev.0 + _BIF for the maximum compatibility.
Microsoft requires _BIX rev.0 for Windows machines, so there are some
laptop machines with _BIX rev.0 only. In this case, FreeBSD does not
recognize the battery information.

After this change, the acpi_cmbat module gets battery information from
_BIX or _BIF object and internally uses _BIX rev.1 data structure as
the primary information store in the kernel.  ACPIIO_BATT_GET_BI[FX]
returns an acpi_bi[fx] structure built by using information obtained
from a _BIF or a _BIX object found on the system.  The revision number
field can be used to check which field is available.  The acpiconf(8)
utility will show additional information if _BIX is available.

Although ABIs of ACPIIO_BATT_* were changed, the existing APIs for
userland utilities are not changed and the backward-compatible ABIs
are provided.  This means that older versions of acpiconf(8) can also
work with the new kernel. The (union acpi_battery_ioctl_arg) was
padded to 256 byte long to avoid another ABI change in the future.
A _BIX object with its revision number >1 will be treated as
compatible with the rev.1 _BIX format.

Reviewed by:	takawata
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D23728
2020-02-19 06:28:55 +00:00
Hiroki Sato
604d0dd551 Use 0x5c for the scan code 0x7d.
Japanese keyboards traditionally use 0x5c for
both Japanese yen sign key and backslash key.
While a Japanese yen sign is depicted on the keytop,
most of Japanese expect that the scan code 0x7d gives
a backslash (0x5c), not a Japanese yen sign (0xa5).

This is because JIS X 0201 encoding (aka ISO/IEC 646-JA,
an extended version of ASCII which is very popular
in Japan) has Japanese yen sign at 0x5c and
no backslash.  On the other hand, ISO/IEC 8859-1
has Japanese yen sign at 0xa5.  This difference has
caused a confusion after Unicode became popular since
ISO/IEC 10646 adopted 8859-1 for the plane 0.

MFC after:	1 week
2020-02-18 01:50:44 +00:00
Matt Macy
45035becfe Add zfree to zero allocation before free
Key and cookie management typically wants to
avoid information leaks by explicitly zeroing
before free. This routine simplifies that by
permitting consumers to do so without carrying
the size around.

Reviewed by:	jeff@, jhb@
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC (Netgate)
Differential Revision:	https://reviews.freebsd.org/D22790
2020-02-16 00:12:53 +00:00
Konstantin Belousov
132fb3dc99 Add pthread_peekjoin_np(3).
The function allows to peek at the thread exit status and even see
return value, without joining (and thus finally destroying) the target
thread.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation (kib)
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D23676
2020-02-15 23:25:39 +00:00
Kyle Evans
485e2f3f55 committers-ports.dot: add myself as a ports committer 2020-02-15 21:21:13 +00:00
Kyle Evans
15e4e740a6 committers-ports: add koobs@ information, somewhat belatedly 2020-02-14 14:03:44 +00:00
Ryan Moeller
0ded0d1256 Add myself (freqlabs) as a src committer
Approved by:	mav (mentor)
MFC after:	3 days
2020-02-13 01:42:13 +00:00
Brooks Davis
d3a5bf95f2 Make the warning for deprecated NO_ variables an error.
Support for NO_CTF, NO_DEBUG_FILES, NO_INSTALLLIB, NO_MAN, NO_PROFILE,
and NO_WARNS as deprecated in 2014 with a warning added for each one
found. Turn these into error in preperation for removal of compatability
support before FreeBSD 13.

This was previously committed in r354909 and reverted in r355011 due to
unforseen impacts on ports.  I've since corrected all amd64 and i386
ports reported in prior runs as well as instance of these variables I
found via grep.
2020-02-12 18:09:20 +00:00
Warner Losh
702547720c Remove sparc64 specific bits of the man pages. 2020-02-12 06:52:22 +00:00
Brooks Davis
8e2e3137a3 Mark hme(4) as deprecated.
It was saved from the initial purge of drivers in fcp-101 due to being
the onboard Ethernet device on a number of sparc64 machines.  Now that
sparc64 is gone, it serves little purpose (PCI cards exist, but are rare
and are unlikely to have been deployed outside Sun systems).

MFC after:	3 days
2020-02-12 00:58:17 +00:00
Kyle Evans
6794d1955a mips: mark GOOGLETEST broken, due to no fault of its own
As explained in the comment; GOOGLETEST cannot currently be compiled on any
mips variant at the moment due to the cross toolchain seemingly using the
wrong spec and not pulling in libgcc. We'll be fine when llvm 10 lands, at
which point this should be reverted most expeditiously.
2020-02-09 18:53:53 +00:00
Mateusz Piotrowski
676ff51e8a Add a missing word in rc.conf.5
PR:		243972
Submitted by:	PauAmma <pauamma@gundo.com>
Approved by:	bcr (mentor)
Differential Revision:	https://reviews.freebsd.org/D23584
2020-02-09 15:13:56 +00:00
Vincenzo Maffione
723180da59 netmap: improve netmap(4) and vale(4) man pages
Clean up obsolete sysctl descriptions and add missing ones.

PR:		243838
Reviewed by:	bcr
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D23546
2020-02-07 19:26:26 +00:00
Dimitry Andric
d54b0ffe9d Correctly recognize linker versions greater than 10.0.
MFC after:	3 days
2020-02-07 19:04:27 +00:00
Warner Losh
ac12771c01 Avoid the phrase 'now deprecated'
Reword this construct to be more consistent with normal man page language.
2020-02-06 16:38:06 +00:00
Warner Losh
24619588e4 'is now deprecated' -> 'is deprecated'
Man pages are written in a more timeless voice than news flashes,
so adopt the language to what we do elsewhere.
2020-02-06 16:38:02 +00:00
Ed Maste
429932bacc src.conf.5: regen after r357617, BINUTILS_BOOTSTRAP description update 2020-02-06 14:18:48 +00:00
Ed Maste
0f61170882 libssp_nonshared: use only on i386 and ppc
libssp_nonshared.a defines one symbol, __stack_chk_fail_local.  This
is used only on i386 and powerpc; other archs emit calls directly to
__stack_chk_fail.  Simplify linking on other archs by omitting it.

PR:		242941 [exp-run]
2020-02-05 20:08:01 +00:00
Ryan Libby
ec0d828071 uma: add UMA_ZONE_CONTIG, and a default contig_alloc
For now, copy the mbuf allocator.

Reviewed by:	jeff, markj (previous version)
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D23237
2020-02-04 22:40:11 +00:00
Kyle Evans
5ad886bf82 src.conf(5): regen after r357543, HTTPD removal 2020-02-04 21:28:04 +00:00
Kyle Evans
504613f246 Remove simple_httpd
simple_httpd was granted a reprieve from the picobsd removal based on having
some reported user; it turns out this user isn't actually using the version
in base and merging their changes would be difficult at this point, so the
version in base will simply continue to rot. Retire it now, it may make a
comeback to ports with the improved version.

No notice issued because its current visibility has only been for ~3
months, and a notice has been previously issued about picobsd removal.
2020-02-04 21:27:39 +00:00
Navdeep Parhar
46e1e307ed cxgbe(4): Retire the allow_mbufs_in_cluster optimization.
This simplifies the driver's rx fast path as well as the bookkeeping
code that tracks various rx buffer sizes and layouts.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2020-02-04 00:51:10 +00:00
Mateusz Piotrowski
a3f02b1af7 ports.7: Update examples with install-missing-packages
The ports framework recently grew support for installing dependencies with
a dedicated target called "install-missing-packages". Let's retire the
carefully constructed one-liner that was used for getting dependencies so
far and use the official ports target instead.

Reviewed by:	bcr
Approved by:	bcr (mentor)
Differential Revision:	https://reviews.freebsd.org/D23485
2020-02-03 23:40:27 +00:00
Mateusz Piotrowski
2125f57a16 Replace *-out with star-out to ease legibility
"*-out" is a complex way of phrasing the fact, and it causes
confusion for people.

Submitted by:	debdrup
Approved by:	bcr (mentor)
Differential Revision:	https://reviews.freebsd.org/D23482
2020-02-03 23:30:47 +00:00
Warner Losh
51691e26d0 Remove vpo.4
The Parallel Port SCSI adapter was interesting for 100MB ZIP drives, but is no
longer used or maintained. Remove it from the tree.

The Parallel Port microsequencer (microseq.9) is now mostly unused in the tree,
but remains. PPI still refrences it, but doesn't use its full functionality.

Relnotes: Yes
Reviewed by: rgrimes@, Ihor Antonov
Discussed on: arch@
Differential Revision:  https://reviews.freebsd.org/D23389
2020-02-02 04:53:27 +00:00
Warner Losh
5a622926ea Add deprecation notice to vpo.4
This driver has seen no real changes for almost 20 years. It's for
hardware that's 25 years old. It has no reports of active use, nor
has it been seen in the NYCBug dmesg database at all. Schedule
its removal for 13.0.

Reviewed by: rgrimes@ (earlier version)
Relnote: Yes
MFC After: 3 days
Differential Revision: https://reviews.freebsd.org/D23403
2020-02-02 04:52:28 +00:00
Conrad Meyer
cd4e43b27d hwpstate_intel(4): Detect and support PKG variant
If package-level control is present, we default to using it.  Per-core
software control may be enabled by setting the machdep.hwpstate_pkg_ctrl
tunable to "0" in loader.conf(5).
2020-02-01 19:50:10 +00:00
Mateusz Piotrowski
dcac254a3a bridge.4: Remove notes about FreeBSD 6.2-7.2
Reported by:	Mateusz Kwiatkowski
Reviewed by:	brueffer
Approved by:	bcr (mentor)
Differential Revision:	 https://reviews.freebsd.org/D23393
2020-02-01 10:25:13 +00:00
Dimitry Andric
05273b1faa Merge r357345 from the clang1000-import branch:
Disable new clang 10.0.0 warnings about misleading indentation in flex.

As this is contributed code with very messy indentation, which will
almost certainly never be upgraded, just disable the warning.

MFC after:	3 days
2020-01-31 19:06:49 +00:00
Dimitry Andric
23bec42733 Merge r357342 from the clang1000-import branch:
Work around two -Werror warning issues in googletest, which have been
solved upstream in the mean time.

The first issue is because one of googletest's generated headers contain
classes with a user-declared copy assignment operator, but rely on the
generation by the compiler of an implicit copy constructor, which is now
deprecated:

/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/internal/gtest-param-util-generated.h:5284:8: error: definition of implicit copy constructor for 'CartesianProductHolder3<testing::internal::ParamGenerator<bool>, testing::internal::ValueArray3<int, int, int>, testing::internal::ValueArray4<cache_mode, cache_mode, cache_mode, cache_mode> >' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
  void operator=(const CartesianProductHolder3& other);
       ^
/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/gtest-param-test.h:1277:10: note: in implicit copy constructor for 'testing::internal::CartesianProductHolder3<testing::internal::ParamGenerator<bool>, testing::internal::ValueArray3<int, int, int>, testing::internal::ValueArray4<cache_mode, cache_mode, cache_mode, cache_mode> >' first required here
  return internal::CartesianProductHolder3<Generator1, Generator2, Generator3>(
         ^
/usr/src/tests/sys/fs/fusefs/io.cc:534:2: note: in instantiation of function template specialization 'testing::Combine<testing::internal::ParamGenerator<bool>, testing::internal::ValueArray3<int, int, int>, testing::internal::ValueArray4<cache_mode, cache_mode, cache_mode, cache_mode> >' requested here
        Combine(Bool(),                                 /* async read */
        ^

For now, silence the warning using -Wno-deprecated-copy.

The second issue is because one of the googlemock test programs attempts
to use "unsigned wchar_t" and "signed wchar_t", which are non-standard
and at best, hazily defined:

contrib/googletest/googlemock/test/gmock-actions_test.cc:111:37: error: 'wchar_t' cannot be signed or unsigned [-Wsigned-unsigned-wchar]
  EXPECT_EQ(0U, BuiltInDefaultValue<unsigned wchar_t>::Get());
                                    ^
contrib/googletest/googlemock/test/gmock-actions_test.cc:112:36: error: 'wchar_t' cannot be signed or unsigned [-Wsigned-unsigned-wchar]
  EXPECT_EQ(0, BuiltInDefaultValue<signed wchar_t>::Get());
                                   ^

For now, silence the warning using -Wno-signed-unsigned-wchar.

MFC after:	3 days
2020-01-31 19:06:01 +00:00
Dimitry Andric
533a4a6296 Disable new clang 10.0.0 warnings about misleading indentation in flex.
As this is contributed code with very messy indentation, which will
almost certainly never be upgraded, just disable the warning.

MFC after:	3 days
2020-01-31 19:02:53 +00:00
Dimitry Andric
7b5814e175 Work around two -Werror warning issues in googletest, which have been
solved upstream in the mean time.

The first issue is because one of googletest's generated headers contain
classes with a user-declared copy assignment operator, but rely on the
generation by the compiler of an implicit copy constructor, which is now
deprecated:

/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/internal/gtest-param-util-generated.h:5284:8: error: definition of implicit copy constructor for 'CartesianProductHolder3<testing::internal::ParamGenerator<bool>, testing::internal::ValueArray3<int, int, int>, testing::internal::ValueArray4<cache_mode, cache_mode, cache_mode, cache_mode> >' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
  void operator=(const CartesianProductHolder3& other);
       ^
/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/gtest-param-test.h:1277:10: note: in implicit copy constructor for 'testing::internal::CartesianProductHolder3<testing::internal::ParamGenerator<bool>, testing::internal::ValueArray3<int, int, int>, testing::internal::ValueArray4<cache_mode, cache_mode, cache_mode, cache_mode> >' first required here
  return internal::CartesianProductHolder3<Generator1, Generator2, Generator3>(
         ^
/usr/src/tests/sys/fs/fusefs/io.cc:534:2: note: in instantiation of function template specialization 'testing::Combine<testing::internal::ParamGenerator<bool>, testing::internal::ValueArray3<int, int, int>, testing::internal::ValueArray4<cache_mode, cache_mode, cache_mode, cache_mode> >' requested here
        Combine(Bool(),                                 /* async read */
        ^

For now, silence the warning using -Wno-deprecated-copy.

The second issue is because one of the googlemock test programs attempts
to use "unsigned wchar_t" and "signed wchar_t", which are non-standard
and at best, hazily defined:

contrib/googletest/googlemock/test/gmock-actions_test.cc:111:37: error: 'wchar_t' cannot be signed or unsigned [-Wsigned-unsigned-wchar]
  EXPECT_EQ(0U, BuiltInDefaultValue<unsigned wchar_t>::Get());
                                    ^
contrib/googletest/googlemock/test/gmock-actions_test.cc:112:36: error: 'wchar_t' cannot be signed or unsigned [-Wsigned-unsigned-wchar]
  EXPECT_EQ(0, BuiltInDefaultValue<signed wchar_t>::Get());
                                   ^

For now, silence the warning using -Wno-signed-unsigned-wchar.

MFC after:	3 days
2020-01-31 18:26:23 +00:00
Ed Maste
3d8a8d1fb0 regen src.conf.5 after r357338 BSD_CRTBEGIN retirement 2020-01-31 18:26:13 +00:00
Ed Maste
43e8403953 retire BSD_CRTBEGIN option
BSD crt is currently used on all architectures (other than sparc64).
Remove the option and use BSD crt everywhere as part of the GCC 4.2.1
retirement plan.

https://lists.freebsd.org/pipermail/freebsd-arch/2020-January/019823.html

PR:		239851
Reviewed by:	andrew, brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23122
2020-01-31 18:04:04 +00:00
Conrad Meyer
43524989c5 hwpstate(4): Ignore CurPstateLimit by default
Add a sysctl knob to allow users to re-enable it, and document the knob and
default in cpufreq.4.  (While here, add a few unrelated updates to
cpufreq.4.)

It seems that the register value in some hardware simply reflects the
configured P-state.  This results in an inadvertent and unintended outcome
where the P-state can only walk down, and then the driver becomes "stuck" in
the slowest possible P-state.

The Linux driver never consults this register, so that's some evidence that
ignoring the contents are relatively harmless.

PR:		234733
Reported by:	sigsys AT gmail.com, Erich Dollanksy <freebsd.ed.lists AT
		sumeritec.com>
2020-01-31 17:40:41 +00:00
Mark Johnston
1c29da0279 Reimplement stack capture of running threads on i386 and amd64.
After r355784 the td_oncpu field is no longer synchronized by the thread
lock, so the stack capture interrupt cannot be delievered precisely.
Fix this using a loop which drops the thread lock and restarts if the
wrong thread was sampled from the stack capture interrupt handler.

Change the implementation to use a regular interrupt instead of an NMI.
Now that we drop the thread lock, there is no advantage to the latter.

Simplify the KPIs.  Remove stack_save_td_running() and add a return
value to stack_save_td().  On platforms that do not support stack
capture of running threads, stack_save_td() returns EOPNOTSUPP.  If the
target thread is running in user mode, stack_save_td() returns EBUSY.

Reviewed by:	kib
Reported by:	mjg, pho
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23355
2020-01-31 15:43:33 +00:00
Alfredo Dal'Ava Junior
d8a85b4237 Add myself (alfredo) to committers-src.dot and calendar.freebsd
Approved by:	jhibbits (mentor)
2020-01-29 17:39:38 +00:00
Warner Losh
4a53357f4d Remove old device list
The device list hasn't aged well. All these devices are over a decade old. umass
supports thunb drives almost universally, and the list is too long to try to
list here.

Remove some obsolete advice as well. This isn't the place to talk about how to
create FAT filesystems, nor now to mount them. The only advice that's still
useful is the rescanning of a multi-slot flash adapater.

MFC After: 3 days
2020-01-28 00:36:46 +00:00
Alex Richardson
d2c32def56 Build hard-float lib32 for mips64hf/mips64elhf
This should fix linker errors when building with clang+lld.
After this change the lib32 compat libraries are now buildt with
-mhard-float instead of -msoft-float

Reviewed By:	brooks, jhb
Differential Revision: https://reviews.freebsd.org/D23229
2020-01-27 12:02:47 +00:00
Nick Hibma
197f150c0c Fix a few spacing issues to make the page more readable. 2020-01-24 11:22:33 +00:00
John Baldwin
03fd4409c7 Correct the return types of fueword*().
MFC after:	1 week
Sponsored by:	DARPA
2020-01-23 23:36:58 +00:00
Mark Johnston
66351f5126 ng_nat: Pass IPv6 packets through.
ng_nat implements NAT for IPv4 traffic only.  When connected to an
ng_ether node it erroneously handled IPv6 packets as well.

This change is not sufficient: ng_nat does not do any validation of IP
packets in this mode, even though they have not yet passed through
ip_input().

PR:		243096
Reported by:	Robert James Hernandez <rob@sarcasticadmin.com>
Reviewed by:	julian
Differential Revision:	https://reviews.freebsd.org/D23080
2020-01-23 16:45:48 +00:00
Conrad Meyer
4577cf3744 cpufreq(4): Add support for Intel Speed Shift
Intel Speed Shift is Intel's technology to control frequency in hardware,
with hints from software.

Let's get a working version of this in the tree and we can refine it from
here.

Submitted by:	bwidawsk, scottph
Reviewed by:	bcr (manpages), myself
Discussed with:	jhb, kib (earlier versions)
With feedback from:	Greg V, gallatin, freebsdnewbie AT freenet.de
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D18028
2020-01-22 23:28:42 +00:00
Ed Maste
cea7cfd20d Tag etc/termcap with package=runtime
/etc/termcap is a symlink to /usr/share/misc/termcap, which is in the
runtime package.  Tag the symlink with the same package so that it is
handled correctly on pkgbase-installed/updated systems.

Sponsored by:	The FreeBSD Foundation
2020-01-22 18:55:36 +00:00
Gleb Smirnoff
a7f12fce22 Remove struct callout_handle. Should have gone with r355732. 2020-01-22 05:47:59 +00:00
Gleb Smirnoff
1d11092814 Change argument order of epoch_call() to more natural, first function,
then its argument.

A miss from r356826.
2020-01-22 02:28:39 +00:00
Mikael Urankar
9932f32f32 Add myself (mikael) as a ports committer
Approved by:	manu (mentor)
Differential Revision:	https://reviews.freebsd.org/D23227
2020-01-20 19:38:29 +00:00
Baptiste Daroussin
6e4cafd1be The ports tree now accepts /usr/local/share/man as a directory for manpage
and will slowly transition from /usr/local/man to it. To reflect this remove
the documentation of the manpages being an exception in the layout of /usr/local

Reported by:	Dan Nelson <dnelson_1901@yahoo.com> (via IRC)
MFC after:	3 days
2020-01-20 16:59:39 +00:00
Ed Maste
fa3c36d362 src.conf.5: regen after BINUTILS defaults and description changes 2020-01-19 19:57:14 +00:00
Ed Maste
9d0e1b8a20 src.opts.mk: default BINUTILS_BOOTSTRAP to NO except for x86 and powerpc
x86 needs bootstrap GNU as for assembling a few files, and powerpc needs
GNU ld.bfd for linking 32-bit objects.  All other targets either fully
use in-tree Clang and lld, or rely on external toolchain.

Sponsored by:	The FreeBSD Foundation
2020-01-19 19:56:05 +00:00
Sergio Carlavilla Delgado
b46595affc Add myself as a mentee of bcr
Patch by:	carlavilla@(doc-committer)
Approved by:	bcr@(mentor)
2020-01-19 16:24:25 +00:00
Ed Maste
9f4e04c193 src.conf.5: regen after r356836, DMAGENT dependency on OPENSSL 2020-01-17 17:56:31 +00:00
Ed Maste
df502acc73 src.opts.mk: force DMAGENT off under WITHOUT_OPENSSL
dma(8) depends on OpenSSL unconditionally.

Reported by:	Michael Dexter's Build Options Survey run
MFC after:	1 weeks
Sponsored by:	The FreeBSD Foundation
2020-01-17 17:53:13 +00:00
Bryan Drewery
844939d743 META_MODE: Allow 'make all install' to work with filemon.
Filemon will add the ability to ignore the cookie if the installed file is
missing. Without filemon that's not possible though so if the cookie is present
an the command unchanged then the install wouldn't run.

Sponsored by:	DellEMC
MFC after:	2 weeks
2020-01-17 14:29:27 +00:00
Emmanuel Vadot
94292d7e95 fdt_pinctrl: Add new methods for gpios
Most of the gpio controller cannot configure or get the configuration
of the pin muxing as it's usually handled in the pinctrl driver.
But they can know what is the pinmuxing driver either because they are
child of it or via the gpio-range property.
Add some new methods to fdt_pinctrl that a pin controller can implement.
Some methods are :
fdt_pinctrl_is_gpio: Use to know if the pin in the gpio mode
fdt_pinctrl_set_flags: Set the flags of the pin (pullup/pulldown etc ...)
fdt_pinctrl_get_flags: Get the flags of the pin (pullup/pulldown etc ...)

The defaults method returns EOPNOTSUPP.

Reviewed by:	ian, bcr (manpages)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D23093
2020-01-16 21:19:27 +00:00
Ed Maste
f112a185b1 pkgbase: move profiling _p.a libs into -development packages
Profiling library archives are part of the development environment; they
don't need to be in separate -profile packages.

(In fact we can probably just eliminate the _p.a archives assuming that
profiling will be done using hwpmc etc., but that is a change for later.)

Discussed with:	bapt, manu
Sponsored by:	The FreeBSD Foundation
2020-01-16 17:27:08 +00:00
Glen Barber
2e67e6ffa3 Update release(7) to note OSRELEASE is only relevant when the
'install' target is invoked.

While here, bump the sample output version name, and explicitly
add the 'obj' target to avoid polluting the src checkout.

Submitted by:	Trond Endrestol
PR:		243287 (related)
MFC after:	3 days
Sponsored by:	Rubicon Communications, LLC (netgate.com)
2020-01-16 15:07:52 +00:00
Leandro Lupori
d4633a9e3c [PowerPC64] Enable virtio drivers
This enables virtio modules on PowerPC* target.
On PowerPC64, drivers are also kernel builtin.

QEMU currently needs to be patched to in order to work on LE hosts due to known
issue affecting pre-1.0 (legacy) virtio drivers.

The patch was submitted to QEMU mail list by @afscoelho_gmail.com, available at
https://lists.nongnu.org/archive/html/qemu-devel/2020-01/msg01496.html

Submitted by:	Alfredo Dal'Ava Junior <alfredo.junior@eldorado.org.br>
Reviewed by:	luporl
Differential Revision:	https://reviews.freebsd.org/D22833
2020-01-16 11:33:15 +00:00
Ed Maste
8c5cb4ce25 acpi_ibm: reference ThinkPad instead of IBM
These are now Lenovo ThinkPads, not IBM ThinkPads.

PR:		234403
Submitted by:	Kevin Zheng <kevinz5000@gmail.com> (original)
2020-01-15 19:43:45 +00:00
Ed Maste
0002146228 src.conf.5: regen after r356736, limiting ld.bfd to powerpc 2020-01-14 18:06:09 +00:00
Kyle Evans
4b50c45172 Revert r353140: Re-add ALLOW_MIPS_SHARED_TEXTREL, sprinkle it around
arichardson has an actual fix for the same issue that this was working
around; given that we don't build with llvm today, go ahead and revert the
workaround in advance.
2020-01-14 17:50:13 +00:00
Ed Maste
8683408cec src.conf.5: regen after option description updates 2020-01-14 17:38:34 +00:00
Kyle Evans
2a345f61da tap(4): also note that we drop configured addresses
This provides a specific pointer for users of tap(4) to understand why their
interfaces are losing their addresses, and specifically how to workaround
this if they need different behavior.

This manpage received a .Dd bump earlier today in r35688, so no bump occurs
this time.

Submitted by:	sigsys@gmail.com (via IRC)
2020-01-13 18:26:27 +00:00
Kyle Evans
6e6161d220 Install tap(4) manpage as vmnet(4) as well
If one comes across a vmnet interface, this is a useful pointer to have
towards what it actually is if they're otherwise unfamiliar.

MFC after:	3 days
2020-01-13 17:02:42 +00:00
Ed Maste
fb27d7ae7c src.conf.5: regen after r356615, KERBEROS_SUPPORT dep on KERBEROS 2020-01-13 14:50:22 +00:00
Ed Maste
0ce9d0af5b src.opts.mk: force KERBEROS_SUPPORT off where KERBEROS forced off
Explicitly setting WITHOUT_KERBEROS implies WITHOUT_KERBEROS_SUPPORT,
but previously other cases that forced KERBEROS off (such as
WITHOUT_CRYPT) did not also set KERBEROS_SUPPORT off.  Because the
_SUPPORT dependent options (KERBEROS/KERBEROS_SUPPORT) are processed
before other dependencies (CRYPT/KERBEROS) it's not easy to make this
happen automatically.  Instead just explicitly set KERBEROS_SUPPORT
off where we set KERBEROS off.

Reported by:	Michael Dexter's Build Option Survey run
2020-01-10 22:00:39 +00:00
Loïc Bartoletti
1cd24ac42b Add myself (lbartoletti) as a ports commiter
Step 5 (Update Mentor and Mentee Information) from Commiters guide.

I also alphababetize mentees from tcberner.

Approved by:	tcberner (mentor)
Differential Revision:	https://reviews.freebsd.org/D23125
2020-01-10 20:53:58 +00:00
Jung-uk Kim
4c8095b1d5 Catch up with Clang 9.0. 2020-01-09 20:07:38 +00:00
Warner Losh
dea247463c Add note to remind me there are three choices for arm32 floating point.
hard	use floating point hardware, pass registers to functions in
	floating point registers.
softfp	use floating point hardware, but pass registers to functions
	in integer registers.
soft	do floating point calcuations without using floating point
	hardware. Pass arguments in integer registers.

FreeBSD 11 and newer assumes hard. 10 and earlier assumed softfp.  We have no
real support, at the moment, for soft. It's untested, though, if softfp still
works.

Add a note here since this is a whack-a-doodle combination relative to all other
platforms.

softfp is likely to go away in the future because it was retained for people
using FreeBSD 10 + armv6 needing to transition more slowly from softfp -> hard
than the project. It likely is no longer needed, and may be getting in the
way of people needing 'soft' support.
2020-01-09 18:14:48 +00:00
Ed Maste
f8c319da66 Revert r356515 - add LLVM_LIBUNWIND back to sparc64 BROKEN_OPTIONS
r356552 reverted the untested build fix for LLVM libunwind on sparc64,
so mark it broken again.
2020-01-09 14:12:57 +00:00
Kyle Evans
20e8d8d554 md(4): improve documentation of preloading
It's not immediately clear by what mechanism loader(8) will be loading the
preloaded file. Specifically name-drop loader.conf(5) with a pointer to the
module loading section and a description of what the 'name' should look
like, because that certainly isn't clear from the loader.conf(5) standpoint.

The default loader.conf already has a pointer to md(4) where it appears and
the reference to loader.conf in the new version of this manpage should make
it more clear that this is where one should look for information.

Reported by:	swills
Reviewed by:	swills, manpages (bcr)
With revision by:	imp
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D22844
2020-01-09 04:39:37 +00:00
Ryan Libby
54c5ae804f uma: reorganize flags
- Garbage collect UMA_ZONE_PAGEABLE & UMA_ZONE_STATIC.
 - Move flag VTOSLAB from public to private.
 - Introduce public NOTPAGE flag and make HASH private.
 - Introduce public NOTOUCH flag and make OFFPAGE private.
 - Update man page.

The net effect of this should be to make the contract with clients more
clear.  Clients should choose constraints, UMA will figure out how to
implement them.  This also breaks the confusing double meaning of
OFFPAGE.

Reviewed by:	jeff, markj
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D23016
2020-01-09 02:03:03 +00:00
Ed Maste
3b957e38ef src.opts.mk: Remove sparc64 LLVM_LIBUNWIND BROKEN_OPTIONS
After r356513 it should build.
2020-01-08 20:51:07 +00:00
Ed Maste
b05bd0b93b src.opts.mk: enable LLVM_UNWIND by default for all archs
Only sparc64 did not enable LLVM_LIBUNWIND. After r356513 LLVM_LIBUNWIND
should at least build on sparc64. The old DWARF unwinder will be removed
along with GCC 4.2.1 in the near future, so switch sparc64 to use LLVM's
unwinder in advance of the removal.  Someone with access to the obsolete
sparc64 hardware supported by FreeBSD will have to test, and investigate
any failures. I will gladly help, but I don't have any suitable hardware
myself.

PR:		233405
2020-01-08 20:45:18 +00:00
Ed Maste
4cee74df63 src.conf.5: regen after r356423 and r356499
riscv now using Clang/lld, riscv64sf reenabled, and googletest adjusted
to avoid only the affected fuse test on mips
2020-01-08 17:54:44 +00:00
John Baldwin
79f5991559 Add -mno-relax to CFLAGS in bsd.prog/lib.mk instead of bsd.cpu.mk.
bsd.cpu.mk is included by bsd.init.mk before bsd.linker.mk, so it
was always setting the flag since LINKER_FEATURES wasn't defined.

Reported by:	mhorne
Reviewed by:	imp, mhorne
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D23076
2020-01-08 17:49:34 +00:00
John Baldwin
8d1df20821 Remove a mention of MAKE_OBSOLETE_GCC.
This should have been included in r356452.
2020-01-08 17:31:18 +00:00
John Baldwin
e48503fffd Use clang and lld as the default toolchain for RISCV.
- Enable clang and lld as system toolchains.
- Don't use external GCC for universe by default.
- Re-enable riscv64sf since it builds fine with clang + lld.

Reviewed by:	emaste, mhorne
Relnotes:	yes
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D23089
2020-01-08 17:25:59 +00:00
Michal Meloun
2138e99bf5 Switch 32-bit arm back to LLVM libunwind.
Actual LLVM libunwind passed all testing without issues, switch back to it.

PR:	233664
2020-01-08 07:25:37 +00:00
Alexander Motin
6de4e458fa Minor adjustments to r356474 and r356480.
Reported by:	jkim, imp
MFC after:	2 weeks
X-MFC-with:	r356474
2020-01-07 23:29:54 +00:00
Alexander Motin
67abaee9fc Add Host Memory Buffer support to nvme(4).
This allows cheapest DRAM-less NVMe SSDs to use some of host RAM (about
1MB per 1GB on the devices I have) for its metadata cache, significantly
improving random I/O performance.  Device reports minimal and preferable
size of the buffer.  The code limits it to 1% of physical RAM by default.
If the buffer can not be allocated or below minimal size, the device will
just have to work without it.

MFC after:	2 weeks
Relnotes:	yes
Sponsored by:	iXsystems, Inc.
2020-01-07 21:17:11 +00:00
Kyle Evans
d679c71970 Refine fusefs test workaround for mips+llvm
This re-enables building the googletest suite by default on mips and instead
specifically doesn't build fusefs tests for mips+clang builds.  clang will
easily spent >= 1.5 hours compiling a single file due to a bug in
optimization (see LLVM PR 43263), so turn these off for now while that's
hashed out.

GCC builds are unaffected and build the fusefs tests as-is. Clang builds
only happen by early adopters attempting to hash out the remaining issues.

The comment has been updated to reflect its new position and use less strong
wording about imposing on people.

Discussed with:	ngie, asomers
Reviewed by:	ngie
2020-01-06 18:25:58 +00:00
Ed Maste
f87832257d src.conf.5: regen after r356419, reenabling powerpc in universe 2020-01-06 18:07:54 +00:00
Ed Maste
dd8a62f058 arch.7: correct overzealous claims of external binutils use
powerpc and powerpcspe still use in-tree ld 2.17.50
2020-01-05 18:06:32 +00:00
Ed Maste
1d91d58f58 arch.7: update toolchain table for external ld use
As of r356379 and r356381 mips* and sparc64 now use external Binutils
ld as their linker.
2020-01-05 18:03:53 +00:00
Ed Maste
463aed9acb src.conf.5: regen after r356381, disable BINUTILS_BOOTSTRAP more widely 2020-01-05 18:01:52 +00:00
Ed Maste
6eb84c961a src.opts.mk: disable BINUTILS_BOOTSTRAP on all mips* and sparc64
Extend r356379 to include 32-bit mips and sparc64.  Using a decade-old
binutils linker with a contemporary compiler (either Clang or GCC) is
a combination unlikely to be used by anyone else, and it's not going
to be a good use of our time investigating and addressing any issues
that arise.  Expect that all architectures newly migrated to external
GCC will also use external binutils.
2020-01-05 18:01:15 +00:00
Ed Maste
895dd2f8fa src.conf.5: regen after r356379, disable BINUTILS_BOOTSTRAP on mips64* 2020-01-05 17:12:41 +00:00
Ed Maste
a69473e38c src.opts.mk: disable BINUTILS_BOOTSTRAP on mips64*
After GCC was disabled by default in r356367, mips and sparc64 started
relying external GCC.  However, the in-tree Binutils ld 2.17.50 is not
compatible with GCC for some mips64 targets, so turn off
BINUTILS_BOOTSTRAP and rely on external binutils (linker) as well.
2020-01-05 16:59:24 +00:00
Ed Maste
984f2f3bf0 arch.7: update to show mips* and sparc64 use external GCC after r356367 2020-01-05 03:07:59 +00:00
Ed Maste
a01517e538 src.conf.5: regen after r356367, default to GCC off 2020-01-05 03:03:34 +00:00
Ed Maste
5a0a85974a Do not build GCC 4.2.1 by default for any CPU architecture
By default set to NO:

GCC
GCC_BOOTSTRAP
GNUCXX

As described by imp@ on the freebsd-arch mailing list Aug 13, 2019 with
Subject: Gcc 4.2.1 to be removed before FreeBSD 13, a firm timeline
https://lists.freebsd.org/pipermail/freebsd-arch/2019-August/019674.html

Reviewed by:	jhb, imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23026
2020-01-05 02:47:56 +00:00
Michael Tuexen
ae7cc6c9f8 Make the message size limit used for SCTP_SENDALL configurable via
a sysctl variable instead of a compiled in constant.

This is based on a patch provided by nwhitehorn@.
2020-01-04 20:33:12 +00:00
Kyle Evans
cd0d51baaa Provide libssp based on libc
For libssp.so, rebuild stack_protector.c with FORTIFY_SOURCE stubs that just
abort built into it.

For libssp_nonshared.a, steal stack_protector_compat.c from
^/lib/libc/secure and massage it to maintain that __stack_chk_fail_local
is a hidden symbol.

libssp is now built unconditionally regardless of {WITH,WITHOUT}_SSP in the
build environment, and the gcclibs version has been disconnected from the
build in favor of this one.

PR:		242950 (exp-run)
Reviewed by:	kib, emaste, pfg, Oliver Pinter (earlier version)
Also discussed with:	kan
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D22943
2020-01-04 20:19:25 +00:00
John Baldwin
64a3ba61a5 Set correct lib32 MACHINE_ARCH for mips64el*.
Use "mipsel" instead of "mips" as the 32-bit MACHINE_ARCH when
building lib32 for little-endian 64-bit MIPS targets.  This fixes an
error where some objects were compiled as LE and others compiled as BE
causing a link error for rtld32.

Reviewed by:	emaste
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D23028
2020-01-03 23:31:38 +00:00
Ed Maste
770379b92c src.conf.5: regen after r356322 and r356323
For SVNLITE dependency on FILE and GOOGLETEST dependency on CXX.
2020-01-03 18:21:00 +00:00
Ed Maste
b4f20f20d5 src.opts.mk: SVNLITE requires FILE
Reported by:	Build Options Survey run by Michael Dexter
2020-01-03 18:20:03 +00:00
Ed Maste
9ed13baa5e src.opts.mk: GOOGLETEST requires CXX
Reported by:	Build Options Survey run by Michael Dexter
2020-01-03 18:11:55 +00:00
Ed Maste
78a576cbe8 src.opts.mk: switch LLD_BOOTSTRAP and LLD_IS_LD to opt-out
More MACHINE_CPUARCH/MACHINE_ARCH cases enable these options than
disable them, and several of them have work in progress to switch over.
Thus, invert the sense of the test and list cases not using LLD as the
exceptions.
2020-01-03 16:28:10 +00:00
Ed Maste
4ad9b9fa8e src.opts.mk: simplify after arm/arm retirement
There were a few special cases for arm v5, such as disabling LLDB due to
the lack of 64-bit atomic operations.  Now that arm has been retired (as
of r356263) we can simplify the options logic somewhat.
2020-01-03 16:06:41 +00:00
Ian Lepore
422d05da14 Add support for i2c bus mux hardware.
An i2c bus can be divided into segments which can be selectively connected
and disconnected from the main bus. This is usually done to enable using
multiple slave devices having the same address, by isolating the devices
onto separate bus segments, only one of which is connected to the main bus
at once.

There are several types of i2c bus muxes, which break down into two general
categories...

 - Muxes which are themselves i2c slaves. These devices respond to i2c
   commands on their upstream bus, and based on those commands, connect
   various downstream buses to the upstream. In newbus terms, they are both
   a child of an iicbus and the parent of one or more iicbus instances.
 - Muxes which are not i2c devices themselves. Such devices are part of the
   i2c bus electrically, but in newbus terms their parent is some other
   bus. The association with the upstream bus must be established by
   separate metadata (such as FDT data).

In both cases, the mux driver has one or more iicbus child instances
representing the downstream buses. The mux driver implements the iicbus_if
interface, as if it were an iichb host bridge/i2c controller driver. It
services the IO requests sent to it by forwarding them to the iicbus
instance representing the upstream bus, after electrically connecting the
upstream bus to the downstream bus that hosts the i2c slave device which
made the IO request.

The net effect is automatic mux switching which is transparent to slaves on
the downstream buses. They just do i2c IO they way they normally do, and the
bus is electrically connected for the duration of the IO and then idled when
it is complete.

The existing iicbus_if callback() method is enhanced so that the parameter
passed to it can be a struct which contains a device_t for the requesting
bus and slave devices. This change is done by adding a flag that indicates
the extra values are present, and making the flags field the first field of
a new args struct. If the flag is set, the iichb or mux driver can recast
the pointer-to-flags into a pointer-to-struct and access the extra
fields. Thus abi compatibility with older drivers is retained (but a mux
cannot exist on the bus with the older iicbus driver in use.)

A new set of core support routines exists in iicbus.c. This code will help
implement mux drivers for any type of mux hardware by supplying all the
boilerplate code that forwards IO requests upstream. It also has code for
parsing metadata and instantiating the child iicbus instances based on it.

Two new hardware mux drivers are added. The ltc430x driver supports the
LTC4305/4306 mux chips which are controlled via i2c commands. The
iic_gpiomux driver supports any mux hardware which is controlled by
manipulating the state of one or more gpio pins.  Test Plan

Tested locally using a variety of mux'd bus configurations involving both
ltc4305 and a homebrew gpio-controlled mux. Tested configurations included
cascaded muxes (unlikely in the real world, but useful to prove that 'it all
just works' in terms of the automatic switching and upstream forwarding of
IO requests).
2020-01-02 17:51:49 +00:00