Commit Graph

151089 Commits

Author SHA1 Message Date
Edward Tomasz Napierala
b1711e4af4 MFC r203721:
Add references to VOP_* man pages to vnode(9).
2010-03-28 18:44:54 +00:00
Edward Tomasz Napierala
616900d1eb MFC r203549:
Add missing coma.
2010-03-28 18:43:04 +00:00
Jaakko Heinonen
f004e8133a MFC r198175:
- If lstat()/stat() fails with an error other than ENOENT, don't ignore
  the error and assume that the file doesn't exist. Touch could return
  success with -c option even if the file existed and time was not set.
- If the first utimes_f() call fails with -A option, give up and don't
  continue trying to set times to current time. [1]
- Set exit status to 1 when setting of timestamps fails for a directory
  or symbolic link even though lstat()/stat() would succeed.
- Don't print bogus error message when rw() succeeds.

PR:		bin/112213
2010-03-28 11:22:38 +00:00
Edward Tomasz Napierala
a4325efcbe MFC r203122:
Improve descriptions, remove turnstiles (since, from what I understand,
they are only used to implement other synchronization primitives), tweak
formatting.

MFC r203127:

Add description of bounded sleep vs unbounded sleep (aka blocking).  Move
rules into their own section.

MFC r203131:

Cosmetic fixes.

MFC r203759:

Improve description for Giant and mention blocking inside interrupt threads.

MFC r203762:

Start sentences with a new line.

Submitted by:	brueffer

MFC r203825:

Remove list of locking primitives, which is kind of redundant, move
information about witness(9) to the section about interactions, and
expand 'contexts' table.

MFC r203929:

Some rewording and language fixes.

PR:		docs/136918, docs/134074
Submitted by:	Ben Kaduk <kaduk at mit dot edu>, Haven Hash <havenster at gmail dot com>
2010-03-27 18:45:53 +00:00
Edward Tomasz Napierala
79964ec98d MFC r201432:
Add manual page for gcache(8).
2010-03-27 18:15:18 +00:00
Edward Tomasz Napierala
fddc12138a MFC r200723:
Interpret VAPPEND correctly in vaccess_acl_nfs4(9).
2010-03-27 18:12:00 +00:00
Edward Tomasz Napierala
bf876fcd34 MFC r200273:
Don't add VAPPEND if the file is not being opened for writing.  Note that this
only affects cases where open(2) is being used improperly - i.e. when the user
specifies O_APPEND without O_WRONLY or O_RDWR.

Reviewed by:	rwatson
2010-03-27 18:09:40 +00:00
Edward Tomasz Napierala
89a2dbabba MFC r200058:
Add change that was somehow missed in r192586.  It could manifest by
incorrectly returning EINVAL from acl_valid(3) for applications linked
against pre-8.0 libc.
2010-03-27 18:08:14 +00:00
Edward Tomasz Napierala
3fbc03cc99 MFC r199875:
Provide a set of sysctls and tunables to disable device node creation
for specific "kinds" of disk labels - for example, GPT UUIDs.  Reason
for this is that sometimes, other GEOM classes attach to these device
nodes instead of the proper ones - e.g. they attach to /dev/gptid/XXX
instead of /dev/ada0p2, which is annoying.

Reviewed by:	pjd (earlier version)
2010-03-27 18:04:33 +00:00
Edward Tomasz Napierala
f2f6fe304d MFC r199182:
Add links to zfs(8) and zpool(8) to mount(8) manual page.
2010-03-27 18:01:38 +00:00
Bjoern A. Zeeb
08611830aa MFC r204840:
As statfs.f_flags are uint64_t the local variables should be as well.
  We'll start noticing this with the next flag introduced as the lower
  32bit are all used.

  While here compare to 0 explicitly [1].

  Suggested by: kib [1]
  Reviewed by:  kib
2010-03-27 17:57:17 +00:00
Edward Tomasz Napierala
168d1f006b MFC r197945:
Orphaning provider with EXDEV seems weird; perhaps the author meant
ENXIO here?
2010-03-27 17:56:45 +00:00
Bjoern A. Zeeb
2287aa049c MFC r205626:
Print the pointer to the lock with the panic message. The previous
        panic: rw lock not unlocked
  was not really helpful for debugging. Now one can at least call
        show lock <ptr>
  form ddb to learn more about the lock.
2010-03-27 17:54:44 +00:00
Bjoern A. Zeeb
0b93ad54a2 MFC r205276:
Add ddb support to the "new" link layer code ("new-arp"):
   - show all lltables [1] (optional flag to also show the llentries as well)
   - show lltable <struct lltable *>
   - show llentry <struct llentry *>
2010-03-27 17:52:56 +00:00
Bjoern A. Zeeb
397069f2c5 MFC r205251:
Add pcb reference counting to the pcblist sysctl handler functions
  to ensure type stability while caching the pcb pointers for the
  copyout.

  Reviewed by:  rwatson
2010-03-27 17:51:27 +00:00
Bjoern A. Zeeb
62f500d0c2 MFC r204838:
Destroy TCP UMA zones (empty or not) upon network stack teardown
  to not leak them, otherwise making UMA/vmstat unhappy with every
  stoped vnet.
  We will still leak pages (especially for zones marked NOFREE).

  Reshuffle cleanup order in tcp_destroy() to get rid of what we can
  easily free first.

  Reviewed by:  rwatson
2010-03-27 17:50:02 +00:00
Bjoern A. Zeeb
a4f6889460 MFC r204805:
Rework reference counting in case we queue into the netisr,
  or overflow the netisr queue and fall back to the interface
  queue so that we can garuantee that the ifnet pointer stays
  valid.   Formerly we ended up with reference counts <= 0 in
  case the netisr had returned ENOBUFS.  The idea is to track
  any packet in the netisr queue and only change the refount
  on edge operations for the fallback interface queue. This
  also avoids problems in case the if_snd.ifq_len lies to us.

  Also rework refount assertions to make sure they trigger if
  we go below 1. Formerly a negative refence count did not
  trigger the assert as the refcount variable is u_int.
2010-03-27 17:48:13 +00:00
Bjoern A. Zeeb
3662f299d2 MFC r204807:
Destroy UDP UMA zones (empty or not) upon network stack teardown
  to not leak them making UMA/vmstat -z unhappy with every stoped vnet.
  We will still leak pages (especially as zones are marked NOFREE).
2010-03-27 17:46:06 +00:00
Bjoern A. Zeeb
67208dfa16 MFC r204147:
Set curvnet earlier so that it also covers calls to sodisconnect(), which
  before were possibly panicing the system in ULP code in the VIMAGE case.

  Submitted by: Igor (igor ispsystem.com)
2010-03-27 17:42:04 +00:00
Bjoern A. Zeeb
1386abc0a7 MFC r204279:
Use the DB_SHOW_ALL_COMMAND() macro to register the formerly 'show ifnets'
  in the db_show_all_table as 'show all ifnets' and with that follow the
  convention for showing complete lists.

  Submitted by: thompsa
2010-03-27 17:40:28 +00:00
Bjoern A. Zeeb
0519db7239 MFC r204145:
Start to implement ifnet DDB support:
  - 'show ifnets' prints a list of ifnet *s per virtual network stack,
  - 'show ifnet <struct ifnet *>' prints fields matching the given ifp.

  We do not yet print the complete set of fields and might want to
  factor this out to an extra if_debug.c file in case this grows
  a lot[1]. We may also want to grow 'show ifnet <if_xname>' support[1].

  Suggested by: rwatson [1]
  Reviewed by:  rwatson
2010-03-27 17:39:02 +00:00
Bjoern A. Zeeb
1198bd71ba MFC r204143:
Upon virtual network stack teardown properly release the TCP syncache
  resources.

  Reviewed by:  rwatson
2010-03-27 17:36:52 +00:00
Bjoern A. Zeeb
e47658ce90 MFC r204140:
Split up ip_drain() into an outer lock and iterator part and
  a "locked" version that will only handle a single network stack
  instance. The latter is called directly from ip_destroy().

  Hook up an ip_destroy() function to release resources from the
  legacy IP network layer upon virtual network stack teardown.

  Reviewed by:  rwatson
2010-03-27 17:34:57 +00:00
Bjoern A. Zeeb
9bdad32791 MFC r204142:
Enhance a panic string to contain more useful debugging information.
2010-03-27 17:33:19 +00:00
Bjoern A. Zeeb
78ba8b295c MFC r203729:
Add DDB support for printing vnet_sysinit and vnet_sysuninit
  ordered call lists. Try to lookup function/symbol names and print
  those in addition to the pointers, along with the constants for
  subsystem and order.
  This is useful for debugging vnet teardown ordering issues.

  Make it possible to call the actual printing frunction from normal
  code at runtime, ie. from vnet_sysuninit(), if DDB support is there.
2010-03-27 17:31:54 +00:00
Bjoern A. Zeeb
72ec67fcb7 MFC r203727:
Add an SDT provider for "vnet"s along with probes for vnet_alloc
  and vnet_destroy.
  Use the line number rather than NULL as dummy argument.

  Note: the fbt provider does not reliably provide :return probes
  (depending on optimization levels used at compile time) making
  it unusable for scripts to generate complete call-traces with
  well defined boundaries over allocations or destructions of
  virtual network stacks.
2010-03-27 17:29:50 +00:00
Bjoern A. Zeeb
ef18ad7e2d MFC r203724:
Properly free resources when destroying the TCP hostcache while
  tearing down a network stack (in the VIMAGE jail+vnet case).

  For that break out the logic from tcp_hc_purge() into an internal
  function we can call from both, the sysctl handler and the
  tcp_hc_destroy().

  Reviewed by:  silby, lstewart
2010-03-27 17:26:31 +00:00
Edward Tomasz Napierala
90a7b167a8 MFC r197780:
Make fetch(9) and store(9) manual pages closer to reality.
2010-03-27 17:25:17 +00:00
Edward Tomasz Napierala
bd7ae20991 MFC r197680:
Provide default implementation for VOP_ACCESS(9), so that filesystems which
want to provide VOP_ACCESSX(9) don't have to implement both.  Note that
this commit makes implementation of either of these two mandatory.

Reviewed by:	kib
2010-03-27 17:22:11 +00:00
Bjoern A. Zeeb
456f25942f MFC r201815:
To avoid hardcoding further kernel configuration names for
  make universe, split the logic into two parts:
  - 1st to build worlds and generate kernel configs like LINT.
  - 2nd to build kernels for a given TARGET architecture correctly
    finding all newly generated configs, not knowing anything about
    LINT anymore.

MFC rr201960:

  Use uname -m [1] and rename BUILD_ARCH to XMACHINE[2].

  Submitted by: nyan[1], imp[2]

MFC r202095:

  Rather than using an extra variable, only call uname if really needed and
  then directly assign the result.

  Submitted by: jmallett
2010-03-27 17:22:08 +00:00
Bjoern A. Zeeb
f0dd3ce087 MFC r201814:
Generate a second LINT configuration for i386 and amd64 in
  sys/conf/makeLINT.mk, which includes LINT and sets options VIMAGE
  so that we will have VIMAGE LINT builds. For now only do it for
  those two architectures to avoid massive universe times for archs,
  where people will less likely use VIMAGE or not at all.
2010-03-27 17:17:11 +00:00
Bjoern A. Zeeb
1a52f90b23 MFC r201813:
In sys/<arch>/conf/Makefile set TARGET to <arch>. That allows
  sys/conf/makeLINT.mk to only do certain things for certain
  architectures.

  Note that neither arm nor mips have the Makefile there, thus
  essentially not (yet) supporting LINT.  This would enable them
  do add special treatment to sys/conf/makeLINT.mk as well chosing
  one of the many configurations as LINT.
2010-03-27 17:14:55 +00:00
Bjoern A. Zeeb
cbd7567e6b MFC r202123:
Change DDB show prison:
  - name some columns more closely to the user space variables,
    as we do for host.* or allow.* (in the listing) already.
  - print pr_childmax (children.max).
  - prefix hex values with 0x.
2010-03-27 17:11:06 +00:00
Edward Tomasz Napierala
90d5927125 MFC r197405, missing part:
Add pieces of infrastructure required for NFSv4 ACL support in UFS.

Reviewed by:	rwatson
2010-03-27 16:41:23 +00:00
Edward Tomasz Napierala
e8db802864 MFC r197650:
Fix typo in the comment.
2010-03-27 16:35:25 +00:00
Edward Tomasz Napierala
78e32164b0 MFC r197405:
Add pieces of infrastructure required for NFSv4 ACL support in UFS.

Reviewed by:	rwatson
2010-03-27 16:31:49 +00:00
Edward Tomasz Napierala
285438bfc0 MFC r201438:
Make mac_lomac(4) able to interpret NFSv4 access bits.

Reviewed by:	rwatson
2010-03-27 15:05:06 +00:00
Edward Tomasz Napierala
ec85a28567 MFC r201818:
Fix array overflow.

Reviewed by:	philip
2010-03-27 15:02:28 +00:00
Edward Tomasz Napierala
c0d73b99f2 MFC r202919:
Fix array overflow.  This routine is only called from procfs,
which is not mounted by default, and I've been unable to trigger
a panic without this fix applied anyway.

Reviewed by:	kib, cperciva
2010-03-27 14:58:28 +00:00
Edward Tomasz Napierala
ae3c92a106 MFC r204408:
Fix panic on invalid 'mdconfig -at preload' usage.

PR:		kern/80136
2010-03-27 14:43:40 +00:00
John Baldwin
d8c0d3dd97 MFC 205332:
Use the same policy for rejecting / not-reject ACPI tables with incorrect
checksums as the base acpi(4) driver.  This fixes a problem where the MADT
parser would reject the MADT table during early boot causing the MP Table
to be, but then the acpi(4) driver would attach and use non-SMP interrupt
routing.
2010-03-26 18:58:22 +00:00
John Baldwin
7bf38446dd MFC 204972:
Make NKPT a kernel option on i386 so that it can be set to a non-default
value from kernel config files.
2010-03-26 18:54:25 +00:00
Xin LI
12d11e2155 MFC r205630 (imp):
This broke when we went to gnu99 as the default standard.  Fix the build
by reverting to the gnu89 standard.
2010-03-26 16:45:21 +00:00
Ivan Voras
e617a8cfde MFC r204248,r204249 - "fancy snake_saver" with color coded load averages 2010-03-26 14:03:42 +00:00
John Baldwin
c7402c0bbc MFC 205214:
- Extend the machine check record structure to include several fields useful
  for parsing model-specific and other fields in machine check events
  including the global machine check capabilities and status registers,
  CPU identification, and the FreeBSD CPU ID.
- Report these added fields in the console log of a machine check so that
  a record structure can be reconstituted from the console messages.
- Parse new architectural errors including memory controller errors.
2010-03-26 13:49:46 +00:00
John Baldwin
d62da94291 MFC 205210,205448:
Remove unneeded type specifiers from 64-bit constants.  The compiler
infers their natural type from the constants' values.
2010-03-26 13:01:30 +00:00
Joerg Wunsch
828bb4f8d4 r205509:
Add .snap to daily_clean_tmps_ignore; /tmp/.snap ist not supposed to
  be auto-removed (and /tmp is a filesystem of its own now by
  default).
2010-03-26 05:13:43 +00:00
Maxim Sobolev
7711964246 MFC: workaround no-carrier issue on IBM HS21.
PR:		118238
2010-03-25 23:38:10 +00:00
Xin LI
3776abf91b MFC r205654:
The rmt client in GNU cpio could have a heap overflow when a malicious
remote tape service returns deliberately crafted packets containing
more data than requested.

Fix this by checking the returned amount of data and bail out when it
is more than what we requested.

PR:		gnu/145010
Submitted by:	naddy
Reviewed by:	imp
Security:	CVE-2010-0624
2010-03-25 20:07:30 +00:00
John Baldwin
b1fc296597 MFC 205013:
Print out the family and model from the cpu_id.  This is especially useful
given the advent of the extended family and extended model fields.  The
values are printed in hex to match their common usage in documentation.
2010-03-25 15:48:23 +00:00