summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MFC r285420:jamie2015-07-302-41/+101
| | | | | | | | | Run a shell in the jail when no command is specified. Add a new flag, -l, for a clean environment, same as jail(8) exec.clean. Change the GET_USER_INFO macro into a function. PR: 201300 Submitted by: Willem Jan Withagen
* MFC: r285843marius2015-07-302-9/+16
| | | | | | | | | | | | | | | | | | | - Since r253161, uart_intr() abuses FILTER_SCHEDULE_THREAD for signaling uart_bus_attach() during its test that 20 iterations weren't sufficient for clearing all pending interrupts, assuming this means that hardware is broken and doesn't deassert interrupts. However, under pressure, 20 iterations also can be insufficient for clearing all pending interrupts, leading to a panic as intr_event_handle() tries to schedule an interrupt handler not registered. Solve this by introducing a flag that is set in test mode and otherwise restores pre-r253161 behavior of uart_intr(). The approach of additionally registering uart_intr() as handler as suggested in PR 194979 is not taken as that in turn would abuse special pccard and pccbb handling code of intr_event_handle(). [1] - Const'ify uart_driver_name. - Fix some minor style bugs. PR: 194979 [1] Reviewed by: marcel (earlier version)
* MFC: r285839marius2015-07-305-80/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Revert the other functional half of r239864, i. e. the merge of r134227 from x86 to use smp_ipi_mtx spin lock not only for smp_rendezvous_cpus() but also for the MD cache invalidation, TLB demapping and remote register reading IPIs due to the following reasons: - The cross-IPI SMP deadlock x86 otherwise is subject to can't happen on sparc64. That's because on sparc64, spin locks don't disable interrupts completely but only raise the processor interrupt level to PIL_TICK. This means that IPIs still get delivered and direct dispatch IPIs such as the cache invalidation etc. IPIs in question are still executed. - In smp_rendezvous_cpus(), smp_ipi_mtx is held not only while sending an IPI_RENDEZVOUS, but until all CPUs have processed smp_rendezvous_action(). Consequently, smp_ipi_mtx may be locked for an extended amount of time as queued IPIs (as opposed to the direct ones) such as IPI_RENDEZVOUS are scheduled via a soft interrupt. Moreover, given that this soft interrupt is only delivered at PIL_RENDEZVOUS, processing of smp_rendezvous_action() on a target may be interrupted by f. e. a tick interrupt at PIL_TICK, in turn leading to the target in question trying to send an IPI by itself while IPI_RENDEZVOUS isn't fully handled, yet, and, thus, resulting in a deadlock. o As mentioned in the commit message of r245850, on least some sun4u platforms concurrent sending of IPIs by different CPUs is fatal. Therefore, hold the reintroduced MD ipi_mtx also while delivering cross-traps via MI helpers, i. e. ipi_{all_but_self,cpu,selected}(). o Akin to x86, let the last CPU to process cpu_mp_bootstrap() set smp_started instead of the BSP in cpu_mp_unleash(). This ensures that all APs actually are started, when smp_started is no longer 0. o In all MD and MI IPI helpers, check for smp_started == 1 rather than for smp_cpus > 1 or nothing at all. This avoids races during boot causing IPIs trying to be delivered to APs that in fact aren't up and running, yet. While at it, move setting of the cpu_ipi_{selected,single}() pointers to the appropriate delivery functions from mp_init() to cpu_mp_start() where it's better suited and allows to get rid of the global isjbus variable. o Given that now concurrent IPI delivery no longer is possible, also nuke the delays before completely disabling interrupts again in the CPU-specific cross-trap delivery functions, previously giving other CPUs a window for sending IPIs on their part. Actually, we now should be able to entirely get rid of completely disabling interrupts in these functions. Such a change needs more testing, though. o In {s,}tick_get_timecount_mp(), make the {s,}tick variable static. While not necessary for correctness, this avoids page faults when accessing the stack of a foreign CPU as {s,}tick now is locked into the TLBs as part of static kernel data. Hence, {s,}tick_get_timecount_mp() always execute as fast as possible, avoiding jitter. PR: 201245
* MFC: r284447, r284552marius2015-07-301-3/+40
| | | | | | | | | | | | | | | | | Merge from NetBSD: o rev. 1.10: Nuke trailing whitespace. o rev. 1.15: Fix typo in comment. o rev. 1.16: Add the following registers from IEEE 802.3-2009 Clause 22: - PSE control register (0x0b) - PSE status register (0x0c) - MMD access control register (0x0d) - MMD access address data register (0x0e) o rev. 1.17 (comments only): The bit location of link ability is different between 1000Base-X and others (see Annex 28B.2 and 28D). o rev. 1.18: Nuke dupe word. Obtained from: NetBSD Sponsored by: genua mbh
* MFC: r281752marius2015-07-301-1/+2
| | | | Make a comment reflect reality.
* Add updated llvm patch corresponding to r286033.dim2015-07-291-0/+217
|
* Reapply r286007, modified to compile with pre-C++11 compilers:dim2015-07-293-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull in r219009 from upstream llvm trunk (by Adam Nemet): [ISel] Keep matching state consistent when folding during X86 address match In the X86 backend, matching an address is initiated by the 'addr' complex pattern and its friends. During this process we may reassociate and-of-shift into shift-of-and (FoldMaskedShiftToScaledMask) to allow folding of the shift into the scale of the address. However as demonstrated by the testcase, this can trigger CSE of not only the shift and the AND which the code is prepared for but also the underlying load node. In the testcase this node is sitting in the RecordedNode and MatchScope data structures of the matcher and becomes a deleted node upon CSE. Returning from the complex pattern function, we try to access it again hitting an assert because the node is no longer a load even though this was checked before. Now obviously changing the DAG this late is bending the rules but I think it makes sense somewhat. Outside of addresses we prefer and-of-shift because it may lead to smaller immediates (FoldMaskAndShiftToScale is an even better example because it create a non-canonical node). We currently don't recognize addresses during DAGCombiner where arguably this canonicalization should be performed. On the other hand, having this in the matcher allows us to cover all the cases where an address can be used in an instruction. I've also talked a little bit to Dan Gohman on llvm-dev who added the RAUW for the new shift node in FoldMaskedShiftToScaledMask. This RAUW is responsible for initiating the recursive CSE on users (http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-September/076903.html) but it is not strictly necessary since the shift is hooked into the visited user. Of course it's safer to keep the DAG consistent at all times (e.g. for accurate number of uses, etc.). So rather than changing the fundamentals, I've decided to continue along the previous patches and detect the CSE. This patch installs a very targeted DAGUpdateListener for the duration of a complex-pattern match and updates the matching state accordingly. (Previous patches used HandleSDNode to detect the CSE but that's not practical here). The listener is only installed on X86. I tested that there is no measurable overhead due to this while running through the spec2k BC files with llc. The only thing we pay for is the creation of the listener. The callback never ever triggers in spec2k since this is a corner case. Fixes rdar://problem/18206171 This fixes a possible crash in x86 code generation when compiling recent llvm/clang trunk sources. Direct commit to stable/10, since head already has llvm/clang 3.6.1, which includes this fix. Reported by: jonathan, theraven Upstream PR: https://llvm.org/bugs/show_bug.cgi?id=24249
* MFC 285325eri2015-07-291-1/+2
| | | | | | Correct issue presented in r285051 by properly initializing variable. Differential Revision: https://reviews.freebsd.org/D3036
* MFC r285051eri2015-07-291-17/+18
| | | | | | Avoid doing multiple route lookups for the same destination IP during forwarding. Differential Revision: https://reviews.freebsd.org/D2964
* MFC: r285859brueffer2015-07-291-0/+2
| | | | Auto-generate hardware notes for pms(4).
* MFC: r285858, r286017brueffer2015-07-292-0/+127
| | | | Add a basic manpage for the pms driver.
* Revert r286007-r286009 for now, until I can figure out how to make thedim2015-07-294-271/+0
| | | | fix compile with older gcc and libstdc++.
* Add llvm patch corresponding to r286007.dim2015-07-291-0/+214
|
* Pull in r219009 from upstream llvm trunk (by Adam Nemet):dim2015-07-293-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ISel] Keep matching state consistent when folding during X86 address match In the X86 backend, matching an address is initiated by the 'addr' complex pattern and its friends. During this process we may reassociate and-of-shift into shift-of-and (FoldMaskedShiftToScaledMask) to allow folding of the shift into the scale of the address. However as demonstrated by the testcase, this can trigger CSE of not only the shift and the AND which the code is prepared for but also the underlying load node. In the testcase this node is sitting in the RecordedNode and MatchScope data structures of the matcher and becomes a deleted node upon CSE. Returning from the complex pattern function, we try to access it again hitting an assert because the node is no longer a load even though this was checked before. Now obviously changing the DAG this late is bending the rules but I think it makes sense somewhat. Outside of addresses we prefer and-of-shift because it may lead to smaller immediates (FoldMaskAndShiftToScale is an even better example because it create a non-canonical node). We currently don't recognize addresses during DAGCombiner where arguably this canonicalization should be performed. On the other hand, having this in the matcher allows us to cover all the cases where an address can be used in an instruction. I've also talked a little bit to Dan Gohman on llvm-dev who added the RAUW for the new shift node in FoldMaskedShiftToScaledMask. This RAUW is responsible for initiating the recursive CSE on users (http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-September/076903.html) but it is not strictly necessary since the shift is hooked into the visited user. Of course it's safer to keep the DAG consistent at all times (e.g. for accurate number of uses, etc.). So rather than changing the fundamentals, I've decided to continue along the previous patches and detect the CSE. This patch installs a very targeted DAGUpdateListener for the duration of a complex-pattern match and updates the matching state accordingly. (Previous patches used HandleSDNode to detect the CSE but that's not practical here). The listener is only installed on X86. I tested that there is no measurable overhead due to this while running through the spec2k BC files with llc. The only thing we pay for is the creation of the listener. The callback never ever triggers in spec2k since this is a corner case. Fixes rdar://problem/18206171 This fixes a possible crash in x86 code generation when compiling recent llvm/clang trunk sources. Direct commit to stable/10, since head already has llvm/clang 3.6.1, which includes this fix. Reported by: jonathan, theraven Upstream PR: https://llvm.org/bugs/show_bug.cgi?id=24249
* Merge r285944: fix typo: delete nsn if we were the last reference.glebius2015-07-291-1/+1
|
* Document SA-15:14 through SA-15:17.gjb2015-07-281-0/+22
| | | | Sponsored by: The FreeBSD Foundation
* Fix patch(1) shell injection vulnerability. [SA-15:14]delphij2015-07-287-101/+125
| | | | | | Fix resource exhaustion in TCP reassembly. [SA-15:15] Fix OpenSSH multiple vulnerabilities. [SA-15:16]
* MFC r285483: pipe_direct_write: Fix mismatched pipelock/unlockcem2015-07-281-2/+3
| | | | | | | | If a signal is caught in pipelock, causing it to fail, pipe_direct_write should not try to pipeunlock. Approved by: markj (mentor) Sponsored by: EMC / Isilon Storage Division
* MFC r284956:kib2015-07-281-1/+1
| | | | Do not calculate the stack's bottom address twice.
* MFC r285039:kib2015-07-281-3/+0
| | | | Remove asserts which might reference freed memory.
* MFC r285173:kib2015-07-281-1/+3
| | | | | Document the locking context for the directly dispatched callouts. Cross-reference timeout(9).
* MFC r285134 (by mjg):kib2015-07-281-28/+24
| | | | | | | fd: de-k&r-ify functions + some whitespace fixes MFC r285269: Handle copyout for the fcntl(F_OGETLK) using oflock structure.
* Fix the description for r274486.gjb2015-07-281-1/+1
| | | | | Submitted by: glebius Sponsored by: The FreeBSD Foundation
* MFC r285248: lldb: use .PATH to find man page instead of symlinking itemaste2015-07-281-2/+2
|
* MFC r285246: Avoid creating invalid UEFI device pathemaste2015-07-281-5/+18
| | | | | | | | | | | | | The UEFI loader on the 10.1 release install disk (disc1) modifies an existing EFI_DEVICE_PATH_PROTOCOL instance in an apparent attempt to truncate the device path. In doing so it creates an invalid device path. Perform the equivalent action without modification of structures allocated by firmware. PR: 197641 Submitted by: Chris Ruffin <chris.ruffin at intel.com>
* MFC r201289: mfiutil: increase buffer size to accommodate sprintf stringemaste2015-07-281-1/+1
| | | | PR: 201289
* Merge r283106:glebius2015-07-281-1/+1
| | | | | | During module unload unlock rules before destroying UMA zones, which may sleep in uma_drain(). It is safe to unlock here, since we are already dehooked from pfil(9) and all pf threads had quit.
* MFC r285340:dim2015-07-281-1/+1
| | | | | | | | | | Fix swapped copyin(9) arguments in cxgb's iwch_arm_cq() function. Detected by clang 3.7.0 with the warning: sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c:309:18: error: variable 'rptr' is uninitialized when used here [-Werror,-Wuninitialized] chp->cq.rptr = rptr; ^~~~
* Merge r283061, r283063: don't dereference NULL is pf_get_mtag() fails.glebius2015-07-281-14/+18
| | | | PR: 200222
* Merge 280169: always lock the hash row of a source node when updatingglebius2015-07-283-67/+59
| | | | | | its 'states' counter. PR: 182401
* Merge r271458:glebius2015-07-281-10/+7
| | | | | | - Provide a sleepable lock to protect against ioctl() vs ioctl() races. - Use the new lock to protect against simultaneous DIOCSTART and/or DIOCSTOP ioctls.
* MFC r285735:ae2015-07-281-7/+4
| | | | | | | | lseek() allows an offset to be set beyond the end of file. Using it to check that partition has enough space to write bootcode doesn't work. Use the known size of provider instead. PR: 201504
* make ctdladm(8) return 0 is everything was ok.bapt2015-07-281-0/+3
| | | | | | | | | | | | | retval is used to test the return of XML_Parse function which is ok if 1 is returned and retval it directly returned to the main function and used as an exit value. if all the parsing part is done reset retval to 0 so that the command return 0 if everything ok Differential Revision: https://reviews.freebsd.org/D3102 Reviewed by: trasz Sponsored by: gandi.net
* MFC r285785 Do not enable UDP checksum offloading when running on thewhu2015-07-281-2/+20
| | | | | | | | | | | Hyper-V on Windows Server 2012 and earlier hosts. Submitted by: whu Reviewed by: royger Approved by: royger Relnotes: No Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D3217
* MFC r285816:jimharris2015-07-271-10/+12
| | | | | | nvme: ensure csts.rdy bit is cleared before returning from nvme_ctrlr_disable Sponsored by: Intel
* MFC r285815:jimharris2015-07-271-6/+28
| | | | | | nvme: properly handle case where pci_alloc_msix does not alloc all vectors Sponsored by: Intel
* MFC r285796:jimharris2015-07-271-1/+2
| | | | | | nvmecontrol: read controller identify data before any log page operations Sponsored by: Intel
* MFC r285767:jimharris2015-07-271-0/+1
| | | | | | | | | | | | | | | | nvd: set d_delmaxsize to full capacity of NVMe namespace 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. Sponsored by: Intel
* MFC: r285066rmacklem2015-07-271-3/+20
| | | | | | | | | | | Alex Burlyga reported a POLA violation for the new NFS client as compared to the old NFS client via email to the freebsd-fs@ mailing list. For the new client, when multiple clients attempted to create a symbolic link concurrently, more that one client would report success instead of EEXIST. This was caused by code in the new client that mapped EEXIST to OK assuming it was caused by a retried RPC request. Since the old client did not do this, the patch defaults to the old behaviour and permits the new behaviour to be enabled via a sysctl.
* Further refine the PAE_TABLES entry, based on feedback fromgjb2015-07-261-7/+10
| | | | | | alc. Sponsored by: The FreeBSD Foundation
* Partially revert r284034. In particular, revert the final change in thisjhb2015-07-255-113/+96
| | | | | | | | MFC (281874). It broke suspend and resume on several Thinkpads (though not all) in 10 even though it works fine on the same laptops in HEAD. PR: 201239 Reported by: Kevin Oberman and several others
* MFC r285701:delphij2015-07-242-2/+7
| | | | | | | | | | | | | Use fixed date/time (the time choosen was the time the import was done on -HEAD) in libntp so we can make reproducible build. PR: bin/201661 Differential Revision: https://reviews.freebsd.org/D3122 While I'm there also remove libmd from linkage as reported in bin/201738 PR: bin/201738 Submitted by: John Marshall
* MFC r285719:pfg2015-07-241-1/+1
| | | | | | | | snmp_hostres(3): Fix buffer overflow. Actually just a typo. Detected by gcc + FORTIFY_SOURCE patches. CID: 1007594
* MFC r277485 by rrs: Fix minor errors found by coverity.emaste2015-07-241-1/+4
| | | | | PR: 201594 Sponsored by: The FreeBSD Foundation
* - Reset stable/10 back to -PRERELEASE status now that releng/10.2gjb2015-07-232-2/+2
| | | | | | | | has been branched. - Update __FreeBSD_version to reflect the new -STABLE branch. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
* MFC r285261, r285279:hrs2015-07-232-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | - Fix offset calculation in variable substitution in jail.conf. The following did not work correctly: A="A_${B}_C_${D}" B="BBBBB" D="DDDD_${E}_FFFFF" E="EEEEE" - Implement PF_IMMUTABLE flag and apply it to "name" and "jid" in jail.conf parameters. This flag disallows redefinition of the parameter. "name" and/or "jid" are automatically defined in jail.conf by using the jail names at the front of jail parameter definitions. However, one could override them by using a variable with the same name like $name = "foo". This confused the parser and could end up with SIGSEGV. Note that this change also affects a case when all of parameters are defined in the command line arguments, not in jail.conf. Specifically, "jail -c name=j1 name=j2" no longer works. This should be harmless. Approved by: re (gjb)
* MFC r284636:hrs2015-07-232-46/+64
| | | | | | | | | | - Add SOCK_SEQPACKET support in UNIX-domain socket. - Display zoneid using % notation in an IPv6 address. - Use nitems(). - Use sstos{in,in6,un} macros to simplify casts. - style(9). Approved by: re (gjb)
* MFC r282805:hrs2015-07-234-28/+5
| | | | | | | | | | - Remove ND6_IFF_IGNORELOOP. This functionality was useless in practice because a link where looped back NS messages are permanently observed does not work with either NDP or ARP for IPv4. - draft-ietf-6man-enhanced-dad is now RFC 7527. Approved by: re (gjb)
* MFC r279538:hrs2015-07-233-8/+71
| | | | | | | | | | | | | | | | | | Fix group membership of cloned interfaces when one is moved by if_vmove(). In if_vmove(), if_detach_internal() and if_attach_internal() were called in series to detach and reattach the interface. When detaching, if_delgroup() was called and the interface leaves all of the group membership. And then upon attachment, if_addgroup(ifp, IFG_ALL) was called and it joined only "all" group again. This had a problem. Normally, a cloned interface automatically joins a group whose name is ifc_name of the cloner in addition to "all" upon creation. However, if_vmove() removed the membership and did not restore upon attachment. Approved by: re (gjb)
* MFC r274841hrs2015-07-231-5/+0
| | | | | | | | Remove examples of gif_interfaces and gifconfig. These have already been marked as deprecated in rc.conf(5) manual page but these examples were still here. Approved by: re (gjb)
OpenPOWER on IntegriCloud