summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Introduce support for MSI-X interrupts in AHCIzbb2015-07-223-19/+140
| | | | | | | | | | - Allocate resources for MSI-X table and PBA if necessary - Add function ahci_free_mem() to free all resources Reviewed by: jhb, mav Obtained from: Semihalf Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3009
* Fix inverted logic bug that David Wolfskill found (thanks David!)rrs2015-07-221-1/+1
| | | | MFC after: 3 Weeks
* Remove duplicate and useless declarations.kib2015-07-222-2/+0
| | | | Submitted by: bde
* Add Makefiles for CloudABI kernel modules.ed2015-07-223-0/+24
| | | | | | | Place all of the machine/pointer size independent code in a kernel module called 'cloudabi'. All of the 64-bit specific code goes in a separate module called 'cloudabi64'. The latter is only enabled on amd64, as it is the only architecture supported.
* Do not enable UDP checksum offloading when running on the Hyper-V onwhu2015-07-221-2/+20
| | | | | | | | | | | | Windows Server 2012 and earlier hosts. Submitted by: whu Reviewed by: royger Approved by: royger MFC after: 3 days Relnotes: No Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D3086
* Cosmetic change. When printing the child's mapped pins, use the pluralloos2015-07-221-3/+8
| | | | | | | only when necessary. Reported by: Daniel O'Connor <darius@dons.net.au>, Sulev-Madis Silber (ketas)
* Various changes to the registers displayed in DDB for x86.jhb2015-07-225-97/+103
| | | | | | | | | | | | | | | | - Fix segment registers to only display the low 16 bits. - Remove unused handlers and entries for the debug registers. - Display xcr0 (if valid) in 'show sysregs'. - Add '0x' prefix to MSR values to match other values in 'show sysregs'. - MFamd64: Display various MSRs in 'show sysregs'. - Add a 'show dbregs' to display the value of debug registers. - Dynamically size the column width for register values to properly align columns on 64-bit platforms. - Display %gs for i386 in 'show registers'. Differential Revision: https://reviews.freebsd.org/D2784 Reviewed by: kib, markj MFC after: 2 weeks
* Fix counter reads on platforms where sizeof(uint64_t) != sizeof(uint64_t *).markj2015-07-211-6/+18
| | | | | | | | | | | | In the kernel, structs such as tcpstat are manipulated as an array of counter_u64_t (uint64_t *), but made visible to userland as an array of uint64_t. kread_counters() was previously copying the counter array into user space and sequentially overwriting each counter with its value. This mostly affects IPsec counters, as other counters are exported via sysctl. PR: 201700 Tested by: Jason Unovitch MFC after: 1 week
* Remove checks for a NULL return value from M_WAITOK allocations.markj2015-07-211-10/+4
|
* Fix resource exhaustion due to sessions stuck in LAST_ACK state.delphij2015-07-211-2/+9
| | | | | | | Submitted by: Jonathan Looney (Juniper SIRT) Reviewed by: lstewart Security: CVE-2015-5358 Security: SA-15:13.tcp
* Let the unwinder handle faults during function prologues or epilogues.markj2015-07-212-46/+13
| | | | | | | | | | | | | | | | | | The i386 and amd64 DDB stack unwinders contain code to detect and handle the case where the first frame is not completely set up or torn down. This code was accidentally unused however, since db_backtrace() was never called with a non-NULL trap frame. This change fixes that. Also remove get_rsp() from the amd64 code. It appears to have come from i386, which needs to take into account whether the exception triggered a CPL switch, since SS:ESP is only pushed onto the stack if so. On amd64, SS:RSP is pushed regardless, so get_rsp() was doing the wrong thing for kernel-mode exceptions. As a result, we can also remove custom print functions for these registers. Reviewed by: jhb Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D2881
* Improve stack unwinding on i386 and amd64 after an IP fault.markj2015-07-212-12/+37
| | | | | | | | | | | | | If we can't find a symbol corresponding to the faulting instruction, assume that the previously-executed function is a call and attempt to find the calling function using the return address on the stack. Otherwise we end up associating the last stack frame with the current call, which is incorrect and causes the unwinder to skip printing of the calling function, resulting in a confusing backtrace. Reviewed by: jhb Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D2859
* Don't return undefined symbols to a DDB symbol lookup.markj2015-07-212-3/+7
| | | | | | | | | | | | | | | | Undefined symbols have a value of zero, so it makes no sense to return such a symbol when performing a lookup by value. This occurs for example when unwinding the stack after calling a NULL function pointer, and we confusingly report the faulting function as uart_sab82532_class() on amd64. Convert db_print_loc_and_inst() to only attempt disassembly if we managed to find a symbol corresponding to the IP. Otherwise we may fault and re-enter the debugger. Reviewed by: jhb Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D2858
* Remove some dead code from DDB's amd64 stack unwinder.markj2015-07-211-74/+8
| | | | | | | | | | | | The amd64 port copied some code from i386 to fetch function arguments and display them in backtraces. However, it was commented out and can't easily be implemented since the function arguments are passed in registers rather than on the stack in amd64. Remove it in preparation for some bug fixes in this area. Reviewed by: jhb Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D2857
* patch(1): Add -Vnone option to disable backup filescem2015-07-213-9/+14
| | | | | | | | | Differential Revision: https://reviews.freebsd.org/D3146 Reviewed by: pfg Approved by: markj (mentor) MFC after: 1 week Relnotes: yes Sponsored by: EMC / Isilon Storage Division
* The smp_rendezvous_cpus() function should ensure that all accesseskib2015-07-211-1/+11
| | | | | | | | | | done by the functions called on other CPUs, are visible to the caller. Pair otherwise useless acquire on smp_rv_waiters[3] with a release add to ensure synchronized with relation, which guarantees visibility. Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 3 weeks
* IPSEC, remove variable argument function its already due.eri2015-07-213-24/+10
| | | | | | Differential Revision: https://reviews.freebsd.org/D3080 Reviewed by: gnn, ae Approved by: gnn(mentor)
* Fix for a customer issue with ixl(4):erj2015-07-211-1/+4
| | | | | | | | | | | | | | - Add required MAC/VLAN filter when adding an LAA - Fix bug where code did not check for I40E_SUCCESS from a successful i40e_validate_mac_address() call in ixl_init_locked(), when setting an LAA. PR: 201240 Differential Revision: https://reviews.freebsd.org/D3111 Submitted by: Gregory Rose <gregory.v.rose@intel.com> Reviewed by: gnn, rstone Approved by: gnn MFC after: 2 weeks
* nvd: set d_delmaxsize to full capacity of NVMe namespacejimharris2015-07-211-0/+1
| | | | | | | | | | | | | | | | The NVMe specification has no ability to specify a maximum delete size that is less than the full capacity of the namespace - so just using the namespace size is the correct value here. This fixes reported issues where ZFS trim on init looked like it was hanging the system - previously the default I/O max size (128KB on Intel NVMe controllers) was used for delete operations which worked out to only about 8MB/s. With this patch I can add an 800GB DC P3700 drive to a ZFS pool in about 15-20 seconds. Reported by: Dylan Just <dylan@techtangents.com> MFC after: 3 days Sponsored by: Intel
* vt: Draw logos per CPU corecem2015-07-215-18/+747
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This feature is inspired by another Unix-alike OS commonly found on airplane headrests. A number of beasties[0] are drawn at top of framebuffer during boot, based on the number of active SMP CPUs[1]. Console buffer output continues to scroll in the screen area below beastie(s)[2]. After some time[3] has passed, the beasties are erased leaving the entire terminal for use. Includes two 80x80 vga16 beastie graphics and an 80x80 vga16 orb graphic. (The graphics are RLE compressed to save some space -- 3x 3200 bytes uncompressed, or 4208 compressed.) [0]: The user may select the style of beastie with kern.vt.splash_cpu_style=(0|1|2) [1]: Or the number may be overridden with tunable kern.vt.splash_ncpu. [2]: https://www.youtube.com/watch?v=UP2jizfr3_o [3]: Configurable with kern.vt.splash_cpu_duration (seconds, def. 10). Differential Revision: https://reviews.freebsd.org/D2181 Reviewed by: dumbbell, emaste Approved by: markj (mentor) MFC after: 2 weeks
* vt: De-static VT_SYSCTL_INT-defined objectscem2015-07-212-11/+11
| | | | | | | | | Explicitly mark existing VT_SYSCTL_INTs static. This is in preparation for D2181. Reviewed by: dumbbell, emaste Approved by: markj (mentor) MFC after: 1 week
* Teach the GICv2 driver about the Qualcomm GICv2 compatible string.andrew2015-07-211-0/+1
| | | | | Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation
* Add some more explanation to r285752zbb2015-07-211-6/+10
| | | | | | | | Add brief commentary to vendor-specific devid function in ITS and remove redundant spaces by the way. Obtained from: Semihalf Sponsored by: The FreeBSD Foundation
* Don't allow malloc() to wait for resource while holding a lock in ITSzbb2015-07-211-2/+30
| | | | | | | | | | | | | | | malloc() should not go to sleep in case of lack of resource while the kernel thread is holding a non-sleepable lock. - change malloc() flags to M_NOWAIT in such cases implement lpi_free_chunk() routine as it will be needed when ITT allocation fails in its_device_alloc_locked() - do not increase verbosity of this code since upper layers will communicate an error if the interrupt setup fails Obtained from: Semihalf Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3121
* Make clock_gettime() and clock_getres() work for CloudABI programs.ed2015-07-212-4/+87
| | | | | | | | | | | | | | | | | | | Though the standard C library uses a 'struct timespec' using a 64-bit 'time_t', there is no need to use such a type at the system call level. CloudABI uses a simple 64-bit unsigned timestamp in nanoseconds. This is sufficient to express any time value from 1970 to 2554. The CloudABI low-level interface also supports fetching timestamp values with a lower precision. Instead of overloading the clock ID argument for this purpose, the system call provides a precision argument that may be used to specify the maximum slack. The current system call implementation does not use this information, but it's good to already have this available. Expose cloudabi_convert_timespec(), as we're going to need this for fstat() as well. Obtained from: https://github.com/NuxiNL/freebsd
* Add support for vendor specific function for PCI devid acquisition in ITSzbb2015-07-213-8/+103
| | | | | | | | | | It is possible that some HW will use different PCI devids, hence allow to replace the default domain:bus:slot:func schema by implementing and registering custom function. Obtained from: Semihalf Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3118
* The part of r285680 which removed release semantic for two stores tokib2015-07-211-2/+14
| | | | | | | | | it_need was wrong [*]. Restore the releases and add a comment explaining why it is needed. Noted by: alc [*] Reviewed by: bde [*] Sponsored by: The FreeBSD Foundation
* Describe COMPAT_CLOUDABI64 in the amd64 configuration NOTES file.ed2015-07-211-0/+3
|
* Implement get_cyclecount() on ARM64zbb2015-07-211-2/+5
| | | | | | | | | Use Vritual Counter register associated with Generic Timer to read the cyclecount. Obtained from: Semihalf Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3134
* Make thread creation work for CloudABI processes.ed2015-07-213-2/+94
| | | | | | | | | | | | | | | | | | | | | Summary: Remove the stub system call that was put in place during the system call import and replace it by a target-dependent version stored in sys/amd64. Initialize the thread in a way similar to cpu_set_upcall_kse(). We provide the entry point with two arguments: the thread ID and the argument pointer. Test Plan: Thread creation still seems to work, both for FreeBSD and CloudABI binaries. Reviewers: dchagin, mjg, kib Reviewed By: kib Subscribers: imp Differential Revision: https://reviews.freebsd.org/D3110
* Improve ARM64 CPU_MATCHzbb2015-07-211-4/+11
| | | | | | | | Add a method to identify CPU based on RAW MIDR value. Obtained from: Semihalf Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3117
* Unbreak "last reboot".ed2015-07-211-0/+8
| | | | | | | | | | | | | According to the last(1) man page, the "reboot" pseudo-user should print all system reboot entries. This got broken by the utmpx import, as records are typed. Re-add support for "last reboot" by specifically matching against SHUTDOWN_TIME and BOOT_TIME records. PR: 168844 Submitted by: matthew@ MFC after: 1 month
* Fix sb_state constant names as used e.g. to display in DDB ``show sockbuf''.pluknet2015-07-211-3/+3
| | | | MFC after: 1 week
* When a tunneling protocol is being used with UDP we must release therrs2015-07-212-20/+42
| | | | | | | | | | | lock on the INP before calling the tunnel protocol, else a LOR may occur (it does with SCTP for sure). Instead we must acquire a ref count and release the lock, taking care to allow for the case where the UDP socket has gone away and *not* unlocking since the refcnt decrement on the inp will do the unlock in that case. Reviewed by: tuexen MFC after: 3 weeks
* Add missing priority argument in example code in BUGS section.pluknet2015-07-211-2/+2
| | | | | | PR: 201725 Submitted by: Thomas Cort MFC after: 1 week
* Remove a couple of TUNABLE_INT() calls which are unnecessary after r267961.hiren2015-07-211-2/+0
| | | | | | | r267961 did remove them but they "reappeared" when ixgbe(4) rewrite happened in r280182. Sponsored by: Limelight Networks
* lseek() allows an offset to be set beyond the end of file. Usingae2015-07-211-7/+4
| | | | | | | | it to check that partition has enough space to write bootcode doesn't work. Use the known size of provider instead. PR: 201504 MFC after: 1 week
* Fix some issues with the application of libxo to ls(1)allanjude2015-07-213-11/+45
| | | | | | | | | | * Add whitespace trimming to some fields (username, group, size, inode, blocks) to avoid whitespace in JSON strings * fix -m mode, was invalid JSON (repeated keys), and was missing outer array container * in -n mode, numeric uids and gids were returned as strings Approved by: eadler (mentor) Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D2854
* Fix an out-of-order execution issue regarding pkg(8):gjb2015-07-211-1/+1
| | | | | | | | | | | | | - pkg(8) cannot be removed before subsequent reinvocations - The PKG_CACHEDIR cannot be cleaned after the repo*.sqlite has been removed - pkg(8) cannot be removed as a precursor to any of the other steps involved here MFC after: 3 days X-MFC-With: r285722 X-MFC-Before: 10.2-{BETA3,RC1} (whichever happens next) Sponsored by: The FreeBSD Foundation
* Add the Dell E7240 laptop and Intel DP965LT motherboard to the list for the ↵allanjude2015-07-211-2/+28
| | | | | | | | | | | | GPT active workaround PR: 194359 Requested by: sbruno, hiren Approved by: marcel MFC after: 3 days Relnotes: yes Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D3139
* Only report the lack of ALTQ support if pfctl is using verbose (-v) mode.gnn2015-07-201-1/+1
| | | | | | PR: 194935 Submitted by: Jim Thompson MFC after: 2 weeks
* Typo in comment.kib2015-07-201-1/+1
|
* Increase output amp on ASUS UX31A by +5dB.mav2015-07-201-4/+22
| | | | While there, implement couple helper functions.
* Add support for building VirtualBox Vagrant images.brd2015-07-207-66/+362
| | | | | | Abstract the build, package and upload to handle building either type. Approved by: re (gjb)
* libusb: Fix minor cast-qual warning.pfg2015-07-201-5/+3
| | | | | | | | | | Fix a warning triggered by the gcc + FORTIFY_SOURCE patches: In function 'libusb20_parse_config_desc': lib/libusb/libusb20_desc.c:141: warning: passing argument 1 of 'memcpy' discards qualifiers from pointer target type Submitted by: hselansky
* snmp_hostres(3): Fix buffer overflow.pfg2015-07-201-1/+1
| | | | | | | Actually just a typo. Detected by gcc + FORTIFY_SOURCE patches. CID: 1007594 MFC after: 3 days
* Make forking of CloudABI processes work.ed2015-07-202-2/+21
| | | | | | | | | | | | Just like FreeBSD+Capsicum, CloudABI uses process descriptors. Return the file descriptor number to the parent process. To the child process we both return a special value for the file descriptor number (CLOUDABI_PROCESS_CHILD). We also return the thread ID of the new thread in the copied process, so the threading library can reinitialize itself. Obtained from: https://github.com/NuxiNL/freebsd
* Add an API for easily creating userspace threads in kernelspace.ed2015-07-203-65/+66
| | | | | | | | | | | | | | | | | | This change refactors the existing create_thread() function to be more generic. It replaces almost all of its arguments by a callback that can be used to extract the thread ID and copy it out to the right place, but also to perform additional initialization steps, such as setting the trapframe. This also makes the difference between thr_new() and thr_create() more clear in my opinion. This function is going to be used by the CloudABI compatibility layer. It looks like the OpenSolaris compatibility framework already provides a function called thread_create(). Rename this function to do_thread_create() and use a macro to deal with the namespacing conflict. A similar approach is already used for thread_exit(). MFC after: 1 month
* Fix typo in comment.mav2015-07-201-1/+1
| | | | Submitted by: Masao Uebayashi
* Prevent null-pointer dereferencing.zec2015-07-201-3/+4
| | | | MFC after: 3 days
OpenPOWER on IntegriCloud