Commit Graph

17359 Commits

Author SHA1 Message Date
riastradh
19aeab521f Rework minherit(2) man page into a table.
XXX Do we not guarantee page-granularity inheritance?  Cursory glance
at uvm suggests we do -- can we nix the caveats about regions vs
pages?
2014-08-05 15:01:03 +00:00
wiz
87561671c1 defintion -> definition 2014-08-03 19:14:24 +00:00
rmind
c2b1c6cc23 Cross-link npf(7). 2014-08-03 00:02:56 +00:00
christos
be225fdda5 PR/49045: Tetsuya Isaki: remove remaining caddr_t in ptrace(2) 2014-07-28 08:10:23 +00:00
justin
28e2f06e08 Clean up error handling in rumpuser_init() 2014-07-25 14:00:31 +00:00
wiz
ce9ef29908 Serial comma, more markup, remove trailing whitespace. 2014-07-25 10:21:34 +00:00
wiz
d882c3d502 Sort errors. Whitespace nits. 2014-07-25 08:47:42 +00:00
wiz
03f93851e3 Sort SEE ALSO. 2014-07-25 08:44:54 +00:00
dholland
d35912857e Bump libc minor version for new syscalls. 2014-07-25 08:31:06 +00:00
dholland
d0352e761c Add userlevel manifestations of posix_fallocate and fdiscard, in
unistd.h and libc, and add a man page.

Allow wiggle room in the man page for implementations of fallocate
that either (a) don't fully unwind on failure, leaving new blocks
allocated without changing the file size, or (b) create only in-memory
transient reservations that disappear when crashing or rebooting.

Also, add crossreference to fdiscard from ftruncate(2), and remove the
old BUGS entry from there that called for a generalized version that
allows discarding ranges of a file: that's what fdiscard is.
2014-07-25 08:30:47 +00:00
mrg
1e4a2ee3ed introduce a new pci_drvname(3) to libpci. implement it in the backend
via PCI_IOC_DRVNAME.

update manual and set lists (and remove a couple of doubled entries.)o

this will be used in libpciaccess() to implement the has_kernel_driver()
method.
2014-07-25 01:38:26 +00:00
htodd
c1a007a161 Build fix (use error when defined). 2014-07-23 05:00:38 +00:00
rmind
a02b7176fb NPF: rework of the connection saving and restoring:
- Add support for saving a snapshot of the current connections together
  with a full configuration.  Support a reverse load operation.  Eliminate
  the old 'sess-save' and 'sess-load' in favour of the new mechanism.
- Share code between load and reload operations: the latter performs
  load from npf.conf without affecting the connections.
- Simplify and fix races with connection loading.
- Bump NPF_VERSION.
2014-07-23 01:25:34 +00:00
justin
648d66f04b Clean up random implementation for librumpuser
Use /dev/urandom for platforms without arc4random, not srandom(),
deduplicate code, do not read excessive random bytes

Reviewed by pooka@
2014-07-22 22:41:58 +00:00
christos
e92a47d1e2 rename npf.3 -> libnpf.3 per rmind@'s request 2014-07-22 22:28:47 +00:00
gson
1c06c49918 Ignore the contents of revents when poll() returns failure.
This is one more part to the fix for PR kern/46464.  Patch
from pooka.
2014-07-21 14:23:43 +00:00
christos
6030f04a15 amend the new destroy function to take function pointers. 2014-07-20 20:17:21 +00:00
wiz
6ce80a189d Remove trailing whitespace. Sort SEE ALSO. Add comma in list. 2014-07-20 13:41:14 +00:00
christos
842ee049dd Our hdestroy implementation was non-conformant because it freed the key of
each entry. Add a new function hdestroy1 that allows the user to control
what gets freed. Pointed out by Pedro Giffuni at FreeBSD.
2014-07-20 13:34:17 +00:00
dholland
156ed6c7d3 fix usage 2014-07-19 19:26:47 +00:00
lneto
4ab4902eb2 lua: updated from 5.1 to 5.3 work3
* lua(1):
  - changed lua_Integer to intmax_t
  - updated distrib/sets/lists and etc/mtree
  - updated bsd.lua.mk
  - fixed bozohttpd (lua-bozo.c)
  - compatibilized bindings: gpio, sqlite
* lua(4):
  - removed floating-point and libc dependencies using '#ifndef _KERNEL'
  - fixed division by zero and exponentiation
  - libkern: added isalnum(), iscntrl(), isgraph(), isprint() and ispunct()
  - acpica: removed isprint() from acnetbsd.h
  - libc: moved strcspn.c, strpbrk.c and strspn.c to common
  - removed stub headers
  - compatibilized bindings: luapmf, luasystm
* reorganized luaconf.h
* updated doc/CHANGES and doc/RESPONSIBLE
2014-07-19 18:38:33 +00:00
wiz
0a3068e150 Use Nx. 2014-07-19 14:58:50 +00:00
roy
1ae594017c Document that our use of pthread_mutex_unlock(3) is async-signal-safe
and as such can be used in a phtread_atfork(3) child handler.
2014-07-19 14:53:22 +00:00
gson
6aaac7c3e2 Do not assert that the two threads do not simultanously notify each
other, because sometimes they do.  Should fix PR kern/46464.  OK pooka.
2014-07-19 14:14:21 +00:00
dholland
885875e18f Remove
Users should not depend on the memory sharing semantics of vfork() as
     other ways of speeding up the fork process may be developed in the
     future.

as we are not planning to deprecate vfork. Besides NetBSD's
compatibility policy means we wouldn't change it anyway but introduce
something new.

Add
     Portable applications should not depend on the memory sharing semantics
     of vfork() as implementations exist that implement vfork() as plain
     fork(2).

because this is or used to be a real hazard.

ok christos
2014-07-18 16:02:50 +00:00
dholland
b50dcf12b2 Clarify HISTORY and bump date. 2014-07-18 15:58:51 +00:00
dholland
bacb19df9d fix typo and minor usage issue 2014-07-18 15:56:44 +00:00
christos
fa7c13505e Document MAP_INHERIT_ZERO. 2014-07-18 12:39:17 +00:00
riastradh
f3a56da0a0 Hold arenas_mtx across (still unused) _malloc_pre/postfork (PR 47428). 2014-07-16 19:09:53 +00:00
christos
db6e70af12 basename_r and dirname_r are non-standard and different from what we define
here on FreeBSD. Their libgen.h exposes them unconditionally, so hide ours
for now.
2014-07-16 10:52:26 +00:00
pgoyette
4ba850aa8a Document the upper limit on size of props dictionary that was recently
imposed.
2014-07-15 18:24:44 +00:00
wiz
dade7144aa Clean up ERRORS (sort, merge). 2014-07-15 17:39:21 +00:00
christos
dbad683e58 Use TOOL_VFONTEDPR 2014-07-15 13:27:58 +00:00
christos
bba6cf07e1 stopgap for non-netbsd build. 2014-07-15 11:19:08 +00:00
christos
59925ff2ff Factor out the basename and dirname code into basename_r and dirname_r
which are static for now. Inspired by similar changes to android(bionic).
2014-07-14 20:44:45 +00:00
alnsn
e77183a6da Remove unused file. 2014-07-14 10:36:33 +00:00
joerg
23958df553 Don't include atomic.c, we have aliases for it in src/common. 2014-07-14 07:55:26 +00:00
blymn
0241cad29d Remove bogus length check - SUSV2 says add(n)str wraps and performs
special character processing so we should not be trying to limit the
length to the screen edge.  This partially fixes PR 48827, the test case
works now.
2014-07-13 01:58:08 +00:00
nakayama
63bc5e6959 Include sparc_v8 library into sparc64 32-bit compat libc library. 2014-07-12 19:21:48 +00:00
nakayama
847b247653 Use save instruction to set up a local stack frame.
This fixes a segmentation fault caused by bash 4.3 on sparc64
kernels with 32-bit userland, bash uses _setjmp/_longjmp heavyly
via sigsetjmp/siglongjmp since 4.3.

For 32-bit compat library which is compiled with -mcpu=ultrasparc
option (and define __sparc_v9__), use a similar code to 64-bit
library.
2014-07-12 19:11:57 +00:00
justin
3620d3dbee Add a fiber based implementation of librumpuser in addition to the
default pthreads based version.

Discussed with pooka@
2014-07-11 20:26:31 +00:00
justin
10b89fe038 Reinstate include of netdb.h, needed on some cross builds 2014-07-10 08:17:43 +00:00
justin
4ce85d0b6f Split out file and memory access in librumpuser
This allows alternate implementations to reuse these parts, and the file
parts will at the next hypercall revision be moved to their own driver.

Discussed with pooka@
2014-07-09 23:41:40 +00:00
christos
4d3bc7269f mention sig == 0 2014-07-09 16:06:47 +00:00
christos
80e781ab85 Bounds search for reallocated index, from OpenBSD via Andreas Fett 2014-07-06 18:15:34 +00:00
christos
0fb55ca669 PR/48957: Federico G. Schwindt: Restore commented out code that broke
rl_callback_handler.
2014-07-06 18:09:04 +00:00
dholland
efe0bd4dbe Remove stray .if make(insatll).
I would really like to know why this didn't fail the clean build I ran
last night.
2014-07-05 22:31:32 +00:00
dholland
b7b7574d3b Reorg docs, part 1:
Move all the reference manuals to subdirs of /usr/share/doc/reference.
We have subdirs ref1-ref9, corresponding to man page sections 1-9.

Everything that's the reference manual for a program (sections 1, 6,
8), C interface (sections 2, 3), driver or file system (section 4),
format or configuration (section 5), or kernel internal interface
(section 9) belongs in here.

Section 7 is a little less clear: some things that might go in section
7 if they were a man page aren't really reference manuals. So I'm only
putting things in reference section 7 that are (to me) clearly
reference material, rather than e.g. tutorials, guides, FAQs, etc.
This obviously leaves some room for debate, especially without first
editing the docs with this distinction in mind, but if people hate
what I've done things can always be moved again.

Note also that while roff macro man pages traditionally go in section
7, I have put all the roff documentation (macros, tools, etc.) in one
place in reference/ref1/roff. This will make it easier to find and
also easier to edit it into some kind of coherent form.
2014-07-05 19:22:41 +00:00
dholland
c3ab26950f Rework /usr/share/doc.
Update the <bsd.doc.mk> infrastructure, and update the docs to match
the new infrastructure.

- Build and install text, ps, pdf, and/or html, not roff sources.

- Don't wire the chapter numbers into the build system, or use them in
the installed pathnames. This didn't matter much when the docs were a
museum, but now that we're theoretically going to start maintaining
them again, we're going to add and remove documents periodically and
having the chapter numbers baked in creates a lot of thrashing for no
purpose.

- Specify the document name explicitly, rather than implicitly in a
path. Use this name (instead of other random strings) as the name
of the installed files.

- Specify the document section, which is the subdirectory of
/usr/share/doc to install into.

- Allow multiple subdocuments. (That is, multiple documents in one
output directory.)

- Enumerate the .png files groff emits along with html so they can be
installed.

- Remove assorted hand-rolled rules for running roff and roff widgetry
and add enough variable settings to make these unnecessary. This
includes support for
   - explicit use of soelim
   - refer
   - tbl
   - pic
   - eqn

- Forcibly apply at least minimal amounts of sanity to certain
autogenerated roff files.

- Don't exclude USD.doc, SMM.doc, and PSD.doc directories from the
build, as they now actually do stuff.

Note: currently we can't generate pdf. This turns out to be a
nontrivial problem with no immediate solution forthcoming. So for now,
as a workaround, install compressed .ps as the printable form.
2014-07-05 19:22:02 +00:00
dholland
01e782f371 Revert the following changes:
src/sys/sys/quotactl.h 1.37
   src/sys/compat/netbsd32/netbsd32.h 1.101
   src/sys/compat/netbsd32/netbsd32_netbsd.c 1.188, 1.189
   src/sys/kern/vfs_quotactl.c 1.39
   src/sys/kern/vfs_syscalls.c 1.483
   src/sys/ufs/lfs/ulfs_quota.c 1.11
   src/sys/ufs/ufs/ufs_quota.c 1.116
   src/lib/libquota/quota_kernel.c 1.5

and do them correctly.

If you're going to change the name of something, you need to change
the name of *all* the things with the same name, not just a handful,
and you should change it to something similar so it still matches the
rest of the system rather than just picking an arbitrarily different
name.

Hi, Joerg.

To wit, rename the quotactl "delete" operation to "del", because
"delete" is a reserved word in C++ and for some reason Joerg wants to
run internal interfaces used only by C code through his C++ compiler.
Do not rename it to "remove" instead, because this doesn't match
libquota or the rest of the usage throughout the system; and rename
all the related identifiers, not just the ones that blew the mind of
Joerg's C++ compiler.

Because this is not a user-facing API (the only userland consumer
sys/quotactl.h is libquota) it is sort of ok to make arbitrary
source-incompatible changes; however, by the same token it's completely
unnecessary. If it *were* a user-facing API that someone might have a
semi-rational reason to want to run a C++ compiler on, it would be
incorrect to change it at this point.
2014-06-28 22:27:50 +00:00
christos
321c9aef65 don't depend on expandtc to open the database or not. 2014-06-26 20:14:32 +00:00
spz
dd745abb62 Fix our iconv version for the issues that apply to us from CVE-2014-3951
(which are the:
- Consistently pass around context information using a simple pointer.
  This fixes some dereferencing bugs in Chinese character set conversions.
- Fix Simplified Chinese character set conversions by switching around the
  fields of an internal struct so it corresponds with the way variables of
  this type are initialised.
part)
Patch taken from FreeBSD and mutilated to fit.
FreeBSD credits: Manuel Mausz (reporter), Tijl Coosemans (report handler)
2014-06-24 22:24:18 +00:00
riastradh
7fd5a93a52 Add `remove arc4random' to mythical libc major bump todo list. 2014-06-23 14:14:10 +00:00
pooka
2f525beeee Hrmph, revert previous pending another fix. I tested it yesterday with
a slightly older tree, and of course it doesn't work anymore ...
2014-06-23 12:38:18 +00:00
shm
11ea949f80 PR/42032 fixed overrun in bm_exec(), free(3) clean ups 2014-06-23 10:43:25 +00:00
pooka
fbc749c67d Wrap pthread_create(). Shouldn't really have a functional effect,
apart from testing that rumpuser_thread_create() can actually survive
an unschedule/schedule cycle (which may or may not be necessary with
other hypercall implementations).
2014-06-22 20:17:23 +00:00
christos
f2d4db7cf6 use fparseln() instead of fgetln() for consistency (this was the last fgetln()
using parser in net/.
cVS: ----------------------------------------------------------------------
2014-06-19 15:09:07 +00:00
christos
08d13064c0 use fparseln() instead of abusing fgetln(), so that the last line that
might not have a terminating newline is processed.
2014-06-19 15:08:18 +00:00
christos
52e916d949 Fix incorrect example (what happens when len == 0?) 2014-06-19 14:27:50 +00:00
wiz
cdfd633d25 Add all functions to NAME section. End sentences with dots.
Bump date for previous.
2014-06-19 09:30:33 +00:00
msaitoh
5edf37f383 Fix "shadows a global declaration" compile error. 2014-06-19 05:31:15 +00:00
christos
20efb692ab cast gotsig because it is long on some systems. 2014-06-18 20:12:15 +00:00
christos
cc52c7c3a4 Add stdlib.h for abort() (Jess Thrysoee) 2014-06-18 18:52:49 +00:00
christos
e06822a79d Don't depend on weak aliases to define the vi "alias" expansion function,
provide an API instead to set it.
2014-06-18 18:12:28 +00:00
christos
1015249915 more man pages links 2014-06-18 17:50:55 +00:00
christos
017500be43 add mkostemp, mkostemps, mkstemps from FreeBSD. 2014-06-18 17:47:58 +00:00
christos
0bd5e60967 accomodate FreeBSD's flavor of weak references. 2014-06-18 13:03:08 +00:00
justin
9dd44a1195 Applications are not supposed to and do not need to include <features.h> explicitly 2014-06-17 09:53:59 +00:00
alnsn
f6181a22c5 Antti objected to including rumpuser_sync_icache. Exclude it from the build. 2014-06-17 08:42:35 +00:00
alnsn
e0a3ca70e0 For consistency with other files in the same directory
don't include <sys/cdefs.h> before __RCSID.
2014-06-17 06:43:21 +00:00
alnsn
bb8c3186cb Implement rumpuser_sync_icache hypercall. 2014-06-17 06:31:47 +00:00
alnsn
46b0c1cbc8 Add __RCSID. 2014-06-16 21:07:28 +00:00
christos
1913c9411a Recognize CR as end of line too. the telnet client passes that to us instead
of linefeed.
2014-06-16 16:29:30 +00:00
joerg
13b8fa7d71 Add modfl(3). From FreeBSD. 2014-06-16 12:54:42 +00:00
mrg
ac641cb906 remove remaining makefile support for GCC < 45 that i found. 2014-06-14 20:49:36 +00:00
wiz
c85844adb6 Sort errors. 2014-06-14 19:02:29 +00:00
christos
0970d31e3c welcome to 2014e 2014-06-14 17:49:27 +00:00
apb
637cec4115 Document the relationship between uname(3) and sysctl(7) variables. 2014-06-14 14:32:43 +00:00
apb
f37ea538b1 If sysctl kern.version returns a string that's too long
to fit in {struct utsname}.version then just use the
truncated value.
2014-06-14 13:09:37 +00:00
pooka
ce1cd03e24 Remove one more symbol reference to librump (missed in previous commit
to this file)
2014-06-14 11:52:42 +00:00
njoly
6b27a22c99 Follow OpenGroup online documents for truncate[1] and ftruncate[2].
Fail with EINVAL for length argument negative values.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/truncate.html
[2] http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html
2014-06-14 11:37:35 +00:00
apb
e72cca9651 Teach fmtcheck(3) that a pointer and a long are not the same. 2014-06-14 08:18:24 +00:00
wiz
8333f359ba Remove trailing whitespace. Use more markup. Merge sections describing
the same error code.
2014-06-13 22:05:15 +00:00
joerg
3adc1c7681 Add asysctl(3) and asysctlbyname(3) wrappers for the common idiom of
fetching dynamically sized data via sysctl.
2014-06-13 15:45:05 +00:00
pooka
a25813f127 Add rump_boot_etfs_register(), which can be used to specify etfs
nodes that will be available immediately when mountroot is done
and file systems are available.

The intended use is for example for firmware images to be available when
config_mountroot() hooks run.
2014-06-13 15:45:01 +00:00
mrg
26f35dd6b6 remove the build support for GCC 4.1, and any hacks i found for it.
there could still be more -- i only looked for lines matching
both "HAVE_GCC" and "4" as words (grep -w.)
2014-06-13 01:17:45 +00:00
justin
76fd41999f gcc cannot always work out initialization here 2014-06-12 22:21:20 +00:00
joerg
ef53e37514 Don't t use a C++ keyword as field name. 2014-06-12 21:39:45 +00:00
apb
e7f11a1a5a fix missing backslash in previous 2014-06-12 19:12:19 +00:00
apb
bb0d3eec51 Wrap complex macros in do { ... } while (0). Also replace the magic
number 1600000 with a macro.
2014-06-12 19:05:37 +00:00
christos
b27e135433 rename to 60 2014-06-12 18:49:37 +00:00
christos
32baae8990 update for new signatures 2014-06-12 18:46:12 +00:00
christos
1eb0dcbb1d fix srandom and initstate signatures (from enh at google) 2014-06-12 18:44:36 +00:00
martin
eb04decfe5 Some more errno remapping: if the NFS server is unreachable because we have
no route to it, assume there are no quotas. While this might sound like
an impossible scenario, it actually happens inside rump tests when we have
a virtual shmif network but are querying quotas for / which happens to
be on NFS (but of course outside of the shmif setup).
This fixes tests/fs/nfs/t_rquotad on diskless clients.
2014-06-11 08:43:01 +00:00
njoly
e4ae04a902 Replace wrong numeric values with corresponding symbolic constants.
While here, remove unneeded paragraph macro.
2014-06-09 09:15:48 +00:00
roy
c7009a57fe Re-stir after forking, fixes PR lib/25367.
Re-stir after consuming 1600000 bytes, fixes PR lib/45952.
2014-06-07 20:55:47 +00:00
joerg
86ed47b359 Fix conditionals. 2014-06-06 11:38:41 +00:00
christos
955a80396c be friendlier to nbcompat 2014-06-06 01:41:00 +00:00
wiz
abf14c83e2 Remove trailing whitespace. 2014-06-05 22:09:50 +00:00
christos
78dc8159da PR/48876: Dmitriy Grigoryev: Core dump in readline lib on attempted expansion
Make sure we have 2 matches before calling strcmp().
2014-06-05 22:07:42 +00:00