summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys
Commit message (Collapse)AuthorAgeFilesLines
* mq_setattr(2): Add missing const to man page.jilles2011-05-171-2/+2
| | | | | | The declaration in the header file is correct. MFC after: 1 week
* Update sticky(7) cross references.pluknet2011-05-132-4/+4
| | | | | PR: docs/124468 X-MFC with: r218998
* - Clarification on kld_file_stat.sizegjb2011-04-231-4/+4
| | | | | | | | | - While here, remove a few C comments that don't seem to contribute anything additional to the man page. PR: 146047 Submitted by: arundel MFC after: 3 days
* Add the posix_fallocate(2) syscall. The default implementation inmdf2011-04-183-1/+148
| | | | | | | | | | | | | | vop_stdallocate() is filesystem agnostic and will run as slow as a read/write loop in userspace; however, it serves to correctly implement the functionality for filesystems that do not implement a VOP_ALLOCATE. Note that __FreeBSD_version was already bumped today to 900036 for any ports which would like to use this function. Also reserve space in the syscall table for posix_fadvise(2). Reviewed by: -arch (previous version)
* getfh(2): Add xrefs for fhopen(2), open(2), stat(2).jilles2011-04-141-1/+5
| | | | MFC after: 1 week
* Fix mdoc errors.kib2011-04-011-3/+2
| | | | | Submitted by: ru MFC after: 3 days
* Expose the rctl(2) API in libc.trasz2011-03-301-0/+5
|
* Document O_CLOEXEC.kib2011-03-251-4/+16
| | | | | Reviewed by: jhb MFC after: 1 week
* When building libc with the syscall compatibility, don't also generate themarcel2011-03-171-1/+4
| | | | | | | | | syscall assembly files. This results in conflicting dependencies and can cause unexpected results for parallel builds. This is because the .c file and the .S file both generate the same .o file. Submitted by: Simon Gerraty <sjg@juniper.net> Sponsored by: Juniper Networks
* rfork(2): Discourage rfork_thread-like approaches.jilles2011-03-151-17/+3
| | | | | | | | | Calling rfork_thread(3) does not interoperate with pthreads and global state is not properly protected. Remove the BUGS section suggesting LinuxThreads entirely. With the current pthread library libthr, all threads are kernel-level entities so there seems little reason to use LinuxThreads.
* Move cap_enter(2) and cap_getmode(2) symbols from FBSD_1.1 to FBSD_1.2.rwatson2011-03-121-2/+2
| | | | | | | Suggested by: kib Obtained from: Capsicum Project Sponsored by: Google MFC after: 3 months
* Move getloginclass(2) and setloginclass(2) to FBSD_1.2, where they should'vetrasz2011-03-061-2/+2
| | | | been added in the first place.
* Add FBSD_1.2; syscalls added in 9-CURRENT are supposed to go there.trasz2011-03-061-0/+3
| | | | Suggested by: kib
* Add manual page for getloginclass(2) and setloginclass(2).trasz2011-03-062-2/+100
|
* Add two new system calls, setloginclass(2) and getloginclass(2). This makestrasz2011-03-051-0/+2
| | | | | | | | | it possible for the kernel to track login class the process is assigned to, which is required for RCTL. This change also make setusercontext(3) call setloginclass(2) and makes it possible to retrieve current login class using id(1). Reviewed by: kib (as part of a larger patch)
* Make cap_new(2) and cap_getmode(2) symbols from libc public so applicationsrwatson2011-03-033-1/+105
| | | | | | | | | | | | can link against them. Add man pages for the new system calls, with one errant forward reference to changes not yet present in FreeBSD, but soon will be. Reviewed by: anderson Obtained from: Capsicum Project Sponsored by: Google, Inc. Discussed with: benl, kris, pjd MFC after: 3 months
* Add description of ECAPMODE to errno(2) man page.rwatson2011-03-031-0/+2
| | | | | | | Discussed with: anderson Obtained from: Capsicum Project Sponsored by: Google, Inc. MFC after: 3 months
* Remove sysctl vm.max_proc_mmap used to protect from KVA space exhaustion.pluknet2011-02-241-3/+0
| | | | | | | | | | | | | | As it was pointed out by Alan Cox, that no longer serves its purpose with the modern UMA allocator compared to the old one used in 4.x days. The removal of sysctl eliminates max_proc_mmap type overflow leading to the broken mmap(2) seen with large amount of physical memory on arches with factually unbound KVA space (such as amd64). It was found that slightly less than 256GB of physmem was enough to trigger the overflow. Reviewed by: alc, kib Approved by: avg (mentor) MFC after: 2 months
* Emit .note.GNU-stack for the syscall stubs generated by libc only onkib2011-01-251-2/+9
| | | | | | | architectures that support this .note. In particular, do not unneccessary emit the notes on ia64 and sparc64, which ABI require non-executable stacks. Tested by: marcel
* Document PT_FLAG_FORKED, PT_FOLLOW_FORK, pl_tdname and pl_child_pid.kib2011-01-251-5/+40
| | | | MFC after: 2 weeks
* 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
* 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
* Emit .note.GNU-stack for the syscall stubs generated by libc.kib2011-01-071-0/+2
|
* 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.
* This commit implements the SO_USER_COOKIE socket option, which letsluigi2010-11-121-0/+18
| | | | | | | | | | | | | | | | | | | | | | | you tag a socket with an uint32_t value. The cookie can then be used by the kernel for various purposes, e.g. setting the skipto rule or pipe number in ipfw (this is the reason SO_USER_COOKIE has been implemented; however there is nothing ipfw-specific in its implementation). The ipfw-related code that uses the optopn will be committed separately. This change adds a field to 'struct socket', but the struct is not part of any driver or userland-visible ABI so the change should be harmless. See the discussion at http://lists.freebsd.org/pipermail/freebsd-ipfw/2009-October/004001.html Idea and code from Paul Joe, small modifications and manpage changes by myself. Submitted by: Paul Joe MFC after: 1 week
* - Note that non-superusers are not allowed to set the SF_ARCHIVEDjh2010-10-291-3/+7
| | | | | | | | | flag. [1] - Note that also fchflags(2) will return EPERM for attempts to set or unset the SF_SNAPSHOT flag. Submitted by: Garrett Cooper [1] MFC after: 1 week
* mdoc: make pages render with mandocuqs2010-10-213-4/+3
| | | | | | It's a bit more pedantic regarding .Bl list elements. This has an added benefit of unbreaking the ipfw(8) manpage, where groff was silently skipping one list element.
* Clang related fixes:rpaulo2010-10-131-1/+1
| | | | | | | * When calling syslog(), pass a format string. * Define YY_NO_INPUT on nslexer.l Submitted by: Norberto Lopes <nlopes.ml at gmail.com>
* mdoc: drop redundant .Pp and .LP callsuqs2010-10-0810-11/+0
| | | | They have no effect when coming in pairs, or before .Bl/.Bd
* Fix exec_imgact_shell()'s handling of two error cases: (1) Previously, ifalc2010-09-211-4/+6
| | | | | | | | | | | | | | | | | | | | | | | the first line of a script exceeded MAXSHELLCMDLEN characters, then exec_imgact_shell() silently truncated the line and passed on the truncated interpreter name or argument. Now, exec_imgact_shell() will fail and return ENOEXEC, which is the commonly used errno among Unix variants for this type of error. (2) Previously, exec_imgact_shell()'s check on the length of the interpreter's name was ineffective. In other words, exec_imgact_shell() could not possibly fail and return ENAMETOOLONG. The reason being that the length of the interpreter name had to exceed MAXSHELLCMDLEN characters in order that ENAMETOOLONG be returned. But, the search for the end of the interpreter name stops after at most MAXSHELLCMDLEN - 2 characters are scanned. (In the end, this particular error is eventually discovered outside of exec_imgact_shell() and ENAMETOOLONG is returned. So, the real effect of this second change is that the error is detected earlier, in exec_imgact_shell().) Update the definition of MAXINTERP to the actual limit on the size of the interpreter name that has been in effect since r142453 (from 2005). In collaboration with: kib
* Bump dates in dbopen(3) and cpuset_getaffinity(2) from r212441 andgjb2010-09-121-1/+1
| | | | | | | r212438, repectively. Approved by: keramida (mentor) MFC after: 1 week
* Add EINVAL to list of possible return values for cpuset_getaffinity(2).gjb2010-09-101-0/+6
| | | | | | | | PR: 149978 Submitted by: gcooper Patch by: gcooper Approved by: keramida (mentor) MFC after: 1 week
* Because POSIX does not allow EINTR to be returned from sigwait(),davidxu2010-09-103-0/+50
| | | | | | | | add a wrapper for it in libc and rework the code in libthr, the system call still can return EINTR, we keep this feature. Discussed on: thread Reviewed by: jilles
* Add ECONNRESET to list of possible errors in connect(2).gjb2010-09-061-1/+3
| | | | | | | PR: 148683 Submitted by: Gennady Proskurin <gpr at mail dot ru> Approved by: keramida (mentor) MFC after: 1 week
* Use NULL instead of 0 for pointer in example.kib2010-08-291-1/+1
| | | | MFC after: 3 days
* Add the MAP_PREFAULT_READ option to mmap(2).alc2010-08-281-1/+14
| | | | Reviewed by: jhb, kib
* Fix incorrect usage of 'assure' and 'insure'.brucec2010-08-281-1/+1
| | | | Approved by: rrs (mentor)
* Powerpc is special here. powerpc and powerpc64 use different ABIs, soimp2010-08-241-4/+2
| | | | | | their implementations aren't in the same files. Introduce LIBC_ARCH and use that in preference to MACHINE_CPUARCH. Tested by amd64 and powerpc64 builds (thanks nathanw@)
* Remove extra FreeBSD tag.kib2010-08-241-1/+0
| | | | MFC after: 3 days
* Move the __stack_chk_fail_local@FBSD_1.0 compat symbol definition intokib2010-08-243-4/+22
| | | | | | | | | | | the separate .o for libc_pic.a. This prevents rtld from making the symbol global. Putting the stack_protector_compat.c into the public domain acknowledged by kan. Reviewed by: kan MFC after: 2 weeks
* MFtbemd:imp2010-08-231-3/+3
| | | | | Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want to test of all the CPUs of a given family conform.
* Use aux vector to get values for SSP canary, pagesize, pagesizes array,kib2010-08-171-0/+8
| | | | | | | | | | | number of host CPUs and osreldate. This eliminates the last sysctl(2) calls from the dynamically linked image startup. No objections from: kan Tested by: marius (sparc64) MFC after: 1 month
* Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki whilejoel2010-08-165-6/+6
| | | | | | translating these manual pages. Minor corrections by me. Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>
* Fix typos and spelling mistakes.joel2010-08-062-2/+2
|
* Spelling fixes.joel2010-08-021-1/+1
|
* Fix a couple of typos.uqs2010-07-301-1/+1
| | | | | | PR: docs/148891 Submitted by: olgeni MFC after: 1 week
* Update mlockall(2) to mention that it's superuser-only syscall, justtrasz2010-07-272-4/+7
| | | | | | | like the mlock(2) manual page says. Update mlock(2) to say that hitting RLIMIT_MEMLOCK results in ENOMEM, not EAGAIN. MFC after: 1 month
* Document pl_siginfo and PT_FLAG_SI for PT_LWPINFO.kib2010-07-101-4/+20
| | | | MFC after: 1 month
* Just like in case of setgroups(2), for getgroups(2) also advice includingpjd2010-06-261-1/+1
| | | | | sys/param.h instead of sys/types.h so we get NGROUPS_MAX and NGROUPS definitions.
OpenPOWER on IntegriCloud