Commit Graph

1338 Commits

Author SHA1 Message Date
martin
6c3cc552c2 Calling _lwp_create() with a bogus ucontext could trigger a kernel
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.

To avoid this, introduce a cpu_mcontext_validate() function and move all
sanity checks from cpu_setmcontext() there. Also untangle the netbsd32
compat mess slightly and add a cpu_mcontext32_validate() cousin there.

Add an exhaustive atf test case, based partly on code from Joel Sing.

Should finally fix the remaining open part of PR kern/43903.
2012-05-21 14:15:16 +00:00
reinoud
e0760a5e85 Clarify description of the msgrcv() return value. I kept on misreading it for
some reason. This ought to clarify it a bit more.
2012-05-15 11:37:01 +00:00
roy
258cf0abec Add capfile(5) to describe the termcap format.
Adjust various man pages and other documentation to point to capfile(5)
instead of termcap(5).
Remove getcap(3) as curses hasn't been building it for a long time.
Punt wrterm.c as tset no longer uses it.
2012-04-21 12:27:24 +00:00
wiz
2306ff07c8 Sort errors. 2012-04-13 16:32:15 +00:00
yamt
8cd2291e6a needs sys/lwpctl.h for constants 2012-04-13 15:14:58 +00:00
yamt
0df0c59ba6 - fix ambiguous sentences.
- mention scheduling class.
2012-04-13 15:14:27 +00:00
agc
6578e3b1a4 fix a couple of typos 2012-04-02 22:06:47 +00:00
matt
68e3ffa377 Convert to C89 prototypes. Remove use of __P 2012-03-20 16:26:12 +00:00
plunky
3d672173f2 pselect->paccept for this page 2012-03-19 09:34:36 +00:00
christos
59ba550f28 fail as the man page says sched_rr_get_interval should. 2012-03-18 02:04:39 +00:00
jruoho
0208cf2398 Use more markup. 2012-03-14 13:24:48 +00:00
christos
c5e820cae4 PR/45989: Martin Husemann: lint invocation does include -w only on i386
- turn lint -w for all the platforms after fixing the lint warnings.
- add _DIAGASSERTS() for casts that would assign values to types that
  would not fit.
- change types, add casts
- change into ansii prototypes
- turn on _DIAGNOSTIC for libc (during current, to be eliminated for release
  builds)

approved by core@
2012-03-13 21:13:30 +00:00
joerg
4acff4c01b Implement sem_timedwait. 2012-03-08 21:59:24 +00:00
wiz
87b2e48e9c Sort error descriptions. 2012-03-04 11:58:31 +00:00
dholland
e9f7fa95bf Clarify description of sticky bit, based on a 3-year-old suggestion by
Hubert Feyrer.
2012-03-04 00:07:44 +00:00
joerg
1d9862f144 Drop obsolete incompatibility note for interaction with libpthread. 2012-03-02 18:07:17 +00:00
matt
c18d70cbd8 Emit SA syscalls using SYS_compat_60_* 2012-02-19 19:18:40 +00:00
dholland
7da608ca9c Update dangling references to quotactl(2), mostly now libquota(3), and to
quotactl(8), mostly now quotarestore(8). ok riz@
2012-02-13 19:53:24 +00:00
dholland
e7114a9280 Fix wrong xref; wrote quotactl(8), meant quotacheck(8). ok riz@ 2012-02-13 19:50:15 +00:00
wiz
074fd0cb6c Merge descriptions for same error code. 2012-02-13 13:22:09 +00:00
dholland
62cfdf3316 Quota-related docs fixes:
- Remove old quotactl(2); replace with new __quotactl(2).
- Document quota_getrestrictions(3), the semantic restriction codes,
  and quota_quotaon/off(3).
- Update VFS_QUOTACTL(9), which was still describing the pre-proplib API.

Approved by releng for the freeze.
2012-02-13 01:24:00 +00:00
martin
fcb6901656 Add missing <sys/spawn.h> include 2012-02-12 01:46:05 +00:00
martin
19f52532ad Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.
2012-02-11 23:31:22 +00:00
wiz
890a9f1122 Remove trailing whitespace. Bump date for previous. 2012-02-01 13:30:42 +00:00
manu
5036fcef74 Document when recv(2) returns 0 2012-02-01 13:29:15 +00:00
dholland
59b296daa7 Change the syscall API for quotas over to the new non-proplib one.
- struct vfs_quotactl_args -> struct quotactl_args
   - add sys/stdint.h to sys/quotactl.h for clean userland build
   - install sys/quotactl.h in /usr/include
   - update set lists for same
   - add new marshalling code in libquota
   - add new unmarshalling code in vfs_syscalls.c
   - discard proplib interpreter code in vfs_quotactl.c
   - add dispatching code for the 14 quotactl ops in vfs_quotactl.c
   - mark the proplib quotactl syscall obsolete
   - add a new syscall number for the new quotactl syscall
   - change the name of the syscall to __quotactl()
   - remove the decl of the old quotactl from quota/quotaprop.h
   - add a decl of the new quotactl to sys/quotactl.h
   - update the libc build
   - update ktruss
   - remove proplib marshalling code from libquota
   - update copy of syscall table in gdb ppc sources
   - hack rumphijack to accomodate new quotactl name (as I recall,
     pooka wanted such a name change to simplify something, but I
     don't really see what/how)

This change appears to require a kernel version bump for rumpish
reasons.
2012-02-01 05:34:38 +00:00
wiz
be748bdcc2 Add Nm for __clone, man page is already linked to that name.
Noted by Abhinav Upadhyay.
2012-01-29 11:44:54 +00:00
wiz
a3c4a222b1 Bump date for previous. 2012-01-25 09:18:52 +00:00
christos
5418d2a724 As discussed in tech-kern, provide the means to prevent delivery of SIGPIPE
on EPIPE for all file descriptor types:

- provide O_NOSIGPIPE for open,kqueue1,pipe2,dup3,fcntl(F_{G,S}ETFL) [NetBSD]
- provide SOCK_NOSIGPIPE for socket,socketpair [NetBSD]
- provide SO_NOSIGPIPE for {g,s}seckopt [NetBSD/FreeBSD/MacOSX]
- provide F_{G,S}ETNOSIGPIPE for fcntl [MacOSX]
2012-01-25 00:28:35 +00:00
reinoud
5bd510aeaa Revert MAP_NOSYSCALLS patch. 2012-01-05 15:19:52 +00:00
wiz
88918228b2 Fix a sentence, following a hint by Abhinav Upadhyay. 2012-01-04 10:53:39 +00:00
wiz
e62237163a New sentence, new line. Bump date for previous. 2011-12-20 16:43:14 +00:00
reinoud
d131102a3b Add a MAP_NOSYSCALLS flag to mmap. This flag prohibits executing of system
calls from the mapped region. This can be used for emulation perposed or for
extra security in the case of generated code.

Its implemented by adding mapping-attributes to each uvm_map_entry. These can
then be queried when needed.

Currently the MAP_NOSYSCALLS is only implemented for x86 but other
architectures are easy to adapt; see the sys/arch/x86/x86/syscall.c patch.
Port maintainers are encouraged to add them for their processor ports too.
When this feature is not yet implemented for an architecture the
MAP_NOSYSCALLS is simply ignored with virtually no cpu cost..
2011-12-20 15:39:35 +00:00
njoly
973e485533 Start making fs read(2) fail with EISDIR if the implementation does
not allow read on directories (kernfs, rumpfs, ptyfs and sysvbfs).
Adjust man page accordingly, and add a small corresponding vfs
testcase.
2011-12-12 19:11:21 +00:00
christos
13f82b913b document MNT_RELATIME 2011-11-18 21:04:21 +00:00
wiz
a71cec48de Remove trailing whitespace. Merge two EINVAL entries. 2011-11-16 22:43:27 +00:00
christos
8cc2344a47 mention RLIMIT_RSS is borked. 2011-11-15 22:45:26 +00:00
christos
8f5455bf91 document ITIMER_MONOTONIC. 2011-10-27 16:10:37 +00:00
wiz
8d207e698a Fix typo reported by Henning Petersen in PR 45515. 2011-10-25 09:26:53 +00:00
christos
9292cfb210 close on exec fixes:
- open + fcntl -> open O_CLOEXEC
- configuration database file descriptors that can stay open are now opened
  fopen(db, "re")
2011-10-15 23:00:01 +00:00
rmind
0d8d4f7455 Amend previous: just leave the part that mmap() was designed for 4.2BSD
and do not mention 4.4BSD until it becomes clear when exactly the interface
was shipped.
2011-10-15 22:03:03 +00:00
rmind
cd963eaff9 Mention that mmap(2) was designed for 4.2BSD, but really appeared in 4.4BSD. 2011-10-15 21:39:35 +00:00
rmind
50902a3b80 Mention POSIX conformance of some functions, when they appeared, sprinkle .Xr. 2011-10-15 21:35:49 +00:00
christos
b13e8d0c26 Remove duplicate documentation that is mentioned in stickt(7) 2011-10-12 22:46:36 +00:00
njoly
e2c203c871 Note functions failure for unknown timer type. 2011-10-03 15:49:02 +00:00
apb
f29014459b There's no st_block field; it's st_blocks. 2011-09-14 11:49:21 +00:00
jmcneill
9a881a9b98 Document PT_SYSCALLEMU 2011-08-31 23:04:33 +00:00
enami
75f2eef8f6 Fix the name of syscall which takes timespec as argument. 2011-08-22 22:14:46 +00:00
wiz
17d9c004a3 Remove trailing whitespace. Bump date for previous.
New sentence, new live. End sentence with dot.
2011-08-17 08:29:20 +00:00
manu
5b61306f9b Add futimens(2) and part of utimnsat(2) 2011-08-17 07:22:33 +00:00