summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys
Commit message (Collapse)AuthorAgeFilesLines
* MFC r295407:kib2016-03-121-0/+1
| | | | Make libc __pthread_map_stacks_exec() interposed.
* MFC r294234: utimensat(2): Correct description of [EINVAL] error.jilles2016-01-211-3/+6
|
* MFC r293783: futimens/utimensat: Use the new system calls.jilles2016-01-153-4/+10
| | | | | | | | | Update the __FreeBSD_version check in lib/libc/sys/futimens.c and lib/libc/sys/utimensat.c. Before this, fallback code using futimes/futimesat/lutimes was used except when running on a sufficiently recent 11-current kernel. Also, update the history section in the man page.
* MFC r287964:trasz2016-01-121-0/+7
| | | | | | | | | | | | | Kernel part of reroot support - a way to change rootfs without reboot. Note that the mountlist manipulations are somewhat fragile, and not very pretty. The reason for this is to avoid changing vfs_mountroot(), which is (obviously) rather mission-critical, but not very well documented, and thus hard to test properly. It might be possible to rework it to use its own simple root mount mechanism instead of vfs_mountroot(). Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2698
* MFC r277610 (by jillies):dchagin2016-01-095-0/+506
| | | | Add futimens and utimensat system calls.
* MFC r292513: clock_gettime(2),gettimeofday(2): Remove [EFAULT] error.jilles2015-12-272-8/+2
| | | | | | | | | Depending on system configuration and parameters, clock_gettime() and gettimeofday() may not be system calls. If so, passing an invalid pointer will cause a signal and not an [EFAULT] error. From a standards perspective, this is OK since passing an invalid pointer is undefined behaviour.
* MFC 289636:jhb2015-11-061-2/+2
| | | | Switch pl_child_pid from int to pid_t.
* MFC 287386,288949,288993:jhb2015-10-231-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* MFC r288092:bdrewery2015-09-291-2/+0
| | | | | Avoid adding duplicates into OBJS. bsd.lib.mk already handles adding entries to OBJS based on SRCS.
* MFC r285428alc2015-09-271-4/+4
| | | | Correct the description of MADV_DONTNEED.
* Long overdue MFC r284377:jlh2015-09-221-8/+5
| | | | | | | | | | | | | NetBSD commit log: Use a constant array for the MIB. Newer LLVM decided that mib[] warranted stack protections, with the obvious crash after the setup was done. As a positive side effect, code size shrinks a bit. I'm not sure why this hasn't bitten us yes, but it is certainly possible and there are no real drawbacks to this change anyway. Submitted by: pfg Obtained from: NetBSD
* MFC r287292:kib2015-09-053-0/+3
| | | | | | | | | | Switch libc from using _sig{procmask,action,suspend} symbols, which are aliases for the syscall stubs and are plt-interposed, to the libc-private aliases of internally interposed sigprocmask() etc. MFC r287300: Use libthr interposed functions instead of syscalls, in posix_spawn()' child.
* MFC r286975:kib2015-08-271-2/+6
| | | | Remove the wrong asserts.
* Implement x86 ptrace(2) requests PT_{GET,SET}{FS,GS}BASE.kib2015-08-051-2/+189
| | | | | | | | | | | | | | | | | | | | | | MFC r284918: Add helper fill_based_sd(9). MFC r284919: Add x86 PT_GETFSBASE, PT_GETGSBASE machine-depended ptrace requests to obtain the thread %fs and %gs bases. Add x86 PT_SETFSBASE and PT_SETGSBASE requests to set the bases from debuggers. The set requests, similarly to the sysarch({I386,AMD64}_SET_FSBASE), override the corresponding segment registers. MFC r284965: Document x86 machine-specific ptrace(2) requests. MFC r285011: Disallow a debugger on 64bit system to set fs/gs bases of the 32bit process beyond the end of the process address space. MFC r285104: Grammar and language fixes.
* MFC r285251:trasz2015-08-021-3/+3
| | | | | | Fix markup. Sponsored by: The FreeBSD Foundation
* MFC 281887:jhb2015-06-022-2/+2
| | | | | Reassign copyright statements on several files from Advanced Computing Technologies LLC to Hudson River Trading LLC.
* MFC 282417:jhb2015-06-021-7/+19
| | | | | | | | | | | | | | | | Various updates to the ftruncate(2) documentation: - Note that ftruncate(2) can operate on shared memory objects and cross reference shm_open(2). - Note that ftruncate(2) does not change the file position pointer (aka seek pointer) of the file descriptor. - ftruncate(2) will fail with EINVAL for all sorts of other fd types than just sockets, so instead note that it fails for all but regular files and shared memory objects. - Note that ftruncate(2) also appeared in 4.2BSD along with truncate(2). (Or at least the manpage for both appeared in 4.2, I did not check the kernel code itself to see if either predated 4.2.) PR: 199472
* MFC 282416:jhb2015-06-021-4/+4
| | | | | | | | Partially revert r255486, the first argument to socketpair() is a socket domain, not a file descriptor. Use 'domain' instead of the original 'd' for this argument to match socket(2). PR: 199491
* MFC 281170:jhb2015-06-021-2/+2
| | | | | | | vfork() first appeared in 3BSD which pre-dates 2.9BSD. Verified via the copy of 3BSD on disc 1 of "The CSRG Archives". PR: 198612
* MFC r280983:trasz2015-05-151-3/+3
| | | | | | | Update open(2) to make it more obvious that O_NOCTTY and O_TTY_INIT are ignored. Sponsored by: The FreeBSD Foundation
* MFC r278352:trasz2015-05-151-6/+1
| | | | | | Remove useless comment. Sponsored by: The FreeBSD Foundation
* MFC r281712:kib2015-04-254-0/+107
| | | | Make wait6(2), waitid(3) and ppoll(2) cancellation points.
* MFC r274933 (by bapt), r281470:pluknet2015-04-191-7/+2
| | | | | r274933 - Ta is only allowed with Bl -column not in Bl -item r281470 - Remove obsolete bits about maximum number of file systems.
* MFC r280818:kib2015-04-124-2/+78
| | | | Make kevent(2) a cancellation point.
* MFC r280959:kib2015-04-081-3/+0
| | | | Correctly handle __fcntl_compat symbol for the !SYSCALL_COMPAT case.
* MFC r272291:bdrewery2015-04-031-1/+3
| | | | Document [EPERM] for UNIX sockets.
* Merge r263842 from HEAD to stable/10:rwatson2015-03-194-8/+8
| | | | | | Update system man pages for s/capability.h/capsicum.h/. Sponsored by: Google, Inc.
* MFC: r278870marius2015-02-241-1/+7
| | | | | | | | Unbreak sparc64 after r276630 (MFCed to stable/10 in r277317) by calling __sparc_sigtramp_setup signal trampoline as part of the MD __sys_sigaction again. Submitted by: kib (initial versions)
* MFC r278751:kib2015-02-171-0/+2
| | | | Properly interpose libc spinlocks, was missed in r276630.
* MFC r277322:kib2015-01-251-1/+78
| | | | | Add procctl(2) PROC_TRACE_CTL command to enable or disable debugger attachment to the process.
* Fix known issues which blow up the process after dlopen("libthr.so")kib2015-01-1836-22/+1707
| | | | | | | | | | | | | | | | | | | | | (or loading a dso linked to libthr.so into process which was not linked against threading library). MFC r276630: Remove interposing, fix malloc, reinstall signal handlers wrappers on libthr load. MFC r276681: Avoid calling internal libc function through PLT or accessing data though GOT. MFC r277032: Reduce the size of the interposing table and amount of cancellation-handling code in the libthr. MFC note: r276646 ("do not erronously export 'openat' symbol from rtld") is not applicable to stable/10 yet, since PATHFDS support was not merged.
* Merge reaper facility.kib2015-01-051-5/+222
| | | | | | | | | | | | | | | | | | | | | MFC r270443 (by mjg): Properly reparent traced processes when the tracer dies. MFC r273452 (by mjg): Plug unnecessary PRS_NEW check in kern_procctl. MFC 275800: Add a facility for non-init process to declare itself the reaper of the orphaned descendants. MFC r275821: Add missed break. MFC r275846 (by mckusick): Add some additional clarification and fix a few gammer nits. MFC r275847 (by bdrewery): Bump Dd for r275846.
* MFC r274462: Add the ppoll() system call.dchagin2014-12-213-2/+70
|
* MFC r271315 (by joel):kib2014-12-181-59/+84
| | | | | | | Minor mdoc nit. MFC r275806: Markup fixes for kqueue(2), no content changes.
* MFC r268843 (by bapt):kib2014-12-181-3/+20
| | | | Extend kqueue's EVFILT_TIMER by adding precision unit flags support.
* MFC 271635,271722:jhb2014-12-161-14/+24
| | | | | | | | | | | | | | | | - Only the manpage updates from 271635 are merged to give additional heads up for the stricter checks in 11, but the kernel in 10 remains permissive. - Fail with EINVAL if an invalid protection mask is passed to mmap(). - Fail with EINVAL if an unknown flag is passed to mmap(). - Fail with EINVAL if both MAP_PRIVATE and MAP_SHARED are passed to mmap(). - Require one of either MAP_PRIVATE or MAP_SHARED for non-anonymous mappings. - Remove mention of MAP_INHERIT. It hasn't been implemented for thirteen years. - Remove mention of unimplemented MAP_SWAP. There are no future plans to implement it.
* MFC r263928:brooks2014-12-061-1/+1
| | | | | | Use the correct variable name in the example code. PR: 195749
* MFC r272884:delphij2014-10-201-2/+2
| | | | accept(2) may and can return EAGAIN, document it.
* MFC r268446:markj2014-07-291-1/+1
| | | | Fix a typo.
* MFC r268643:kevlo2014-07-241-1/+4
| | | | Document that listen(2) can fail with EDESTADDRREQ.
* MFC r268212:kib2014-07-101-46/+20
| | | | | Note that most errors are possible for all syscalls from utimes(2) family. Minor wording corrections.
* MFC r267909: Document EINVAL.pluknet2014-07-032-2/+10
| | | | PR: 191382
* MFC r267630:kib2014-06-261-6/+27
| | | | Add MAP_EXCL flag for mmap(2).
* MFC r267629:kib2014-06-261-11/+6
| | | | Tidy up code of the wrapper.
* MFC r266285,266866:bjk2014-06-011-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r266285 | bjk | 2014-05-16 23:05:52 -0400 (Fri, 16 May 2014) | 9 lines Correct documentation of the limit on how much memory can be mlock()ed vm.max_wired is a system-wide limit, not per-process. Reword the section to make this more clear. PR: docs/189214 Submitted by: Lawrence Chen (original text) Approved by: hrs (mentor) ------------------------------------------------------------------------ r266866 | bjk | 2014-05-29 22:16:28 -0400 (Thu, 29 May 2014) | 5 lines Minor mdoc fix Submitted by: hrs Approved by: hrs (mentor, implicit) ------------------------------------------------------------------------ PR: docs/189214 Approved by: hrs (mentor)
* MFC r265534:pho2014-05-211-5/+7
| | | | | | | | msync(2) must return ENOMEM and not EINVAL when the address is outside the allowed range or when one or more pages are not mapped. This according to The Open Group Base Specifications Issue 7. Sponsored by: EMC / Isilon storage division
* MFC r258794: chmod(2): Document S_ISVTX following SUSv3/SUSv4.jilles2014-04-051-10/+16
| | | | | | S_ISTXT is non-standard. While here, also update fchmodat() standards entry to POSIX.1-2008.
* waitid(2): Do not tell userland programmers to include <sys/signal.h>.jilles2014-04-051-1/+1
| | | | Userland should get these definitions by including <signal.h>.
* MFC: r262296brueffer2014-02-281-3/+3
| | | | | | | Match the correct variable to the variable description. PR: 121173 Submitted by: Thomas Mueller <tmueller at sysgo.com>
* MFC: r261447brueffer2014-02-101-1/+1
| | | | Fix a typo.
OpenPOWER on IntegriCloud