summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | libkvm code janitoringuqs2011-01-2320-309/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - make WARNS=6 clean for archs w/o strict alignment requirments - add const, ANSIfy, remove unused vars, cast types for comparison - thanks to differing definitions of VM_MIN_ADDRESS across our archs, we need to trick the compiler to not complain about signedness. We could either fix VM_MIN_ADDRESS to always be a simple integer or make the check conditional on $ARCH. Closes PRs: kern/42386, kern/83364 Reviewed by: bde
* | | | getgroups(2): Remove mention of <sys/param.h> and refer to sysconf(3).jilles2011-01-211-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because {NGROUPS_MAX} may become variable, its value should be obtained using sysconf(3). If a #define is used anyway, it should be obtained by including <limits.h> as that is in POSIX like getgroups(2) itself is. <sys/param.h> is not in POSIX. MFC after: 1 week
* | | | Introduce signed and unsigned version of CTLTYPE_QUAD, renamingmdf2011-01-191-3/+12
| | | | | | | | | | | | | | | | existing uses. Rename sysctl_handle_quad() to sysctl_handle_64().
* | | | Fix a bug related to connection caching which could cause a crash afterdes2011-01-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a STAT command. PR: kern/153748 (different patch) Submitted by: Mark Johnston <markjdb@gmail.com> MFC after: 2 weeks
* | | | mknod(2): The required include is <sys/stat.h>, not <unistd.h>.jilles2011-01-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is what SUSv4 requires, and also the only thing that works if strict standards compliance is requested or mknodat() is needed. PR: standards/123688 Submitted by: gcooper MFC after: 1 week
* | | | Mark csu on PowerPC as not requiring executable stack.kib2011-01-144-0/+8
| | | | | | | | | | | | | | | | Reviewed and tested by: nwhitehorn
* | | | Mark assembler sources from libc as working with non-executable stack.kib2011-01-1424-2/+44
| | | | | | | | | | | | | | | | Reviewed and tested by: nwhitehorn
* | | | Mark libcompiler_rt as not needed executable stack on powerpc.kib2011-01-141-1/+2
| | | | | | | | | | | | | | | | Reviewed and tested by: nwhitehorn
* | | | The (%esp & 0xf) == 0 should be true before the call instruction iskib2011-01-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | executed, for the properly aligned stack. Reported and tested by: rstone Pointy hat to: kib MFC after: 3 days
* | | | Apply a workaround for a binutils issue with the .note.ABI-tag sectiondim2011-01-138-28/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | generated from lib/csu/common/crtbrand.c (which ultimately ends up in executables and shared libraries, via crt1.o, gcrt1.o or Scrt1.o). For all arches except sparc, gcc emits the section directive for the abitag struct in crtbrand.c with a PROGBITS type. However, newer versions of binutils (after 2.16.90) require the section to be of NOTE type, to guarantee that the .note.ABI-tag section correctly ends up in the first page of the final executable. Unfortunately, there is no clean way to tell gcc to use another section type, so crtbrand.c (or the C files that include it) must be compiled in multiple steps: - Compile the .c file to a .s file. - Edit the .s file to change the 'progbits' type to 'note', for the section directive that defines the .note.ABI-tag section. - Compile the .s file to an object file. These steps are done in the invididual Makefiles for each applicable arch. Reviewed by: kib
* | | | Fix a typo.davidxu2011-01-111-1/+1
| | | | | | | | | | | | | | | | Submitted by: avg
* | | | For the process that already loaded libthr but still not initializedkib2011-01-101-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | threading, fall back to libc method of performing __pthread_map_stacks_exec() job. Reported and tested by: Mykola Dzham <i levsha me>
* | | | Revert part of r217071 so that us mere mortals can clearly seedougb2011-01-091-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | what this bit of code is intended to do. :) Approved by: imp
* | | | Implement the __pthread_map_stacks_exec() for libthr.kib2011-01-095-1/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stack creation code is changed to call _rtld_get_stack_prot() to get the stack protection right. There is a race where thread is created during dlopen() of dso that requires executable stacks. Then, _rtld_get_stack_prot() may return PROT_READ | PROT_WRITE, but thread is still not linked into the thread list. In this case, the callback misses the thread stack, and rechecks the required protection afterward. Reviewed by: davidxu
* | | | Implement __pthread_map_stacks_exec() callback for libc, to change thekib2011-01-083-0/+39
| | | | | | | | | | | | | | | | stack protection to allow execution for single-threaded processes.
* | | | Fix some style(9) issues.kib2011-01-081-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not use strlcpy() where simple assignment is enough. Noted by: bde (long time ago) MFC after: 1 week
* | | | Fix struct FILE * leak on error (in disabled by default hesiod support code).kib2011-01-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Submitted by: henning petersen <henning.petersen t-online de> PR: 153756 MFC after: 1 week
* | | | Retire TARGET_ABI.imp2011-01-071-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement MACHINE_ARCH=mips64e[lb] to build N64 images. This replaces MACHINE_ARCH=mipse[lb] TARGET_ABI=n64. MACHINE_ARCH=mipsn32e[lb] has been added, but currently requires WITHOUT_CDDL due to atomic issues in libzfs. I've not investigated this much, but implemented this to preserve as much of the TARGET_ABI functionality that I could. Since its presence doesn't affect the working cases, I've kept it in for now. Added mips64e[lb] to make universe, so more kernels build. And I think this (finally) closes the curtain on the tbemd tree.
* | | | Add section .note.GNU-stack for assembly files used by 386 and amd64.kib2011-01-0768-0/+136
| | | |
* | | | Add section .note.GNU-stack for assembly files used by 386 and amd64.kib2011-01-072-0/+4
| | | |
* | | | Add section .note.GNU-stack for assembly files used by 386 and amd64.kib2011-01-0772-0/+142
| | | |
* | | | Add section .note.GNU-stack for assembly files used by 386 and amd64.kib2011-01-075-0/+10
| | | |
* | | | Fix braino in r217101. -Wa is used to supply assembler flag to cc driver.kib2011-01-071-1/+1
| | | | | | | | | | | | | | | | Noted by: Anonymous <swell.k gmail com>
* | | | On amd64 and i386, force assembler to mark objects compiled from thekib2011-01-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | assembler source for libcompiler_rt as not needed executable stack. This is done with a hammer instead of properly marking each assembly file with section .note.GNU-stack to avoid modifying contributed source. Discussed with: ed
* | | | Emit .note.GNU-stack for the syscall stubs generated by libc.kib2011-01-071-0/+2
| | | |
* | | | Make this work on big endian MIPS, while not breaking it for smallimp2011-01-061-7/+3
| | | | | | | | | | | | | | | | | | | | endian mips. This will also make it work automatically on all future big endian platforms.
* | | | Return 0 instead of garbage value.davidxu2011-01-061-2/+1
| | | | | | | | | | | | | | | | Found by: clang static analyzer
* | | | On i386 and amd64, consistently use the following options whenever wedim2011-01-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | want to avoid using any "advanced" CPU features: -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
* | | | In lib/libstand, sys/boot/ficl and sys/boot/zfs, -mno-sse3 should alsodim2011-01-051-4/+1
| | | | | | | | | | | | | | | | be used for amd64, not just for i386.
* | | | Quiet clang warnings by using string literal format strings.emaste2011-01-041-2/+2
| | | |
* | | | Because sleepqueue may still being used, we should always check wchan withdavidxu2011-01-041-6/+0
| | | | | | | | | | | | | | | | queue locked.
* | | | Switch mips architectures back to libgcc.kan2010-12-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | MIPS64 n64 binaries are broken with libcompiler_rt at this time. Switch mips back to libgcc until the cause of breakage is analyzed and fixed.
* | | | Revert most of r210764, now that mdocml does the rightuqs2010-12-283-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | thing with empty quotation macros. Requested by: Alex Kozlov
* | | | Always clear flag PMUTEX_FLAG_DEFERED when unlocking, as it is onlydavidxu2010-12-241-2/+2
| | | | | | | | | | | | | | | | significant for lock owner.
* | | | Add sleep queue code.davidxu2010-12-221-0/+175
| | | |
* | | | MFp4:davidxu2010-12-229-191/+666
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add flags CVWAIT_ABSTIME and CVWAIT_CLOCKID for umtx kernel based condition variable, this should eliminate an extra system call to get current time. - Add sub-function UMTX_OP_NWAKE_PRIVATE to wake up N channels in single system call. Create userland sleep queue for condition variable, in most cases, thread will wait in the queue, the pthread_cond_signal will defer thread wakeup until the mutex is unlocked, it tries to avoid an extra system call and a extra context switch in time window of pthread_cond_signal and pthread_mutex_unlock. The changes are part of process-shared mutex project.
* | | | Unbreak the build by temprorarily not using include directives insyrinx2010-12-201-4/+0
| | | | | | | | | | | | | | | | | | | | bsnmpd(1)' def files, until bsd.snmpmod.mk & Makefiles are fixed to pass proper include path flags to gensnmptree.
* | | | Bring in a SNMP module that allows configuration of SNMPv3 Notification targets.syrinx2010-12-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Reviewed by: philip Approved by: philip
* | | | Sort cross references by section.brucec2010-12-181-2/+2
| | | | | | | | | | | | | | | | Reported by: pluknet
* | | | Update shmget(2) with POSIX access permissions and remove non-standard SHM_R,brucec2010-12-173-13/+11
| | | | | | | | | | | | | | | | SHM_W and machine/param.h.
* | | | Fix a memory leak on the error conditionkevlo2010-12-141-1/+1
| | | | | | | | | | | | | | | | Reviewed by: rpaulo
* | | | Check the return value of malloc().kevlo2010-12-141-0/+5
| | | | | | | | | | | | | | | | | | | | Reviewed by: hselasky MFC after: 3 days
* | | | Bump manual page date.trasz2010-12-131-1/+1
| | | |
* | | | After PSARC/2010/029, "canonical six" no longer exists.trasz2010-12-131-1/+3
| | | |
* | | | Fix stack alignment (required to be to 16 bytes) instead of ptrace andnwhitehorn2010-12-112-5/+5
| | | | | | | | | | | | | | | | cerror on powerpc64.
* | | | The use of snprintf() to append to a buffer is not valid according to C99kevlo2010-12-111-1/+2
| | | |
* | | | Add a .note.ABI-tag section to ia64 startup files by linking crtbrand.ctijl2010-12-101-8/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in crt1.o. On other architectures crtbrand.c is included from crt1.c, but that's not a C source code file on ia64. Instead it is compiled separately and included in crt1.o using incremental linking. Tested by: dim (previous version) Approved by: kib (mentor)
* | | | Let all .c and .S files under lib/csu consistently use the __FBSDID()dim2010-12-0921-50/+61
| | | | | | | | | | | | | | | | | | | | macro for identification, instead of several different hand-rolled variants (plain .ident, .ascii, etc).
* | | | When reopening a stream backed by an open file descriptor, do not closejhb2010-12-091-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the existing file descriptor. Instead, let dup2() atomically close the old file descriptor when assigning the newly opened file to the same descriptor. This closes a race in a multithreaded application where a concurrent open() could allocate the existing file descriptor in between the calls to close() and dup2(). PR: threads/79887 Submitted by: Dmitrij Tejblum tejblum of yandex-team.ru Reviewed by: davidxu MFC after: 1 week
* | | | In bsnmpd(1) add support for SNMPv3 message processing model, including ↵syrinx2010-12-081-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | message authentication, packet encryption & view-based access control (RFC 3412, 3414, 3415). Sponsored by: The FreeBSD Foundation Reviewed by: philip@ (mostly) Approved by: philip@
OpenPOWER on IntegriCloud