Commit Graph

238847 Commits

Author SHA1 Message Date
Conrad Meyer
8c1c50ff87 Allow multi-byte thousands separators in strfmon(3)
PR:	234010
Reported by:	Jon Tejnung <jon AT herrskogen.se>
Reviewed by:	yuripv
Differential Revision:	https://reviews.freebsd.org/D18605
2018-12-19 22:57:47 +00:00
Warner Losh
beab3c4bf4 Fix the date
The first part of the mips pruning has been commited. This part
is uncontested. Fix the date in the UPDATING file to reflect when
I made the commit. The contested parts will be committed (or not)
once those discussions complete.
2018-12-19 22:56:31 +00:00
Warner Losh
8e1165bf5b Remove old config file for SENTRY5
This is an older broadcom part that implements the mips32 ISA. 32-bit
FreeBSD/mips now requires mips32r2, so retire this config. Most of the
broadcom port is shared with newer ports, so what little code may be
unique to this part has not been GC'd at this time.

Discussed on: freebsd-mips@
Differential Revision: https://reviews.freebsd.org/D18543
2018-12-19 22:54:34 +00:00
Warner Losh
31733a7d2e Remove support for running 32-bit kernels on 64-bit hardware.
This was useful in bring up. However, it causes more issues than the
support is worth (64-bit atomics being chief among them).

Discussed on: freebsd-mips@
Differential Revision: https://reviews.freebsd.org/D18543
2018-12-19 22:54:29 +00:00
Warner Losh
a9ab417679 Remove the GXEMUL support.
gxemul was a nice stop-gap while qemu support for mips was firmed
up. Now MALTA* + qemu is the platform of choice retire gxemul support.
It's unknown when this was last confirmed working.

Discussed on: freebsd-mips@
Differential Revision: https://reviews.freebsd.org/D18543
2018-12-19 22:54:23 +00:00
Warner Losh
0bb183ed8d Remove support for the now very old SiByte MIPS platform. It's not
relevant and is unused. It's also getting in the way of progress in
some admittedly minor ways. Better to retire it to reduce the burden
on the project.

Discussed on: freebsd-mips@
Differential Revision: https://reviews.freebsd.org/D18543
2018-12-19 22:54:03 +00:00
Marcin Wojtas
c97ed06a4b Fix alignment issue in uefisign
The pe_certificate structure has to be aligned to 8 bytes. [1]
Since this is now checked in edk2, any binaries signed with
older version of this tool will fail verification.

References:
[1] https://docs.microsoft.com/en-us/windows/desktop/Debug/pe-format#the-attribute-certificate-table-image-only

Submitted by: Kornel Duleba <mindal@semihalf.com>
Reviewed by: trasz
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D18554
2018-12-19 22:47:37 +00:00
Marcin Wojtas
11721f6600 Include the new TPM 2.0 driver in the TPM module.
Update the appropriate Makefile to build the new driver
together with the old one.

Submitted by: Kornel Duleba <mindal@semihalf.com>
Reported by: kib
Obtained from: Semihalf
Sponsored by: Stormshield
2018-12-19 22:43:10 +00:00
Mateusz Guzik
6dcf45feda mac: reduce pessimization of sdt probe handling
Prior to the change the code would branch on return value and then check
if probes are enabled. Since vast majority of the time they are not, this
is clearly wasteful. Check probes first.

Sponsored by:	The FreeBSD Foundation
2018-12-19 22:30:26 +00:00
Mateusz Guzik
92dec625e3 Remove iBCS2: plug a wart missed in r342242
Sponsored by:	The FreeBSD Foundation
2018-12-19 22:08:51 +00:00
Mateusz Guzik
70a975ae6b Remove iBCS2, part3: the implementation
Reviewed by:	kib (previous version)
Sponsored by:	The FreeBSD Foundation
2018-12-19 22:02:49 +00:00
Mateusz Guzik
628888f0e0 Remove iBCS2, part2: general kernel
Reviewed by:	kib (previous version)
Sponsored by:	The FreeBSD Foundation
2018-12-19 21:57:58 +00:00
Mateusz Guzik
405c3050f1 Remove iBCS2, part1: userspace
iBCS2 was disconnected from the build in 2015 (see r291419)

bsdconfig parts submitted by dteske.

Reviewed by:	kib (previous version)
Sponsored by:	The FreeBSD Foundation
2018-12-19 21:56:54 +00:00
Mateusz Guzik
19b75ef59a Microoptimize corner case of ID bitmap handling.
Prior to the change we would avoidably test more possibly used IDs.

While here update the comment: there is no pidchecked variable anymore.
2018-12-19 20:29:52 +00:00
Mateusz Guzik
7d065d876e Deinline vfork handling out of the syscall return path.
vfork is rarely called (comparatively to other syscalls) and it avoidably
pollutes the fast path.

Sponsored by:	The FreeBSD Foundation
2018-12-19 20:27:26 +00:00
Mateusz Guzik
1ea91370ae Update priv(9) after r341827
Reported by:	trasz
Sponsored by:	The FreeBSD Foundation
2018-12-19 20:25:58 +00:00
Navdeep Parhar
377328701d cxgbe(4): Do not issue mbox commands after t4_fw_bye.
Sponsored by:	Chelsio Communications
2018-12-19 19:21:29 +00:00
Ed Maste
1e13299fd8 bootpd: validate hardware type
Due to insufficient validation of network-provided data it may have been
possible for a malicious actor to craft a bootp packet which could cause
a stack buffer overflow.

admbugs:	850
Reported by:	Reno Robert
Reviewed by:	markj
Approved by:	so
Security:	FreeBSD-SA-18:15.bootpd
Sponsored by:	The FreeBSD Foundation
2018-12-19 18:16:29 +00:00
Mark Johnston
53941c0a73 Replace uses of sbadaddr with stval.
The sbadaddr register was renamed in version 1.10 of the privileged
architecture specification.  No functional change intended.

Submitted by:	Mitchell Horne <mhorne063@gmail.com>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D18594
2018-12-19 17:52:09 +00:00
Mark Johnston
5268e09865 Implement cpu_halt() for RISC-V.
Submitted by:	Mitchell Horne <mhorne063@gmail.com>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D18595
2018-12-19 17:45:16 +00:00
David Bright
39a8ee1351 asmc: Add support for MacPro1,1
PR:		203431
Submitted by:	jjr@alisa.org & holindho@saunalahti.fi
Reported by:	jjr@alisa.org
MFC after:	1 week
2018-12-19 16:45:37 +00:00
Mark Johnston
0e4a3d93ee Remove a use of a negative array index from fxp(4).
This fixes a warning seen when compiling amd64 GENERIC with clang 7.
Also remove the workaround added in r337324.  clang 7 and gcc 4.2
generate the same code with or without the code change.

Reviewed by:	imp (previous version)
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D18603
2018-12-19 04:54:32 +00:00
Andriy Voskoboinyk
627bd78e3e net80211: fix out-of-bounds read in ieee80211_amrr(9).
ieee80211_alloc_node() does not initialize rateset tables; that's not
expected by rate control modules and will result in array access at
index -1 - where ni_essid[] array is located (zeroed at allocation, so
there are no user-visible consequences).

Just delay rate control initialization to the moment, when rateset
tables are initiaziled; nothing will use rates here anyway.

MFC after:	4 days
2018-12-19 03:08:10 +00:00
Navdeep Parhar
b156a400a6 cxgbe/t4_tom: fixes for issues on the passive open side.
- Fix PR 227760 by getting the TOE to respond to the SYN after the call
  to toe_syncache_add, not during it.  The kernel syncache code calls
  syncache_respond just before syncache_insert.  If the ACK to the
  syncache_respond is processed in another thread it may run before the
  syncache_insert and won't find the entry.  Note that this affects only
  t4_tom because it's the only driver trying to insert and expand
  syncache entries from different threads.

- Do not leak resources if an embryonic connection terminates at
  SYN_RCVD because of L2 lookup failures.

- Retire lctx->synq and associated code because there is never a need to
  walk the list of embryonic connections associated with a listener.
  The per-tid state is still called a synq entry in the driver even
  though the synq itself is now gone.

PR:		227760
MFC after:	2 weeks
Sponsored by:	Chelsio Communications
2018-12-19 01:37:00 +00:00
Mark Johnston
26e9d9b01f Fix DDB's "show malloc" after r338899.
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2018-12-19 00:17:22 +00:00
Andriy Gapon
d4ee942054 cyapa.4, isl.4: cross-reference and document use of chromebook_platform(4)
PR:		218632
Reported by:	Denis Kozadaev <denis@tambov.ru>
MFC after:	1 week
2018-12-18 21:43:33 +00:00
Gleb Smirnoff
32c4f3bb78 Use mbufq instead of ifqueue to queue mbufs. 2018-12-18 19:38:13 +00:00
Warner Losh
c08ef04422 Fix typo and formatting... 2018-12-18 19:05:57 +00:00
Warner Losh
5211a86d78 add pre-commit review request for drm*.
Move dev/usb/wlan to sys/dev/usb/wlan as it was the odd-man-out.
2018-12-18 18:52:12 +00:00
Andriy Gapon
3e9ec69a35 ichwd: add a few assertions about tco_version
Those should ensure correctness of ichwd_find_ich_lpc_bridge() and
ichwd_find_ich_lpc_bridge() as well as make it easier for both humans
and static analyzers to see the relation between tco_version and ich and
smb variables in ichwd_identify().

Reported by:	Coverity
CID:		1396314, 1396317
MFC after:	10 days
2018-12-18 17:17:53 +00:00
Mark Johnston
18fcfaa4ca Use caph_enter_casper() in ping(8).
Reported by:	oshogbo
MFC with:	r341837
Sponsored by:	The FreeBSD Foundation
2018-12-18 16:47:03 +00:00
Brooks Davis
10f7b12c13 const poison the new pointer of __sysctl.
Reviewed by:	kib
Obtained from:	CheriBSD
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D18444
2018-12-18 12:44:38 +00:00
Andriy Voskoboinyk
12df38ad62 iwi(4): do not leak node reference when IWI_FLAG_ASSOCIATED flag is set.
MFC after:	6 days
2018-12-18 05:08:56 +00:00
Cy Schubert
076b94438c MFV r342175:
Update sqlite3-3.23.1 --> sqlite3-3.26.0 (3260000)

MFC after:	3 days
Security:	https://blade.tencent.com/magellan/index_en.html
		No known CVE was apparently registered.
2018-12-18 01:12:30 +00:00
Mark Johnston
fd930cdbd0 Remove UMS support code from radeonkms.
The code is unreachable since the entries of radeon_ioctls[] are not
associated with any device: we provide only the KMS entry points.
Moreover, r600_cp_dispatch_texture() contains an integer overflow bug
that can be triggered from userspace.[1]

Reported by:	Anonymous of the Shellphish Grill Team[1]
Reviewed by:	dumbbell
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D18516
2018-12-17 21:48:20 +00:00
Mark Johnston
e710f8caf5 Catch up with r338948.
MFC with:	r342178
2018-12-17 21:34:09 +00:00
Andriy Gapon
9744b779a8 fix formatting and style in ig4iic_acpi_probe afetr r339754
This includes removing stray whitespace, adding a line after the
variable declaration block and removing a redundant check.

MFC after:	1 week
X-MFC with:	r339754
2018-12-17 21:33:25 +00:00
Mark Johnston
c491ffc3fb Revert r336326.
In testing on a Dell Latitude 7480, having ig4.ko loaded during a
suspend caused the system to hang.  It turns out that ig4iic_intr() was
being called after the device entered D3, and entered an infinite loop
because a read of the I2C status register returned all ones, causing us
to attempt to read a byte from the data buffer until one of the status
bits clears.  This occured because ig4iic_pci0 shares an interrupt with
the VGA device on this laptop, so ig4iic_intr() gets called even when
there is no work to do.  This is exactly the problem fixed by r342170,
which resolves the hang for me and allows suspend/resume to work with
ig4.ko loaded.  So, re-enable autoloading of ig4.ko in the hope that
r342170 resolves the problem universally.

Reviewed by:	gonzo
MFC after:	1 month (pending an MFC of r342170)
Differential Revision:	https://reviews.freebsd.org/D18587
2018-12-17 21:13:05 +00:00
Cy Schubert
aaa2feb76d Import sqlite3-3.26.0 (3260000)
Obtained from:	https://www.sqlite.org/2018/sqlite-autoconf-3260000.tar.gz
2018-12-17 20:19:35 +00:00
Alan Somers
b1ce931bd8 Conditionalize installtion audit(4) tests on MK_AUDIT
MK_AUDIT already controls auditd(8), praudit(1), etc.  It should also control
the audit test suite.

Submitted by:	ngie
MFC after:	2 weeks
Pull Request:	https://github.com/freebsd/freebsd/pull/240
2018-12-17 18:35:32 +00:00
Alan Somers
7fe3fd48a5 audit(4) tests: require /etc/rc.d/auditd
These tests should be skipped if /etc/rc.d/auditd is missing, which could be
the case if world was built with WITHOUT_AUDIT set.  Also, one test case
requires /etc/rc.d/accounting.

Submitted by:	ngie
MFC after:	2 weeks
Pull Request:	https://github.com/freebsd/freebsd/pull/240
2018-12-17 18:11:06 +00:00
David Bright
71b475e7dd asmc: Add support for mid-2011 Macmini 5,2
PR:		225911
Submitted by:	trev <fbsdbugs4@sentry.org>
Reported by:	trev <fbsdbugs4@sentry.org>
MFC after:	1 week
2018-12-17 17:21:45 +00:00
Andriy Gapon
82a5a27527 add support for marking interrupt handlers as suspended
The goal of this change is to fix a problem with PCI shared interrupts
during suspend and resume.

I have observed a couple of variations of the following scenario.
Devices A and B are on the same PCI bus and share the same interrupt.
Device A's driver is suspended first and the device is powered down.
Device B generates an interrupt. Interrupt handlers of both drivers are
called. Device A's interrupt handler accesses registers of the powered
down device and gets back bogus values (I assume all 0xff). That data is
interpreted as interrupt status bits, etc. So, the interrupt handler
gets confused and may produce some noise or enter an infinite loop, etc.

This change affects only PCI devices.  The pci(4) bus driver marks a
child's interrupt handler as suspended after the child's suspend method
is called and before the device is powered down.  This is done only for
traditional PCI interrupts, because only they can be shared.

At the moment the change is only for x86.

Notable changes in core subsystems / interfaces:
- BUS_SUSPEND_INTR and BUS_RESUME_INTR methods are added to bus
  interface along with convenience functions bus_suspend_intr and
  bus_resume_intr;
- rman_set_irq_cookie and rman_get_irq_cookie functions are added to
  provide a way to associate an interrupt resource with an interrupt
  cookie;
- intr_event_suspend_handler and intr_event_resume_handler functions
  are added to the MI interrupt handler interface.

I added two new interrupt handler flags, IH_SUSP and IH_CHANGED, to
implement the new intr_event functions.  IH_SUSP marks a suspended
interrupt handler.  IH_CHANGED is used to implement a barrier that
ensures that a change to the interrupt handler's state is visible
to future interrupts.
While there, I fixed some whitespace issues in comments and changed a
couple of logically boolean variables to be bool.

MFC after:	1 month (maybe)
Differential Revision: https://reviews.freebsd.org/D15755
2018-12-17 17:11:00 +00:00
Andriy Gapon
5b7f9fada1 add a knob that disables detection of write protected disks
It has been reported that on some systems (with real hardware passed
through to a virtual machine) the WP detection causes USB disk probing
failures.

While here, also fix the selection of the next state in the case
of malloc failure in DA_STATE_PROBE_WP.  It was DA_STATE_PROBE_RC
unconditionally even when it should have been DA_STATE_PROBE_RC16.

PR:		225794
Reported by:	David Boyd <David.Boyd49@twc.com>
MFC after:	3 weeks
Differential Revision: https://reviews.freebsd.org/D18496
2018-12-17 16:01:37 +00:00
Maxim Sobolev
b7841ae650 Allow ng_nat to be attached to a ethernet interface directly via ng_ether(4)
or the likes. Add new control message types: setdlt and getdlt to switch
from default DLT_RAW (no encapsulation) to DLT_EN10MB (ethernet).

Approved by:	glebius
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D18535
2018-12-17 16:00:35 +00:00
Stefan Eßer
83eb920c6f Add removed CTM files to ObsoleteFiles.inc as a follow-up to r342126. 2018-12-17 10:17:56 +00:00
Toomas Soome
4f22b40a32 loader: zfs reader should not probe partitionless disks (UEFI case)
With r342151 I did fix the BIOS version of zfs_probe_dev() from accessing
the whole disk, but the fix was not complete - we actually did not check
if the device name was really for whole disk. Since UEFI version
is only calling the zfs_probe_dev() with partitions and not with whole
disk, the UEFI loader was not able to find the zfs pools.

This update does correct the issue by calling archsw.arch_getdev() to
translate the device name back to dev_desc, and we have whole disk when both
partition and slice values are -1.

Reported by:	alvisen_gmail.com
Differential Revision:	https://reviews.freebsd.org/D18558
2018-12-17 07:43:29 +00:00
Greg Lehey
867bb99bbb Work around BIOS quirks on HPE Proliant MicroServer Gen10
PR:		221350
Submitted by:	Bob Bishop
Reported by:	Rafal Lukawiecki
Reviewed by:	jhb
MFC after:	2 weeks
2018-12-17 07:09:46 +00:00
Andriy Voskoboinyk
b5a2424b58 Add revision number for TP-Link TL-WN722N to prevent ambiguity between
different chipsets.

MFC after:	3 days
X-MFC with:	341786
2018-12-17 05:07:57 +00:00
Alan Somers
314ce98edf OptionalObsoleteFiles: Fix deleting usr/tests/usr.sbin/sa
It's a directory, not a file.

Reported by:	ngie
MFC after:	2 weeks
X-MFC-With:	300938
2018-12-16 23:45:46 +00:00