]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 years agoMFC r342671:
Justin Hibbits [Sun, 20 Jan 2019 03:58:21 +0000 (03:58 +0000)]
MFC r342671:

rtld-elf: Fix powerpc64 TLS handling, matching powerpc's fix

We need to subtract the TLS_TCB_SIZE to get to the real data pointer, since
r13 points to the end of the TCB structure.  Prior to this, devel/protobuf-c
port broke with recent update to devel/protobuf, which exposed this issue.

Submitted by: andreast
Reported by: Piotr Kubaj

5 years agoMFC r341387:
Justin Hibbits [Sun, 20 Jan 2019 03:53:42 +0000 (03:53 +0000)]
MFC r341387:

Fix PowerPC64 ELFv1-specific problem in __elf_phdr_match_addr() leading to crash
in threaded programs that unload libraries.

Summary:
The GNOME update to 3.28 exposed a bug in __elf_phdr_match_addr(), which leads
to a crash when building devel/libsoup on powerpc64.

Due to __elf_phdr_match_addr() limiting its search to PF_X sections, on the
PPC64 ELFv1 ABI, it was never matching function pointers properly.

This meant that libthr was never cleaning up its atfork list in
__pthread_cxa_finalize(), so if a library with an atfork handler was unloaded,
libthr would crash on the next fork.

Normally, the null pointer check it does before calling the handler would avoid
this crash, but, due to PPC64 ELFv1 using function descriptors instead of raw
function pointers, a null check against the pointer itself is insufficient, as
the pointer itself was not null, it was just pointing at a function descriptor
that had been zeroed. (Which is an ABI violation.)

Calling a zeroed function descriptor on PPC64 ELFv1 causes a jump to address 0
with a zeroed r2 and r11.

5 years agoMFC r342988:
Justin Hibbits [Sun, 20 Jan 2019 03:30:04 +0000 (03:30 +0000)]
MFC r342988:

powerpcspe: Correct SPE high-component loading

Don't clobber the low part of the register restoring the high component of.
This could lead to very bad behavior if it's an ABI-affected register.

While here, also mark the asm volatile in the SPE high save case, to match
the load case.

5 years agoMFC r343117:
Mark Johnston [Sun, 20 Jan 2019 00:58:54 +0000 (00:58 +0000)]
MFC r343117:
Fix handling of rights on stdio streams.

PR: 234885

5 years agoMFC r343088:
Andriy Voskoboinyk [Sat, 19 Jan 2019 15:07:25 +0000 (15:07 +0000)]
MFC r343088:
rtwn_usb(4): add new USB id for RTL8821AU

Reported by: Mike Tancsa <mike@sentex.net>
Tested by: Mike Tancsa <mike@sentex.net>

5 years agoMFC r340926:
Vladimir Kondratyev [Fri, 18 Jan 2019 21:25:10 +0000 (21:25 +0000)]
MFC r340926:

evdev: Fix pause key release event in AT keyboard set 1 to evdev xlat-or.

5 years agoMFC r340912,r340913:
Vladimir Kondratyev [Fri, 18 Jan 2019 21:11:02 +0000 (21:11 +0000)]
MFC r340912,r340913:

psm(4): Revert r328640 and add minimal support for active AUX port
        multiplexers

Active PS/2 multiplexing is a method for attaching up to four PS/2
pointing devices to a computer. Enabling of multiplexed mode allows
commands to be directed to individual devices using routing prefixes.
Multiplexed mode reports input with each byte tagged to identify
its source. This method differs from one currently supported by psm(4)
where so called guest device (trackpoint) is attached to special
interface located on the host device (touchpad) and latter performs
guest protocol conversion to special encapsulation packet format.

At present time active PS/2 multiplexing is used in some models of
HP laptops e.g. EliteBook 8560w, 9470m. Enabling of absolute operation
mode on such touchpads is connected with following problems:
1. Touchpad's port priority is lower than trackpoint's. That blocks
   information queries thus prevents touchpad detection and configuration.
2. Touchpad and trackpoint have different protocol packet sizes and
   sync bytes.

As PS/2 usage is on decline only minimal possible set of changes to
support Synaptics touchpad and generic mouses is implemented.
Active multiplexing mode is enabled only at probe stage to scan through
attached PS/2 devices to query and configure Synaptics touchpad.
After touchpad has been configured, mux is switched back to legacy
(hidden multiplexing) mode to perform normal interrupt-driven input
data processing. Overflow bit values rather than tags are used to
separate packets produced by different devices. Switching back to
legacy mode allows to avoid psm(4) and atkbd(4) rework to support
4 instances of mouse driver.

Note: While in hidden multiplexing mode KBC does some editing of the
packet stream. It remembers the button bits from the last packet
received from each device, and replaces the button bits of every
packet with the logical OR of all devices’ most recent button bits.
This sort of button crosstalk results in spurious button events
which are inhibitted with various tricks. E.g. trackpoint middle
button events are suppressed while trackpad surface is touched and
touchpad left and right button events are suppressed if corresponding
trackpoint buttons are pressed.

PR: 231058
Reported by: Michael Figiel <mifigiel at gmail.com>
Tested by: Michael Figiel <mifigiel at gmail.com>

5 years agoMFC r340338:
Vladimir Kondratyev [Fri, 18 Jan 2019 20:59:06 +0000 (20:59 +0000)]
MFC r340338:
wmt(4): Add PNP record so it could be picked by devd/devmatch.
Fix uhid(4) conflict with blacklisting of multitouch HID-usages
in uhid(4) probe handler.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D17689

5 years agoMFC r342822:
David Bright [Fri, 18 Jan 2019 16:03:59 +0000 (16:03 +0000)]
MFC r342822:

asmc: Add support for Mac mini 4,1 (Mid-2010)

5 years agoMFC r342770:
David Bright [Fri, 18 Jan 2019 15:58:32 +0000 (15:58 +0000)]
MFC r342770:

asmc: Patch to add MacBook Pro 9,2 support

PR: 211513
Submitted by: William Theesfeld Jr <wtheesfeld@mailbox.org>
Reported by: William Theesfeld Jr <wtheesfeld@mailbox.org>

5 years agoMFC r342925:
Andrey V. Elsukov [Fri, 18 Jan 2019 09:54:28 +0000 (09:54 +0000)]
MFC r342925:
  Relax requirement to packet size of CARP protocol and remove version check.

  CARP shares protocol number 112 with VRRP (RFC 5798). And the size of
  VRRP packet may be smaller than CARP. ipfw_chk() does m_pullup() to at
  least sizeof(struct carp_header) and can fail when packet is VRRP. This
  leads to packet drop and message about failed pullup attempt.
  Also, RFC 5798 defines version 3 of VRRP protocol, this version number
  also unsupported by CARP and such check leads to packet drop.

  carp_input() does its own checks for protocol version and packet size,
  so we can remove these checks to be able pass VRRP packets.

  PR: 234207

5 years agoMFC r340421 (by cem), r342934:
Konstantin Belousov [Fri, 18 Jan 2019 09:41:17 +0000 (09:41 +0000)]
MFC r340421 (by cem), r342934:
cpucontrol(8): De-duplicate common update logic.

5 years agoMFC r342884:
Hans Petter Selasky [Fri, 18 Jan 2019 08:55:26 +0000 (08:55 +0000)]
MFC r342884:
Fix loopback traffic when using non-lo0 link local IPv6 addresses.

The loopback interface can only receive packets with a single scope ID,
namely the scope ID of the loopback interface itself. To mitigate this
packets which use the scope ID are appearing as received by the real
network interface, see "origifp" in the patch. The current code would
drop packets which are designated for loopback which use a link-local
scope ID in the destination address or source address, because they
won't match the lo0's scope ID. To fix this restore the network
interface pointer from the scope ID in the destination address for
the problematic cases. See comments added in patch for a more detailed
description.

This issue was introduced with route caching by karels@ .

Reviewed by: bz (network)
Differential Revision: https://reviews.freebsd.org/D18769
Sponsored by: Mellanox Technologies

5 years agoMFC r342778:
Hans Petter Selasky [Fri, 18 Jan 2019 08:47:48 +0000 (08:47 +0000)]
MFC r342778:
Reduce timeout for reading the USB HUB port status to 1000ms and try to filter
out dead USB HUB devices by implementing an error counter, so that the USB
enumeration thread does not spend all its time reading from non-responding
devices, blocking user-space access in the end.

Tested by: Matthias Apitz <guru@unixarea.de>
Sponsored by: Mellanox Technologies

5 years agoMFC r342730:
Hans Petter Selasky [Fri, 18 Jan 2019 08:43:42 +0000 (08:43 +0000)]
MFC r342730:
Improve USB generic debug messages. Print process ID and name when opening
and closing usb/ugenX.Y character device nodes.

Sponsored by: Mellanox Technologies

5 years agoMFC r342398:
Brooks Davis [Thu, 17 Jan 2019 23:22:56 +0000 (23:22 +0000)]
MFC r342398:

Enable sys/random.h #include from C++

And bump __FreeBSD_version, just in case.

PR: 234180
Submitted by: Ralf van der Enden <tremere AT cainites.net>

5 years agoPull in r337861 from upstream llvm trunk (by Hideki Saito):
Dimitry Andric [Wed, 16 Jan 2019 20:38:17 +0000 (20:38 +0000)]
Pull in r337861 from upstream llvm trunk (by Hideki Saito):

  [LV] Fix for PR38110, LV encountered llvm_unreachable()

  Summary: truncateToMinimalBitWidths() doesn't handle all Instructions
  and the worst case is compiler crash via llvm_unreachable(). Fix is
  to add a case to handle PHINode and changed the worst case to NO-OP
  (from compiler crash).

  Reviewers: sbaranga, mssimpso, hsaito

  Reviewed By: hsaito

  Subscribers: llvm-commits

  Differential Revision: https://reviews.llvm.org/D49461

This should fix "Unhandled instruction type!" (if assertions are
enabled) or segmentation faults (if assertions are disabled) when
compiling certain versions of the net-p2p/gtk-gnutella port.

Direct commit to stable/11 and stable/12, since head already has this
fix.

Reported by: Jamie Landeg-Jones <jamie@catflap.org>
PR: 234987

5 years agoMFC r343043: scp: disallow empty or current directory
Ed Maste [Wed, 16 Jan 2019 15:12:19 +0000 (15:12 +0000)]
MFC r343043: scp: disallow empty or current directory

Obtained from: OpenBSD scp.c 1.198
Security: CVE-2018-20685
Sponsored by: The FreeBSD Foundation

5 years agoMFC r340933:
Baptiste Daroussin [Wed, 16 Jan 2019 12:04:24 +0000 (12:04 +0000)]
MFC r340933:

libedit: improve multibyte support

Until this commit libedit only supported UTF-8 for multibyte charset
Improve it to support other multibyte charsets

Tested with eucJP and SJIS charsets.
Note that this change as been review and committed in upstream libedit
as well via christos@NetBSD

Submitted by: naito.yuichiro _at_ gmail.com
Reviewed by: bapt, pfg, yuripv, 0mp
Differential Revision: https://reviews.freebsd.org/D17903

5 years agoMFC r342591,342599:
Kristof Provost [Wed, 16 Jan 2019 05:17:24 +0000 (05:17 +0000)]
MFC r342591,342599:

Make kernel print jail ID when logging a process exit

Kernel now includes jail ID when logging a process exit. jid is 0 for unjailed
processes.

Submitted by: Marie Helene Kvello-Aune <freebsd@mhka.no>
Relnotes: yes
Sponsored by: Modirum MDPay

5 years agoMFC r342887:
Mark Johnston [Wed, 16 Jan 2019 03:07:32 +0000 (03:07 +0000)]
MFC r342887:
Stop setting if_linkmib in vlan(4) ifnets.

PR: 219472

5 years agoMFC r342875: Turn off ec2_ephemeralswap for now
Colin Percival [Wed, 16 Jan 2019 01:32:42 +0000 (01:32 +0000)]
MFC r342875: Turn off ec2_ephemeralswap for now

PR: 234686

5 years agoMFC 340469: Remove bogus roundup2() of the key programming work request header.
John Baldwin [Tue, 15 Jan 2019 21:43:18 +0000 (21:43 +0000)]
MFC 340469: Remove bogus roundup2() of the key programming work request header.

The key context is always placed immediately after the work request
header.  The total work request length has to be rounded up by 16
however.

5 years agoMFC 340468: Change the quantum for TLS key addresses to 32 bytes.
John Baldwin [Tue, 15 Jan 2019 21:40:51 +0000 (21:40 +0000)]
MFC 340468: Change the quantum for TLS key addresses to 32 bytes.

The addresses passed when reading and writing keys are always shifted
right by 5 as the memory locations are addressed in 32-byte chunks, so
the quantum needs to be 32, not 8.

5 years agoMFC 340466,340473: Move the TLS key map into the adapter softc.
John Baldwin [Tue, 15 Jan 2019 21:33:26 +0000 (21:33 +0000)]
MFC 340466,340473: Move the TLS key map into the adapter softc.

340466:
Move the TLS key map into the adapter softc so non-TOE code can use it.

340473:
Restore the <sys/vmem.h> header to fix build of cxgbe(4) TOM.

vmem's are not just used for TLS memory in TOM and the #include actually
predates the TLS code so should not have been removed when the TLS vmem
moved in r340466.

5 years agoMFC 340206: Treat the memory lengths for CHELSIO_T4_GET_MEM as unsigned.
John Baldwin [Tue, 15 Jan 2019 21:07:40 +0000 (21:07 +0000)]
MFC 340206: Treat the memory lengths for CHELSIO_T4_GET_MEM as unsigned.

Previously attempts to read the MC region were failing since the
length was greater than 2^31.

5 years agoMFC: r342944
Rodney W. Grimes [Tue, 15 Jan 2019 19:01:04 +0000 (19:01 +0000)]
MFC: r342944
Fix spelling of identifier

Approved by: phk (mfc blanket)

5 years agoMFC r342874: Fix bsdgrep manpage clobbering grep(1) with default build
Kyle Evans [Tue, 15 Jan 2019 18:22:16 +0000 (18:22 +0000)]
MFC r342874: Fix bsdgrep manpage clobbering grep(1) with default build

The default build should install bsdgrep(1) and grep(1), with the latter
being gnugrep(1). WITH_BSD_GREP flips this situation such that we have
gnugrep(1) and grep(1), with the latter being bsdgrep(1).

Changes to start installing the zgrep script out of usr.bin/grep
inadvertently altered the default build such that grep(1) was being
installed, and it was bsdgrep(1). Correct the typo.

5 years agoMFC r342849: libbe(3): Don't allow bootfs to be destroyed
Kyle Evans [Tue, 15 Jan 2019 18:21:06 +0000 (18:21 +0000)]
MFC r342849: libbe(3): Don't allow bootfs to be destroyed

Previously, the following sequence of events was feasible under some
circumstance:

bectl create test
bectl activate test
# the test BE dataset gets promoted and set as bootfs
bectl destroy test

I was unable to reproduce the destroy succeeding, but we should be rejecting
this before it even gets to libzfs because it would leave the system in an
inconsistent state. Forcing the user to be explicit as to which environment
should be activated instead is much better.

5 years agoMFC r342792, r342805: Provide rc_service variable for rc service scripts
Kyle Evans [Tue, 15 Jan 2019 15:52:23 +0000 (15:52 +0000)]
MFC r342792, r342805: Provide rc_service variable for rc service scripts

r342792: rc.subr: Provide rc_service variable for service scripts

Some rc scripts in ports (e.g. uwsgi, apache, openvpn) allow for
'application profiles' that usually require the rc script to be invoked
again for each active profile. Because there's no consistent way to
determine the path because it differs between manual/service(8) invocations
and /etc/rc invocations, this leads to patterns like these:

- www/uwsgi hardcodes the script path
- security/openvpn guesses either $_file or $0 based on $0 = /etc/rc

Instead of forcing rc scripts to guess, provide an rc_service variable to
the scripts that gets set appropriately both for direct execution or when a
script is being executed via run_rc_script (e.g. /etc/rc).

This is our analog of an OpenRC variable with the same name, different case
(RC_SERVICE).

r342805: rc.subr: Fix typo

Originally intended as 'in case in needs to be re-invoked', but it was later
decided (by myself) that 're-invoke itself' makes it more clear that the
script is expected to use this in a way.

PR: 234614

5 years agoMFC r342640: Ensure buffer is nul-terminated.
Xin LI [Tue, 15 Jan 2019 06:50:51 +0000 (06:50 +0000)]
MFC r342640: Ensure buffer is nul-terminated.

5 years agoMFC r342863:
Mark Johnston [Tue, 15 Jan 2019 02:09:32 +0000 (02:09 +0000)]
MFC r342863:
Add termcap entries for TI Silent 703/707 terminals.

PR: 234716

5 years agoMFC r342966:
Andriy Voskoboinyk [Tue, 15 Jan 2019 02:05:51 +0000 (02:05 +0000)]
MFC r342966:
net80211: fix possible panic for some drivers after r342463

Check if rate control structures were allocated before trying to
access them in various places; this was possible before on
allocation failure (unlikely), but was revealed after r342211
where allocation was deferred.

In case if driver uses wlan_amrr(4) and it is loaded it
is possible to reproduce the panic via

sysctl net.wlan.<number>.rate_stats

(for wlan0 the number will be 0).

5 years agoMFC r342912:
Andriy Voskoboinyk [Tue, 15 Jan 2019 01:57:46 +0000 (01:57 +0000)]
MFC r342912:
rtwn_usb(4): add IQ calibration support for RTL8192CU

The code is similar to the one for RTL8188E* and probably
should be shared with RTL8188CE (needs to be tested).

Was checked with RTL8188CUS, STA mode.

5 years agoMFC r341406, r342106
Oleksandr Tymoshenko [Mon, 14 Jan 2019 21:46:56 +0000 (21:46 +0000)]
MFC r341406, r342106

r341406:
Fix PCI driver unload for Marvell PCI controller

Add generic implementation for bus_deactivate_resource method. Without
it bus_release_resource fails with "Failed to release active resource"
message

r342106:
[mv_pci] Do not attempt to attach disabled PCI ports

Fail probe for PCI port if the respective FDT node is not enabled

Differential Revision: https://reviews.freebsd.org/D18385

5 years agoMFC r342855:
Stephen Hurd [Mon, 14 Jan 2019 18:40:37 +0000 (18:40 +0000)]
MFC r342855:

Use iflib_if_init_locked() during resume instead of iflib_init_locked().

iflib_init_locked() assumes that iflib_stop() has been called, however,
it is not called for suspend.  iflib_if_init_locked() calls stop then init,
so fixes the problem.

This was causing errors after a resume from suspend.

PR: 224059
Reported by: zeising
Sponsored by: Limelight Networks

5 years agoMFC r340617,341006: unbreak ng_source(4) for 64-bit platforms
Eugene Grosbein [Mon, 14 Jan 2019 09:54:53 +0000 (09:54 +0000)]
MFC r340617,341006: unbreak ng_source(4) for 64-bit platforms

5 years agoMFC r342883:
Andriy Voskoboinyk [Mon, 14 Jan 2019 07:50:23 +0000 (07:50 +0000)]
MFC r342883:
net80211: fix panic when device is removed during initialization

if_dead() is called during device detach - check if interface is
still exists before trying to refresh vap MAC address
(IF_LLADDR will trigger page fault otherwise).

5 years agoMFC r342853:
Konstantin Belousov [Mon, 14 Jan 2019 07:24:49 +0000 (07:24 +0000)]
MFC r342853:
Add a tunable which changes mincore(2) algorithm to only report data
from the local mapping.

5 years agoMFC r342826:
Konstantin Belousov [Mon, 14 Jan 2019 07:21:43 +0000 (07:21 +0000)]
MFC r342826:
Fix use of busdma(9) KPI in ahci(4).

5 years agoMFC r342935:
Emmanuel Vadot [Mon, 14 Jan 2019 06:57:39 +0000 (06:57 +0000)]
MFC r342935:

Import DTS includes from 4.19
This was missed in r340337

5 years agoMFC r342632:
Pedro F. Giffuni [Mon, 14 Jan 2019 03:19:08 +0000 (03:19 +0000)]
MFC r342632:
ext2fs.5: Update the manpage.

General update of the driver description and mention some important credits.
Add a symlink for ext4fs as it is of special interest nowadays.

Fix some `mandoc -Tlint` issues while here.

5 years agoMFC r342816: thr_wake(2): Minor mdoc fixes
Jilles Tjoelker [Sun, 13 Jan 2019 13:57:56 +0000 (13:57 +0000)]
MFC r342816: thr_wake(2): Minor mdoc fixes

5 years agoMFC r342817: getconf(1): Minor mdoc fix
Jilles Tjoelker [Sun, 13 Jan 2019 13:57:11 +0000 (13:57 +0000)]
MFC r342817: getconf(1): Minor mdoc fix

5 years agoMFC r342933:
Fedor Uporov [Sun, 13 Jan 2019 12:12:50 +0000 (12:12 +0000)]
MFC r342933:
Fix errno values returned from DUMMY_XATTR linuxulator calls

Reported by: weiss@uni-mainz.de
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D18812

5 years agoMFC r342614, r342633
Xin LI [Sun, 13 Jan 2019 08:46:06 +0000 (08:46 +0000)]
MFC r342614, r342633

r342614:
Properly set svn:mimetype for zh_CN.UTF-8.src.

r342633:
Fix various issues with Chinese locales:

 - Change short weekday names to use only one Chinese character.
   (note: this is a somewhat misunfortunate compromise due to the fact
   that some applications are using short buffer for weekday names,
   and in ~1905 when 星期 system was created to replace the traditional
   七曜 system, which can use 日月火水木金土 to represent Sunday through
   Saturday with just one character without any confusion).
 - for zh_CN locales: use Arabic numerals for month names, matching the
   practice of all other CJK locales
 - Regenerate zh_CN.{GB2312,GBK} locales from zh_CN.UTF-8.

Reported by: ygy
Reviewed by: kevlo
Differential Revision: https://reviews.freebsd.org/D18689

5 years agoMFC: r342619, r342626
Toomas Soome [Sun, 13 Jan 2019 07:25:55 +0000 (07:25 +0000)]
MFC: r342619, r342626

loader: create bio_alloc and bio_free for bios bounce buffer

We do have 16KB buffer space defined in pxe.c, move it to bio.c and implement
bio_alloc()/bio_free() interface to make it possible to use this space for
other BIOS calls (notably, from biosdisk.c).

5 years agoi386_parsedev() needs to support fd devices
Toomas Soome [Sun, 13 Jan 2019 07:22:16 +0000 (07:22 +0000)]
i386_parsedev() needs to support fd devices

After introduction of fd device list to BIOS loader, the i386_parsedev()
needs to recognize fd devices.

5 years agoloader.efi: update memmap command to recognize new attributes
Toomas Soome [Sun, 13 Jan 2019 07:19:20 +0000 (07:19 +0000)]
loader.efi: update memmap command to recognize new attributes

Also move memory type to string translation to libefi for later use.

5 years agoWith buggy int13 ah=15, we can mis-identify the floppy devices.
Toomas Soome [Sun, 13 Jan 2019 07:12:50 +0000 (07:12 +0000)]
With buggy int13 ah=15, we can mis-identify the floppy devices.

We have no option than trust INT13 ah=08 return code during the init phase.

PR: 234460
Reported by: Oleh Hushchenkov

5 years agoMFC r342823:
Konstantin Belousov [Sun, 13 Jan 2019 02:36:58 +0000 (02:36 +0000)]
MFC r342823:
Clamp tuklib_physmem() return value to SIZE_T_MAX.

5 years agoMFC r342810:
Andriy Voskoboinyk [Sun, 13 Jan 2019 02:19:01 +0000 (02:19 +0000)]
MFC r342810:
powerd(8): allow to force a method of battery state query

This change allows to determine power source via sysctl or /dev/apm
when devd(8) is running (used by default).

Based on patch from PR; other changes on top of it:
- '-f' (force) -> '-s' (source) parameter renaming;
- allow 'apm' -> 'devd' transition when '-s devd' is set
(if APM is enabled);
- man page update.

PR: 125707
Submitted by: Konstantin Stepanov <milezv@yandex.ru>
Reviewed by: bcr, imp
Differential Revision: https://reviews.freebsd.org/D18742

5 years agoMFC r342787:
Mark Johnston [Sat, 12 Jan 2019 17:00:54 +0000 (17:00 +0000)]
MFC r342787:
Add a bounds check to the tws(4) passthrough ioctl handler.

admbug: 825

5 years agoMFC r342888:
Mark Johnston [Sat, 12 Jan 2019 16:58:32 +0000 (16:58 +0000)]
MFC r342888:
Complete the removal of obsolete ioctl handlers.

PR: 234706

5 years agoMFC r342886
Vincenzo Maffione [Sat, 12 Jan 2019 08:26:58 +0000 (08:26 +0000)]
MFC r342886

netmap: fix bridge example in netmap(4)

PR:     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194872
Reported by:    adrian

5 years agonetmap: fix sysctl variable in vale(4)
Vincenzo Maffione [Sat, 12 Jan 2019 08:25:49 +0000 (08:25 +0000)]
netmap: fix sysctl variable in vale(4)

PR:     https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212333

5 years agoMFC r342784:
Kristof Provost [Sat, 12 Jan 2019 05:38:48 +0000 (05:38 +0000)]
MFC r342784:

pf: Remove references to pflow from the pf.conf man page

pflow no longer exists. It was removed as part of a pf update back in 2012
(r240233).

PR: 223957

5 years agoMFC r342597:
Enji Cooper [Sat, 12 Jan 2019 00:39:42 +0000 (00:39 +0000)]
MFC r342597:

Remove legacy rc.d infrastructure references from rc(8)

Legacy rc.d scripts (.sh extension) have not been supported since
r193118. Remove the outdated references to the legacy format, as they
are no longer valid.

Bug: 193936
Approved by: emaste (earlier version, mentor), jtl (mentor)
Differential Revision: https://reviews.freebsd.org/D18804

5 years agoMFC r342575, r342580: ar: detect and error out on 32-bit symbol table overflow
Ed Maste [Fri, 11 Jan 2019 19:49:19 +0000 (19:49 +0000)]
MFC r342575, r342580: ar: detect and error out on 32-bit symbol table overflow

BSD ar currently does not support the /SYM64/ 64-bit symbol table, and
previously truncated to 32-bits, silently producing corrupted archives
larger than 4GB.

PR: 234454

5 years agoMFC r342525: MFV r342469: 9630 add lzc_rename and lzc_destroy to libzfs_core
Andriy Gapon [Fri, 11 Jan 2019 11:49:35 +0000 (11:49 +0000)]
MFC r342525: MFV r342469: 9630 add lzc_rename and lzc_destroy to libzfs_core

Relnotes: maybe

5 years agoMFC r342541: MFV r342532: 5882 Temporary pool names
Andriy Gapon [Fri, 11 Jan 2019 11:45:30 +0000 (11:45 +0000)]
MFC r342541: MFV r342532: 5882 Temporary pool names

Note that this commit brings only formatting changes that were done
during the final review of the illumos change, because FreeBSD got the
main changes before illumos.

5 years agoMFC r342169: add a knob that disables detection of write protected disks
Andriy Gapon [Fri, 11 Jan 2019 11:42:25 +0000 (11:42 +0000)]
MFC r342169: add a knob that disables detection of write protected disks

PR: 225794

5 years agoMFC r340337:
Emmanuel Vadot [Fri, 11 Jan 2019 05:41:46 +0000 (05:41 +0000)]
MFC r340337:

Update our devicetree to 4.19 for arm and arm64

5 years agoMFC r342768:
Mark Johnston [Fri, 11 Jan 2019 03:50:51 +0000 (03:50 +0000)]
MFC r342768:
Support MSG_DONTWAIT in send*(2).

5 years agoMFC r342769, r342775:
Konstantin Belousov [Fri, 11 Jan 2019 02:08:06 +0000 (02:08 +0000)]
MFC r342769, r342775:
i386: Use atomic 64bit load to read PDE value from PAE pagetables in
pmap_kextract().

5 years agoMFC r342551, r342574:
Konstantin Belousov [Thu, 10 Jan 2019 10:37:19 +0000 (10:37 +0000)]
MFC r342551, r342574:
Bump sys_errlist size to keep ABI backward-compatible for some time.

5 years agoMFC r342737
Vincenzo Maffione [Thu, 10 Jan 2019 08:52:50 +0000 (08:52 +0000)]
MFC r342737

netmap: unit tests: fix issues found by coverity scan

Reported by:    asomers
Sponsored by:   Sunny Valley Networks

5 years agoMFC r342686:
Mark Johnston [Wed, 9 Jan 2019 17:39:15 +0000 (17:39 +0000)]
MFC r342686:
Avoid setting PG_U unconditionally in pmap_enter_quick_locked().

5 years agoMFC r342687:
Mark Johnston [Wed, 9 Jan 2019 17:38:47 +0000 (17:38 +0000)]
MFC r342687:
Use g_handleattr() to reply to GEOM::candelete queries.

5 years agoMFC r342649, r342650
Vincenzo Maffione [Tue, 8 Jan 2019 09:40:09 +0000 (09:40 +0000)]
MFC r342649, r342650

netmap: add suite of unit tests

Import the unit tests from upstream (https://github.com/luigirizzo/netmap
ba02539859d46d33), and make them ready for use with Kyua.
There are currently 38 regression tests, which test the kernel control ABI
exposed by netmap to userspace applications:

  1: test for port info get
  2-5: tests for basic port registration
  6-9: tests for VALE
  10-11: tests for getting netmap allocator info
  12-15: tests for netmap pipes
  16: test on polling mode
  17-18: tests on options
  19-27: tests for sync-kloop subsystem
  28-39: tests for null ports
  31-38: tests for the legacy NIOCREGIF registers

Reviewed by:    ngie
Sponsored by: Sunny Valley Networks
Differential Revision:  https://reviews.freebsd.org/D18490

5 years agoMFC r342113:
Michal Meloun [Mon, 7 Jan 2019 11:03:08 +0000 (11:03 +0000)]
MFC r342113:

  Improve R_AARCH64_TLSDESC relocation.  The original code did not support
  dynamically loaded libraries and used suboptimal access to TLS variables.
  New implementation removes lazy resolving of TLS relocation - due to flaw in
  TLSDESC design is impossible to switch resolver function at runtime without
  expensive locking.

5 years agoMFC r340359:
Xin LI [Mon, 7 Jan 2019 07:12:51 +0000 (07:12 +0000)]
MFC r340359:

Make outfile constant.

5 years agoMFC r341641: Reduce number of DNS queries in mountd.
Sean Eric Fagan [Mon, 7 Jan 2019 05:58:55 +0000 (05:58 +0000)]
MFC r341641: Reduce number of DNS queries in mountd.

Approved by: mav
Sponsored by: iXsystems Inc.

5 years agoMFC r342703:
Andriy Voskoboinyk [Mon, 7 Jan 2019 05:31:40 +0000 (05:31 +0000)]
MFC r342703:
rtwn_usb(4): add USB id for TP-LINK TL-WN821N v5.

It is already mentioned in manpage, but was missing from the driver.

5 years agoMFC r342702:
Andriy Voskoboinyk [Mon, 7 Jan 2019 05:28:00 +0000 (05:28 +0000)]
MFC r342702:
rtwn(4): refresh manpages.

- Add 'device rtwn' to rtwn_pci(4) and rtwn_usb(4) config sample;
kernel will not compile otherwise.
- Refresh devices list in rtwn_usb(4); add 'chipset' column.
- Bump Dd after this commit and r342835.

MFC r342714:
rtwnfw(4): refresh this manpage too (add rtwn-rtl8188eefw module).

5 years agoMFC r342684:
Andriy Voskoboinyk [Mon, 7 Jan 2019 05:20:24 +0000 (05:20 +0000)]
MFC r342684:
Refresh sys/conf/files after recent rtwn(4) update.

5 years agoMFC r342759:
Andriy Voskoboinyk [Mon, 7 Jan 2019 05:17:34 +0000 (05:17 +0000)]
MFC r342759:
rtwn_pci(4): sync r88ee_power_on() with OpenBSD

Submitted by: Farhan Khan <khanzf@gmail.com>
Differential Revision: https://reviews.freebsd.org/D18727

5 years agoMFC r342682:
Andriy Voskoboinyk [Mon, 7 Jan 2019 04:58:10 +0000 (04:58 +0000)]
MFC r342682:
rtwn_pci(4): add support for RTL8188EE chipset.

Initially based on https://reviews.freebsd.org/D15692;
later deduplicated and improved a bit (Tx reports, IQ calibration support).

Submitted by: Farhan Khan <khanzf@gmail.com>
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D15692

5 years agoMFC r342681:
Andriy Voskoboinyk [Mon, 7 Jan 2019 04:41:50 +0000 (04:41 +0000)]
MFC r342681:
rtwn(4): rename set_name -> set_rom_opts method and reuse it for RTL8188E*

5 years agoMFC r342680:
Andriy Voskoboinyk [Mon, 7 Jan 2019 04:38:50 +0000 (04:38 +0000)]
MFC r342680:
rtwn(4): rename common RTL8188E* structures.

No functional change intended.

5 years agoMFC r342679:
Andriy Voskoboinyk [Mon, 7 Jan 2019 04:34:15 +0000 (04:34 +0000)]
MFC r342679:
rtwn(4): do not try to start RTL8188E* MCU during device shutdown.

5 years agoMFC r342678:
Andriy Voskoboinyk [Mon, 7 Jan 2019 04:31:41 +0000 (04:31 +0000)]
MFC r342678:
Move USB-specific parts from rtwn(4) to rtwn_usb(4)

5 years agoMFC r342677:
Andriy Voskoboinyk [Mon, 7 Jan 2019 04:23:06 +0000 (04:23 +0000)]
MFC r342677:
rtwn_pci(4): add support for event-based Tx reports.

It will be used for RTL8188EE (and, probably, others).

MFC r342700:
rtwn_pci(4): fix panic with INVARIANTS (due to inverted assertion logic)

5 years agoMFC r342674:
Andriy Voskoboinyk [Mon, 7 Jan 2019 04:10:54 +0000 (04:10 +0000)]
MFC r342674:
rtwn(4): add IQ calibration support for RTL8188E*

MFC r342675:
rtwn(4): drop obsolete comment + use 'nop' function for 92eu calibration

RTL8192EU was not tested with previously added code.

5 years agoMFC r342673:
Andriy Voskoboinyk [Mon, 7 Jan 2019 03:47:28 +0000 (03:47 +0000)]
MFC r342673:
rtwn(4): provide register definitions for RTL8188CE calibration routines.

No functional change intended.

5 years agoMFC r342672:
Andriy Voskoboinyk [Mon, 7 Jan 2019 03:36:33 +0000 (03:36 +0000)]
MFC r342672:
rtwn_pci: fix excessive packet loss on Tx with RTL8188EE.

Use proper flags for bus_dmamap_sync() in Tx path.

MFC r342676:
rtwn_pci(4): use proper bus_dmamap_sync flags after Tx.

5 years agoMFC r342767:
Konstantin Belousov [Mon, 7 Jan 2019 00:29:02 +0000 (00:29 +0000)]
MFC r342767:
x86: Report per-cpu IPI TLB shootdown generation in ddb 'show pcpu' output.

5 years agoMFC of 342135 and 342290
Kirk McKusick [Sun, 6 Jan 2019 22:48:56 +0000 (22:48 +0000)]
MFC of 342135 and 342290

Properly respond to error from VFS_ROOT() during mount.

Sponsored by: Netflix

5 years agoMFC of 342548
Kirk McKusick [Sun, 6 Jan 2019 22:30:27 +0000 (22:30 +0000)]
MFC of 342548

When loading an inode from disk, verify that its mode is valid.
Sponsored by: Netflix

5 years agoMFC r342362-r342363: config(8) duplicate option handling
Kyle Evans [Sun, 6 Jan 2019 02:12:55 +0000 (02:12 +0000)]
MFC r342362-r342363: config(8) duplicate option handling

r342362:
config(8): Allow duplicate options to be specified

config(8)'s option handling has been written to allow duplicate options; if
the value changes, then the latest value is used and an informative message
is printed to stderr like so:

/usr/src/sys/amd64/conf/TEST: option "VERBOSE_SYSINIT" redefined from 0 to 1

Currently, this is only a possibility for cpu types, MAXUSERS, and
MACHINE_ARCH. Anything else duplicated in a config file will use the first
value set and error about duplicated options on subsequent appearances,
which is arguably unfriendly since one could specify:

include GENERIC
nooptions VERBOSE_SYSINIT
options VERBOSE_SYSINIT

to redefine the value later anyways.

Reported by: mmacy

r342363:
config(8): Remove all instances of an option when opting out

Quick follow-up to r342362: options can appear multiple times now, so
clean up all of them as needed. For non-OPTIONS options, this has no effect
since they're already de-duplicated.

5 years agoMFC r342628, r342670 (by cem):
Konstantin Belousov [Sun, 6 Jan 2019 00:52:53 +0000 (00:52 +0000)]
MFC r342628, r342670 (by cem):
Fix linux_destroy_dev() behaviour when there are still files open from
the destroying cdev.

Also bump __FreeBSD_version since struct linux_cdev size on i386 increased
(this is unmergeable r342629 on HEAD).

5 years agoMFC r342627:
Konstantin Belousov [Sun, 6 Jan 2019 00:45:41 +0000 (00:45 +0000)]
MFC r342627:
Implement zap_vma_ptes() for managed device objects.

5 years agoMFC r342625, r342631:
Konstantin Belousov [Sun, 6 Jan 2019 00:44:32 +0000 (00:44 +0000)]
MFC r342625, r342631:
Use IDX_TO_OFF().

5 years agoMFC r342739:
Konstantin Belousov [Sun, 6 Jan 2019 00:40:31 +0000 (00:40 +0000)]
MFC r342739:
Fix typo in r342710.

5 years agoMFC r342630:
Konstantin Belousov [Sun, 6 Jan 2019 00:37:14 +0000 (00:37 +0000)]
MFC r342630:
Add 'v' modifier to the ddb 'show pginfo' command to display vm_page
backing the provided kernel virtual address.

5 years agoMFC r342711:
Konstantin Belousov [Sun, 6 Jan 2019 00:34:43 +0000 (00:34 +0000)]
MFC r342711:
Fix typo, use boolean operator instead of bit-wise.

5 years agoMFC r342605:
Cy Schubert [Sun, 6 Jan 2019 00:32:14 +0000 (00:32 +0000)]
MFC r342605:

TCP_PAWS_IDLE is does not exist in NetBSD and illumos. In FreeBSD
TCP_PAWS_IDLE is defined in netinet/tcp_seq.h, however this header
isn't included explicitly or implicitly at this point therefore
as far ipfilter is concerned TCP_PAWS_IDLE is not defined. Remove
the #ifdef and include netinet/tcp.h unconditionally.

5 years agoMFC r342688:
Mark Johnston [Sat, 5 Jan 2019 15:09:50 +0000 (15:09 +0000)]
MFC r342688:
Typo.

5 years agoMFC r341101-r341103, r341148, r341391, r341422-r341423, r341454, r341780-r341781...
Justin Hibbits [Sat, 5 Jan 2019 05:20:36 +0000 (05:20 +0000)]
MFC r341101-r341103, r341148, r341391, r341422-r341423, r341454, r341780-r341781, r341805, r342026

Make powerpc booke kernels boot from ubldr.

r341101: powerpcspe: Don't crash the loader on ubldr with SPE instructions.
r341102: powerpc: Prepare Book-E kernels for KERNBASE != run base
r341103: powerpc: Fix the powerpc64 build post-r341102
r341148: powerpc: Don't include KERNBASE in genassym, it's unnecessary
r341391: ubldr: Force 'usefdt' variable to 1 for powerpc
r341422: powerpc/booke: Check for the metadata address by physical address
r341423: powerpc: Check for a fdt in the metadata if it doesn't already exist
r341454: powerpc: preload_addr_relocate is no longer necessary for booke
r341780: powerpc/ubldr: Teach powerpc's ubldr to boot 64-bit kernels
r341781: powerpc/booke: Replace a logical equivalent of pmap_kextract() with a
         real call
r341805: powerpc/booke: Don't get and use the load offset for TOC on APs
r342026: powerpc/booke: Change KERNBASE to be physical load address

5 years agoMFC r341751-r341752, r342025, r342107
Justin Hibbits [Sat, 5 Jan 2019 04:43:22 +0000 (04:43 +0000)]
MFC r341751-r341752, r342025, r342107

r341751:
powerpc/SPE: Reload vector registers after efdabs/efdnabs/efdneg

r341752:
powerpc/SPE: Copy lower part of source register to target for
efdabs/efdnabs/efdneg

r342025:
powerpcspe: Fix GPR handling in SPE exception handler

r342107:
powerpcspe: Don't require FPU_EMU for powerpcspe IEEE emulation