aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix fsck_ffs build with a 64-bit ino_t.Matthew D Fleming2012-09-278-85/+103
| | | | | | | Original code by: Gleb Kurtsou Notes: svn path=/head/; revision=241012
* Fix up kernel sources to be ready for a 64-bit ino_t.Matthew D Fleming2012-09-2715-121/+140
| | | | | | | Original code by: Gleb Kurtsou Notes: svn path=/head/; revision=241011
* libc/fts: Use O_CLOEXEC for internal file descriptors.Jilles Tjoelker2012-09-272-10/+14
| | | | | | | | | | | | Because fts keeps internal file descriptors open across calls, making such descriptors close-on-exec helps not only multi-threaded applications but also single-threaded applications. In particular, this prevents passing a temporary file descriptor for saving the current directory to processes created via find -exec. Notes: svn path=/head/; revision=241010
* Ensure that all cases that enqueue a netgraph item for delivery by aRyan Stone2012-09-271-1/+1
| | | | | | | | | | | | | | | | ngthread properly set the item's depth to 1. In particular, prior to this change if ng_snd_item failed to acquire a lock on a node, the item's depth would not be set at all. This fix ensures that the error code from rcvmsg/ rcvdata is properly passed back to the apply callback. For example, this fixes a bug where an error from rcvmsg/rcvdata would not previously propagate back to a libnetgraph consumer when the message was queued. Reviewed by: mav MFC after: 1 month Sponsored by: Sandvine Incorporated Notes: svn path=/head/; revision=241009
* Complete revert of r239963:Pedro F. Giffuni2012-09-272-7/+8
| | | | | | | | | | | | | | | | | | The attempt to merge changes from the linux libtirpc caused rpc.lockd to exit after startup under unclear conditions. After many hours of selective experiments and inconsistent results the conclusion is that it's better to just revert everything and restart in a future time with a much smaller subset of the changes. ____ MFC after: 3 days Reported by: David Wolfskill Tested by: David Wolfskill Notes: svn path=/head/; revision=241008
* Complete revert of r239963:Pedro F. Giffuni2012-09-2710-52/+24
| | | | | | | | | | | | | | | | | | The attempt to merge changes from the linux libtirpc caused rpc.lockd to exit after startup under unclear conditions. After many hours of selective experiments and inconsistent results the conclusion is that it's better to just revert everything and restart in a future time with a much smaller subset of the changes. ____ MFC after: 3 days Reported by: David Wolfskill Tested by: David Wolfskill Notes: svn path=/head/; revision=241007
* Fix pseudo checksum calculation.Max Khon2012-09-271-1/+3
| | | | | | | | | | | | This fixes ipfilter w/ network controllers that implement only partial rx csum offloading. PR: 106438 Obtained from: upstream MFC after: 1 week Notes: svn path=/head/; revision=241002
* sigaction(2),sigwait(2),sigwaitinfo(2): Remove [EFAULT] error condition.Jilles Tjoelker2012-09-273-16/+3
| | | | | | | | | | | | | | | | | Passing an invalid pointer results in undefined behaviour. The wrappers in libthr access some of the data pointed to by the arguments in userland, so that an invalid pointer will cause a signal and not an [EFAULT] error return. Furthermore, if the [EFAULT] error occurs when the kernel is writing, it is not a proper error in the sense that the call still commits (changing the signal disposition or accepting the signal). MFC after: 1 week Notes: svn path=/head/; revision=241001
* Revert r240931, as the previous comment was actually in sync with POSIX.Pawel Jakub Dawidek2012-09-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have to note that POSIX is simply stupid in how it describes O_EXEC/fexecve and friends. Yes, not only inconsistent, but stupid. In the open(2) description, O_RDONLY flag is described as: O_RDONLY Open for reading only. Taken from: http://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html Note "for reading only". Not "for reading or executing"! In the fexecve(2) description you can find: The fexecve() function shall fail if: [EBADF] The fd argument is not a valid file descriptor open for executing. Taken from: http://pubs.opengroup.org/onlinepubs/9699919799/functions/exec.html As you can see the function shall fail if the file was not open with O_EXEC! And yet, if you look closer you can find this mess in the exec.html: Since execute permission is checked by fexecve(), the file description fd need not have been opened with the O_EXEC flag. Yes, O_EXEC flag doesn't have to be specified after all. You can open a file with O_RDONLY and you still be able to fexecve(2) it. Notes: svn path=/head/; revision=241000
* Make sure the "wMaxPacketSize" limitations are respected.Hans Petter Selasky2012-09-271-3/+28
| | | | Notes: svn path=/head/; revision=240999
* Make sure we record NAK tokens in the TD structure for IN direction.Hans Petter Selasky2012-09-273-63/+43
| | | | | | | | Improve host channel disabling. Wait two times 125us for channel to be disabled. The DWC OTG doesn't like when channels are re-used too early. Notes: svn path=/head/; revision=240998
* Kernel and modules have "set_vnet" linker set, where virtualizedMikolaj Golub2012-09-271-1/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | global variables are placed. When a module is loaded by link_elf linker its variables from "set_vnet" linker set are copied to the kernel "set_vnet" ("modspace") and all references to these variables inside the module are relocated accordingly. The issue is when a module is loaded that has references to global variables from another, previously loaded module: these references are not relocated so an invalid address is used when the module tries to access the variable. The example is V_layer3_chain, defined in ipfw module and accessed from ipfw_nat. The same issue is with DPCPU variables, which use "set_pcpu" linker set. Fix this making the link_elf linker on a module load recognize "external" DPCPU/VNET variables defined in the previously loaded modules and relocate them accordingly. For this set_pcpu_list and set_vnet_list are used, where the addresses of modules' "set_pcpu" and "set_vnet" linker sets are stored. Note, archs that use link_elf_obj (amd64) were not affected by this issue. Reviewed by: jhb, julian, zec (initial version) MFC after: 1 month Notes: svn path=/head/; revision=240997
* Remove useless NULL checks after M_WAITOK allocations.Edward Tomasz Napierala2012-09-274-147/+2
| | | | Notes: svn path=/head/; revision=240993
* Fix zillions of style(9) and spacing bugs introduced by r240981.Gleb Smirnoff2012-09-271-140/+142
| | | | | | | Pointy hat to: sobomax Notes: svn path=/head/; revision=240992
* Fix several build failures for !COMPAT_FREEBSD32 andGleb Smirnoff2012-09-271-31/+44
| | | | | | | | | !COMPAT_FREEBSD* kernels introduced by r240981. Pointy hat to: sobomax Notes: svn path=/head/; revision=240990
* Fix bug in TCP_KEEPCNT setting, which slipped in in the last roundGleb Smirnoff2012-09-271-8/+14
| | | | | | | | | | | | | of reviewing of r231025. Unlike other options from this family TCP_KEEPCNT doesn't specify time interval, but a count, thus parameter supplied doesn't need to be multiplied by hz. Reported & tested by: amdmi3 Notes: svn path=/head/; revision=240985
* Track the last ANI TX/RX sample correctly.Adrian Chadd2012-09-271-2/+2
| | | | | | | | | | | | This doesn't specifically fix the issue(s) i'm seeing in this 2GHz environment (where setting/increasing spur immunity causes OFDM restart errors to skyrocket through the roof; but leaving it at 0 would leave the environment cleaner..) Pointy-hat-to: me, for committing this broken code in the first place. Notes: svn path=/head/; revision=240984
* Implementing pmap_kextract(va) as pmap_extract(kernel_pmap, va) isAlan Cox2012-09-273-51/+69
| | | | | | | | | | | | | | | | | problematic because some callers to pmap_kextract() expect its implementation to be lock-less. In particular, uma_dbg_alloc() implicitly requires this. Otherwise, lock-order reversals occur between pmap locks and UMA zone locks. So, this change introduces a lock-less implementation of pmap_kextract(). Disable recursion on the pvh global lock in the new armv6 pmap. While recursion on this locks occurs in the old arm pmap, it thankfully doesn't occur in the armv6 pmap. Tested by: jmg Notes: svn path=/head/; revision=240983
* Initialize the num variable to avoid uninitialized data.Kevin Lo2012-09-271-2/+2
| | | | | | | | | This fixes the bug introduced by r238378. Reviewed by: pfg Notes: svn path=/head/; revision=240982
* Add 32-bit ABI compat shims. Those are necessary for i386 binary-onlyMaxim Sobolev2012-09-271-6/+201
| | | | | | | | | | | | tools like sysutils/hpacucli (HP P4xx RAID controller management suite) working on amd64 systems. PR: 139271 Submitted by: Kazumi MORINAGA, Eugene Grosbein MFC after: 1 week Notes: svn path=/head/; revision=240981
* atrun: Do not assume that MAXLOGNAME <= 100.Jilles Tjoelker2012-09-261-1/+1
| | | | | | | | | | | | The reserved space for fmt was exactly sufficient for a two-digit value of MAXLOGNAME - 1. PR: bin/171815 Submitted by: Jeremy Huddleston Sequoia MFC after: 1 week Notes: svn path=/head/; revision=240974
* find: Do not pass fd to save current directory to child processes.Jilles Tjoelker2012-09-261-1/+1
| | | | | | | | | | This removes one of the two wrongly passed file descriptors. The other one appears to be from fts(3). MFC after: 1 week Notes: svn path=/head/; revision=240973
* - In the bridge_enqueue() do success/error accounting forGleb Smirnoff2012-09-261-5/+4
| | | | | | | | each fragment, not only once. - In the GRAB_OUR_PACKETS() macro do increase if_ibytes. Notes: svn path=/head/; revision=240971
* - Make C11 atomic macros usable in expressions:Tijl Coosemans2012-09-261-25/+33
| | | | | | | | | | | | | | | | | | | | | - Replace do-while statements with void expressions. - Wrap __asm statements in statement expressions. - Make the macros function-like: - Evaluate all arguments exactly once. - Make sure there's a sequence point between evaluation of the arguments and the function body. Arguments should be evaluated before any memory barriers. - Fix use of __atomic_is_lock_free built-in. It requires the address of an atomic variable as second argument. Use this built-in on clang as well because clang's __c11_atomic_is_lock_free only takes the size of the variable into account. - In atomic_exchange_explicit put the barrier before instead of after the __sync_lock_test_and_set call. Reviewed by: theraven Notes: svn path=/head/; revision=240970
* Make sure the DWC OTG host mode channels are given enough time to disable.Hans Petter Selasky2012-09-262-1/+18
| | | | Notes: svn path=/head/; revision=240969
* Merge similar fixes from 223198 from igb to ixgbe:John Baldwin2012-09-263-9/+44
| | | | | | | | | | | | | | | | | - Use a dedicated task to handle deferred transmits from the if_transmit method instead of reusing the existing per-queue interrupt task. Reusing the per-queue interrupt task could result in both an interrupt thread and the taskqueue thread trying to handle received packets on a single queue resulting in out-of-order packet processing and lock contention. - Don't define ixgbe_start() at all where if_transmit is used. Tested by: Vijay Singh Reviewed by: jfv MFC after: 2 weeks Notes: svn path=/head/; revision=240968
* - Allow cross-architecture builds with 'generate-release.sh', whichGlen Barber2012-09-261-8/+109
| | | | | | | | | | | | | | | | | | | | | is set by specifying '-a <arch>'. (Only supported for i386 on amd64 and powerpc on powerpc64 currently). - Change how textproc/docproj is installed: o Attempt to install from pkg(8); o Fall back to pkg_add(1) if pkg(8) installation is not successful; o Fall back to installing from ports as last resort. - Ensure the script is run by root[1]. - Get OSVERSION from param.h[1]. Provided by: glebius [1] Reviewed by: nwhitehorn, kensmith Approved by: kensmith MFC After: 2 weeks X-Needs-MFC: r240586, r240587, r240588 Notes: svn path=/head/; revision=240967
* Add a COMPILER_FEATURES variable that is set in bsd.compiler.mk.Brooks Davis2012-09-262-1/+33
| | | | | | | | | | | | When the compiler is clang add c++11 to COMPILER_FEATURES. When the compiler supports c++11, default to building libc++. This will not impact the compliation of programs, but will make it easier for users with clang compiled systems to test libc++ by passing -stdlib=libc++ to their c++ compliations. Notes: svn path=/head/; revision=240966
* Create led(4) device nodes mapped to isci(4) SGPIO locate LEDs.Jim Harris2012-09-263-1/+37
| | | | | | | | | | | Device nodes are in the format /dev/led/isci.busX.portY.locate. Sponsored by: Intel Requested by: Paul Maulberger <paul dot maulberger at gmx dot de> MFC after: 1 week Notes: svn path=/head/; revision=240965
* Remove FreeBSD 4.x compat shims. Verified by md5.John Baldwin2012-09-265-117/+40
| | | | Notes: svn path=/head/; revision=240963
* Grab the mfi_config_lock while performing a MFI_DCMD_CFG_FOREIGN_IMPORTJohn Baldwin2012-09-261-0/+1
| | | | | | | | | | request on behalf of a user utility. Submitted by: Steven Hartland killing multiplay co uk MFC after: 1 week Notes: svn path=/head/; revision=240962
* Create the new initarm_ functions to reduce the diff to the other FDTAndrew Turner2012-09-261-11/+25
| | | | | | | versions of initarm Notes: svn path=/head/; revision=240956
* Merge recent vendor changes in ZFS.Martin Matuska2012-09-266-25/+61
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Illumos issued covered: 2811 missing implementation: zfs send -r 3139 zdb dies when it tries to determine path of unlinked file 3189 kernel panic in ZFS test suite during hotspare_onoffline_004_neg 3208 moving zpool cross-endian results in incorrect user/group accounting References: https://www.illumos.org/issues/ + [issue_id] Obtained from: illumos (vendor/illumos, vendor/illumos-sys) MFC after: 2 weeks Notes: svn path=/head/; revision=240955
| * Update vendor/illumos/dist and vendor-sys/illumos/distMartin Matuska2012-09-266-32/+63
| | | | | | | | | | | | | | | | to illumos-gate 13836:37bf491c434c (illumos ZFS issues #2678, #2811, #3139, #3189, #3208) Notes: svn path=/vendor-sys/illumos/dist/; revision=240949
* | Teach getent(1) to look up a hostname and find IPv6 addresses.Kevin Lo2012-09-261-12/+22
| | | | | | | | | | | | | | | | PR: bin/161548 Submitted by: matthew Notes: svn path=/head/; revision=240954
* | Use arm_dump_avail_init to build the dump_avail arrayAndrew Turner2012-09-261-6/+1
| | | | | | | | Notes: svn path=/head/; revision=240953
* | Start to clean up the lpc initarm as it also uses FDT.Andrew Turner2012-09-261-12/+18
| | | | | | | | Notes: svn path=/head/; revision=240952
* | Make the updates of the tid ring buffer' head and tail pointersKonstantin Belousov2012-09-261-6/+6
| | | | | | | | | | | | | | | | | | | | | | explicit by moving them into separate statements from the buffer element accesses. Requested by: jhb MFC after: 3 days Notes: svn path=/head/; revision=240951
* | Fix panic in CTL caused by trying to free invalid pointers passedEdward Tomasz Napierala2012-09-261-0/+5
| | | | | | | | | | | | | | | | | | by the userland process via the IOCTL interface. Reviewed by: ken@ Notes: svn path=/head/; revision=240948
* | Map the non-QoS TID to the voice queue, in order to ensure importantAdrian Chadd2012-09-261-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | things like EAPOL frames make it out. After a whole bunch of hacking/testing, I discovered that they weren't being early-dropped by the stack (but I should look at ensuring that later..) but were even making to the hardware transmit queue. They were mostly even being received by the remote end. However, the remote end was completely ignoring them. This didn't happen under 150-170MBit TCP tests as I'm guessing the TX queue stayed very busy and the STA didn't do any scanning. However, when doing 100Mbit/s of TCP traffic, the STA would do background scanning - which involves it coming in and out of powersave mode with the AP. Now, this is a total and utter hack around the real problems, which are: * I need to implement proper power save handling and integrate it into the filtered frames support, so the driver/stack doesn't send frames whilst the station is actually in sleep; * .. but frames were actually making it to the STA (macbook pro) and the AP did receive an ACK; but a tcpdump on the receiving side showed the EAPOL frame never made it. So the stack was dropping it for some reason; * Importantly - the EAPOL frames are currently going into the non-QoS TID, which maps to the BE queue and is susceptible to that queue being busy doing other things, but; * There's other traffic going on in the non-QoS TID from other contexts when scanning is going on and it's possible there's some races causing sequence number/IV issues, but; * Importantly importantlly, I think the interaction with TID 16 multicast traffic in power save mode is causing issues - since I -believe- the sequence number space being used by the EAPOL frames on TID 16 overlaps with the multicast frames that have sequence numbers allocated and are then stuffed on the cabq. Since with EAPOL frames being in TID 16 and queued to the BE queue, it's going to be waiting to be serviced with all of the aggregate traffic going on - and if the CABQ gets emptied beforehand, those TID 16 multicast frames with sequence numbers will go out beforehand. Now, there's quite likely a bunch of "stuff happening slightly out of sequence" going on due to the nature of the TX path (read: lots of overlapping and concurrent ath_start() and ath_raw_xmit() calls going on, sigh) but I thought I had caught them all and stuffed each TID TX behind a lock (that lasted as long as it needed to in order to get the frame onto the relevant destination queue - thus keeping things in order.) Unfortunately the last problem is the big one and I'm going to stare at it some more. If it _is_ So this is a work around for now to ensure that EAPOL frames actually make it out before any other stuff in the non-QoS TID and HOPEFULLY before the CABQ gets active. I'm now going to spend a little time in the TX path figuring out exactly why the sender is rejecting things. There's two (well, three if you count EAPOL contents invalid) possibilities: * The sequence number is out of order (ie, something else like the multicast traffic on CABQ) is going out first on TID 16; * The CCMP IV is out of order (similar to above - but less likely, as the TX key for multicast traffic is different to unicast traffic); * EAPOL contents strangely invalid. AP: Ubiquiti RSPRO, AR9160/AR9220 NICs STA: Macbook Pro, Broadcom 11n NIC Notes: svn path=/head/; revision=240946
* | Correct misspelling in debug output.Ed Maste2012-09-261-1/+1
| | | | | | | | Notes: svn path=/head/; revision=240945
* | Add regression test for kern/172075.Ed Maste2012-09-261-0/+59
| | | | | | | | | | | | | | | | Sponsored by: ADARA Networks PR: kern/172075 Notes: svn path=/head/; revision=240944
* | Revert part of an earlier patch attempt that snuck in with r240938.Ed Maste2012-09-251-1/+0
| | | | | | | | Notes: svn path=/head/; revision=240942
* | Fix freebsd32_kmq_timedreceive() and freebsd32_kmq_timedsend() to usePawel Jakub Dawidek2012-09-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | getmq_read() and getmq_write() respectively, just like sys_kmq_timedreceive() and sys_kmq_timedsend(). Sponsored by: FreeBSD Foundation MFC after: 2 weeks Notes: svn path=/head/; revision=240940
* | Add more SPI flash IDs.Aleksandr Rybalko2012-09-251-9/+16
| | | | | | | | | | | | | | | | | | Submitted by: Luiz Otavio O Souza. Submitted by: ZRouter.org project. Approved by: adrian (menthor) Notes: svn path=/head/; revision=240939
* | Avoid INVARIANTS panic destroying an in-use tap(4)Ed Maste2012-09-252-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The requirement (implied by the KASSERT in tap_destroy) that the tap is closed isn't valid; destroy_dev will block in devdrn while other threads are in d_* functions. Note: if_tun had the same issue, addressed in SVN revisions r186391, r186483 and r186497. The use of the condvar there appears to be redundant with the functionality provided by destroy_dev. Sponsored by: ADARA Networks Reviewed by: dwhite MFC after: 2 weeks Notes: svn path=/head/; revision=240938
* | vn_write() always expects FOF_OFFSET flag, which is asserted at the begining,Pawel Jakub Dawidek2012-09-251-4/+3
| | | | | | | | | | | | | | | | | | | | so there is no need to check for it. Sponsored by: FreeBSD Foundation MFC after: 2 weeks Notes: svn path=/head/; revision=240936
* | Remove an incorrect commentEd Maste2012-09-251-1/+0
| | | | | | | | Notes: svn path=/head/; revision=240932
* | We cannot open file for reading and executing (O_RDONLY | O_EXEC).Pawel Jakub Dawidek2012-09-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Well, in theory we can pass those two flags, because O_RDONLY is 0, but we won't be able to read from a descriptor opened with O_EXEC. Update the comment. Sponsored by: FreeBSD Foundation MFC after: 2 weeks Notes: svn path=/head/; revision=240931
* | Require CAP_DELETE on directory descriptor for unlinkat(2).Pawel Jakub Dawidek2012-09-251-2/+2
| | | | | | | | | | | | | | | | Sponsored by: FreeBSD Foundation MFC after: 2 weeks Notes: svn path=/head/; revision=240930