Commit Graph

251563 Commits

Author SHA1 Message Date
Mark Johnston
329d975c0c Print arm64 physmem info during boot.
PR:		243682
Reviewed by:	andrew, emaste
MFC after:	1 week
Event:		July 2020 Bugathon
Differential Revision:	https://reviews.freebsd.org/D25625
2020-07-13 17:05:44 +00:00
Mark Johnston
a7752896f0 Add vm_map_valid_range_KBI().
This is required for standalone module builds.

Reported by:	hselasky
Reviewed by:	dougm, hselasky, kib
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D25650
2020-07-13 16:39:27 +00:00
Alexander Motin
48daf25193 Update AMD Zen1 and add Zen2 events mapping.
MFC after:	2 weeks
2020-07-13 16:23:02 +00:00
Gordon Bergling
e7677232d6 lseek(2): Document the seek behavior better and update the POSIX compliance
In certain situations lseek(2) will return successful although if no seek
was performed. This can happen when operating on devices that don't support
seeking (older tape drives) or when operating on changeable media devices
(such as DVD or Blu-ray devices) without a medium inserted.

Document this within the man page and update the POSIX compliance while here.

PR:		162765
Submitted by:	arundel@
Reported by:	arundel@
Reviewed by:	bcr (mentor)
Approved by:	bcr (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D25646
2020-07-13 15:52:57 +00:00
Gordon Bergling
e4d47f45eb gethostname(3): Correct the reference of the undefined value HOST_NAME_MAX
PR:		143472
Submitted by:	bcran@
Reported by:	Jeremy Huddleston <jeremyhu at apple dot com>
Reviewed by:	bcr (mentor)
Approved by:	bcr (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D25647
2020-07-13 15:17:29 +00:00
Gordon Bergling
aeeff830b9 arp(8) clarify the use of the '-a flag'
PR:		238146
Submitted by:	Andrew Stevenson <andrew at ugh dot net dot au>
Reported by:	Andrew Stevenson <andrew at ugh dot net dot au>
Reviewed by:	bcr (mentor)
Approved by:	bcr (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D25645
2020-07-13 15:06:29 +00:00
Alexander Motin
eab56f7f65 Minor textual fixes.
MFC after:	1 week
2020-07-13 14:25:25 +00:00
Allan Jude
fb6b5cd016 Remove excess spaces from rc.d scripts
The space between words is already being echoed by the space between quoted strings:

    % echo 'foo' 'bar'
    foo bar

    % echo 'foo' ' baz'
    foo  baz

Found in `ipfw` and `mountlate` messages.

PR:		247948
Submitted by:	Jose Luis Duran <jlduran@gmail.com>
MFC after:	2 weeks
Sponsored by:	Klara Inc.
2020-07-13 13:44:54 +00:00
Tom Jones
b2776a1809 Don't print VNET pointer when initializing dummynet
When dummynet initializes it prints a debug message with the current VNET
pointer unnecessarily revealing kernel memory layout. This appears to be left
over from when the first pieces of vimage support were added.

PR:		238658
Submitted by:	huangfq.daxian@gmail.com
Reviewed by:	markj, bz, gnn, kp, melifaro
Approved by:	jtl (co-mentor), bz (co-mentor)
Event:		July 2020 Bugathon
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D25619
2020-07-13 13:35:36 +00:00
Oleksandr Tymoshenko
e331252340 Fix invalid VHDX generation for image larger than 4Gb
- Part of BAT payload location was lost due to invalid
    BAT entry encoding type (32 bits instead of 64 bits)
- The sequence of PB/SB entries in BAT was broken due to
    off-by-one index check. It worked for smaller than
    4Gb because there were no SB entries in BAT.

MFC after:	1 day
2020-07-13 02:24:31 +00:00
Allan Jude
551d20f044 Loader: explain the syntax of currdev
The origin text was: "Syntax for devices is odd."
That is not very helpful.

PR:		199103
Reviewed by:	kevans, tsoome
Sponsored by:	Klara Inc.
Event:		July 2020 Bugathon
Differential Revision:	https://reviews.freebsd.org/D25629
2020-07-13 02:09:21 +00:00
Yuri Pankov
e4bfd2a675 sed/multi_test: print comment for current test, not next one
This is visible when e.g. 8.20 is failing:

not ok 96 8.20 # \ in y command

8.20's comment should be '[ as an s delimiter and its escapes'.
2020-07-13 01:32:37 +00:00
Rick Macklem
6722f6e577 Minor code cleanup that removes "nd->nd_bpos = mcp;" in both if and else.
The statement "nd->nd_bpos = mcp;" was in both the if and else. Correct,
but potentially confusing.  This patch fixes this.

There should be no semantics change caused by this commit.
2020-07-13 01:28:45 +00:00
Eugene Grosbein
57f09d08c6 install(1): another correction after r363064
Make sure we call fsync(2) on strip result
in case of "safecopy" and "strip -o tempcopy -- src"
before renaming tempcopy to destination.

MFC after:	3 weeks
X-MFC-With:	r363064
2020-07-12 20:59:52 +00:00
Michael Tuexen
cd7518203d Cleanup, no functional change intended.
This file is only compiled if INET or INET6 is defined. So there
is no need for checking that.

Reviewed by:		markj
Differential Revision:	https://reviews.freebsd.org/D25635
2020-07-12 18:34:09 +00:00
Enji Cooper
cdb9318eed Don't leave path behind when executing :chflags_success
Prior to this change a `SF_IMMUTABLE` chflagsat(2)'ed file (`path`) was left
behind, which sabotaged kyua(1) from being able to clean up the work directory,
This resulted in unnecessary work for folks having to clean up the work
directory on non-disposable systems, which defaults to `/tmp`. Use `UF_OFFLINE`
instead of `SF_IMMUTABLE`, in part because setting `SF_IMMUTABLE` isn't relevant
to the test and `SF_IMMUTABLE` cannot be cleared at all securelevels, as pointed
out by @asomers.

Additional work is required to catch cases like this upfront in the future to
avoid tester headache. See PR # 247765 for more details/followup.

Suggested by:	asomers
Reviewed By:	asomers, #tests
MFC after:	1 week
PR:		247761
Sponsored by:	DellEMC
Differential Revision: https://reviews.freebsd.org/D25561
2020-07-12 17:16:57 +00:00
Alexander Leidinger
e37db348c1 Fix r363125 (Implement CLOCK_MONOTONIC_RAW (linux >= 2.6.28)),
by realy using the MONOTONIC version and not the REALTIME version.

Noticed by:	myfreeweb at github
2020-07-12 14:57:29 +00:00
Michael Tuexen
83b8204f61 (Re)activate SCTP system calls when compiling SCTP support into the kernel
r363079 introduced the possibility of loading the SCTP stack as a module in
addition to compiling it into the kernel. As part of this, the registration
of the system calls was removed and put into the loading of the module.
Therefore, the system calls are not registered anymore when compiling the
SCTP into the kernel. This patch addresses that.

Reviewed by:		markj
Differential Revision:	https://reviews.freebsd.org/D25632
2020-07-12 14:50:12 +00:00
Alexander V. Chernikov
4c7ba83f9d Switch inet6 default route subscription to the new rib subscription api.
Old subscription model allowed only single customer.

Switch inet6 to the new subscription api and eliminate the old model.

Differential Revision:	https://reviews.freebsd.org/D25615
2020-07-12 11:24:23 +00:00
Alexander V. Chernikov
edc37a66e3 Add destructor for the rib subscription system to simplify users code.
Subscriptions are planned to be used by modules such as route lookup engines.
In that case that's the module task to properly unsibscribe before detach.
However, the in-kernel customer - inet6 wants to track default route changes.
To avoid having inet6 store per-fib subscriptions, handle automatic
 destruction internally.

Differential Revision:	https://reviews.freebsd.org/D25614
2020-07-12 11:18:09 +00:00
Alexander Leidinger
8c2602f30f Implement CLOCK_MONOTONIC_RAW (linux >= 2.6.28).
It is documented as a raw hardware-based clock not subject to NTP or
incremental adjustments. With this "not as precise as CLOCK_MONOTONIC"
description in mind, map it to our CLOCK_MONOTNIC_FAST (the same
mapping as for the linux CLOCK_MONOTONIC_COARSE).

This is needed for the webcomponent of steam (chromium) and some
other steam component or game.

The linux-steam-utils port contains a LD_PRELOAD based fix for this.
There this is mapped to CLOCK_MONOTONIC.
As an untrained ear/eye (= the majority of people) is normaly not
noticing a difference of jitter in the 10-20 ms range, specially
if you don't pay attention like for example in a browser session
while watching a video stream, the mapping to CLOCK_MONOTONIC_FAST
seems more appropriate than to CLOCK_MONOTONIC.
2020-07-12 09:51:09 +00:00
Michal Meloun
c0c5cf7b31 Reverse the processing order of assigned clocks property.
Linux processes these clocks in reverse order and some DT relies
on this fact. For example, the frequency setting for a given PLL
is the last in the list, preceded by the frequency setting of its
following divider or so...

MFC after:	1 week
2020-07-12 07:59:15 +00:00
Michal Meloun
a9be5d7515 Assigned clocks: fix off-by-one bug, don't leak allocated memory.
MFC after:	1 week
2020-07-12 07:42:21 +00:00
Michal Meloun
6e9862526a Fix the module name for some arm drivers.
Module name (unlike of the of driver name) must be system wide unique.

Reported by:	Mark Millard(bcm_pci), andrew(mvebu_gpio)
MFC with:	r362954, r362385
2020-07-12 07:27:21 +00:00
Simon J. Gerraty
3841c28717 Update to bmake-20200710
Key changes include reduced noise at end of failed build log
and avoid evaluation of unnecessary terms in conditionals.
In META MODE; a target flagged .META is out-of-date if meta file
is missing

MFC after:      1 week
2020-07-12 01:11:48 +00:00
Simon J. Gerraty
367d32e2b1 Import bmake-20200710
from ChangeLog:

    o filemon/filemon_dev.c: use O_CLOEXEC rather than extra syscall
    o meta.c: target flagged .META is out-of-date if meta file missing
    o cond.c: fix for compare_expression when doEval=0
    o unit-tests/Makefile: rework
    o filemon/filemon_dev.c: ensure filemon fd is closed on exec.
2020-07-11 22:45:05 +00:00
Allan Jude
cdfea68b44 periodic.conf: correct capitailization in the middle of a sentence
Reported by:	yuripv
Event:		July 2020 Bugathon
2020-07-11 22:14:44 +00:00
Mateusz Guzik
bd3cbfd26f sx: remove SX_NOADAPTIVE from the man page
The flag itself was removed in r341593
2020-07-11 21:57:43 +00:00
Mateusz Guzik
373278a7f6 fd: stop looping in pwd_hold
We don't expect to fail acquiring the reference unless running into a corner
case. Just in case ensure forward progress by taking the lock.

Reviewed by:	kib, markj
Differential Revision: https://reviews.freebsd.org/D25616
2020-07-11 21:57:03 +00:00
Allan Jude
463b8ebdcb Add cross references betwen ttys(5) and related drivers
nmdm(4), ucom(4), and uart(4)

PR:		247638
Submitted by:	Pau Amma <pauamma@gundo.com>
Reported by:	0mp
MFC after:	4 weeks
Sponsored by:	Klara Inc.
Event:		July 2020 Bugathon
2020-07-11 20:56:57 +00:00
Allan Jude
ce2fe5b109 Add a periodic script to backup the partition table and boot code
Optionally, alert you if the contents change from the previous backup

PR:		86388
Submitted by:	Rob Fairbanks <rob.fx907@gmail.com>, Miroslav Lachman <000.fbsd@quip.cz> (Original Version)
MFC after:	4 weeks
Relnotes:	yes
Sponsored by:	Klara Inc.
Event:		July 2020 Bugathon
Differential Revision:	https://reviews.freebsd.org/D25628
2020-07-11 20:53:31 +00:00
Allan Jude
86e88c4f54 nscd: does not warn about invalid values what parsing config file
PR:		202135
Submitted by:	amutu@amutu.com
Reported By:	Trond.Endrestol@ximalas.info
Reviewed by:	markj, freqlabs
MFC after:	4 weeks
Sponsored by:	Klara Inc.
Event:		July 2020 Bugathon
Differential Revision:	https://reviews.freebsd.org/D25627
2020-07-11 19:44:12 +00:00
Allan Jude
d046aae254 boot(8): fix sorting of cross references
Reported by:	yuripv
Event:		July 2020 Bugathon
2020-07-11 19:29:24 +00:00
Allan Jude
4f9917f5ff boot(8): Add additional cross references
Provide hints to direct people towards gptzfsboot, zfsbootcfg, efibootmgr, etc

PR:		199103
MFC after:	2 weeks
Sponsored by:	Klara Inc.
Event:		July 2020 Bugathon
2020-07-11 19:18:43 +00:00
Sergio Carlavilla Delgado
45b34f2cce Add orders man page
PR:		239020
Submitted by:	gbe@
Approved by:	imp@
Obtained from:	NetBSD
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D24293
2020-07-11 18:27:05 +00:00
Allan Jude
9d4c84dea4 ppp: Document the fact that ppp_nat is enabled by default
No functional change.

PR:		243062
Submitted by:	Evilham <contact@evilham.com> (original version)
MFC after:	2 weeks
Sponsored by:	Klara Inc.
Event:		July 2020 Bugathon
Differential Revision:	https://reviews.freebsd.org/D25623
2020-07-11 18:24:16 +00:00
Allan Jude
0e3972bc19 procctl(2): consistently refer to the last agrument as 'data'
Some older references called it 'arg'

Also fix a syntax error that was underlining an entire sentence.

PR:		247386
Reported by:	Paul Floyd <paulf@free.fr>, PauAmma (research)
MFC after:	2 weeks
Sponsored by:	Klara Inc.
2020-07-11 18:04:09 +00:00
Allan Jude
c5acd3a091 bsdinstall: only kill the dhclient for the interface we are restarting
PR:		205821
Reported by:	mjg
MFC after:	2 weeks
Sponsored by:	Klara Inc.
Event:		July 2020 Bugathon
2020-07-11 17:20:17 +00:00
Mark Johnston
87f9c14ad3 ping(8): Check for integer truncation when handling the value for -s.
PR:		239976
Submitted by:	Neeraj <neerajpal09@gmail.com>
MFC after:	1 week
Event:		July 2020 Bugathon
2020-07-11 17:10:16 +00:00
Allan Jude
5b8d2467eb bsdinstall: don't fail if fstab is empty
PR:		210865
Submitted by:	Tim Lukasiewicz <eclipzetech08@gmail.com>, h-fujishima@sakura.ad.jp (original version)
Reported by:	h-fujishima@sakura.ad.jp
Reviewed by:	sef
MFC after:	2 weeks
Sponsored by:	Klara Inc.
Event:		July 2020 Bugathon
2020-07-11 17:06:48 +00:00
Allan Jude
d36485a5c8 defaults/rc.conf: note that the default is ppp_nat="YES"
PR:		243062
Submitted by:	Evilham <contact@evilham.com>
MFC after:	2 weeks
Sponsored by:	Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D25621
2020-07-11 16:57:44 +00:00
Allan Jude
9a55656956 bsdinstall: kill dhclient before starting a new instance
PR:		205821
Submitted by:	William Orr <will@worrbase.com>
MFC after:	2 weeks
Sponsored by:	Klara Inc.
Event:		July 2020 Bugathon
Differential Revision:	https://reviews.freebsd.org/D14572
2020-07-11 15:32:53 +00:00
Michael Reifenberger
4b9ac8a0a6 Handle device removal and removal+add cases to fix infinity rate.
PR:		219829
Submitted by:	ota@j.email.ne.jp
Reported by:	rezo@live.cn
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D25226
2020-07-11 13:56:36 +00:00
Edward Tomasz Napierala
ce28fd95e0 Make linprocfs(5) report correct tty number in /proc/<PID>/stat.
Fixes sudo (sudo-1.8.21p2-3ubuntu1.2); previously would fail
with "sudo: no tty present and no askpass program specified".

Reviewed by:	kib, emaste
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D25588
2020-07-11 13:11:54 +00:00
Edward Tomasz Napierala
17f701a3fb Make linux stat(2) return the same st_dev for every devfs instance.
The reason for this is to work around an idiosyncrasy of glibc
getttynam(3) implementation: it checks whether st_dev returned for
fd 0 is the same as st_dev returned for the target of /proc/self/fd/0
symlink, and with linux chroots having their own devfs instance,
the check will fail if you chrooted into it.

PR:		kern/240767
Reviewed by:	kib
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D25559
2020-07-11 13:08:16 +00:00
Stefan Eßer
cf7becd216 Update to version 3.1.3
This version fixes the following evaluation, which lead to a parse error:

     echo "if (1 < 3) 1" | bc
2020-07-11 07:33:18 +00:00
Toomas Soome
de776da323 loader: implement GELI writes
Bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247482

This patch is based on initial work from allanjude.

PR:		247482
Obtained from:	https://reviews.freebsd.org/D10236
Differential Revision:	https://reviews.freebsd.org/D25605
2020-07-11 06:51:42 +00:00
Eugene Grosbein
a0b083fbda Fix the tests for install(1): add support for STRIPBIN's -o option.
Reported by:	lwhsu
MFC after:	1 week
2020-07-10 22:59:26 +00:00
Edward Tomasz Napierala
09c4e43d18 Don't emit warnings on MADV_HUGEPAGE; Firefox uses it a lot.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2020-07-10 21:41:09 +00:00
Mark Johnston
1365cd6468 Add a RELNOTES entry for r363084. 2020-07-10 19:58:26 +00:00