aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Trim whitespace.Konstantin Belousov2018-09-071-2/+2
| | | | | | | Approved by: re (gjb) Notes: svn path=/head/; revision=338522
* Update head from ALPHA4 to ALPHA5 as part of the 12.0-RELEASEGlen Barber2018-09-071-1/+1
| | | | | | | | | | cycle. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=338518
* The Call For Testing had no reports of operational problems andKirk McKusick2018-09-061-2/+2
| | | | | | | | | | | | | | | | | found that performance was no worse and usually better when running with TRIM consolidation. Performance improvement was most noticable when multiple large files are released in a short period of time. Thus, TRIM consolidation is being enabled by default. Should operational problems be found, it can be disabled using the command `sysctl vfs.ffs.dotrimcons=0'. This variable can also be set as a tunable if early disabling is necessary. Approved by: re (gjb) Sponsored by: Netflix Notes: svn path=/head/; revision=338517
* Avoid uninitialized read of ext_csd.Marius Strobl2018-09-061-3/+5
| | | | | | | | | Reported by: Coverity CID: 1395275 Approved by: re (gjb, kib) Notes: svn path=/head/; revision=338513
* - Explicitly compare a pointer to NULL. The __builtin_expect() of clangMarius Strobl2018-09-061-2/+1
| | | | | | | | | | 3.4.1 otherwise isn't able to cope with the expression. - Fix a nearby whitespace bug. Approved by: re (gjb, kib) Notes: svn path=/head/; revision=338512
* bhyve: Use MAP_GUARD when mapping guest memory ranges.John Baldwin2018-09-061-5/+4
| | | | | | | | | | | | | | | | Instead of relying on PROT_NONE mappings with MAP_ANON, use MAP_GUARD to reserve address space around guest memory ranges including the guard ranges of address space around mappings. Submitted by: Shawn Webb Reviewed by: araujo Approved by: re (rgrimes) MFC after: 1 month Sponsored by: HardendBSD and G2, Inc Differential Revision: https://reviews.freebsd.org/D16822 Notes: svn path=/head/; revision=338511
* Use the correct terminology.Mark Johnston2018-09-061-2/+2
| | | | | | | | | Reported by: kib Approved by: re (gjb) Differential revision: https://reviews.freebsd.org/D16191 Notes: svn path=/head/; revision=338510
* The inp_lle field to struct inpcb, along with two "valid" flagsBjoern A. Zeeb2018-09-061-3/+3
| | | | | | | | | | | | | | | | | | for the rt and lle cache were added in r191129 (2009). To my best knowledge they have never been used and route caching has converted the inp_rt field from that commit to inp_route rendering this field and these flags obsolete. Convert the pointer into a spare pointer to not change the size of the structure anymore (and to have a spare pointer) and mark the two fields as unused. Reviewed by: markj, karels Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D17062 Notes: svn path=/head/; revision=338509
* amd64: depessimize copyinstr_smapMateusz Guzik2018-09-061-15/+20
| | | | | | | | | | | | | | | | | The stac/clac combo around each byte copy is causing a measurable slowdown in benchmarks. Do it only before and after all data is copied. While here reorder the code to avoid a forward branch in the common case. Note the copying loop (originating from copyinstr) is avoidably slow and will be fixed later. Reviewed by: kib Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D17063 Notes: svn path=/head/; revision=338508
* Avoid resource deadlocks when one domain has exhausted its memory. AttemptMark Johnston2018-09-067-20/+65
| | | | | | | | | | | | | | | other allowed domains if the requested domain is below the minimum paging threshold. Block in fork only if all domains available to the forking thread are below the severe threshold rather than any. Submitted by: jeff Reported by: mjg Reviewed by: alc, kib, markj Approved by: re (rgrimes) Differential Revision: https://reviews.freebsd.org/D16191 Notes: svn path=/head/; revision=338507
* Re-enable kernel modules for the MALTA64EL kernel configuration.John Baldwin2018-09-062-2/+2
| | | | | | | | | | | | | Update the BOOTSTRAPPING check for libelf to require the fix for mips64el object files committed in r338478 and re-enable kernel modules in the MALTA64EL config file. Reviewed by: emaste Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D17054 Notes: svn path=/head/; revision=338506
* Clean up iflib sysctlsStephen Hurd2018-09-061-54/+42
| | | | | | | | | | | | | | | | | | | | | | | | Remove sysctls: txq_drain_encapfail - now a duplicate of encap_txd_encap_fail intr_link - was never incremented intr_msix - was never incremented rx_zero_len - was never incremented The following were not incremented in all code-paths that apply: m_pullups, mbuf_defrag, rxd_flush, tx_encap, rx_intr_enables, tx_frees, encap_txd_encap_fail. Fixes: Replace the broken collapse_pkthdr() implementation with an MPASS(). fl_refills and fl_refills_large were not incremented when using netmap. Reviewed by: gallatin Approved by: re (marius) Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D16733 Notes: svn path=/head/; revision=338505
* Add device_attach and device_detach events to man page.Ben Widawsky2018-09-061-1/+5
| | | | | | | | | Approved by: bcr, emaste (mentor), imp, jhb Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D17052 Notes: svn path=/head/; revision=338504
* Add MPLS LSP-echo (RFC8029, March 2017) port.David E. O'Brien2018-09-061-0/+2
| | | | | | | | | Reviewed by: stevek Approved by: re(gjb) Obtained from: Juniper Networks Notes: svn path=/head/; revision=338503
* Fix the GIC ACPI cross reference value.Andrew Turner2018-09-061-1/+2
| | | | | | | | | | | | To support INTRNG with ACPI we need to set a non-zero cross reference value for the interrupt controller. The GICv3 driver already had this value set, however it was missed in the GICv2 driver. Fix this by setting xref to the correct value. Approved by: re (gjb) Notes: svn path=/head/; revision=338502
* Remove the check that the Arm generic interrupt controller variant isAndrew Turner2018-09-061-2/+1
| | | | | | | | | | non-zero. This is the case on qemu, so remove it to allow us to boot there. This change is needed to boot on qemu with ACPI. Approved by: re (gjb) Notes: svn path=/head/; revision=338501
* powerpc64: Add initial support for HTM (kABI)Breno Leitao2018-09-062-0/+7
| | | | | | | | | | | | | This patch adds the very initial support for HTM that might come at FreeBSD version 12.1. This basic support defines a new kABI, so, we do not need to change it later during 12.1 time frame, when the full implementation will come. Reviewed by: jhibbits Approved by: re(marius), jhibbits (mentor) Differential Revision: https://reviews.freebsd.org/D16889 Notes: svn path=/head/; revision=338500
* Remove vm_page_remque().Mark Johnston2018-09-063-26/+11
| | | | | | | | | | | | | | | | Testing m->queue != PQ_NONE is not sufficient; see the commit log message for r338276. As of r332974 vm_page_dequeue() handles already-dequeued pages, so just replace vm_page_remque() calls with vm_page_dequeue() calls. Reviewed by: kib Tested by: pho Approved by: re (marius) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17025 Notes: svn path=/head/; revision=338499
* Make tcp_hpts.c compile a LINT kernel with options RSS and PCBGROUPS added byBjoern A. Zeeb2018-09-061-1/+3
| | | | | | | | | | | | adding the missing include files and changing a the type of cpuid which would otherwise cause a false comparison with NETISR_CPUID_NONE. Reviewed by: rrs Approved by: re (marius) Differential Revision: https://reviews.freebsd.org/D16891 Notes: svn path=/head/; revision=338498
* Move etc/crontab to usr.sbin/cron/cron/Brad Davis2018-09-063-1/+2
| | | | | | | | Approved by: re (gjb), will (mentor) Differential Revision: https://reviews.freebsd.org/D16786 Notes: svn path=/head/; revision=338497
* Define sctp probes only when SCTP is configured.Mark Johnston2018-09-061-0/+6
| | | | | | | | | | | | | Otherwise the "depends_on provider" guard in sctp.d does not work as intended. Reported by: mjg Reviewed by: tuexen Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D17057 Notes: svn path=/head/; revision=338496
* Add proper support for VIMAGE to krping.Hans Petter Selasky2018-09-061-1/+1
| | | | | | | | | | | Make sure we pass the correct VNET when allocating the RDMA ID. MFC after: 3 days Approved by: re (gjb) Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=338495
* Add missing copyin() to access LUN and port ioctl arguments.Alexander Motin2018-09-061-2/+20
| | | | | | | | | | | Somehow this was working even after PTI in, at least on amd64, and got broken by something only very recently. Reviewed by: araujo Approved by: re (gjb) Notes: svn path=/head/; revision=338494
* Make the MSIX module parameter limit per device, in mlx5en(4).Hans Petter Selasky2018-09-062-5/+13
| | | | | | | | | MFC after: 3 days Approved by: re (marius) Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=338493
* Add support for receive side scaling stride, RSSS, in mlx5en(4).Hans Petter Selasky2018-09-063-4/+28
| | | | | | | | | | | | | | | | | | | The receive side scaling stride parameter is a value which define the interval between active receive side queues. The traffic for the inactive queues is redirected to the nearest active queue by use of modulus. The default value of this parameter is one, which means all receive side queues are used. The point of this feature is to redirect more traffic to fewer receive side queues in order to take more advantage of sorted large receive offload, sorted LRO. The sorted LRO works better when more packets are accumulated per service interval. MFC after: 3 days Approved by: re (marius) Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=338492
* ibcore: Fix endless loop in searching for matching VLAN deviceSlava Shwartsman2018-09-061-2/+2
| | | | | | | | | | | | | | | | In r337943 ifnet's if_pcp was set to the PCP value in use instead of IFNET_PCP_NONE. Current ibcore code assumes that if_pcp is IFNET_PCP_NONE with VLAN interfaces so it can identify prio-tagged traffic. Fix that by explicitly verifying that that the if_type is IFT_ETHER and not IFT_L2VLAN. MFC after: 3 days Approved by: re (Marius), hselasky (mentor), kib (mentor) Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=338491
* Don't stall transmit queue on drops in mlx5en(4).Hans Petter Selasky2018-09-061-4/+2
| | | | | | | | | | | When a transmitted packet is dropped don't stall the transmit queue. MFC after: 3 days Approved by: re (marius) Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=338490
* Maximum number of mbuf frags is off-by-one for worst case scenario in mlx5en(4).Hans Petter Selasky2018-09-061-1/+2
| | | | | | | | | | | | | | | | | | | | Inspecting the PRM no more than 0x3F data segments, DS, of size 16 bytes is allowed. Worst case scenario summary of DS usage: Header is fixed: 2 DS Maximum inlining: 98 => (98 - 2) / 16 = 6 DS Remainder: 0x3F - 2 - 6 = 55 DS (mbuf frags) Previously a value of 56 DS was used and this would work in the normal case because not all inline data area was used up. MFC after: 3 days Approved by: re (marius) Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=338489
* Rename hardclock_cnt() to hardclock() and remove the old implementation.Mark Johnston2018-09-063-100/+9
| | | | | | | | | | | | | | | Also remove some related and unused subroutines. They have long been replaced by variants that handle multiple coalesced events with a single call. No functional change intended. Reviewed by: cem, kib Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D17029 Notes: svn path=/head/; revision=338487
* Rework rtld's TLS Variant I implementation to match r326794Brooks Davis2018-09-057-20/+73
| | | | | | | | | | | | | | | | | | | | | The above commit fixed handling overaligned TLS segments in libc's TLS Variant I implementation, but rtld provides its own implementation for dynamically-linked executables which lacks these fixes. Thus, port these changes to rtld. This was previously commited as r337978 and reverted in r338149 due to exposing a bug the ARM rtld. This bug was fixed in r338317 by mmel. Submitted by: James Clarke Approved by: re (kib) Reviewed by: kbowling Testing by: kbowling (powerpc64), br (riscv), kevans (armv7) Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D16510 Notes: svn path=/head/; revision=338486
* Add gelf_mips64el.c to the list of files to include in libelf.John Baldwin2018-09-051-0/+1
| | | | | | | | | | | Missed in r338478. Pointy hat to: jhb Approved by: re (rgrimes) MFC after: 1 month Notes: svn path=/head/; revision=338485
* Fix objcopy for little-endian MIPS64 objects.John Baldwin2018-09-057-9/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MIPS64 does not store the 'r_info' field of a relocation table entry as a 64-bit value consisting of a 32-bit symbol index in the high 32 bits and a 32-bit type in the low 32 bits as on other architectures. Instead, the 64-bit 'r_info' field is really a 32-bit symbol index followed by four individual byte type fields. For big-endian MIPS64, treating this as a 64-bit integer happens to be compatible with the layout expected by other architectures (symbol index in upper 32-bits of resulting "native" 64-bit integer). However, for little-endian MIPS64 the parsed 64-bit integer contains the symbol index in the low 32 bits and the 4 individual byte type fields in the upper 32-bits (but as if the upper 32-bits were byte-swapped). To cope, add two helper routines in gelf_getrel.c to translate between the correct native 'r_info' value and the value obtained after the normal byte-swap translation. Use these routines in gelf_getrel(), gelf_getrela(), gelf_update_rel(), and gelf_update_rela(). This fixes 'readelf -r' on little-endian MIPS64 objects which was previously decoding incorrect relocations as well as 'objcopy: invalid symbox index' warnings from objcopy when extracting debug symbols from kernel modules. Even with this fixed, objcopy was still crashing when trying to extract debug symbols from little-endian MIPS64 modules. The workaround in gelf_*rel*() depends on the current ELF object having a valid ELF header so that the 'e_machine' field can be compared against EM_MIPS. objcopy was parsing the relocation entries to possibly rewrite the 'r_info' fields in the update_relocs() function before writing the initial ELF header to the destination object file. Move the initial write of the ELF header earlier before copy_contents() so that update_relocs() uses the correct symbol index values. Note that this change should really go upstream. The binutils readelf source has a similar hack for MIPS64EL though I implemented this version from scratch using the MIPS64 ABI PDF as a reference. Discussed with: jkoshy Reviewed by: emaste, imp Approved by: re (gjb, kib) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D15734 Notes: svn path=/head/; revision=338478
* Be a little conservative about when to force size optimizations.Warner Losh2018-09-051-0/+2
| | | | | | | | | | | | Reports have come in that there's issue with powerpc and sparc64 since we've switched to using -Oz / -Os. We don't strictly need them for !x86, so be conservative about when we enable them. Approved by: re@ (gjb) Differential Revision: https://reviews.freebsd.org/D17016 Notes: svn path=/head/; revision=338474
* sh: Fix formal overflow in pointer arithmeticJilles Tjoelker2018-09-051-2/+2
| | | | | | | | | | | | The intention is to lower the value of the pointer, which according to ubsan cannot be done by adding an unsigned quantity. Reported by: kevans Approved by: re (kib) MFC after: 1 week Notes: svn path=/head/; revision=338473
* Correct the condition under which we allocate a terminator node.Mark Johnston2018-09-051-5/+9
| | | | | | | | | | | | | | | | | | | We will have last_block < blocks if the block count is divisible by BLIST_BMAP_RADIX, but a terminator node is still needed if the tree isn't balanced. In this case we were overruning the blist array by 16 bytes during initialization. While here, add a check for the invalid blocks == 0 case. PR: 231116 Reviewed by: alc, kib (previous version), Doug Moore <dougm@rice.edu> Approved by: re (gjb) MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17020 Notes: svn path=/head/; revision=338472
* Move gettytab to libexec/getty/Brad Davis2018-09-053-1/+1
| | | | | | | | Approved by: re (gjb), will (mentor) Differential Revision: https://reviews.freebsd.org/D16953 Notes: svn path=/head/; revision=338471
* Fix style bugs in in_pcblookup_lbgroup().Mark Johnston2018-09-051-28/+17
| | | | | | | | | | | | No functional change intended. Reviewed by: bz, Johannes Lundberg <johalun0@gmail.com> Approved by: re (rgrimes) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17030 Notes: svn path=/head/; revision=338470
* Fix "ipfw fwd" to work for incoming IPv4 packets when ip_tryforward() choosesEugene Grosbein2018-09-051-2/+24
| | | | | | | | | | | | | | fast forwarding path, as it already works for IPv6 and for both of them on old slow path. PR: 231143 Reviewed by: ae Approved by: re (gjb) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D17039 Notes: svn path=/head/; revision=338468
* Permit supervisor to access user VA space for certain functions only.Ruslan Bukin2018-09-056-18/+49
| | | | | | | | | | | | | | This is done by setting SUM (permit Supervisor User Memory access) bit in sstatus register. The functions we allow access for are routines in assembly that explicitly handle crossing the user kernel boundary. Approved by: re (kib) Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=338467
* Fix bug: compare uaddr to VM_MAXUSER_ADDRESS, not to a tmp valueRuslan Bukin2018-09-051-2/+2
| | | | | | | | | | left by SET_FAULT_HANDLER(). Approved by: re (kib) Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=338466
* Add kbowling to ports committer list and calendarKevin Bowling2018-09-052-0/+5
| | | | | | | | Approved by: re (rgrimes), timur (mentor), krion (mentor) Differential Revision: https://reviews.freebsd.org/D17021 Notes: svn path=/head/; revision=338465
* Assign to correct structure members.Konstantin Belousov2018-09-041-3/+3
| | | | | | | | | | Reported by: cem from Coverity Sponsored by: The FreeBSD Foundation MFC after: 6 days Approved by: re (gjb) Notes: svn path=/head/; revision=338461
* amd64: Properly re-merge r334537 into SMAP-ified copyin(9) and copyout(9).Konstantin Belousov2018-09-041-3/+5
| | | | | | | | | | | Also this fixes the eflags.ac leak from copyin_smap() when the copied data length is multiple of eight bytes. Sponsored by: The FreeBSD Foundation Approved by: re (gjb) Notes: svn path=/head/; revision=338460
* amd64: For non-PTI mode, do not initialize PCPU kcr3 to KPML4phys.Konstantin Belousov2018-09-041-3/+7
| | | | | | | | | | | | | | | | | | | | Non-PTI mode does not switch kcr3, which means that kcr3 is almost always stale. This is important for the NMI handler, which reloads %cr3 with PCPU(kcr3) if the value is different from PMAP_NO_CR3. The end result is that curpmap in NMI handler does not match the page table loaded into hardware. The manifestation was copyin(9) looping forever when a usermode access page fault cannot be resolved by vm_fault() updating a different page table. Reported by: mmacy Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 3 days Approved by: re (gjb) Notes: svn path=/head/; revision=338459
* wmt(4): Fix regression introduced in r337289Vladimir Kondratyev2018-09-041-1/+1
| | | | | | | | | | | | | | | | r337289 has a side effect of reducing usb frame 0 buffer size down to touch report size. That broke some devices e.g. "Raydium Touch System" which are capable of generating non-touch frames of bigger length. Fix it with enlarging frame 0 buffer up to internal wmt(4) buffer size. Reported by: Roberto Fernandez Cueto <roberfern@gmail.com> Tested by: Roberto Fernandez Cueto <roberfern@gmail.com> Approved by: re (gjb) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D16772 Notes: svn path=/head/; revision=338458
* regulator: Use bool values instead of 0/1Emmanuel Vadot2018-09-041-5/+6
| | | | | | | | | | | While here do not attempt to disable regulators if they are meant to be always on. Reviewed by: mmel Approved by: re (kib) Notes: svn path=/head/; revision=338457
* Move etc/ttys to sbin/init/.Brad Davis2018-09-0410-11/+12
| | | | | | | | | | And simplify this a little by flattening the directory structure. Approved by: re (gjb), will (mentor) Differential Revision: https://reviews.freebsd.org/D16955 Notes: svn path=/head/; revision=338454
* For full Linux-PAM compatibility, add a trailing NUL character whenDag-Erling Smørgrav2018-09-042-2/+4
| | | | | | | | | | | | passing the authentication token to the external program. Approved by: re (kib) Submitted by: Thomas Munro <munro@ip9.org> MFC after: 1 week Differential Revision: D16950 Notes: svn path=/head/; revision=338453
* Replicate r328271 from legacy IP to IPv6 using a single macroBjoern A. Zeeb2018-09-032-17/+6
| | | | | | | | | | | | to clear L2 and L3 route caches. Also mark one function argument as __unused. Reviewed by: karels, ae Approved by: re (rgrimes) Differential Revision: https://reviews.freebsd.org/D17007 Notes: svn path=/head/; revision=338450
* Replicate r307234 from legacy IP to IPv6 code, using the RO_RTFREE()Bjoern A. Zeeb2018-09-031-8/+2
| | | | | | | | | | | | macro rather than hand crafted code. No functional changes. Reviewed by: karels Approved by: re (rgrimes) Differential Revision: https://reviews.freebsd.org/D17006 Notes: svn path=/head/; revision=338449