Commit Graph

244113 Commits

Author SHA1 Message Date
Warner Losh
2c24ffacd6 Fix typo not -> nor and add 'the' because we are talking about specific flags
and make the punctuation parallel between the three cases.

Submitted by: Yoshihiro Ota-san
Differential Revision: https://reviews.freebsd.org/D21530
2019-09-06 15:01:47 +00:00
Fabien Thomas
d5f39c34a6 Fix broken window replay check that will allow old packet to be accepted.
This was introduced in r309144.

Submitted by:	Jean-Francois HREN <jean-francois.hren@stormshield.eu>
Approved by:	ae@
MFC after:	3 days
2019-09-06 14:30:23 +00:00
Randall Stewart
e57b2d0e51 This adds the final tweaks to LRO that will now allow me
to add BBR. These changes make it so you can get an
array of timestamps instead of a compressed ack/data segment.
BBR uses this to aid with its delivery estimates. We also
now (via Drew's suggestions) will not go to the expense of
the tcb lookup if no stack registers to want this feature. If
HPTS is not present the feature is not present either and you
just get the compressed behavior.

Sponsored by:	Netflix Inc
Differential Revision: https://reviews.freebsd.org/D21127
2019-09-06 14:25:41 +00:00
Emmanuel Vadot
725ee594b4 pkgbase: r351861 didn't solve everything, we need to default to the utilities package too 2019-09-06 12:26:45 +00:00
Takanori Watanabe
ca78bcd73b Add embedded Managed Object Format blob access to acpi_wmi(4).
This blob is can be converted to human readable form by bmfdec.
(http://github.com/pali/bmfdec)

Differential Revision:	https://reviews.freebsd.org/D21529
2019-09-06 10:12:05 +00:00
Conrad Meyer
f3cf622523 ufs: Remove redundant brelse() after r294954
Same automation.

No functional change.
2019-09-06 08:08:33 +00:00
Conrad Meyer
454409a372 msdosfs: Remove redundant brelse() after r294954
Same automation.

No functional change.
2019-09-06 08:08:10 +00:00
Conrad Meyer
dadc0f97d0 cd9660: Remove redundant brelse() after r294954
Same automation.

No functional change.
2019-09-06 08:07:36 +00:00
Conrad Meyer
fe8b34563d ext2fs: Remove redundant brelse() after r294954
Coccinelle:

@ rule1 @
 identifier __error;
@@
 ...
 int __error;
 ...

@ rule2 depends on rule1 @
 identifier rule1.__error;
 identifier __bp;
@@

 __error =
(
 bread
|
 bread_gb
|
 breadn
|
 breadn_flags
)
 (..., &__bp);
 if (
(
 __error
|
 __error != 0
)
 ) {
 ...
- brelse(__bp);
 ...
 }

No functional change.
2019-09-06 08:07:12 +00:00
Justin Hibbits
e0b5c15c54 powerpc64/pmap: Fix a WITNESS error in alloc_pvo_entry()
We only call alloc_pvo_entry() with M_WAITOK from one location.  However,
this can be called while holding nonsleepable locks.  Rather than passing
M_WAITOK down, use vm_wait() and loop.
2019-09-06 03:02:12 +00:00
Justin Hibbits
197a7e48c9 powerpc64/pmap: Simplify the code path for moea64_pte_replace_native()
Summary:
MOEA64_PTE_REPLACE() is called often with the pmap lock held, and
sometimes with the page pv lock held.  The less work done while holding
a lock, the better.  Since we are intending to replace the same PTE
(same hash index), we don't need to recalculate anything, just flat
replace the PTE.  This cuts more than 200 instructions off the
invalidating code path.  In addition, we don't need to replace a PTE
that's not occupied by this PVO.

Reviewed by:	luporl
Differential Revision:	https://reviews.freebsd.org/D21515
2019-09-06 02:45:46 +00:00
Justin Hibbits
2f6823d4c1 Loader: Add load offset to powerpc kernel entry point
Summary:
There is logic in ELF loadimage() to relocate kernels, but currently
only type ET_EXEC.  PowerPC kernels are ET_DYN, and can be relocated anywhere.
Add the load offset to kernel entry points on this platform.

Reviewed by:	imp, ian
Differential Revision:	https://reviews.freebsd.org/D21286
2019-09-06 02:28:03 +00:00
Philip Paeps
7f0b970948 QEMU: use default HZ
HZ=100 by default on riscv since r351918.
2019-09-06 01:22:16 +00:00
Philip Paeps
7f0851ab19 riscv: default to HZ=100
Most current RISC-V development platforms are not fast enough to benefit
from the increased granularity provided by HZ=1000.

Sponsored by:	Axiado
2019-09-06 01:19:31 +00:00
Rick Macklem
4ce21f37fd Delete the unused "nd" argument for nfsrv_proxyds().
The "nd" argument for nfsrv_proxyds() is no longer used by the function.
This patch deletes it. This allows a subsequent patch to delete the "nd"
argument from nfsvno_getattr(), since it's only use of "nd" was to pass it
to nfsrv_proxyds().
Getting rid of the "nd" argument from nfsvno_getattr() avoids confusion
over why it might need "nd".

This patch is trivial and does not have any semantic effect.
2019-09-05 22:25:19 +00:00
Toomas Soome
56758831fe loader: use teken teminal emulator for x86 and uefi
Replace mini cons25 emulator with teken, this does enable us proper console
terminal for loader and will make it possible to implement different
back end callbacks to draw to screen.

At this time we still only "draw" in text mode.
2019-09-05 22:15:50 +00:00
Conrad Meyer
a6935d085c Remove long-dead BUF_ASSERT_{,UN}HELD assertions
These were fully neutered in r177676 (2008), but not removed at the time for
unclear reasons.  They're totally dead code, so go ahead and yank them now.

No functional change.
2019-09-05 21:43:33 +00:00
Conrad Meyer
f80cbeb292 msdosfs: Drop an unneeded brelse in bread error condition
After r294954, it is an invariant that bread returns non-NULL bp if and only
if the routine succeeded.  On error, it handles any buffer cleanup
internally.  So the brelse(NULL) here was just redundant.

No functional change.

Discussed with:	kib (extracted from a larger differential)
2019-09-05 21:30:52 +00:00
D Scott Phillips
ed4e4cff0e nvdimm(4): Add description of NVDIMM Namespace support
Reviewed by:	kib, bcr
Approved by:	emaste (mentor)
MFC after:	3 days
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D21536
2019-09-05 20:51:41 +00:00
Cy Schubert
4effc02129 Bounds check again after advancing cp, otherwise we have a possible
heap buffer overflow. This was discovered by a Google fuzzer test.
This can lead to remote denial of service. User interaction and
execution privileges are not a prerequisite for exploitation.

Reported by:	enh at Google, to FreeBSD by maya@NetBSD.org
Obtained from:	enh at Google
See also:	NetBSD ns_name.c r1.12
Reviewed by:	delphij, ume
MFC after:	3 days
	https://android-review.googlesource.com/c/platform/bionic/+/1093130
Differential Revision:	https://reviews.freebsd.org/D21523
2019-09-05 19:35:30 +00:00
Ian Lepore
acce2d7606 Use a single write of 3 bytes instead of iicdev_writeto() in ads111x.
The iicdev_writeto() function basically does scatter-gather IO by filling
in a pair of iic_msg structs to write the register address then the data
from different locations but with a single bus START/xfer/STOP sequence.
It turns out several low-level i2c controller drivers do not honor the
IIC_NOSTART flag, so the second piece of the write gets a new START on
the bus, and that confuses the ads111x chips which expect a continuous
write of 3 bytes to set a register.

A proper fix for this is to track down all the misbehaving controllers
drivers and fix them.  For now this change makes this driver work again.
2019-09-05 19:17:53 +00:00
Emmanuel Vadot
f6a3b357e9 pkgbase: Add the pkg trusted keys to the FreeBSD-utilities package 2019-09-05 19:17:17 +00:00
Ian Lepore
c56cf3d276 Ensure a measurement is complete before reading the result in ads111x.
Also, disable the comparator by default; it's not used for anything.

The previous logic would start a measurement, and then pause_sbt() for the
averaging time currently configured in the chip.  After waiting that long,
the code would blindly read the measurement register and return its value.
The problem is that the chip's idea of averaging time is based on its
internal free-running 1MHz oscillator, which may be running at a wildly
different rate than the kernel clock.  If the chip's internal timer was
running slower than the kernel clock, we'd end up grabbing a stale result
from an old measurement.

The driver now still uses pause_sbt() to yield the cpu while waiting for
the measurement to complete, but after sleeping it checks the chip's status
register to ensure the measurement engine is idle.  If it's not, the driver
uses a retry loop to wait a bit (5% of the original wait time) then check
again for completion.
2019-09-05 19:07:48 +00:00
Kristof Provost
3bc534ea8e Set required program for all acl tests
r339782 re-enabled acl test 00 and 02, which were disabled in r336617
due to PR 229930.
When the tests were disabled the code to set their required programs was
disabled as well, but this was not reinstated when r339782 re-enabled
them.
Do so now.

Sponsored by:	Axiado
2019-09-05 18:54:46 +00:00
Mateusz Guzik
68c3c1abe1 vfs: temporarily revert r351825
There are 2 problems:
- it introduces a funny bug where it can end up trylocking the same vnode [1]
- it exposes a pre-existing softdep deadlock [2]

Both are easier to run into that the bug which got fixed, so revert until
a complete solution is worked out.

Reported by:	cy [1], pho [2]
Sponsored by:	The FreeBSD Foundation
2019-09-05 18:19:51 +00:00
Toomas Soome
8262585607 Adjust teken to allow build as part of loader
Building for loader needs specific headers.
2019-09-05 18:07:40 +00:00
Ruslan Bukin
446e035c30 Add dwgpio to NOTES so it gets built in LINT kernels.
Sponsored by:	DARPA, AFRL
2019-09-05 17:54:57 +00:00
Stephen J. Kiernan
d57cd5ccd3 Bump up the low range of cpuset numbers to account for the kernel cpuset.
Reviewed by:	jeff
Obtained from:	Juniper Networks, Inc.
2019-09-05 17:48:39 +00:00
Adrian Chadd
7e7c290154 [lib80211] add initial VHT (11ac) channel ranges for FCC.
This is a simple set of VHT channels and flags for the FCC (US) regulatory
domain.  This needs to be researched and done for the rest of the
regulatory domains, but this should at least unblock some more ath10k
testing.
2019-09-05 15:55:24 +00:00
Ed Maste
aa91d4b3a9 pcie: return an error if a matching resource is not found
Submitted by:	markj
Reviewed by:	manu
Event:		vBSDCon FreeBSD hackathon
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D20884
2019-09-05 15:45:21 +00:00
Kyle Evans
89b5571e0b patch(1): fix the file removal test, strengthen it a bit
To remain compatible with GNU patch, we should ensure that once we're
removing empty files after a reversed /dev/null patch we don't remove files
that have been modified. GNU patch leaves these intact and just reverses the
hunk that created the file, effectively implying --remove-empty-files for
reversed /dev/null patches.
2019-09-05 15:35:57 +00:00
Toomas Soome
938cae327c ficl: add xemit word
While emit will output one byte on screen, the xemit will output xchar.

See: http://forth-standard.org/standard/xchar/XEMIT
2019-09-05 15:06:30 +00:00
Mateusz Piotrowski
d15e810db9 rc: Honor ${name}_env when a custom *_cmd is defined (e.g., start_cmd)
A user may set ${name}_env variable in rc.conf(5) in order to set additional
environment variables for a service command.  Unfortunately, at the moment
this variable is only honored when the command is specified via the command
variable. Those additional environment variables coming from ${name}_env
are never set if the service is started via the ${rc_arg}_cmd variable (for
example start_cmd).

PR:		239692
Reviewed by:	bcr, jilles
Approved by:	src (jilles)
Differential Revision:	https://reviews.freebsd.org/D21228
2019-09-05 14:52:22 +00:00
Emmanuel Vadot
92fd0827c1 pkgbase: pfctl: tests: Put tests files in the FreeBSD-tests package
Reviewed by:	kp, gjb
Differential Revision:	https://reviews.freebsd.org/D21521
2019-09-05 14:19:06 +00:00
Emmanuel Vadot
5112cfa07b pkgbase: Handle FILES when no FILESGROUP isn't used
bsd.files.mk only add the TAG when groups are used, fix this.

Reviewed by:	gjb
Differential Revision:	https://reviews.freebsd.org/D21520
2019-09-05 14:18:13 +00:00
Emmanuel Vadot
ce49128a13 pkgbase: Add tag for LIBSYMLINK case
Otherwised the files aren't packaged.

Reviewed by:	bapt, gjb
Differential Revision:	https://reviews.freebsd.org/D21508
2019-09-05 14:17:28 +00:00
Emmanuel Vadot
dba1420463 pkgbase: Add tags for includes in bsd.incs.mk
Otherwise the files aren't packaged.

Reviewed by:	bapt, gjb
Differential Revision:	https://reviews.freebsd.org/D21507
2019-09-05 14:16:39 +00:00
Emmanuel Vadot
4c1a82cea5 pkgbase: Create a FreeBSD-utilities package and make it the default one
The default package use to be FreeBSD-runtime but it should only contain
binaries and libs enough to boot to single user and repair the system, it
is also very handy to have a package that can be tranform to a small mfsroot.
So create a new package named FreeBSD-utilities and make it the default one.
Also move a few binaries and lib into this package when it make sense.
Reviewed by:	bapt, gjb
Differential Revision:	https://reviews.freebsd.org/D21506
2019-09-05 14:15:47 +00:00
Emmanuel Vadot
3c8868056c pkgbase: Add TAG for evdev and veriexec headers
Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D21505
2019-09-05 14:14:47 +00:00
Emmanuel Vadot
ea8a4d593b pkgbase: Put the sys/common test into the tests package
Every other test is there so do the same for those.

Reviewed by:	bapt, gjb
Differential Revision:	https://reviews.freebsd.org/D21504
2019-09-05 14:14:07 +00:00
Emmanuel Vadot
a7b5a3d486 pkgbase: Put a lot of binaries and lib in FreeBSD-runtime
All of them are needed to be able to boot to single user and be able
to repair a existing FreeBSD installation so put them directly into
FreeBSD-runtime.

Reviewed by:    bapt, gjb
Differential Revision:  https://reviews.freebsd.org/D21503
2019-09-05 14:13:08 +00:00
Emmanuel Vadot
df347c8a2e pkgbase: Put libbluetooth in the bluetooth package
It make sense to have everything bluetooth related in the same package.
Reviewed by:	bapt, gjb
Differential Revision:	https://reviews.freebsd.org/D21502
2019-09-05 14:11:16 +00:00
Emmanuel Vadot
724fad3ad0 pkgbase: Move libcap_ to FreeBSD-runtime
A lot of binaries present in FreeBSD-runtime depend on it so move
the libs there.

Reviewed by:	bapt, gjb
Differential Revision:	https://reviews.freebsd.org/D21501
2019-09-05 14:10:26 +00:00
Emmanuel Vadot
034a4717aa pkgbase: Tag passwd related file to be in FreeBSD-runtime package.
Reviewed by:	bapt, gjb
Differential Revision:	https://reviews.freebsd.org/D21500
2019-09-05 14:09:33 +00:00
Emmanuel Vadot
8c15be73b6 pkgbase: Move rc scripts and related files to their own packages
It doesn't need to be in runtime and might help people who want to
experiment with other rc system or don't use one (like in small
embedded mfsroot).

Reviewed by:	bapt, gjb
Differential Revision:	https://reviews.freebsd.org/D21499
2019-09-05 14:08:45 +00:00
Emmanuel Vadot
c2a7c3bedd pkgbase: Force zfs(8) and zpool(8) to be in the runtime package
Those commands are needed to repair a FreeBSD installation so add them
to the runtime package

Reviewed by:	bapt, gjb
Differential Revision:	https://reviews.freebsd.org/D21498
2019-09-05 14:07:49 +00:00
Emmanuel Vadot
8d250cb461 pkgbase: lib80211 is needed by ifconfig(8) so put it in FreeBSD-runtime
Reviewed by:	bapt, gjb
Differential Revision:	https://reviews.freebsd.org/D21497
2019-09-05 14:06:48 +00:00
Emmanuel Vadot
994c13ef19 pkgbase: Move the bootloader related files to a new FreeBSD-bootloader package
Bootloader file isn't needed for jails so don't include it in FreeBSD-runtime.

Reviewed by:	bapt, delphij, gjb
Differential Revision:	https://reviews.freebsd.org/D21496
2019-09-05 14:06:01 +00:00
Hans Petter Selasky
a48a37bee2 Decrease the default audio playback latency to a maximum of 21.3ms.
This significantly improves the audio playback response time.

Discussed with:	mav@
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2019-09-05 10:49:12 +00:00
Toomas Soome
0bd5d36798 ficl: add uIsGreater word
For some reason we have u< but not u>, fix it.
2019-09-05 09:04:48 +00:00