Commit Graph

240803 Commits

Author SHA1 Message Date
Ed Maste
2a965e2836 revert r302146: makeroot: zero out subsecond component of time= keywords
After r345281 by mhorne subsecond components are supported.

PR:		194703
Sponsored by:	The FreeBSD Foundation
2019-03-27 17:28:23 +00:00
Ruslan Bukin
61fef9e860 Grab timer frequency from FDT.
RISC-V timer has no dedicated DTS node and we have to get timer
frequency from cpus node.

Tested on Government Furnished Equipment (GFE) cores synthesized
on Xilinx VCU118.

Reviewed by:	markj
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D19727
2019-03-27 16:26:03 +00:00
Dag-Erling Smørgrav
77c2fe20df Add workaround for a QoS-related bug in VMWare Workstation.
Submitted by:	yuripv
Differential Revision:	https://reviews.freebsd.org/D18636
2019-03-27 15:17:29 +00:00
Ed Maste
0967215db7 Merge r345574 from vendor-crypto:
upstream: when checking that filenames sent by the server side

match what the client requested, be prepared to handle shell-style brace
alternations, e.g. "{foo,bar}".

"looks good to me" millert@ + in snaps for the last week courtesy
deraadt@

OpenBSD-Commit-ID: 3b1ce7639b0b25b2248e3a30f561a548f6815f3e

Discussed with: des
Obtained from:	OpenSSH-portable 3d896c157c722bc47adca51a58dca859225b5874
2019-03-27 14:35:38 +00:00
Ed Maste
dc9e8d9c84 Apply commit 3d896c15 from openssh-portable:
upstream: when checking that filenames sent by the server side

match what the client requested, be prepared to handle shell-style brace
alternations, e.g. "{foo,bar}".

"looks good to me" millert@ + in snaps for the last week courtesy
deraadt@

OpenBSD-Commit-ID: 3b1ce7639b0b25b2248e3a30f561a548f6815f3e

Discussed with:	des
2019-03-27 14:07:09 +00:00
Scott Long
aa24a04abf Add missing break statements. Coverity CID 1400446.
Reported by:	mav
2019-03-27 12:25:46 +00:00
Bruce Evans
aa1ce985e4 Fix copying of bitmaps in depths > 8. This fix is complete, except different
depths for the source and target are not supported.  The bits for higher
numbered planes (mostly for red) were either not copied or were copied to
lower numbered planes for nearby pixels.

Quick fix for creation of mouse cursor bitmaps in all depths.   This fix is
only complete for the default lightwhite cursor with a black frame.

Even the lightwhite and black colors are hard to find.  The templates
use 0xff for lightwhite, but that means brightblue in the simplest mode
(Truecolor depth 24).  Other modes are even more complicated -- they are
singly or doubly indirect throught palette(s) and changing of the palettes
by applications is supported.

Details:

Replicate the template value for Truecolor modes to fill out the target
depth (and more for depths not a multiple of 8).  Do this for every
drawing of the cursor so that it sort of works for mouse cursor bitmaps
set by applications.

Use 0xf for lightwhite in most other modes.  Only do this for the
default cursor so that it doesn't affect mouse cursor bitmaps set by
applications.  0xf mostly works because it was originally for CGA
lightwhite and is emulated using 1 or 2 indirections on EGA and VGA.
0x3f (EGA white) and 0xff (VGA black) direct palette indexes mostly
don't work since backwards compatibility inhibits or prevents them
representing lightwhite.  But 0x3f (EGA white) must be used for mode
37 (VGA_MODEX) (320x240x8 V) since this mode is closer to EGA than VGA.
2019-03-27 08:02:55 +00:00
Conrad Meyer
8207def158 x86: Use XSAVEOPT for fpusave(), when available
Remove redundant npxsave_core definition while here.

Suggested by:	Anton Rang
Reviewed by:	kib, Anton Rang <rang AT acm.org>
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D19665
2019-03-26 22:45:41 +00:00
Mark Johnston
7762bbc30e Add CTLFLAG_VNET to the net.inet.icmp.tstamprepl definition.
Reported by:	Hans Fiedler <hans@hfconsulting.com>
MFC after:	3 days
2019-03-26 22:14:50 +00:00
Ed Maste
a342f5772f pf: use UID_ROOT and GID_WHEEL named constants in make_dev
No functional change but improves consistency and greppability of
make_dev calls.

Discussed with: kp
2019-03-26 21:20:42 +00:00
John Baldwin
608289394f Add special psuedo-options for the base/{binutils,gcc} ports.
The WITH_PORT_BASE_{BINUTILS,GCC} options are used to prevent 'make check-old'
and 'make delete-old' from deleting files installed by the base/binutils
and base/gcc packages as normally one disables the in-tree variants
(e.g. WITHOUT_BINUTILS) when using these packages.

Reviewed by:	bapt (earlier version)
Differential Revision:	https://reviews.freebsd.org/D19483
2019-03-26 20:56:12 +00:00
John Baldwin
ffad9893e7 Remove the TIMED src option from the list of options.
This was missed in r342139 when timed(8) was removed and fixes a
warning when running makeman to regenerate src.conf.5.

Differential Revision:	https://reviews.freebsd.org/D19486
2019-03-26 20:44:02 +00:00
Ed Maste
698194ab24 stand: remove CLANG_NO_IAS from zfsldr
Many components under stand/ had CLANG_NO_IAS added when Clang's
Integrated Assembler (IAS) did not handle .codeNN directives.  Clang
gained support quite some time ago, and we can now build stand/ with
IAS.

Note that in some cases there are small differences in the generated
output, so CLANG_NO_IAS should be removed only after testing (or after
finding no differences in the output).  For zfsldr I compared objdump
output between GNU as- and Clang IAS-built zfsldr and .text was
identical (changes were limited to the object's ELF headers and debug
info).

Sponsored by:	The FreeBSD Foundation
2019-03-26 20:32:05 +00:00
Ed Maste
98b1cf29cf init: pedantic correction to "can't exec" script warning
Direct /etc/rc exec was introduced in r337321, with a fallback to
passing it to sh if direct exec fails.  "Can't exec" is slightly
misleading in this case (the script is still executed, just not
directly).
2019-03-26 19:38:25 +00:00
Ed Maste
ed5e102abb DTF_REWIND does nothing (since r247236) so retire its use
Reviewed by:	cem
Differential Revision:	https://reviews.freebsd.org/D19663
2019-03-26 19:35:41 +00:00
Edward Tomasz Napierala
0b208315f4 Improve error reporting when the swap pager runs out of memory.
Reviewed by:	kib
MFC after:	2 weeks
Sponsored by:	Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D19699
2019-03-26 19:11:15 +00:00
Oleksandr Tymoshenko
b25ce41e33 Change default value of kern.bootfile to reflect reality
In most cases kernel.bootfile is populated from the information
provided by loader(8). There are certain scenarios when loader
is not available, for instance when kernel is loaded by u-boot
or some other BootROM directly. In this case the default value
"/kernel" points to invalid location and breaks some functinality,
like using installkernel on self-hosted system or dtrace's CTF
lookup. This can be fixed by setting the value manually but the
default that reflects correct location is better than default that
points to invalid one.

Current default was set around FreeBSD 1, when "/kernel" was the
actual path. Transition to /boot/kernel/kernel happened circa FreeBSD 3.

PR:		221550
Reviewed by:	ian, imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D18902
2019-03-26 18:03:18 +00:00
Edward Tomasz Napierala
7000d321e8 Make smartpqi(4) behave better when running out of memory, by returning
CAM_RESRC_UNAVAIL instead of CAM_REQUEUE_REQ.  This makes CAM delay a bit
before retrying, so that the retries actually get a chance to succeed.

Reviewed by:	sbruno
MFC after:	2 weeks
Sponsored by:	Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D19696
2019-03-26 15:47:13 +00:00
Edward Tomasz Napierala
fd5795b23a .Xr trim(8) from dd(1).
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2019-03-26 15:44:06 +00:00
Edward Tomasz Napierala
20e1174a00 Factor out resource limit enforcement code in the ELF loader.
It makes the code slightly easier to follow, and might make
it easier to fix the resouce accounting to also account for
the interpreter.

The PROC_UNLOCK() is moved earlier - I don't see anything
it should protect; the lim_max() is a wrapper around lim_rlimit(),
and that, differently from lim_rlimit_proc(), doesn't require
the proc lock to be held.

Reviewed by:	kib
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D19689
2019-03-26 15:35:49 +00:00
Randall Stewart
7854c63d6f Fix a small bug in the tcp_log_id where the bucket
was unlocked and yet the bucket-unlock flag was not
changed to false. This can cause a panic if INVARIANTS
is on and we go through the right path (though rare).

Reported by:	syzbot+179a1ad49f3c4c215fa2@syzkaller.appspotmail.com
Reviewed by:	tuexen@
MFC after:	1 week
2019-03-26 10:41:27 +00:00
Philip Paeps
107510b8a4 SZ has been known as Eswatini since April 2018 (formerly Swaziland).
Sources:
https://www.iso.org/obp/ui/#iso:code:3166:SZ
http://www.un.org/en/member-states/index.html#gotoE
http://www.times.co.sz/news/118373-kingdom-of-eswatini-change-now-official.html

MFC after:	3 days
2019-03-26 09:46:17 +00:00
Michael Tuexen
eb3b9ea3fe Fix a double free of an SCTP association in an error path.
This is joint work with rrs@. The issue was found by running
syzkaller.

MFC after:		1 week
2019-03-26 08:27:00 +00:00
Philip Paeps
ad48359a65 Import tzdata 2019a
Changes: https://github.com/eggert/tz/blob/2019a/NEWS

MFC after:	3 days
2019-03-26 08:10:51 +00:00
Philip Paeps
beecab9423 Import tzdata 2019a 2019-03-26 07:55:48 +00:00
Justin Hibbits
9f1a007da7 powerpc64: Micro-optimize moea64 native pmap tlbie
* Cache moea64_need_lock in a local variable; gcc generates slightly better
  code this way, it doesn't need to reload the value from memory each read.
* VPN cropping is only needed on PowerPC ISA 2.02 and older cores, a subset
  of those that need serialization, so move this under the need_lock check,
  so those that don't need the lock don't even need to check this.
2019-03-26 02:53:35 +00:00
Kyle Evans
dc4636133f Allow kernel config to specify DTS/DTSO to build, and out-of-tree support
This allows for directives such as

makeoptions DTS+=/out/of/tree/myboard.dts
# in tree! Same rules applied as if this were in a dtb/ module
makeoptions DTS+=otherboard.dts

to be specified in config(5) and have these built/installed alongside th
kernel. The assumption that overlays live in an overlays/ directory is only
made for in-tree DTSO, but we still make the assumption that out-of-tree
arm64 DTS will be in vendored directories (for now).

This lowers the cost to hacking on an overlay or dts by being able to
quickly throw it in a custom config, especially if it doesn't fit one of the
current dtb/modules quite appropriately or it's not intended for commit
there.

The build/install targets were split out of dtb.mk to centralize the build
logic and leave out the all/realinstall/CLEANFILES additions... it was
believed that we didn't want to pollute the kernel build with these.

The build rules were converted to suffix rules at the suggestion of Ian to
clean things up a little bit in a world where we can have mixed
in-tree/out-of-tree DTS/DTSO specified.

Reviewed by:	ian
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D19351
2019-03-26 02:45:23 +00:00
Kyle Evans
8f7f3d08ae lualoader: Fix up some luacheck concerns
- Garbage collect an unused (removed because it was useless) constant
- Don't bother with vararg notation if args will not be used

MFC after:	1 week
2019-03-26 02:35:58 +00:00
Kyle Evans
c206dd4d81 lualoader: Clear the screen before prompting for password
Assuming that the autoboot sequence was interrupted, we've done enough
cursor manipulation that the prompt for the password will be sufficiently
obscured a couple of lines up. Clear the screen and reset the cursor
position here, too.

MFC after:	1 week
2019-03-26 02:33:27 +00:00
Kyle Evans
79483833d0 MFV r345515: netbsd-tests: import memory bump for libc/regex/t_exhaust
MFC after:	3 days
2019-03-26 02:21:09 +00:00
Kyle Evans
ef169556a5 netbsd-tests: import memory bump for libc/regex/t_exhaust 2019-03-26 02:13:25 +00:00
Maxim Sobolev
4f20706113 Refine r345425: get rid of superfluous helper macro that I have added.
MFC after:	2 weeks
2019-03-26 01:28:10 +00:00
Mark Johnston
fd76e780a7 Reject F_SETLK_REMOTE commands when sysid == 0.
A sysid of 0 denotes the local system, and some handlers for remote
locking commands do not attempt to deal with local locks.  Note that
F_SETLK_REMOTE is only available to privileged users as it is intended
to be used as a testing interface.

Reviewed by:	kib
Reported by:	syzbot+9c457a6ae014a3281eb8@syzkaller.appspotmail.com
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D19702
2019-03-25 21:38:58 +00:00
Michael Gmelin
4f6714d53b Correct contradictory information on default syslog logging priority.
MFC after:	1 week
2019-03-25 21:14:51 +00:00
Andrew Turner
40fcc4760e Sort printing of the ID registers on arm64 to be identical to the
documentation. This will simplify checking new fields when they are added.

MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2019-03-25 18:02:04 +00:00
Michael Tuexen
7c96d54f20 Initialize scheduler specific data for the FCFS scheduler.
This is joint work with rrs@. The issue was reported by using
syzkaller.

MFC after:		1 week
2019-03-25 16:40:54 +00:00
Michael Tuexen
689ed08920 Improve locking when tearing down an SCTP association.
This is joint work with rrs@ and the issue was found by
syzkaller.

MFC after:		1 week
2019-03-25 15:23:20 +00:00
Hans Petter Selasky
d7c5dccd66 Change all kernel C-type macros into static inline functions.
The current kernel C-type macros might obscurely hide the fact that
the input argument might be used multiple times.

This breaks code like:
isalpha(*ptr++)

Use static inline functions instead of macros to fix this.

Reviewed by:		kib @
Differential Revision:	https://reviews.freebsd.org/D19694
MFC after:		1 week
Sponsored by:		Mellanox Technologies
2019-03-25 13:50:38 +00:00
Martin Matuska
df422cb404 MFV r345495:
Sync libarchive with vendor.

Relevant vendor changes:
  PR #1153: fixed 2 bugs in ZIP reader [1]
  PR #1143: ensure archive_read_disk_entry_from_file() uses ARCHIVE_READ_DISK
  Changes to file flags code, support more file flags on FreeBSD:
    UF_OFFLINE, UF_READONLY, UF_SPARSE, UF_REPARSE, UF_SYSTEM
    UF_ARCHIVE is not supported by intention (yet)

PR:		236300
MFC after:	2 weeks
2019-03-25 11:49:57 +00:00
Bruce Evans
dac776fdbf Fix another type of buffer overrun for segmented modes. The buffer index
was not taken modulo the window size in VGLClear().

Segmented modes also need a kernel fix to almost work.  The ioctl to set
the window origin is broken.

These bugs are rarely problems since non-VESA modes only need
segmentation to support multiple pages but libvgl doesn't support
multiple pages and treats these modes as non-segmented, and VESA modes
are usually mapped linearly except on old hardware so they really are
non-segmented.
2019-03-25 11:48:40 +00:00
Martin Matuska
f9b2e63a44 Update vendor/libarchive/dist to git 3c079320b23ddf5ef38c443569c25898ad79ddb9
Relevant vendor changes:
  PR #1153: fixed 2 bugs in ZIP reader
  PR #1143: ensure archive_read_disk_entry_from_file() uses ARCHIVE_READ_DISK
  Changes to file flags code, support more file flags on FreeBSD:
    UF_OFFLINE, UF_READONLY, UF_SPARSE, UF_REPARSE, UF_SYSTEM
    UF_ARCHIVE is not supported by intention (yet)
2019-03-25 11:39:49 +00:00
Michael Tuexen
2de5b90420 Fix the handling of fragmented unordered messages when using DATA chunks
and FORWARD-TSN.

This bug was reported in https://github.com/sctplab/usrsctp/issues/286
for the userland stack.

This is joint work with rrs@.

MFC after:		1 week
2019-03-25 09:47:22 +00:00
Andriy Voskoboinyk
ae6f61b116 run(4): merge some common TSF-related code into run_disable_tsf()
No functional change intended.

MFC after:	5 days
2019-03-25 09:10:07 +00:00
Allan Jude
5e02af0dda The Atheros AR7241 has 20 GPIO pins
AR724X_GPIO_PINS used for this family is defined as 18
The datasheet for the AR7241 describes 20 pins, allow all to be used.

Submitted by:	Hiroki Mori <yamori813@yahoo.co.jp>
Reviewed by:	mizhka
Differential Revision:	https://reviews.freebsd.org/D17580
2019-03-25 07:48:52 +00:00
Allan Jude
b4b3e3498b Make TMPFS_PAGES_MINRESERVED a kernel option
TMPFS_PAGES_MINRESERVED controls how much memory is reserved for the system
and not used by tmpfs.

On very small memory systems, the default value may be too high and this
prevents these small memory systems from using reroot, which is required
for them to install firmware updates.

Submitted by:	Hiroki Mori <yamori813@yahoo.co.jp>
Reviewed by:	mizhka
Differential Revision:	https://reviews.freebsd.org/D13583
2019-03-25 07:46:20 +00:00
Ed Maste
07c9bf2a44 Apply WITH_PIE changes to other binutils components
Followon to r345489, explicitly specified bare .a libraries need
${PIE_SUFFIX} (although these still built).

MFC with:	r345489
2019-03-25 01:18:26 +00:00
Ed Maste
bce37ebc34 Fix GNU objdump build under WITH_PIE
Explicitly specified bare .a libraries need ${PIE_SUFFIX}.

Reported by:	David E. Cross, on twitter
2019-03-25 01:06:29 +00:00
Ed Maste
876d02f135 Add description for WITHOUT_RETPOLINE
Not used by default at the moment, but added for the benefit of
downstream projects/branches with different options.
2019-03-24 23:26:03 +00:00
Bruce Evans
31d09534f8 Oops, my previous commit to libvgl was missing the change of VGLSetBorder()
to match the change in its declaration.  Change the declaration back to
"byte color" since setting of the border color is not supported for more
than 256 colors.
2019-03-24 20:43:21 +00:00
Scott Long
8d8b448919 Add event table decoding for SAS Broadcast Primitive events. 2019-03-24 20:37:37 +00:00