151669 Commits

Author SHA1 Message Date
Konstantin Belousov
e753752c1d MFC r208731:
Add a facility to dynamically adjust or unconfigure p1003_1b mib.
Use it to allow to tune sem_nsem_max at runtime, only when sem.ko
module is present in kernel.

Approved by:    re (bz)
2010-06-05 14:53:34 +00:00
Konstantin Belousov
f0f2f0a9e0 MFC r208374:
Remove POLLHUP from the flags used to test for to set exceptfsd
fd_set bits in select(2). It seems that historical behaviour is to not
reporting exception on EOF, and several applications are broken.

Approved by:    re (kensmith)
2010-06-04 14:06:59 +00:00
Martin Matuska
0985c67ea7 MFC r208689:
Fix ZIL close when doing zfs rollback or zfs receive on a mounted dataset.

The fix is a partial import and merge of OpenSolaris onnv revisions
8227:f7d7be9b1f56. and 9292:e112194b5b73

Reviewed by:	pjd, delphij (mentor)
Obtained from:	OpenSolaris (Bug ID 6798298)
Approved by:	re (kib)
2010-06-04 08:46:26 +00:00
Robert Watson
ef9bfed8fb Merge r205010 from head to stable/8:
Update nfsrv_getsocksndseq() for changes in TCP internals since FreeBSD 6.x:

  - so_pcb is now guaranteed to be non-NULL and valid if a valid socket
    reference is held.

  - Need to check INP_TIMEWAIT and INP_DROPPED before assuming inp_ppcb is a
    tcpcb, as it might be a tcptw or NULL otherwise.

  - tp can never be NULL by the end of the function, so only check
    TCPS_ESTABLISHED before extracting tcpcb fields.

  The NFS server arguably incorporates too many assumptions about TCP
  internals, but fixing that is left for another day.

  Reviewed by:		bz
  Reviewed and tested by:	rmacklem
  Sponsored by:		Juniper Networks

Approved by:	re (kib)
2010-06-03 09:15:52 +00:00
Robert Watson
e5dbe8eca0 Merge r204830 from head to stable/8
Locking the tcbinfo structure should not be necessary in tcp_timer_delack(),
  so don't.

  Reviewed by:    bz
  Sponsored by:   Juniper Networks

Approved by:	re (kib)
2010-06-03 09:06:50 +00:00
Robert Watson
4b33228640 Merge r204826 from head to stable/8:
Make udp_set_kernel_tunneling() less forgiving when its invariants are
  violated: so_pcb can never be NULL for a valid UDP socket, and it is
  always SOCK_DGRAM.  Use sotoinpcb() as the rest of the UDP code does.

  Reviewed by:	bz
  Sponsored by:	Juniper Networks

Approved by:	re (kib)
2010-06-03 09:02:53 +00:00
Robert Watson
c00cb785e5 Merge r204810 from head to stable/8:
Remove unnecessary locking of divcbinfo lock from div_output(): this has
  not been required since FreeBSD 7.0 when the so_pcb pointer leading to inp
  was guaranteed to be stable when a valid socket reference is held (as it
  is in the output path).

  Reviewed by:	bz
  Sponsored by:	Juniper Networks

Approved by:	re (kib)
2010-06-03 08:55:45 +00:00
Jung-uk Kim
32aa4ac70d MFC: r208650
Fix a regression from r203544 (MFC of r200554), which broke fdc(4)
attachment to acpi(4).

Approved by:	re (kib)
2010-06-02 21:00:18 +00:00
Edward Tomasz Napierala
4d01f7c33b MFC r208437:
Make acl_get_perm_np(3) work with NFSv4 ACLs.

Reviewed by:	kientzle@
Approved by:	re (kib)
2010-06-02 20:35:56 +00:00
Gleb Smirnoff
295c646baf Merge 208554 from head:
Add uep(4), driver for USB onscreen touch panel from eGalax.

  The driver is stub. It just creates device entry and feeds
  reassembled packets from hardware into it.

  If in future we would port wsmouse(4) from NetBSD, or make
  sysmouse(4) to support absolute motion events, then the driver
  can be extended to act as system mouse. Meanwhile, it just
  presents a /dev/uep0, that can be utilized by X driver, that
  I am going to commit to ports tree soon.

  The name for the driver is chosen to be the same as in NetBSD,
  however, due to different USB stacks this driver isn't a port.

The driver is supported by ports/x11-drivers/xf86-input-egalax.

Approved by:	re (kib)
2010-06-02 18:46:12 +00:00
Dag-Erling Smørgrav
d2997dabd4 Missing commas in Dd
Approved by:	re (kib@)
2010-06-02 10:28:26 +00:00
Dag-Erling Smørgrav
a97329ecda Fix expansion of AuthorizedKeysFile (upstream patch)
PR:		146334, 145940
Approved by:	re (kib@)
2010-06-02 10:26:31 +00:00
Attilio Rao
875e0aa40d MFC r207329, r208716:
- Extract the IODEV_PIO interface from ia64 and make it MI.
- On i386 and amd64 the old behaviour is kept but multithreaded
  processes must use the new interface in order to work well.
- Support for the other architectures is greatly improved.

Sponsored by:	Sandvine Incorporated

Approved by:	re (kib, bz)
2010-06-01 21:19:58 +00:00
John Baldwin
af89e29624 MFC 208555:
Ignore the 'addr' argument passed to PT_STEP (it is required to be '1'
for PT_STEP which means "ignore") and PT_DETACH.

Approved by:	re (kib)
2010-06-01 19:38:46 +00:00
Robert Watson
2300da982a Merge r206210 from head to stable/7:
Synchronize Coda kernel module definitions in our coda.h to Coda 6's
  coda.h:

  - CodaFid typdef -> struct CodaFid throughout.
  - Use unsigned int instead of unsigned long for venus_dirent and other
    cosmetic fixes.
  - Introduce cuid_t and cgid_t and use instead of uid_t and gid_t in RPCs.
  - Synchronize comments and macros.
  - Use u_int32_t instead of unsigned long for coda_out_hdr.

  With these changes, a 64-bit Coda kernel module now works with
  coda6_client, whereas previous userspace and kernel versions of RPCs
  differed sufficiently to prevent using the file system.  This has been
  verified only with casual testing, but /coda is now usable for at least
  basic operations on amd64.

Approved by:	re (kensmith)
2010-06-01 14:29:26 +00:00
Robert Watson
6e2c1ff23b Merge r206972 from head to stable/8:
Merge @176820, @176822, @177156 to tcpp from P4 to HEAD:

   Improve accuracy of connection data transfer math.

   Disable Nagle's algorithm to avoid delaying transfers of data --
   will want to refine this to combine payload with header transfer,
   however.

   Now that we're running w/o Nagle, try to send the initial data
   burst with the header in a single TCP segment.

   Prefer %zu to %ju for size_t.

   Sponsored by:	Juniper, Inc.

Approved by:	re (bz)
2010-06-01 14:26:27 +00:00
Robert Watson
03b868be4c Merge r204809 from head to stable/8:
Add a comment to tcp_usr_accept() to indicate why it is we acquire the
  tcbinfo lock there: r175612, which re-added it, masked a race between
  sonewconn(2) and accept(2) that could allow an incompletely initialized
  address on a newly-created socket on a listen queue to be exposed.  Full
  details can be found in that commit message.

  Sponsored by:	Juniper Networks

Approved by:	re (bz)
2010-06-01 14:21:24 +00:00
Robert Watson
4fc9f6b81e Merge r204806 from head to stable/8:
Wrap use of rw_try_upgrade() on pcbinfo with macro INP_INFO_TRY_UPGRADE()
  to match other pcbinfo locking macros.

Approved by:	re (bz)
2010-06-01 14:18:44 +00:00
Robert Watson
93ed892eb9 Merge r204435 from head to stable/8:
Fix typo in comment.

Approved by:	re (bz)
2010-06-01 14:09:35 +00:00
Robert Watson
f462942090 Merge r204430 from head to stable/8:
Remove stale comment about socket buffer accounting from access(2) code.
  It is the case, however, that the uidinfo of the temporary credential
  set up for access(2) is not properly updated when its effective uid is
  changed.

Approved by:	re (bz)
2010-06-01 14:04:33 +00:00
Robert Watson
9b47fa5955 Merge r208601 from head to stable/8:
When close() is called on a connected socket pair, SO_ISCONNECTED might be
  set but be cleared before the call to sodisconnect().  In this case,
  ENOTCONN is returned: suppress this error rather than returning it to
  userspace so that close() doesn't report an error improperly.

  PR:		kern/144061
  Reported by:	Matt Reimer <mreimer at vpop.net>,
		Nikolay Denev <ndenev at gmail.com>,
		Mikolaj Golub <to.my.trociny at gmail.com>

Approved by:	re (kib)
2010-06-01 13:59:48 +00:00
Robert Watson
9770cc486f Merge r206206 from head to stable/8:
Correct definition of CIOC_KERNEL_VERSION Coda ioctl() for systems
  where sizeof(int) != sizeof(sizeof(int)), or the ioctl will return
  EINVAL.

Approved by:	re (kib)
2010-06-01 13:57:58 +00:00
Attilio Rao
bf28bb90d5 MFC r208300:
Fix a race between ngs_rcvmsg() and soclose() which closes the control
socket while it is still in use as ngs_rcvmsg() runs without any lock
held.

Sponsored by:	Sandvine Incorporated
Approved by:	re (bz)
2010-06-01 09:32:22 +00:00
Robert Watson
67b38bab13 Merge r204498 from head to stable/8:
Whitespace tweak.

Approved by:	re (kib)
2010-05-31 22:29:48 +00:00
Robert Watson
d5a42fa49c Merge r204581 from head to stable/8:
Update device-labeling logic for Biba, LOMAC, and MLS to recognize new-style
  pts devices when various policy ptys_equal flags are enabled.

  Submitted by:	Estella Mystagic <estella at mystagic.com>

Approved by:	re (kib)
2010-05-31 22:27:08 +00:00
Robert Watson
b6ec54747a Merge r204173 from head to stable/8:
ifconfig(8) expects interface fooX to be supported by the module if_foo,
  and will try to load it if it's not present.  To better meet these
  expectations, change the module name for the loopback interface from
  'loop' to 'if_lo'.  The loopback interface is always compiled into the
  base kernel, so there are no resulting changes in kld files, etc.

  Discussed with:       brooks (ages ago)

Approved by:    re (bz, kib)
2010-05-31 22:18:42 +00:00
Pyun YongHyeon
1cf8f2c431 MFC r208512:
sge_encap() can sometimes return an error with m_head set to NULL.
  Make sure not to requeue freed mbuf in sge_start_locked(). This
  should fix NULL pointer dereference panic.

  Reported by:	Nikolay Denev <ndenev <> gmail dot com>
  Submitted by:	jhb
  Approved by:	re (bz)
2010-05-31 22:03:56 +00:00
Robert Watson
1732ca8fb3 Merge r203410 from head to stable/8:
Only audit pathnames in namei(9) if copying the directory string completes
 successfully.  Continue to do this before the empty path check so that the
 ENOENT returned in that case gets an empty string token in the BSM record.

Approved by:	re (kib)
2010-05-31 21:57:31 +00:00
Robert Watson
b269c05e01 Merge r200976 from head to stable/8:
Minor comment tweaks in rmlocks.

Approved by:	re (kib)
2010-05-31 21:35:40 +00:00
Robert Watson
25d3931a9f Merge r200899 from head to stable/8:
When warning about possible netisr configuration problems during boot,
  report using "netisr_init" rather than "netisr2", which was the development
  name for the project.

Approved by:	re (kib)
2010-05-31 21:14:56 +00:00
Andriy Gapon
84ba62ee66 MFC r201374: g_part_gpt: Properly return the UUID represented by the alias
PR:		kern/142174
Approved by:	re (kib)
Approved by:	marcel
2010-05-31 20:17:37 +00:00
Colin Percival
e39a411806 MFC r208606: Remove $Mdocdate$ from man page imported from OpenBSD;
their mdoc supports it, but ours doesn't.

Approved by:	re (hrs)
2010-05-31 07:14:40 +00:00
Bjoern A. Zeeb
0ed5d06536 MFC r199818:
New style of jail(8) usage requires "-c" argument to create a jail.

Approved by:	re (hrs)
2010-05-30 11:28:01 +00:00
Ulrich Spörlein
182140f04a MFC r208493:
These features will first appear in 8.1, soon to be released

Approved by:	re (kib)
2010-05-30 08:38:41 +00:00
Colin Percival
31b99bfe49 Change the current working directory to be inside the jail created by
the jail(8) command. [10:04]

Fix a one-NUL-byte buffer overflow in libopie. [10:05]

Correctly sanity-check a buffer length in nfs mount. [10:06]

Approved by:	so (cperciva)
Approved by:	re (kensmith)
Security:	FreeBSD-SA-10:04.jail
Security:	FreeBSD-SA-10:05.opie
Security:	FreeBSD-SA-10:06.nfsclient
2010-05-27 03:15:04 +00:00
Konstantin Belousov
f3e1e28bcc MFC r208488:
Fix the double counting of the last process thread td_incruntime
on exit, that is done once in thread_exit() and the second time in
proc_reap(), by clearing td_incruntime.

Approved by:	re (kensmith)
2010-05-26 19:26:28 +00:00
Matt Jacob
7b0f9e6cc7 This is an MFC of 208119, 208129
Hook up some wires that were forgotten a few months ago and restore
the zombie device timeout code and the loop down time code and the fabric
hysteresis code.

Approved by:    re (ken smith)
2010-05-26 18:56:06 +00:00
Marius Strobl
6709b9fdf6 MFC: r208468
At least on sparc64 these modules require ata_machdep.c.

Approved by:	re (kib)
2010-05-26 17:30:14 +00:00
Ken Smith
129c311289 Add packages-8.1-release directory. While here add packages-7.3-release.
Approved by:	re (implicit)
2010-05-26 17:18:32 +00:00
Ken Smith
f57aeb7d71 Bump version number from 8.0 to 8.1. Belatedly bump stable/7 to stable/8
for SVNBRANCH.

Approved by:	re (implicit)
2010-05-26 17:11:01 +00:00
Ken Smith
e81db4f2dc Change the FreeBSD version that will be printed for the manual pages.
Approved by:	re (implicit)
2010-05-26 17:07:39 +00:00
Marius Strobl
83884db72c MFC: r208459, r208511
- Update the sparc64 hardware list regarding machines that will be supported
  beginning with 8.1-RELEASE as well as correct some existing entries and
  add previously missed ones. [1]
- According to simon@ when referring to a company along a product just to
  identify the company one shouldn't use the company trademark. [2]

Approved by:	re (kib), blackend [1], simon [2]
2010-05-26 17:05:54 +00:00
Jung-uk Kim
470007435e Regen for r208547.
Approved by:	re (kib)
2010-05-25 20:21:46 +00:00
Jung-uk Kim
8528a36cfb MFC: r208322
Add an option file for WITHOUT_MAN_UTILS to regenerate src.conf(5).

Approved by:	re (kib)
2010-05-25 20:19:31 +00:00
Jung-uk Kim
2ddf40c67d MFC: r208320
Add a new build option, MAN_UTILS.  This option lets you control building
utilities and related support files for manual pages, which were previously
controlled by MAN.  For POLA, the default depends on MAN, i.e., WITHOUT_MAN
implies WITHOUT_MAN_UTILS and WITH_MAN implies WITH_MAN_UTILS.
Note this patch implicitly fixes a documentation bug of src.conf(5), which
says WITHOUT_MAN may be used to not build manual pages while it was also
disabling some utilities for manual pages.

Approved by:	re (kib)
2010-05-25 20:16:36 +00:00
Randi Harper
f8db260873 MFC r198477,198503:
Eject CDROM after installation if used as source media.

Approved by: cperciva (mentor)
2010-05-25 03:15:09 +00:00
Randi Harper
8ddf122eea MFC r208407:
Flush all routes before adding the default route in order to allow
  sysinstall to cleanly re-initialize the network.

PR: bin/145553
Submitted by: gcooper
Approved by: cperciva (mentor)
2010-05-25 03:08:47 +00:00
Andrew Thompson
9751d55f06 MFC r200824
Set correct USB device description

Submitted by:	Paul B Mahol
2010-05-25 02:52:10 +00:00
Andrew Thompson
494793d68a MFC r202612
Use the iflladdr_event event to keep the mac address on the vap in sync with
 the parent wirless interface. If the user passed in a mac address or it was
 autogenerated then flag this to avoid trashing it on update.

 This will fix wlan+lagg in a post vap world.
2010-05-25 02:39:55 +00:00
Andrew Thompson
7c61d49370 MFC r202588
Declare a new EVENTHANDLER called iflladdr_event which signals that the L2
 address on an interface has changed. This lets stacked interfaces such as
 vlan(4) detect that their lower interface has changed and adjust things in
 order to keep working. Previously this situation broke at least vlan(4) and
 lagg(4) configurations.

 The EVENTHANDLER_INVOKE call was not placed within if_setlladdr() due to the
 risk of a loop.

 PR:		kern/142927
 Submitted by:	Nikolay Denev

MFC r202611

 Do not hold the lock over if_setlladdr() as it calls into the interface driver
 init routine.
2010-05-25 02:36:06 +00:00