summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Import bugfix for reading and extracting of FreeBSD ISO images with tar.mm2011-08-259-198/+391
| | | | | | | | | | | | | | | | | | | | Upstream revision 3645 (merge of 3642): Change the mechanism handling a rr_moved directory, which is Rockridge extension that can exceed the limitation of a maximum directory depth of ISO 9660. - Stop reading all entries at a time. - Connect "CL" entry to "RE" entry dynamically, which "CL" and "RE" have information to rebuild a full directory tree. - Tweak some related tests since we use Headsort for re-ordering entries and it cannot make a steady order when the keies of the entries are the same. http://code.google.com/p/libarchive/issues/detail?id=168 Reviewed by: kientzle Approved by: re (kib) Obtained from: libarchive (release/2.8, svn rev 3645) MFC after: 3 days
* Spelling corrections for LibUSB manual page (2/2).hselasky2011-08-221-64/+70
| | | | | | MFC after: 1 week Approved by: re (kib) PR: docs/159898
* Whitespace corrections for LibUSB manual page (1/2).hselasky2011-08-221-183/+118
| | | | | | MFC after: 1 week Approved by: re (kib) PR: docs/159898
* Use correct enum instead of constant value.hselasky2011-08-201-1/+1
| | | | | | MFC after: 1 week Spotted by: scf @ Approved by: re (kib)
* Add experimental support for process descriptorsjonathan2011-08-184-3/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | A "process descriptor" file descriptor is used to manage processes without using the PID namespace. This is required for Capsicum's Capability Mode, where the PID namespace is unavailable. New system calls pdfork(2) and pdkill(2) offer the functional equivalents of fork(2) and kill(2). pdgetpid(2) allows querying the PID of the remote process for debugging purposes. The currently-unimplemented pdwait(2) will, in the future, allow querying rusage/exit status. In the interim, poll(2) may be used to check (and wait for) process termination. When a process is referenced by a process descriptor, it does not issue SIGCHLD to the parent, making it suitable for use in libraries---a common scenario when using library compartmentalisation from within large applications (such as web browsers). Some observers may note a similarity to Mach task ports; process descriptors provide a subset of this behaviour, but in a UNIX style. This feature is enabled by "options PROCDESC", but as with several other Capsicum kernel features, is not enabled by default in GENERIC 9.0. Reviewed by: jhb, kib Approved by: re (kib), mentor (rwatson) Sponsored by: Google Inc
* Update LibUSB v1.0 manual page:hselasky2011-08-162-22/+34
| | | | | | | | | - fix some minor spelling - fix some style - add description of new function MFC after: 1 week Approved by: re (kib)
* Add missing function to get device speed to the LibUSB v1.0 API.hselasky2011-08-162-0/+30
| | | | | MFC after: 1 week Approved by: re (kib)
* Cross-reference cap_new(2) from dup(2), as they have similar functionality.rwatson2011-08-141-1/+7
| | | | Approved by: re (kib)
* Updates to libprocstat(3) and procstat(1) to allow monitoring Capsicumrwatson2011-08-142-11/+19
| | | | | | | | | | capability mode and capabilities. Right now no attempt is made to unwrap capabilities when operating on a crashdump, so further refinement is required. Approved by: re (bz) Sponsored by: Google Inc
* Fix a pathname (s,netinet/if_ether.h,net/ethernet.h,).hrs2011-08-081-1/+1
| | | | | | PR: docs/159341 Submitted by: Garrett Cooper Approved by: re (kib)
* Merge revision 3554 from libarchive's release/2.8 branch:mm2011-08-073-16/+27
| | | | | | | | | | | | Partial merge of 2431 from trunk: Retry writes on EINTR. This should fix the SIGINT handler in bsdtar. Note: The rest of r2431 can't be merged, since it interacts with a big write-side rearchitecture. PR: bin/149409 Reviewed by: kientzle Approved by: re (kib) MFC after: 3 days
* Change lwp to int64_t as thr_pread_long() always uses a 64-bit valuemarius2011-08-071-4/+4
| | | | | | | | | | | | in order to account for LP64 targets when cross-debugging on ILP32, allowing r224683 to compile on ILP32. Note that thr_p{read,write}_{long,ptr}() still incorrectly use the size of the respective types on the host rather than that on the target when accessing the target address space which still needs to be fixed. This means that r224683 alone may not be sufficient to solve the problem it's intended to fix when cross-debugging. Approved by: re (hrs)
* Add compatibility for ISO images created with unfixed makefs thatmm2011-08-0711-35/+317
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | violated ECMA-119 (ISO9660): allow reserved4 to be 0x20 in PVD. This allows tar to read FreeBSD distribution ISO images created with makefs prior to NetBSD bin/45217 bugfix (up to 9.0-BETA1). In addition, merge following important bugfixes from libarchive's release/2.8 branch: Revision 2812: Merge 2811 from trunk: Don't try to verify that compression-level=0 produces larger results than the default compression, since this isn't true for all versions of liblzma. Revision 2817: Merge 2814 from trunk: Fix Issue 121 (mtree parser error) http://code.google.com/p/libarchive/issues/detail?id=121 Revision 2820: Fix issue 119. Change the file location check that a file location does not exceed volume block. New one is that a file content does not exceed volume block(end of an ISO image). It is better than previous check even if the issue did not happen. While reading an ISO image generated by an older version of mkisofs utility, a file location indicates the end the ISO image if its file size is zero and it is the last file of all files of the ISO image, so it is possible that the location value is the same as the number of the total block of the ISO image. http://code.google.com/p/libarchive/issues/detail?id=119 Revision 2955: Issue 134: Fix libarchive 2.8 crashing in archive_write_finish() when the open has failed and we're trying to write Zip format. http://code.google.com/p/libarchive/issues/detail?id=134 Revision 2958: Followup on Issue 134: 1) Port test_open_failure to libarchive 2.8 branch to test the problem reported in Issue 134. This test also shows that archive_read_open() sometimes fails to report open errors correctly. 2) Fix the bug in archive_read.c 3) Comment out the tests that close functions are invoked promptly when open fails; that's fully fixed in libarchive 3.0, but I don't think it's worth fixing here. Revision 3484: Use uintmax_t with %ju Revision 3487: Fix issue 163. Correctly allocate enough memory for a input buffer saved. http://code.google.com/p/libarchive/issues/detail?id=163 Revision 3542: Merge 2516, 2536 from trunk: Allow path table offset values of 0 and 18, which are used by some ISO writers. Reviewed by: kientzle Approved by: re (kib) MFC after: 3 days
* Implementmarius2011-08-061-5/+30
| | | | | | Reviewed by: marcel Approved by: re (kib) MFC after: 1 week
* Use the size of struct fpreg rather than of the pointer to it when copyingmarius2011-08-061-2/+5
| | | | | | | | the FPU state. Reviewed by: marcel Approved by: re (kib) MFC after: 1 week
* The tid member of struct pthread actually is long so read it as such.marius2011-08-061-8/+8
| | | | | | | | | Accessing it as an int causes failure on big-endian LP64, i.e. mips64be, powerpc64 and sparc64. Reviewed by: marcel Approved by: re (kib) MFC after: 1 week
* Add support for PBVM addresses. In a nutshell this means:marcel2011-08-061-7/+81
| | | | | | | | | | | | | | | o get the physical address and size of the PBVM page table. This can be found in the bootinfo structure, of which the physical address is recorded as the ELF entry point. o translate region 4 virtual addresses to physical addresses using the PBVM page table. In _kvm_kvatop() make the distinction between physical address and core file offset a little clearer to avoid confusion. To further enhance readability, always store the translated address into pa so that it's obvious how the translation from va to pa happened. Approved by: re (blanket)
* The result of a joint work between rrs@ and myself at the IETF:tuexen2011-08-031-0/+3
| | | | | | | | | | | * Decouple the path supervision using a separate HB timer per path. * Add support for potentially failed state. * Bring back RTO.min to 1 second. * Accept packets on IP-addresses already announced via an ASCONF * While there: do some cleanups. Approved by: re@ MFC after: 2 months.
* fix a serious bug in libproc's proc_attachavg2011-08-031-2/+1
| | | | | | | | | | proc_attach always frees any struct proc_handle data that it allocates, but that is supposed to be done only in error conditions. PR: bin/158431 Approved by: re (kib) MFC after: 1 week
* Get rid of MAXCPU knowledge used for internal needs only. Switch topluknet2011-08-016-64/+41
| | | | | | | | | | | dynamic memory allocation to hold per-CPU memory types data (sized to mp_maxid for UMA, and to mp_maxcpus for malloc to match the kernel). That fixes libmemstat with arbitrary large MAXCPU values and therefore eliminates MEMSTAT_ERROR_TOOMANYCPUS error type. Reviewed by: jhb Approved by: re (kib)
* MFprojects/hid:mav2011-07-301-5/+7
| | | | | | | | | | | | - Fix usbhidctl and usbhidaction to handle HID devices with multiple report ids, such as multimedia keyboards. - Add collection type and report id to the `usbhidctl -r` output. They are important for proper device understanding and debugging. - Fix usbhidaction tool to properly handle items having report_count more then 1. Approved by: re (kib) MFC after: 2 weeks
* Remove incorrect attribution.gnn2011-07-211-1/+1
| | | | | | Approved by: re (kib) Pointed out by: brueffer Pointy hat to: gnn
* Make both stpcpy and strcpy be assembly language implementationsgnn2011-07-213-20/+60
| | | | | | | | | on amd64. Submitted by: Guillaume Morin (guillaume at morinfr.org) Reviewed by: kib, jhb Approved by: re (bz) MFC after: 1 month
* Add cap_new(2) and cap_getrights(2) symbols to libc.jonathan2011-07-203-1/+478
| | | | | | | | These system calls have already been implemented in the kernel; now we hook up libc symbols so userspace can drive them. Approved by: re (kib), mentor (rwatson) Sponsored by: Google Inc
* Fix building of 32-bit compat libraries on amd64 with clang, and usingdim2011-07-181-4/+0
| | | | | | | | | | | | | | -g, by reverting r219139. The LLVM PR referenced in that revision was fixed in the mean time, and we imported a clang snapshot soon afterwards, so the temporary workaround of disabling clang's integrated assembler is no longer needed. In this particular case, using e.g. DEBUG_FLAGS=-g causes clang to output certain directives into assembly that our version of GNU as chokes on. Reported by: dougb Approved by: re (kib)
* Rename ki_ocomm to ki_tdname and OCOMMLEN to TDNAMLEN.bz2011-07-181-2/+2
| | | | | | | | | Provide backward compatibility defines under BURN_BRIDGES. Suggested by: jhb Reviewed by: emaste Sponsored by: Sandvine Incorporated Approved by: re (kib)
* Disable gvmat64.S, the assembler version of longest_match for now.delphij2011-07-181-10/+10
| | | | | | PR: kern/154073 MFC after: 3 days Approved by: re (kib)
* - Update libarchive to 2.8.4mm2011-07-1745-103/+5799
| | | | | | | | - Add support for extracting xar and rpm archives - Add libarchive_fe subdir (common code for tar and cpio) Approved by: kientzle MFC after: 2 weeks
*-. Upgrade our copy of llvm/clang to r135360, from upstream's trunk.dim2011-07-1761-128/+228
|\ \
| | * Vendor import of clang trunk r135360:dim2011-07-17209-9638/+25449
| | | | | | | | | | | | http://llvm.org/svn/llvm-project/cfe/trunk@135360
| | * Vendor import of clang trunk r132879:dim2011-06-12168-4978/+11673
| | | | | | | | | | | | http://llvm.org/svn/llvm-project/cfe/trunk@132879
| * | Vendor import of llvm trunk r135360:dim2011-07-17645-22623/+27962
| | | | | | | | | | | | http://llvm.org/svn/llvm-project/llvm/trunk@135360
* | | Fixes to make the WITH_BIND_LIBS option functional with BIND 9.8.xdougb2011-07-171-2/+8
| | |
* | | bmake and other updates necessary for the BIND 9.8.x upgrade.dougb2011-07-1612-84/+455
| | | | | | | | | | | | | | | | | | | | | | | | | | | This includes a structural change regarding atomic ops. Previously they were enabled on all platforms unless we had knowledge that they did not work. However both work performed by marius@ on sparc64 and the fact that the 9.8.x branch is fussier in this area has demonstrated that this is not a safe approach. So I've modified a patch provided by marius to enable them for i386, amd64, and ia64 only.
* | | - Add two missing functions to the LibUSB v0.1 API.hselasky2011-07-166-0/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Clamp the string length to 255 bytes when getting the interface description. - Clamp data request length to 65535 bytes when doing control requests. MFC after: 3 days
* | | Handle the MK_BIND_XML option more intelligentlydougb2011-07-161-5/+12
| | |
* | | Document RFTSIGZMB. Fix spelling of SIGCHLD. Note that signals arekib2011-07-121-2/+14
| | | | | | | | | | | | | | | | | | delivered, not returned. MFC after: 1 week
* | | Mention myself in the AUTHORS section.pluknet2011-07-121-1/+8
| | | | | | | | | | | | Requested by: stas
* | | Provide a simple manual page for libprocstat(3).pluknet2011-07-122-2/+255
| | | | | | | | | | | | Reviewed by: jilles, gjb
* | | Update xz to git snapshot of v5.0 branch as of 20110711 (post-5.0.3)mm2011-07-111-3/+7
| | | | | | | | | | | | | | | | | | | | | For architectures with __NO_STRICT_ALIGNMENT define TUKLIB_FAST_UNALIGNED_ACCESS MFC after: 2 weeks
* | | posix_spawn: If an error is detected in the child process, reap the zombie.jilles2011-07-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Formerly, in this case an error was returned but the pid was also returned to the application, requiring the application to use unspecified behaviour (the returned pid in error situations) to avoid zombies. Now, reap the zombie and do not return the pid. MFC after: 2 weeks
* | | - Removing some unneeded definitions of NULL(cruft related to 1970's C).avatar2011-07-106-29/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In C90, NULL is guaranteed to be declared in <stddef.h> and also in <string.h>. Though the correct way to define NULL in FreeBSD is to include <sys/_null.h>, other parts of libstand still require <string.h> to build; therefore, we keep <string.h> in stand.h and add a note about this; - Removing no longer used 'Prototype' definition. Quote from bde@: 'Cruft related to getting incomplete struct declarations within prototypes forward-declared before the structs. It doesn't mean "prototype" but only part of a prototype-related hack. No longer used.' - Replacing iaddr_t with uintptr_t; - Removing use of long double to determine alignment. Use a fixed 16 byte alignment instead; Reviewed by: bde Obtained from: DragonFlyBSD (partially) MFC after: 1 month
* | | style(9) cleanupkevlo2011-07-101-1/+1
| | |
* | | Add a HISTORY sectionkevlo2011-07-101-0/+5
| | | | | | | | | | | | Requested by: arundel
* | | Add missing "swapuse" resource limit.trasz2011-07-091-1/+2
| | |
* | | - Add xdr_sizeof(3) to libckevlo2011-07-094-4/+22
| | | | | | | | | | | | | | | | | | - Document xdr_sizeof(3); from NetBSD Discussed with: kib
* | | Fixing building bustage on 32 bits platforms when WARNS >= 2. Note thatavatar2011-07-082-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | this fix only applies to zalloc.c, the other part of libstand such like qdivrem.c still gives compilation warnings on sparc64 tinderbox builds; therefore, WARNS level isn't changed for now. Submitted by: Garrett Cooper <yanegomi@gmail.com> Reviewed by: bde
* | | With retirement of cpumask_t and usage of cpuset_t for representing aattilio2011-07-041-29/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mask of CPUs, pc_other_cpus and pc_cpumask become highly inefficient. Remove them and replace their usage with custom pc_cpuid magic (as, atm, pc_cpumask can be easilly represented by (1 << pc_cpuid) and pc_other_cpus by (all_cpus & ~(1 << pc_cpuid))). This change is not targeted for MFC because of struct pcpu members removal and dependency by cpumask_t retirement. MD review by: marcel, marius, alc Tested by: pluknet MD testing by: marcel, marius, gonzo, andreast
* | | LibUSB v1.0: Need at least one frame when doing the dummy openhselasky2011-06-281-1/+1
| | | | | | | | | | | | else clear stall won't work in that case.
* | | Build Scrt.o on powerpc64. Its introduction on other platforms got lostnwhitehorn2011-06-271-4/+10
| | | | | | | | | | | | during the period of time the powerpc64 port was on a project branch.
OpenPOWER on IntegriCloud