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)
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)
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)
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)
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)
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)
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)
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)
- 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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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
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)
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)
- 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]
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)
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)
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.
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.