summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo in ".PATH"pluknet2012-04-181-1/+1
|
* Import jemalloc 9ef7f5dc34ff02f50d401e41c8d9a4a928e7c2aa (dev branch,jasone2012-04-1713-8250/+182
| | | | | | | | prior to 3.0.0 release) as contrib/jemalloc, and integrate it into libc. The code being imported by this commit diverged from lib/libc/stdlib/malloc.c in March 2010, which means that a portion of the jemalloc 1.0.0 ChangeLog entries are relevant, as are the entries for all subsequent releases.
* Work around an issue on 32-bit PowerPC, where clang executable can getdim2012-04-162-1/+8
| | | | | | too big, causing 'relocation truncated to fit' errors at link time. Reviewed by: nwhitehorn
*-. Upgrade our copy of llvm/clang to trunk r154661, in preparation of thedim2012-04-1653-79/+269
|\ \ | | | | | | | | | | | | | | | | | | upcoming 3.1 release (expected in a few weeks). Preliminary release notes can be found at: <http://llvm.org/docs/ReleaseNotes.html> MFC after: 2 weeks
| | * Vendor import of clang trunk r154661:dim2012-04-14435-34948/+91609
| | | | | | | | | | | | http://llvm.org/svn/llvm-project/cfe/trunk@r154661
| | * Vendor import of clang 3.0 final release:dim2011-12-0911-857/+992
| | | | | | | | | | | | http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_30/final@145349
| * | Vendor import of llvm trunk r154661:dim2012-04-141307-70971/+111145
| | | | | | | | | | | | http://llvm.org/svn/llvm-project/llvm/trunk@r154661
* | | Replace the C implementation of __aeabi_read_tp with an assembly version.andrew2012-04-162-14/+9
| | | | | | | | | | | | | | | | | | This ensures we follow the ABI by preserving registers r1-r3. Reviewed by: jmallett, imp
* | | When searching for uninitialized memory usage add ensure that the entireeadler2012-04-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | struct is set to zero. PR: bin/166483 Submitted by: Roy Marples <roy@marples.name> Reviewed by: delphij Approved by: cperciva MFC after: 3 days
* | | Additional manual page updates for r234103.jh2012-04-131-8/+12
| | | | | | | | | | | | Submitted by: bde
* | | Add missing LibUSB 1.0 API function.hselasky2012-04-124-1/+33
| | | | | | | | | | | | | | | Reported by: lme @ MFC after: 1 week
* | | Fix error messages containing the executed command namedumbbell2012-04-121-31/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, we took the first argument to pam_exec(8). With the addition of options in front of the command, this could be wrong. Now, options are parsed before calling _pam_exec() and messages contain the proper command name. While here, fix a warning. Sponsored by: Yakaz (http://www.yakaz.com)
* | | Support percent-encoded user and passwordemaste2012-04-111-6/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | RFC 1738 specifies that any ":", "@", or "/" within a user name or password in a URL is percent-encoded, to avoid ambiguity with the use of those characters as URL component separators. Reviewed by: rstone@ MFC after: 1 month
* | | Make the item numbers match the crypt magic numbereadler2012-04-111-0/+2
| | | | | | | | | | | | | | | | | | | | | PR: docs/166497 Submitted by: Mike Kelly <pioto@pioto.org> Approved by: cperciva MFC after: 1 week
* | | Return EBADF instead of EMFILE from dup2 when the second argument iseadler2012-04-112-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | outside the range of valid file descriptors PR: kern/164970 Submitted by: Peter Jeremy <peterjeremy@acm.org> Reviewed by: jilles Approved by: cperciva MFC after: 1 week
* | | Do not restore the register holding the TLS pointer when doing variousnwhitehorn2012-04-116-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | usermode context switches (long jumps and ucontext operations). If these are used across threads, multiple threads can end up with the same TLS base. Madness will then result. This makes behavior on PPC match that on x86 systems and on Linux. MFC after: 10 days
* | | Back out r233646. Although it fixed most libgeom consumers under 32-bitjmallett2012-04-102-82/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | compatibility, it broke programs using devstat, under 32-bit compatibility and not. It's very difficult to fix the identifiers used by devstat, so this change is simply being backed out. Since changes to 3rd-party code seem likely, and may be necessary to properly fix 32-bit binaries on 64-bit kernel, it would seem better to make more invasive changes to fix GEOM's problems with 32-bit compatibility in general. The right thing to do is to replace all of the use of pointers as opaque identifiers with a fixed-size (64-bit or even 32-bit should be enough for tracking unique GEOM elments) field. That probably maintains source compatibility with most GEOM consumers, and allows xml2tree to make better assumptions about how to decode the identifiers. Submitted by: Anton Yuzhaninov
* | | - Return EPERM from ufs_setattr() when an user without PRIV_VFS_SYSFLAGSjh2012-04-101-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | privilege attempts to toggle SF_SETTABLE flags. - Use the '^' operator in the SF_SNAPSHOT anti-toggling check. Flags are now stored to ip->i_flags in one place after all checks. Submitted by: bde
* | | sem_open: Make sure to fail an O_CREAT|O_EXCL open, even if that semaphorejilles2012-04-091-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is already open in this process. If the named semaphore is already open, sem_open() only increments a reference count and did not take the flags into account (which otherwise happens by passing them to open()). Add an extra check for O_CREAT|O_EXCL. PR: kern/166706 Reviewed by: davidxu MFC after: 10 days
* | | Unlike other functions __aeabi_read_tp function must preserve r1-r3. Theandrew2012-04-081-2/+5
| | | | | | | | | | | | | | | | | | | | | currently generated code clobbers r3. Fix this by loading ARM_TP_ADDRESS using inline assembly. Approved by: imp (mentor)
* | | - Use __NO_TLS preprocessor value to make assumptions about TLS supportstas2012-04-081-1/+1
| | | | | | | | | | | | on a platform.
* | | - Revert part of r234005, which I did not intend to commit.stas2012-04-071-1/+1
| | | | | | | | | | | | Sorry! :(
* | | - Add kernel config file for QEMU-emulated gumstix board.stas2012-04-071-1/+1
| | |
* | | Properly resolve the _ctx_start function descriptor (the symbol _ctx_startnwhitehorn2012-04-071-1/+1
| | | | | | | | | | | | | | | | | | | | | is a descriptor, not a code address), which prevents crashes when starting a context. This fixes QEMU on powerpc64. MFC after: 3 days
* | | mdoc: fix function type.joel2012-04-071-1/+1
| | |
* | | mdoc: fix column names, indentation, column separation within each row, andjoel2012-04-0712-103/+104
| | | | | | | | | | | | | | | | | | | | | quotation. Also make sure we have the same amount of columns in each row as the number of columns we specify in the head arguments. Reviewed by: brueffer
* | | Fix a bug in remquo{,f,l}, in which the quotient didn't always have thedas2012-04-073-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | correct sign when the remainder was 0. Fix a separate bug in remquo alone, in which the remainder and quotient were both off by a bit in certain cases involving subnormal remainders. The bugs affected all platforms except amd64 and i386, on which the routines are implemented in assembly. PR: 166463 Submitted by: Ilya Burylov MFC after: 2 weeks
* | | - Do not use deprecated krb5 error message reporting functions in libtelnet.stas2012-04-061-1/+0
| | |
* | | Update to version 9.8.2, the latest from ISC, which contains numerous bug fixes.dougb2012-04-057-68/+71
| | |
* | | In sem_post, the field _has_waiters is no longer used, because somedavidxu2012-04-051-16/+8
| | | | | | | | | | | | | | | | | | | | | application destroys semaphore after sem_wait returns. Just enter kernel to wake up sleeping threads, only update _has_waiters if it is safe. While here, check if the value exceed SEM_VALUE_MAX and return EOVERFLOW if this is true.
* | | umtx operation UMTX_OP_MUTEX_WAKE has a side-effect that it accessesdavidxu2012-04-052-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a mutex after a thread has unlocked it, it event writes data to the mutex memory to clear contention bit, there is a race that other threads can lock it and unlock it, then destroy it, so it should not write data to the mutex memory if there isn't any waiter. The new operation UMTX_OP_MUTEX_WAKE2 try to fix the problem. It requires thread library to clear the lock word entirely, then call the WAKE2 operation to check if there is any waiter in kernel, and try to wake up a thread, if necessary, the contention bit is set again by the operation. This also mitgates the chance that other threads find the contention bit and try to enter kernel to compete with each other to wake up sleeping thread, this is unnecessary. With this change, the mutex owner is no longer holding the mutex until it reaches a point where kernel umtx queue is locked, it releases the mutex as soon as possible. Performance is improved when the mutex is contensted heavily. On Intel i3-2310M, the runtime of a benchmark program is reduced from 26.87 seconds to 2.39 seconds, it even is better than UMTX_OP_MUTEX_WAKE which is deprecated now. http://people.freebsd.org/~davidxu/bench/mutex_perf.c
* | | Eliminate two cases of unwanted strncpy(). The name is not requireddelphij2012-04-022-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | by the current code, and the results would get overwritten anyway by subsequent memset(). Reviewed by: ume MFC after: 1 month
* | | Export some more useful info about shared memory objects to userlandjhb2012-04-015-1/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | via procstat(1) and fstat(1): - Change shm file descriptors to track the pathname they are associated with and add a shm_path() method to copy the path out to a caller-supplied buffer. - Use the fo_stat() method of shared memory objects and shm_path() to export the path, mode, and size of a shared memory object via struct kinfo_file. - Add a struct shmstat to the libprocstat(3) interface along with a procstat_get_shm_info() to export the mode and size of a shared memory object. - Change procstat to always print out the path for a given object if it is valid. - Teach fstat about shared memory objects and to display their path, mode, and size. MFC after: 2 weeks
* | | mdoc: terminate quoted strings.joel2012-03-301-53/+53
| | |
* | | Remove unnecessary Xo/Xc.joel2012-03-291-10/+5
| | | | | | | | | | | | Reviewed by: brueffer
* | | mdoc: Ud takes no argument.joel2012-03-291-1/+1
| | |
* | | Remove superfluous paragraph macro.joel2012-03-291-3/+0
| | |
* | | mandoc complains loudly when <TAB>s are misused in columnated lists. Fixjoel2012-03-297-51/+51
| | | | | | | | | | | | | | | this syntax violation and while I'm here also convert <TAB> to Ta and adjust quotation marks in order to prevent this problem in the future.
* | | mdoc: sort prologue macros.joel2012-03-291-1/+1
| | |
* | | Remove trailing whitespace per mdoc lint warningeadler2012-03-2956-135/+135
| | | | | | | | | | | | | | | | | | | | | Disussed with: gavin No objection from: doc Approved by: joel MFC after: 3 days
* | | Fix 32-bit libgeom consumers run on 64-bit kernels with COMPAT_FREEBSD32.jmallett2012-03-292-29/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kernel pointer values are used as opaque unique identifiers, which are then used to reconstruct references between various providers, classes, etc., inside libgeom from the source XML. Unfortunately, they're converted to pointer-width integers (in the form of pointers) to do this, and 32-bit userland pointers cannot hold sensible representations (however opaque) of 64-bit kernel pointers on all systems. In the case where the leading bits are zero and 32 distinct bits of pointer can be identified, this will happen to work. On systems where the upper 32-bits of kernel pointers are non-zero and the same for all kernel pointers, this will result in double frees and all kinds of bizarre crashes and linkage between objects inside libgeom. To mitigate this problem, treat the opaque identifiers in the XML as C strings instead, and internalize them to give unique and consistent per-object pointer values in userland for each identifier in the XML. This allows us to keep the libgeom logic the same with only minor changes to initial setup and parsing. It might be more sensible for speed reasons to treat the identifiers as numbers of a large size (uintmax_t, say) rather than strings, but strings seem fine for now. (As an added side-effect, this makes it slightly easier to identify unresolved references, but nothing has been added to inform the user of those.)
* | | Fix comment to specify correct struct name.jimharris2012-03-281-2/+2
| | | | | | | | | | | | | | | Reviewed by: gjb Approved by: sbruno
* | | Add software PMC support.fabient2012-03-2826-26/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New kernel events can be added at various location for sampling or counting. This will for example allow easy system profiling whatever the processor is with known tools like pmcstat(8). Simultaneous usage of software PMC and hardware PMC is possible, for example looking at the lock acquire failure, page fault while sampling on instructions. Sponsored by: NETASQ MFC after: 1 month
* | | Fix Fo arguments.joel2012-03-281-1/+1
| | | | | | | | | | | | Reviewed by: gabor
* | | mdoc: add missing El macro.joel2012-03-271-0/+2
| | |
* | | Minor indentation and paragraph nits.joel2012-03-271-4/+4
| | |
* | | Remove useless Ta macro.joel2012-03-273-14/+14
| | |
* | | Minor mdoc nit.joel2012-03-271-1/+1
| | |
* | | Handle MIPS .reginfo section as ELF_T_BYTEgonzo2012-03-261-0/+2
| | |
* | | mdoc: correct .Bd/.Bl arguments.joel2012-03-262-7/+7
| | | | | | | | | | | | Reviewed by: brueffer
OpenPOWER on IntegriCloud