Commit Graph

17305 Commits

Author SHA1 Message Date
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