summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MFC r289601:ngie2015-10-261-2/+1
| | | | | | | | | | Don't check if `val` is NULL before calling free; free(3) already handles this PR: 203649 Submitted by: Thomas Schmitt <scdbackup@gmx.net> Coverity CID: 1305659 Sponsored by: EMC / Isilon Storage Division
* MFC r288305:ngie2015-10-2616-63/+25
| | | | Replace N #defines with nitems to simplify ifconfig code slightly
* MFC r289300:ngie2015-10-264-0/+10
| | | | | | Integrate tools/regression/vfs into the FreeBSD test suite as tests/sys/vfs Sponsored by: EMC / Isilon Storage Division
* MFC r264965:ngie2015-10-261-1/+1
| | | | | | r264965 (by des): Note that the bug was fixed, and when.
* MFC r282339,r282341:ngie2015-10-266-0/+56
| | | | | | | | | | r282339 (by bapt): Add regression test about reverse line feed to col(1) r282341 (by bapt): Actually push the right tests
* MFC r289600:ngie2015-10-261-1/+1
| | | | | | | | | Initialize `quiet` to false so `pw groupnext` again prints out the next gid by default Reported by: Florian Degner <f.degner@gmx.de> PR: 203876 Sponsored by: EMC / Isilon Storage Division
* MFC r288304:ngie2015-10-261-0/+2
| | | | Enable parallel subdirectory building with sys/modules/netgraph
* MFC r289451:ngie2015-10-261-1/+1
| | | | | | | | | | | Install share/zoneinfo in a deterministic way by sorting the results from find This helps produce deterministic METALOG output PR: 200674 Submitted by: Fabian Keil <fk@fabiankeil.de> Reviewed by: emaste Obtained from: ElectroBSD
* MFC r289450:ngie2015-10-261-1/+3
| | | | | | | | | | Set dev->fd to -1 when calling cam_close_spec_device with a valid dev->fd descriptor to avoid trashing valid file descriptors that access dev->fd at a later point in time PR: 192671 Submitted by: Scott Ferris <scott.ferris@isilon.com> Sponsored by: EMC / Isilon Storage Division
* MFC r289332:ngie2015-10-261-0/+27
| | | | | | | | | | | | | | | | | | | | | Fix test-fenv:test_dfl_env when run on some amd64 CPUs Compare the fields that the AMD [1] and Intel [2] specs say will be set once fnstenv returns. Not all amd64 capable processors zero out the env.__x87.__other field (example: AMD Opteron 6308). The AMD64/x64 specs aren't explicit on what the env.__x87.__other field will contain after fnstenv is executed, so the values in env.__x87.__other could be filled with arbitrary data depending on how the CPU-specific implementation of fnstenv. 1. http://support.amd.com/TechDocs/26569_APM_v5.pdf 2. http://www.intel.com/Assets/en_US/PDF/manual/253666.pdf Discussed with: kib, Anton Rang <anton.rang@isilon.com> Reviewed by: Daniel O'Connor <darius@dons.net.au> (earlier patch; pre-generalization) Sponsored by: EMC / Isilon Storage Division Reported by: Bill Morchin <wmorchin@isilon.com>
* MFC r289488:ngie2015-10-261-9/+9
| | | | Clean up trailing whitespace
* MFC r288330,r288423,r288678,r288905,r288906,r288907,r289102:ngie2015-10-254-0/+981
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r288330: Add initial testcases for bin/ls Sponsored by: EMC / Isilon Storage Division r288423: Skip the B_flag testcase to stop blowing up freebsd-current@ with "test failure emails" because kyua report-jenkins doesn't properly escape non-printable chars r288678: Merge additional testcases and improvements to bin/ls/ls_tests from ^/user/ngie/more-tests. - Additional testcases added: -- ls -D -- ls -F -- ls -H -- ls -L -- ls -R -- ls -S -- ls -T -- ls -b -- ls -d -- ls -f -- ls -g -- ls -h -- ls -i -- ls -k -- ls -l -- ls -m -- ls -n -- ls -o -- ls -p -- ls -q/ls -w -- ls -r -- ls -s -- ls -t -- ls -u -- ls -y - Socket file creation is limited to the ls -F testcase, greatly speeding up the test process - The ls -C testcase was made more robust by limiting the number of columns via COLUMNS and by dynamically formulating the columns/lines. - Add `atf_test_case` before all testcase `head` functions. Sponsored by: EMC / Isilon Storage Division r288905: Add some more syncs to quiesce the filesystem after creating the files to see if this fixes deterministic Jenkin failures r288906: Explicitly set BLOCKSIZE to 512 in the environment r288907: Call sync consistently using atf_check Remove superfluous sync's r289102: Remove all of the syncs They're unnecessary as shown by further testing on my VM Requested by: jhb
* MFC r288295,r288298:ngie2015-10-253-7/+6
| | | | | | | | | | | | | | | | r288295: Posthumously remove all references to MFREE(9) The macro was removed in r90227 Sponsored by: EMC / Isilon Storage Division r288298: Remove MLINKS to more non-existent mbuf(9) macros Sponsored by: EMC / Isilon Storage Division
* MFC r288057:ngie2015-10-251-0/+1
| | | | Delete /etc/autofs/special_noauto when MK_AUTOFS == no
* MFC r287520:ngie2015-10-251-0/+10
| | | | | | Parallelize the usr.sbin/ntp subdirectory build Articulate all needed dependencies for the subdirectories
* Regen src.conf(5) after r289959ngie2015-10-251-7/+2
|
* MFC r286822:ngie2015-10-253-6/+0
| | | | | | | Reap MK_SYSINSTALL It's no longer in use in the tree (most likely missed when sade/sysinstall were removed)
* MFC r286512:ngie2015-10-251-6/+6
| | | | | | | | | Make some debug printf's into DPRINTF's to reduce noise on attach/detahh Similar reasoning to what was done in r286367 with geom_uzip(4) Differential Revision: D3320 Sponsored by: EMC / Isilon Storage Division
* MFC r283144:ngie2015-10-251-0/+5
| | | | | | | | Articulate dependencies for cddl/lib/libdtrace and cddl/lib/libzfs Parallelize the build in this subdirectory Sponsored by: EMC / Isilon Storage Division
* MFC r282072,r283018:ngie2015-10-256-26/+27
| | | | | | | | | | | | r282072: - Fix compilation (MAP_INHERIT's dead) - Fix warnings - Use mkstemp instead of tmpnam r283018: Fix more warnings related to missing headers
* MFC r284405:ngie2015-10-252-83/+7
| | | | | | Remove ALLOW_DEPRECATED_ATF_TOOLS/ATFFILE support from atf.test.mk The legacy atf tools were removed in atf 0.20
* MFC r286367:ngie2015-10-251-4/+4
| | | | | | | | Make some debug printf's into DPRINTF's to reduce noise on attach/detach Differential Revision: https://reviews.freebsd.org/D3306 Reviewed by: loos Sponsored by: EMC / Isilon Storage Division
* MFC r286304:ngie2015-10-251-8/+20
| | | | | | | | | | | | | | Set f_file to -1/F_UNUSED when after closing when possible This will help ensure we don't trash file descriptors that get used later on in the daemon Found via internal Coverity scan Discussed with: cem, ed, markj Differential Revision: https://reviews.freebsd.org/D3081 Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com> Sponsored by: EMC / Isilon Storage Division
* MFC r288309: fnmatch(): Remove exponential behaviour as in sh r229201.jilles2015-10-251-28/+49
| | | | | | The old code was exponential in the number of asterisks in the pattern. However, once a match has been found upto the next asterisk, the previous asterisks are no longer relevant.
* MFC r288430: wordexp: Rewrite to make WRDE_NOCMD reliable.jilles2015-10-256-93/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Shell syntax is too complicated to detect command substitution and unquoted operators reliably without implementing much of sh's parser. Therefore, have sh do this detection. While changing sh's support anyway, also read input from a pipe instead of arguments to avoid {ARG_MAX} limits and improve privacy, and output count and length using 16 instead of 8 digits. The basic concept is: execl("/bin/sh", "sh", "-c", "freebsd_wordexp ${1:+\"$1\"} -f "$2", "", flags & WRDE_NOCMD ? "-p" : "", <pipe with words>); The WRDE_BADCHAR error is still implemented in libc. POSIX requires us to fail strings containing unquoted braces with code WRDE_BADCHAR. Since this is normally not a syntax error in sh, there is still a need for checking code in libc, we_check(). The new we_check() is an optimistic check that all the characters <newline> | & ; < > ( ) { } are quoted. To avoid duplicating too much sh logic, such characters are permitted when quoting characters are seen, even if the quoting characters may themselves be quoted. This code reports all WRDE_BADCHAR errors; bad characters that get past it and are a syntax error in sh return WRDE_SYNTAX. Although many implementations of WRDE_NOCMD erroneously allow some command substitutions (and ours even documented this), there appears to be code that relies on its security (codesearch.debian.net shows quite a few uses). Passing untrusted data to wordexp() still exposes a denial of service possibility and a fairly large attack surface. This is also a MFC of r286830 to reduce conflicts. I changed the code somewhat to avoid changes from r286941; in particular, WRDE_BADVAL can still only be returned if WRDE_UNDEF was passed. Relnotes: yes Security: fixes command execution with wordexp(untrusted, WRDE_NOCMD)
* MFC r289146:mav2015-10-252-48/+55
| | | | | | | | | Make delete method set via kern.cam.da.X.delete_method persistent. This allows to set delete method via tunable, before device capabilities are known. Also allow ZERO method for devices not reporting LBP, if user explicitly requests it -- it may be useful if storage supports compression and WRITE SAME, but does not support UNMAP.
* MFC r261891: provide fast versions of ffsl and flsl for i386; ffsll andavg2015-10-2310-5/+39
| | | | flsll for amd64
* MFC r288339: remove unused sgsmsg utility (originally imported from opensolaris)avg2015-10-2314-3817/+3
|
* MFC r288363: std: it is important that func name is never an empty stringavg2015-10-231-0/+2
|
* MFC r284409: Fix circular dependency between libzfs and libzfs_coreavg2015-10-232-2/+2
| | | | By bapt.
* MFC r288340: define aok in libnvpair which is linked to all zfsavg2015-10-233-1/+10
| | | | libraries that need aok
* MFC r288362: sdt: start checking version field when parsing probe definitionsavg2015-10-231-0/+6
|
* MFC r288337: remove an extra copy of avl.c from illumos contrib codeavg2015-10-231-1059/+0
|
* MFC r288336: save some bytes by using more concise SDT_PROBE<n>avg2015-10-2312-88/+79
|
* MFC r288366: sdt.h: no need for argtype_list_headavg2015-10-231-1/+1
|
* MFC r288365: sdt: static-ize couple of variablesavg2015-10-231-2/+2
|
* MFC r288364: sdt module does not seem to actually use any symbol fromavg2015-10-231-1/+0
| | | | opensolaris module
* MFC r288361: dtrace_getarg: remove stray return statement on amd64, powerpcavg2015-10-232-2/+0
|
* MFC r287673: radeon_suspend_kms: don't mess with pci stateavg2015-10-231-8/+0
|
* MFC 287386,288949,288993:jhb2015-10-239-22/+314
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Export current system call code and argument count for system call entry and exit events. To preserve the ABI, the new fields are moved to the end of struct thread in these branches (unlike HEAD) and explicitly copied when new threads are created. In addition, the new tests are only added in 10. r287386: Export current system call code and argument count for system call entry and exit events. procfs stop events for system call tracing report these values (argument count for system call entry and code for system call exit), but ptrace() does not provide this information. (Note that while the system call code can be determined in an ABI-specific manner during system call entry, it is not generally available during system call exit.) The values are exported via new fields at the end of struct ptrace_lwpinfo available via PT_LWPINFO. r288949: Fix various edge cases related to system call tracing. - Always set td_dbg_sc_* when P_TRACED is set on system call entry even if the debugger is not tracing system call entries. This ensures the fields are valid when reporting other stops that occur at system call boundaries such as for PT_FOLLOW_FORKS or when only tracing system call exits. - Set TDB_SCX when reporting the stop for a new child process in fork_return(). This causes the event to be reported as a system call exit. - Report a system call exit event in fork_return() for new threads in a traced process. - Copy td_dbg_sc_* to new threads instead of zeroing. This ensures that td_dbg_sc_code in particular will report the system call that created the new thread or process when it reports a system call exit event in fork_return(). - Add new ptrace tests to verify that new child processes and threads report system call exit events with a valid pl_syscall_code via PT_LWPINFO. r288993: Document the recently added pl_syscall_* fields in struct ptrace_lwpinfo.
* getconf(1): Fix typo. _POSIX_V6_LP64_OFFBIG -> _POSIX_V6_LPBIG_OFFBIG.bapt2015-10-221-1/+1
| | | | | Submitted by: Sascha Wildner <saw@online.de> Obtained from: DragonflyBSD
* MFC r289316:kp2015-10-214-50/+93
| | | | | | | | | | | | | | | | | | | | pf: Fix TSO issues In certain configurations (mostly but not exclusively as a VM on Xen) pf produced packets with an invalid TCP checksum. The problem was that pf could only handle packets with a full checksum. The FreeBSD IP stack produces TCP packets with a pseudo-header checksum (only addresses, length and protocol). Certain network interfaces expect to see the pseudo-header checksum, so they end up producing packets with invalid checksums. To fix this stop calculating the full checksum and teach pf to only update TCP checksums if TSO is disabled or the change affects the pseudo-header checksum. PR: 154428, 193579, 198868 Relnotes: yes Sponsored by: RootBSD
* MFC r288994:bdrewery2015-10-211-27/+5
| | | | | Remove redundant RFFPWAIT/vfork(2) handling in Linux fork(2) and clone(2) wrappers.
* MFC r281828, r289083, r289084, r289091, r289093, r289095, r289097, r289098,ian2015-10-2012-418/+518
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r289104, r289105, r289118: various i2c fixes... Fix numerous issues in iic(4) and iicbus(4): --Allow multiple open iic fds by storing addressing state in cdevpriv --Fix, as much as possible, the baked-in race conditions in the iic ioctl interface by requesting bus ownership on I2CSTART, releasing it on I2CSTOP/I2CRSTCARD, and requiring bus ownership by the current cdevpriv to use the I/O ioctls --Reduce internal iic buffer size and remove 1K read/write limit by iteratively calling iicbus_read/iicbus_write --Eliminate dynamic allocation in I2CWRITE/I2CREAD --Move handling of I2CRDWR to separate function and improve error handling --Add new I2CSADDR ioctl to store address in current cdevpriv so that I2CSTART is not needed for read(2)/write(2) to work --Redesign iicbus_request_bus() and iicbus_release_bus(): --iicbus_request_bus() no longer falls through if the bus is already owned by the requesting device. Multiple threads on the same device may want exclusive access. Also, iicbus_release_bus() was never device-recursive anyway. --Previously, if IICBUS_CALLBACK failed in iicbus_release_bus(), but the following iicbus_poll() call succeeded, IICBUS_CALLBACK would not be issued again --Do not hold iicbus mtx during IICBUS_CALLBACK call. There are several drivers that may sleep in IICBUS_CALLBACK, if IIC_WAIT is passed. --Do not loop in iicbus_request_bus if IICBUS_CALLBACK returns EWOULDBLOCK; instead pass that to the caller so that it can retry if so desired. Bugfix: Exit the transfer loop if any read or write operation fails. Also, perform a stop operation on the bus if there was an error, otherwise the bus will remain hung forever. Consistantly use 'if (error != 0)' style in the function. Mostly rewrite the imx i2c driver. This started out as an attempt to fix one specific problem: the driver didn't check for ACK/NAK after writing a slave address byte to the bus, and some slaves signal that they are busy (such as when completing an internal write to flash memory) by sending a NAK in response to being addressed. Use IIC_EBUSBSY and IIC_BUSERR status values consistantly across all drivers. Make it clearer what each one means in the comments that define them. Add iic2errno(), a helper function to translate IIC_Exxxxx status values to errno values that are at least vaguely equivelent. Also add a new status value, IIC_ERESOURCE, to indicate a failure to acquire memory or other required resources to complete a transaction. Return only IIC_Exxxx status values from iicbus-layer functions. Most of these functions are thin wrappers around calling the hardware-layer driver, but some of them do sanity checks and return an error. Add a short name, IIC_INTRWAIT, for the common case (IIC_INTR | IIC_WAIT). Replace a local sx lock that allowed only one client at a time to access an eeprom device with iicbus_request/release_bus(), which achieves the same effect and also keeps other i2c slave drivers from clashing on the bus.
* MFC r288903:bdrewery2015-10-201-4/+2
| | | | | | | | Fix crash if a process sends itself a SIGTRAP. Just forward it as expected. This does not match head as the code was rewritten significantly there. Relnotes: yes
* MFC r288477:bdrewery2015-10-201-6/+18
| | | | | | META_MODE: For some reason meta mode cannot generate the intermediate tab.c files. Split up all of the targets to be more clear on how they are generated to fix the problem.
* MFC r288429:bdrewery2015-10-204-26/+40
| | | | Replace most of the beforeinstall: hack with FILES mechanism.
* MFC r289480. Really fix ipfilter bug 3600459.cy2015-10-201-2/+1
| | | | Obtained from: ipfilter cvs repo r1.48.2.25, r1.72 and NetBSD repo r1.4
* MFC r289337:gjb2015-10-194-8/+8
| | | | | | | | | | Deprecate MD5 checksum generation in favor of SHA512. This was discussed during the 10.2-RELEASE cycle, however since we were nearing the end of the cycle, we decided to defer this change until after 10.2-RELEASE. Sponsored by: The FreeBSD Foundation
* MFC r287785:trasz2015-10-181-2/+2
| | | | | | Make it clear that 'swapuse' is swap reservation and not actual swap usage. Sponsored by: The FreeBSD Foundation
OpenPOWER on IntegriCloud