184826. Some pending reliability changes needs to be tested throughly and
it does not seem to be a good idea to ship the current state of bce(4)
with the release. Thanks for everyone who provided testing and sorry for
the mess.
Approved by: re (kensmith)
long commands into multiple requests. [08:12]
Avoid calling uninitialized function pointers in protocol switch
code. [08:13]
Merry Christmas everybody...
Approved by: so (cperciva)
Approved by: re (kensmith)
Security: FreeBSD-SA-08:12.ftpd, FreeBSD-SA-08:13.protosw
of FreeBSD.
These changes provide the following features:
Allow users of more than one Firewire board to execute commands
Allow users to pass more than one command line argument at a time
Provide NetBSD code support
Cleanup Mergeinfo and mark the branch in sync
Reviewed by: slong ([email protected]) Mentor
Approved by: re Ken ([email protected])
Make sure we are maintaining the reference count on the route eliminating
another:
rtfree: 0xc841ee88 has 1 refs
Reviewed by: bz
Approved by: re@ (gnn)
Do not segfault when procstat -f or procstat -v is called on a process not
owned by the current user. If kinfo_getfile() or kinfo_getvmmap() return
NULL, simply exit, and do not try and derefernce the memory.
Approved by: re (kib)
Initialize the cntp pointer to 0 prior to doing any work so that callers
don't try to iterate through garbage or NULL memory. Additionally, return
NULL instead of 0 on error.
Approved by: re (kib)
The userland_sysctl() function retries sysctl_root() until returned
error is not EAGAIN. Several sysctls that inspect another process use
p_candebug() for checking access right for the curproc. p_candebug()
returns EAGAIN for some reasons, in particular, for the process doing
exec() now. If execing process tries to lock Giant, we get a livelock,
because sysctl handlers are covered by Giant, and often do not sleep.
Break the livelock by dropping Giant and allowing other threads to
execute in the EAGAIN loop.
This commit does not merge the following change, as was discussed with jhb:
[Also, do not return EAGAIN from p_candebug() when process is executing,
use more appropriate EBUSY error.]
MFC r185987:
Uio_yield() already does DROP_GIANT/PICKUP_GIANT, no need to repeat this
around the call.
Approved by: re (kensmith)
Make two style changes to create new commit and document proper commit
message for r185765.
Commit message for r185765 should be:
In procfs map handler, and in linprocfs maps handler, do not call
vn_fullpath() while having vm map locked. This is done in anticipation
of the vop_vptocnp commit, that would make vn_fullpath sometime
acquire vnode lock.
Also, in linprocfs, maps handler already acquires vnode lock.
MFC r185864:
Relock user map earlier, to have the lock held when break leaves the
loop earlier due to sbuf error.
Approved by: re (kensmith)
MFC 183967, 184861, 185157
183967:
Track number of packets transmitted and number of packets received
PR: 125806
184861:
Update firmware version check
make ddp a tunable
Obtained from: Chelsio Inc.
185157:
Several small additions to the Chelsio 10G driver.
1) Fix a bug in dealing with the Alerus 1006 PHY which prevented the
device from ever coming back up once it had been set to down.
2) Add a kernel tunable (hw.cxgb.snd_queue_len) which makes it possible
to give the device more than IFQ_MAXLEN entries in its send queue. The
default remains 50.
3) Add code to place the card'd identification and serial number into
its description (%desc) so that users can tell which card they have
installed.
Approved by: re
> Handle VFS_VGET() failing with an error other than EOPNOTSUPP in addition
> to failing with that error.
>
> PR: 125149
> Submitted by: Jaakko Heinonen (jh <at> saunalahti <dot> fi)
> Reviewed by: mohans, kan
Approved by: re (kib)
Don't count InFramesL2FilterDiscards into Ierr. This value does not represent
a real packet error but simply indicate that an unexpected unicast or multicast
error was received by the NIC, which was not counted in the past as well.
Reported by: many (on -stable@)
Reviewed by: davidch
Approved by: re (kensmith)
Test whether sc->tx_mbuf_map[i], not whether sc->tx_mbuf_map is NULL before
doing bus_dmamap_sync() since it operates on the former, not the latter.
Reviewed by: davidch
Approved by: re (kensmith)
Update our resolver to BIND 9.4.3.
It includes the following fix:
2426. [bug] libbind: inet_net_pton() can sometimes return the
wrong value if excessively large netmasks are
supplied. [RT #18512]
Reported by: Maksymilian Arciemowicz <cxib__at__securityreason.com>
Approved by: re (kib)
Update the list of Intel chips with EM64T for FreeBSD/amd64 and
increase the known maximum memory configuration from 8gb to 32gb.
Approved by: re (hrs)
- According to the corresponding Linux, NetBSD and OpenSolaris
drivers, there should be a 1us delay after every write when
bit-banging the MII. Also insert barriers in order to ensure
the intended ordering. These changes hopefully will solve the
bus wedging occasionally experienced with DM9102A since r182461.
- Deobfuscate dc_mii_readreg() a bit.
Approved by: re (kib)
causes data corruption in combination with certain bridges.
Information about this problem was kindly provided by davidch. [1]
- As BGE_FLAG_PCIX is meant to indicate that the controller is in
PCI-X mode, revert to the pre __FreeBSD_version 602101 method of
reading the bus mode register rather than checking the mere
existence of a PCI-X capability, which is also there when the
NIC f.e. is put into a 32-bit slot causing it not to be in PCI-X
mode. Setting BGE_FLAG_PCIX inappropriately could cause the NIC
to be tuned incorrectly.
PR: 128833 [1]
Reviewed by: jhb
Approved by: re (kib)
Merge r185855 from head to stable/7:
Move flag definitions for t_flags and t_oobflags below the definition of
struct tcpcb so that the structure definition is a bit more vertically
compact. Can't yet fit it on one printed page, though.
Approved by: re (gnn)
Merge r185813 from head to stable/7:
Update comment on INP_TIMEWAIT to say what it's about, as we caution
regarding the misplacement of flags in inp_vflag in an earlier comment.
Approved by: re (gnn)
Merge r185791 from head to stable/7:
Move macros defining flags and shortcuts to nested structure fields in
inpcbinfo below the structure definition in order to make inpcbinfo
fit on a single printed page; related style tweaks.
Approved by: re (kib)
Bug fix from Chelsio which addresses the issue of the device resetting
when it sees only received packets. In some cases where a device only
recieves data it mistakenly thinks that its transmitting side is broken
and resets the device.
Fix a bug with the ael1006 PHY. The bug shows up as persistent but incomplete
packet loss, of between 10-30%. The fix is to put the PHY into
and take it out of local loopback mode when resetting the interface.
Bug fix to support N310 version of Chelsio cards (board ID 1088).
Obtained from: Chelsio Inc.
Approved by: re@
Recheck the DQ_MOD after the dqh lock is relocked. Repeat dqsync() if
the dq is dirty. This ensures that up to date dq is written in the quota
file and fixes assertion in dqget().
Approved by: re (kensmith)
The times(3) function returns the number of CLK_TCKs since the
startup time of FreeBSD, not since the UNIX Epoch.
PR: docs/122359
Submitted by: Viktor Štujber
Approved by: re (kib)
* Document quotachecks use of the passno field.
* Explain how the passno field in /etc/fstab works with fsck and
quotacheck in some more detail.
* Explain in more detail how the pass number field works.
* Remove information about block devices; we don't have this sort
of separation between character and block devices anymore.
* Enhance the explanation of using filesystem-specific mount
options, and add a mount_msdosfs example.
Approved by: re (kib)
Document that loader(8) stops reading `loader.conf' when it
encounters a syntax error, and add a tip about adding first
the `vital' options and then experimental ones.
PR: docs/119658
Submitted by: Julian Stacey, jhs at berklix.org
Approved by: re (kib)
Add some PHY magic to enable PHY hibernation and 1000baseT/10baseT
power adjustment. This change is required to guarantee correct
operation on certain switches.
MFC r185577:
AR8113 also need to set DMA read burst value. This should fix
occasional DMA read error seen on AR8113.
Approved by: re (kensmith)
183648 (simon): Document that the bce(4) driver works with Dell PowerEdge
1950/2950 NIC's.
185574 (delphij): Update bce(4)'s hardware list to reflect the recent
update to driver.
Approved by: re (kib)
Don't attempt to clear status updates if we did not do a link state
change. As a side effect, this makes the excessive interrupts to
disappear which has been observed as a regression in recent stable/7.
Reported by: many (on -stable@)
Reviewed by: davidch
Approved by: re (kensmith, kib)
sometimes fail to initialize on startup. This also
required shared code as a whole be updated.
VLAN HW filtering code is present but undefined
until after release.
Approved by:re
Merge r184367 from head to stable/7:
When the mac_bsdextended policy is unloaded, free rule memory.
Obtained from: TrustedBSD Project
Approved by: re (kensmith)
Merge r184567 from head to stable/7:
When encoding an smb name, truncate one byte earlier in order than we did
previously in order to ensure it fit properly in the bufer when encoded.
This prevents a debugging printf from firing if a source or destination
host name for an smb mount exceeds 15 characters.
Obtained from: Apple, Inc.
Approved by: re (kensmith)
chips.
g33 based chips use a different method of identifying the gtt size.
g45 based chips gtt is located in a different area of stolen memory.
Approved by: re@ (kensmith)
archive_entry attributes to be explicitly "unset".
This fixes a number of issues:
* Zip archives with "length at end" can now be
extracted correctly, since the Zip extractor
can simply mark the size as "unknown."
* Extract-to-disk can now accurately handle
cases with partial time information (e.g.,
mtime is known but not atime)
* We get more accurate handling of different
hardlink extraction cases; sometimes a hardlink
entry has definitive size information and sometimes
not.
Approved by: re
Plug a credential leak in case the inpcb is freed by
in6_pcbfree() instead of in_pcbfree(); missed in r183606.
Discussed with: re (kib)
Approved by: re (gnn)
Reminded by: rwatson (with his re hat?)
Fix a scope problem in the multiple routing table code that
stopped the SO_SETFIB socket option from working correctly.
Approved by: re (kensmith, kostik)
Obtained from: Ironport
Fix typo. It restuled in activating unwanted Rx filtering as well
as resetting Rx threshold configuration.
Submitted by: Joost Mulders < Joost.Mulders <> Sun DOT COM >
Approved by: re (kib)
Add ale(4), a driver for Atheros AR8121/AR8113/AR8114 PCIe ethernet
controller. The controller is also known as L1E(AR8121) and
L2E(AR8113/AR8114). Unlike its predecessor Attansic L1,
AR8121/AR8113/AR8114 uses completely different Rx logic such that
it requires separate driver. Datasheet for AR81xx is not available
to open source driver writers but it shares large part of Tx and
PHY logic of L1. I still don't understand some part of register
meaning and some MAC statistics counters but the driver seems to
have no critical issues for performance and stability.
The AR81xx requires copy operation to pass received frames to upper
stack such that ale(4) consumes a lot of CPU cycles than that of
other controller. A couple of silicon bugs also adds more CPU
cycles to address the known hardware bug. However, if you have fast
CPU you can still saturate the link.
Currently ale(4) supports the following hardware features.
- MSI.
- TCP Segmentation offload.
- Hardware VLAN tag insertion/stripping with checksum offload.
- Tx TCP/UDP checksum offload and Rx IP/TCP/UDP checksum offload.
- Tx/Rx interrupt moderation.
- Hardware statistics counters.
- Jumbo frame.
- WOL.
AR81xx PCIe ethernet controllers are mainly found on ASUS EeePC or
P5Q series of ASUS motherboards. Special thanks to Jeremy Chadwick
who sent the hardware to me. Without his donation writing a driver
for AR81xx would never have been possible. Big thanks to all people
who reported feedback or tested patches.
HW donated by: koitsu
Tested by: bsam, Joao Barros <joao.barros <> gmail DOT com >
Jan Henrik Sylvester <me <> janh DOT de >
Ivan Brawley < ivan <> brawley DOT id DOT au >,
CURRENT ML
Approved by: re (kib)
Note, GENERIC kernel does NOT include ale(4) but users can still
kldload it. It was requested by re.
- For maximum flexibility, sparc64 supports BUS_DMA_COHERENT also
with bus_dmamap_create() and not only bus_dmamem_alloc() so move
the description of this flag up accordingly in order to document
this fact. While at it, refine this description with an application
example.
- Reword the description of BUS_DMA_NOCACHE as this flag is also
implemented on sparc64.
Approved by: re (kib)
Instead of forcing vn_start_write() to reset mp back to NULL for the
failed calls with non-NULL vp, explicitely clear mp after failure.
Approved by: re (kensmith)
PR: 123768
parenthesized subexpression is defined. For example, the
following command line caused unexpected behavior like
segmentation fault:
% echo test | sed -e 's/test/\1/'
Approved by: re (kib)
PR: bin/126682
For now on every 10 cyclinder groups flush the buffer cache to free
up space. If the buffer cache fills up then the disk systems can
grind to a halt.
PR: 128832
Approved by: re (kensmith)
This addresses:
1) New HW support from LSI (they want to get the HW support
into a FreeBSD release before the HW comes out!).
2) Bug fix in the ioctl path with zero length command.
3) Adds functional support so that SCSI sense will work
when requested from user-land. This is a little strange,
since they store a user-land pointer in the "data" space
of the ioctl packet. So copy the data out into another
structure that is a union of the data and pointer (mfi_sense_ptr
union). This way we can cleanly use the pointer, as pointer on
both 64bit and 32bit machines (i386/amd64).
Submitted by: LSI
Approved by: re (kib)
Adapt the locking of esp(4) to MPSAFE cam(4) (so that ncr53c9x_intr()
actually is INTR_MPSAFE now) and fix a couple of bugs which lead to
panics, amongst other improvements.
Approved by: re (kib)
o Fix style(9) bugs and similar nits.
o Merge ncr53c9x.c from NetBSD:
1.115: fix variable shadowing
1.118: __inline -> inline
1.121: fix empty if
Approved by: re (kib)
Add AS lookup functionality. On each hop we query a whois server to
find the corresponding AS for that IP (-a switch).
We can also choose a different whois server with the -A switch. The
default is whois.radb.net.
Obtained from: NetBSD
Approved by: re
The code in linux_proc_exit() contains a race when multiple linux based
processes exits at the same time. The linux_emuldata structure is freed
but p->p_emuldata is left as a dangling pointer to the just freed
memory.
The check for W_EXIT in the loop scanning the child processes isn't safe
since the state of the child process can change right afterwards. Lock
the process and check the W_EXIT before delivering signal.
Approved by: re (kensmith)
When running a "chio return" operation using a physical source unit
rather than a voltag name, do not set the CESR_VOLTAGS flags in the
CHIOGSTATUS command requesting the current status. As voltags are an
optional feature that must be handled as "reserved" by media changers
not implementing the feature, always setting CESR_VOLTAGS resulted in
the command being aborted with an `Invalid field in CDB', and
consequently the "chio return" failed, for media changers that do not
support voltags.
Approved by: re (kib)
In both dropwithreset paths in tcp_input.c, drop the tcbinfo lock
sooner to decomplicate locking and eliminate the need for a rather
chatty comment about why we have to handle the global lock in a
special way for the benefit of ipfw and pf cred rules.
Approved by: re (kib)
r176448,178132,178853,179436,179695,179771,182293
r176448 (davidch)
- Added loose RX MTU functionality to allow frames larger than 1500
bytes to be accepted even though the interface MTU is set to 1500.
- Implemented new TCP header splitting/jumbo frame support which uses
two chains for receive traffic rather than the original single
receive chain.
- Added additional debug support code.
r178132 (davidch)
- Fixed a problem with the send chain consumer index which would cause
TX traffic to sit in the send chain until a received packet kick
started the interrupt handler. This would cause extremely slow
performance when used with NFS over UDP.
- Removed untested polling code.
- Updated copyright year in the file header.
- Removed inadvertent ^M's created by DOS text editor.
r178853 (scottl)
The BCE chips appear to have an undocumented requirement that RX frames
be aligned on an 8 byte boundary. Prior to rev 1.36 (now r176448) this
wasn't a problem because mbuf clusters tend be naturally aligned. The
switch to using split buffers with the first buffer being the embedded
data area of the mbuf has broken this assumption, at least on i386,
causing a complete failure of RX functionality. Fix this for now by
using a full cluster for the first RX buffer. A more sophisticated
approach could be done with the old buffer scheme to realign the m_data
pointer with m_adj(), but I'm also not clear on performance benefits of
this old scheme or the performance implications of adding an m_adj()
call to every allocation.
r179436 (jhb)
Trim an extra semi-colon.
r179695 (davidch)
- Fixed kern/123696 by increasing firmware timeout value from 100 to
1000.
- Fixed a problem on i386 architecture when using split header/jumbo
frame firmware caused by hardware alignment requirements.
- Added #define BCE_USE_SPLIT_HEADER to allow the feature to be
enabled/disabled. Enabled by default.
PR: kern/123696
r179771 (davidch)
- Added support for BCM5709 and BCM5716 controllers.
r182293 (davidch)
- Updated support for 5716.
- Added some additional code for debug builds.
- Fixed a problem printing physical memory on 64bit system during
debugging.
- Modified some of the context memory and mailbox register names to
more clearly distinguish their use.
- Added memory barriers for Intel CPUs when accessing host memory data
structures which are written by hardware.
Approved by: re (kib)
Remove endearing but syntactically unnecessary "return;" statements
directly before the final closeing brackets of some TCP functions.
Approved by: re (gnn)
Revert to preferring mmap(2) over sbrk(2) when mapping memory, due
to potential extreme contention in the kernel for multi-threaded
applications on SMP systems.
Approved by: re (kib)
(which was missed with r184739: r183013,r183017,r183032,r183034)
Original commit message from HEAD:
Julian: "oops commit the version that compiles"
Unbreak RELENG_7 including the missing sys/proc.h header file.
Approved by: re (kib)
Make sure internal rtld malloc routines are not called from unlocked
contexts as rtld's malloc is not thread safe and is only supposed to be
called with exclusive bind lock already held.
Approved by: re (kensmith), kan
Allow strong symbols to override weak ones for lookups done through
dlsym with RTLD_NEXT/RTLD_SELF handles.
Allow symbols from ld-elf.so to be located this way too.
Approved by: re (kensmith), kan
Supply a valid Connect ID when issuing XPT_DEV_MATCH, which
according to my reading of the CAM draft is mandatory for
all CCB function calls and enforced by xptioctl() since at
least r168752. Previously we happened to use 0 as the Path
ID, causing the XPT_DEV_MATCH call to fail if there's no
SCSI bus 0. Basically the same bug was also fixed the same
way for camcontrol(8) as part of r126514.
PR: 127605
Approved by: re (kib)
Protect check for v_pollinfo == NULL and assignment of the newly allocated
vpollinfo with vnode interlock. Fully initialize vpollinfo before putting
pointer to it into vp->v_pollinfo.
Approved by: re (kensmith)
- In GCC 4.2 __builtin_frame_address() was fixed to include the
V9 stack bias so we no longer need to add it in db_backtrace()
and stack_capture() respectively. This also reverts r182168,
which kludged around the resulting unaligned access.
- Sync the sun4v versions of db_trace.c and stack_machdep.c with
the sparc64 ones and fix some style bugs.
Approved by: re (kib)
MNTK_UNMOUNT before, and mnt_mtx is used as interlock. vfs_busy() always
tries to obtain a shared lock on mnt_lock, the other user is unmount who
tries to drain it, setting MNTK_UNMOUNT before.
Approved by: re (kensmith)
Assert that v_holdcnt is non-zero before entering lockmgr in vn_lock and
ffs_lock. This cannot catch situations where holdcnt is incremented not
by curthread, but I think it is useful.
Approved by: re (kensmith)
Add explicit PCI IDs for the following Adaptec RAID Series 2 adapters:
Adaptec RAID 2045
Adaptec RAID 2405
Adaptec RAID 2445
Adaptec RAID 2805
Without this change these devices are supported by the driver's family
support, but they then appear as "Adaptec RAID Controller" in boot
messages and the dev.aac.0.%desc sysctl.
Approved by: re (kib)
Add cr_canseeinpcb() doing checks using the cached socket
credentials from inp_cred which is also available after the
socket is gone.
Switch cr_canseesocket consumers to cr_canseeinpcb.
This removes an extra acquisition of the socket lock.
Approved by: re (rwatson)
Workaround possible q_time overflow (will happen after 2^32/(86400*hz)
days of uptime (~50days for hz = 1000)), which may lead to:
- broken shaping in 'fast' io mode.
- incorrect average queue length calculation in RED/GRED algorithm.
PR: kern/128401
Approved by: re (kensmith)
Add mac_check_inpcb_visible MAC Framework entry point, which is similar
to mac_check_socket_visible but operates on the inpcb.
Approved by: re (rwatson)
> Allow multiple locks to be acquired by detecting corresponding
> bit flag, otherwise if a thread acquired a lock, another thread
> or the current thread itself can no longer acquire another lock
> because thread_mask_set() return whole flag word, this results
> bit leaking in the word and misbehavior in later locking and
> unlocking.
Approved by: re (kib)
Cache so_cred as inp_cred in the inpcb.
This means that inp_cred is always there, even after the socket
has gone away. It also means that it is constant for the lifetime
of the inp.
Both facts lead to simpler code and possibly less locking.
Approved by: re (gnn)
mld_timerresid() returns ms so instead of doing the maths in usec
and then dividing down to ms, do the maths in ms.
Obtained from: NetBSD mld6.c rev. 1.47
Approved by: re (gnn)
Make the checks for ptp interfaces in ifa_ifwithdstaddr() and
ifa_ifwithnet() look more similar by comparing the pointer to NULL
in both cases.
Approved by: re (gnn)
There is no real consumer of ip6_plen (IPv6 payload length)
as set in tcpip_fillheaders().
ip6_output() will calculate it based of the length from the
mbuf packet header itself.
Initialize the value in tcpip_fillheaders() in correct
(network) byte order.
With the above change, all places calling tcp_trace() pass in
the ip6 header serialized in the mbuf as ipgen and with
ip6_plen in network byte order. Thus convert the IPv6 payload
length to host byte order before printing.
Approved by: re (gnn)
Expand DBDMA API to allow setting device-dependent control bits and allow
DBDMA registers to lie in a subregion of a resource.
Also import changes to the BMAC driver to handle these changes and
change the way we enable the BMAC cell in macio. Instead of calling the
macio's enable-enet word, which apparently does nothing on some machines,
open an OF instance of the ethernet controller. This fixes cold booting
from disk on my Blue & White G3.
Approved by: re (gnn)
Prefix the static shl function with '__' like its parent function __qdivrem to
avoid being picked up by the DTrace fbt provider.
This is called by __udivdi3() for doing 64bit division on a 32bit arch and may
be called from within the dtrace context causing a double fault.
Approved by: re (kib)
of refinement later, as bde says that 4BSD expects stathz of 128, while
in this case stathz would be in the range 40-128.
Approved by: re (kib, kensmith)
- r183613 by delphij
Note recently added ICH10 support
- r183570 by brueffer
ITE IT8213F support.
- r181826 by simon
Fix mdoc markup in r181825.
Approved by: re (kib)
- r183380 (sos)
Add support for the ITE 8213 controller.
Thanks goes to ITE who provided docs and feedback and made this possible.
Minor fixups to the Intel ICH code for bugs found while doing this.
(ITE8213 is very semilar to an Intel ICH)
- r183552 (sos)
Add ICH10 PCI id's.
Fix the number of PATA ports on newer ICHX chips, they have just 1 port
not 2.
Approved by: re (kib)
- Reduce the scope of the vnode lock such that it does not
cover the various copyouts associated with initializing
the process's argv/env data in userspace. It is possible
that these copyout operations can fault under memory
pressure, possibly resulting in dead locks.
Approved by: re@ (kib)
Fall back to the binary-specified interpreter (ld-elf.so.1) if the
ABI override binary isn't found.
MFC r183694:
If the ABI-overriden interpreter was not loaded, do not set have_interp
to TRUE.
Approved by: re (kensmith)
Small cleanups to openpty().
- Pass O_NOCTTY to posix_openpt(2). This makes the implementation work
consistently on implementations that make the PTY the controlling TTY
by default.
- Call unlockpt() before opening the slave device. POSIX mentions that
de slave device should only be opened after grantpt() and unlockpt()
have been called.
- Replace some redundant code by a label.
As a safety net, add a call to revoke() to unlockpt(). All applications
out there use openpty(), explicitly call revoke() or implement their own
PTY allocation routines. Adding the call to unlockpt() won't hurt, but
will prevent foot-shooting.
Reviewed by: jhb, kib
Approved by: re
Wireless Mouse device of Sony VGP-WRC1 mouse/keyboard receiver has the
same program interface as Microsoft Wireless Notebook Optical Mouse and
needs a quirk.
PR: usb/122712
Approved by: re (kensmith)
Ktr(9) stores format string and arguments in the event circular buffer,
not the string formatted at the time of CTRX() call. Stack_ktr(9) uses
an on-stack buffer for the symbol name, that is supplied as an argument
to ktr. As result, stack_ktr() traces show garbage or cause page faults.
Fix stack_ktr() by using pointer to module symbol table that is supposed
to have a longer lifetime.
Approved by: re (kensmith)
In realtimer_delete(), clear timer's value and interval to tell
realtimer_expire() to not rearm the timer, otherwise there is a
chance that a callout will be left there and be tiggered in future
unexpectly.
Approved by: re (kib)
When we notice the INDEX had volume numbers (so the media the packages
are coming from has multiple volumes) walk through the dependency tree
for the packages selected by the user once for each volume, only
installing packages on the current volume. If we can't install the
package because its on a higher volume just note that we have looked
at it during the pass for this volume to cut down on time spent checking
dependencies. This stops the excessive disc swapping that users have
complained (a lot...) about.
Approved by: re (kib)
Return G_PART_PROBE_PRI_HIGH instead of G_PART_PROBE_PRI_NORM
if the probe succeeds. This guarantees that the BSD scheme
wins over the MBR scheme when MBR gets to probe first.
Approved by: re (kib@)
setting the ACL changes the mtime. (Plus a new test to exercise
basic ACL restore logic.)
PR: kern/128203
Submitted by: Udo Schweigert
Approved by: re (Kostik Belousov)
Some 88E1149 PHY's page select is initialized to point to other
bank instead of copper/fiber bank which in turn resulted in
wrong registers were accessed during PHY operation. It is
believed that page 0 should be used for copper PHY so reinitialize
E1000_EADR to select default copper PHY.
This fixes link establishment issue of nfe(4) on Sun Fire X4140.
OpenBSD also has similimar patch but they just reset the E1000_EADR
register to page 0. However some Marvell PHYs((88E3082, 88E1000)
don't have the extended address register and the meaning of the
register is quite different for each PHY model. So selecting copper
PHY is limited to 88E1149 PHY which seems to be the only one that
exhibits link establishment problem. If parent device know the type
of PHY(either copper or fiber) that information should be notified
to PHY driver but there is no good way to pass this information yet.
Reported by: thompsa
Reviewed by: thompsa
Approved by: re (gnn)
r183771:
Add a build knob MAKE_DVD to control on a per-architecture basis whether
or not to build a tree used for the creation of a DVD image. If that is
enabled set up a DVD tree by installing everything we normally install
to the individual CDROM trees into the one DVD tree. The result is one
image with all the install bits, livefs bits, and doc bits suitable for
burning to a DVD instead of CDROM.
Enable building the DVD for amd64 and i386.
r183860:
The thought of making more than one DVD image for a release really
freaks me out. But it turns out we might be able to generalize
a few of the other things RE uses to assemble the package trees
for releases if the DVDs use a naming theme close to what is used
for the CDROMS (disc1, disc2, etc). So change the name to dvd1.
Hopefully this way src/release/scripts/{package-split.py,package-trees.sh}
can be generalized instead of copied-and-hacked.
Approved by: re (kib)
Turn XXX's for unlocked writes of NFS server statistics to simple notes,
as we consider it a feature to exchange performance for consistency.
Approved by: re (kib)
When disconnecting a UDPv6 socket, acquire the socket lock around the
changing of the so_state field, as is done in UDPv4. Remove XXX
locking comment.
Approved by: re (kib)
The locking in portalfs's socket connect code is no less correct than
identical code in connect(2), so remove XXX that it might be incorrect.
Approved by: re (kib)
Implement sched_setaffinity and get_setaffinity using real cpu affinity
setting primitives.
MFC r177604 (by ru):
Fix build.
MFC r183612:
Use FreeBSD size of cpuset_t for bitmap size parameter and return EINVAL
if length of user space bitmap less than our size of cpuset_t.
Approved by: re (kensmith)
Read PCI device id instead of PCI revision id. Also checks the read
device id is JMC260 family. Previously it just verified the deivce
is JMC260 Rev A0. This will make it easy for newer JMC2xx support.
Pointed out by: bouyer at NetBSD
MFC r183859:
Make sure to read the last byte of EEPROM descriptor. Previously
the last byte of the ethernet address was not read which in turn
resulted in getting 5 out of the 6 bytes of ethernet address and
always returned ENOENT. I did not notice the bug on FPGA version
because of additional configuration data in EEPROM.
Pointed out by: bouyer at NetBSD
Approved by: re (gnn)
sc->ndis_txidx should be cycle between 0 and sc->ndis_maxpkts, not
NDIS_TXPKTS and don't allocate unused extra spaces for
sc->ndis_txarray and sc->ndis_txpool.
PR: kern/127644
Submitted by: Antoine Pelisse <apelisse_at_gmail.com>
Approved by: re (gnn)
In soreceive_dgram, when a 0-length buffer is passed into recv(2) and
no data is ready, return 0 rather than blocking or returning EAGAIN.
This is consistent with the behavior of soreceive_generic (soreceive)
in earlier versions of FreeBSD, and restores this behavior for UDP.
Discussed with: jhb, sam
Approved by: re (kib)
the unlocked route caching in if_stf. Add a mutex that protects
access to cached route. Various versions of this patch were tested
by Pekka Savola, Nick Sayer and Wouter Snels.
Approved by: re (gnn)
MFV of r183861
MFC of r183864
- Minor update for Mauritius (which I don't understand)
- Syria goes to DST at 1 November instead of 1 October.
- Niue is now located at the right side of the equator.
Approved by: re (blackend)
Remove temporary debugging KASSERT's introduced to detect protocols
improperly invoking sosend(), soreceive(), and sopoll() instead of
attach either specialized or _generic() versions of those functions
to their pru_sosend, pru_soreceive, and pru_sopoll protosw methods.
Approved by: re (kib)
Don't pass curthread to sbreserve_locked() in tcp_do_segment(), as the
netisr or ithread's socket buffer size limit is not the right limit to
use. Instead, pass NULL as the other two calls to sbreserve_locked()
in the TCP input path (tcp_mss()) do.
In practice, this is a no-op, as ithreads and the netisr run without a
process limit on socket buffer use, and a NULL thread pointer leads to
not using the process's limit, if any. However, if tcp_input() is
called in other contexts that do have limits, this may prevent the
incorrect limit from being used.
Rewrite sbreserve_locked()'s comment on NULL thread pointers, eliminating
an XXXRW about the comment being stale.
Approved by: re (gnn)
Lock receive socket buffer in soo_stat() rather than commenting that
we should lock it, which may marginally improve the consistency of
the results. Remove comment.
Approved by: re (gnn)
stable/7:
Further minor cleanups to UNIX domain sockets:
- Staticize and locally prototype functions uipc_ctloutput(),
unp_dispose(), unp_init(), and unp_externalize(), none of which have
been required outside of uipc_usrreq.c since uipc_proto.c was removed.
- Remove stale prototype for uipc_usrreq(), which has not existed in the
code since 1997
- Forward declare and staticize uipc_usrreqs structure in uipc_usrreq.c
and not un.h.
- Comment on why uipc_connect2() is still non-static -- it is used
directly by fifofs.
- Remove stale comments, tidy up whitespace.
Use soconnect2() rather than directly invoking uipc_connect2() to
interconnect two UNIX domain sockets.
Now that portalfs doesn't directly invoke uipc_connect2(), make it a
static symbol.
Remove stale comment (and XXX saying so) about why we zero the file
descriptor pointer in unp_freerights: we can no longer recurse into
unp_gc due to unp_gc being invoked in a deferred way, but it's still
a good idea.
Remove stale comment: while uipc_connect2() was, until recently, not
static so it could be used by fifofs (actually portalfs), it is now
static.
Submitted by: kensmith
Approved by: re (kensmith)
Disable ATAPI DMA as it's once again broken in that it causes data
corruption with the on-board AcerLabs M5229 controllers. While at
it, remove the pointless "nothing to autoload yet." message.
Approved by: re (blackend)
Add freebsd32 compat shim for nmount(2). Also 32-bit ioctl shims
for MDIO, CDIOREADTOCHEADER and CDIOREADTOCENTRYS requests.
Fix bug which removed the 32-bit swapon(2) interface. style(9).
Approved by: re(kostikbel)
Various cleanups for soreceive_dgram():
- Update or remove comments that were left over from the original
soreceive_generic() implementation. Quite a few were misleading in the
context of the new code.
- Since soreceive_dgram() has a simpler structure, replace several gotos
with a while loop making the invariants more clear.
- In the blocking while loop, don't try to handle cases incompatible with
the loop invariant (since m is always NULL, don't check for and handle
non-NULL).
- Don't drop and re-acquire the socket buffer lock unnecessarily after
sbwait() returns, which may help reduce lock contention (etc).
- Assume PR_ATOMIC since we assert it at the top of the function.
Approved by: re (gnn)
rev. 1.7 net/if_enc.c
rev. 1.14 netipsec/ipsec.h, 1.20 netipsec/ipsec_input.c
rev. 1.17 netipsec/ipsec_output.c
rev. 1.4 netipsec/xform.h, 1.16 netipsec/xform_ipip.c
SVN r174054, 174055
Add sysctls to if_enc(4) to control whether the firewalls or
bpf will see inner and outer headers or just inner or outer
headers for incoming and outgoing IPsec packets.
This is useful in bpf to not have over long lines for debugging
or selcting packets based on the inner headers.
It also properly defines the behavior of what the firewalls see.
Last but not least it gives you if_enc(4) for IPv6 as well.
[ As some auxiliary state was not available in the later
input path we save it in the tdbi. That way tcpdump can give a
consistent view of either of (authentic,confidential) for both
before and after states. ]
Note: The defaults were not changed but you may want to do that.
See the the man page for more details.
PR: kern/127785
Approved by: re (gnn)
Differentiate between interrupt frames, trap interrupt frames and timer
frame in the kgdb, to allow it to properly backtrace over the interrupt
stacks.
Approved by: re (kensmith)
Frames created by the Xcpustop, Xrendezvous, Xipi_intr_bitmap_handler
and Xlazypmap differ from the frame for Xtimerint. The Xtimerint puts
pointer to the frame between return address and frame body, while rest
of the functions listed above do not. Correct offset calculation to
allow the ddb backtrace to step over such frames.
Approved by: re (kensmith)
If the panic thread is preempted after setting panicstr but before
setting TDF_INPANIC then it will never be rescheduled again. Wrap
setting the panic condition with the critical section.
Approved by: re (kensmith)
fix two panics:
1. panic: rtalloc1_fib: bad fibnum
2. panic: Lock tcpinp not exclusively locked
@ /usr/src/sys/netinet/in_pcb.c:1284
Submitted by: Chelsio Inc.
Approved by: re
copy out the size of the user's buffer. In the case of a program using
the older (smaller) structure, the previous code would trash memory after
the end of the user's kld_stat struct. This was missed in the DTrace
MFC.
Submitted by: Jaakko Heinonen jh saunalahti.fi
Approved by: re (kib)
Save previous content of the td_fpop before storing the current
filedescriptor into it. Make sure that td_fpop is NULL when calling
d_mmap from dev_pager_getpages().
Approved by: re (kensmith)
When an inpcb doesn't have a socket but the inpcb is passed to ipfw
in the transmit path, such as TCPS_TIMEWAIT, fail the credential
extraction immediately rather than acquiring locks and looking up
the inpcb on the global lists in order to reach the conclusion that
the credential extraction has failed.
This is more efficient, but more importantly, it avoids lock
recursion on the inpcbinfo, which is no longer allowed with rwlocks.
This appears to have been responsible for at least two reported
panics.
Reported by: ganbold
Approved by: re (kib)
Rather than shadowing global variable 'lookup' in check_uidgid(), rename
it to ugid_lookupp. This should make debugging issues with ipfw uid
rules easier.
Approved by: re (kib)
As a follow-on to r183323, correct another case where ip_output() was
called without an inpcb pointer despite holding the tcbinfo global
lock, which lead to a deadlock or panic when ipfw tried to further
acquire it recursively.
Reported by: Stefan Ehmann <shoesoft at gmx dot net>
Approved by: re (kib)
When dropping a packet and issuing a reset during TCP segment handling,
unconditionally drop the tcbinfo lock (after all, we assert it lines
before), but call tcp_dropwithreset() under both inpcb and inpcbinfo
locks only if we pass in an tcpcb. Otherwise, if the pointer is NULL,
firewall code may later recurse the global tcbinfo lock trying to look
up an inpcb.
This is an instance where a layering violation leads not only
potentially to code reentrace and recursion, but also to lock
recursion, and was revealed by the conversion to rwlocks because
acquiring a read lock on an rwlock already held with a write lock is
forbidden. When these locks were mutexes, they simply recursed.
Reported by: Stefan Ehmann <shoesoft at gmx dot net>
Approved by: re (kib)
Don't terminate if we are listing devices, a controller might
legitimately not be there.
Submitted by: Andrey V. Elsukov <[email protected]>
Approved by: re (gnn), phk
Add workaround for occasional packet loss issue of JMC250 A2
when it runs on half-duplex media.
While I'm here add register definition for GPREG1. ATM the GPREG1
register is only valid for JMC250 A1/A2.
Submitted by: Ethan at JMicron
Approved by: re (kensmith)
- Clean up the code that checks the types of address so that it is
done by understandable macros.
- Fix the bug that prevented the system from responding on interfaces with
link local addresses assigned.
Approved by: re (gnn)
Lockf was exiting with status 1 if the command did not exit normally.
This is easy to confuse with the actual exit status of the program.
Instead exit with EX_SOFTWARE if the command doesn't exit normally.
Approved by: re (kib)
- Correct a long-standing error in vm_object_deallocate(). Specifically,
only anonymous default (OBJT_DEFAULT) and swap (OBJT_SWAP) objects should
ever have OBJ_ONEMAPPING set. However, vm_object_deallocate() was
setting it on device (OBJT_DEVICE) objects. As a result,
vm_object_page_remove() could be called on a device object and if that
occurred pmap_remove_all() would be called on the device object's pages.
However, a device object's pages are fictitious, and fictitious pages do
not have an initialized pv list (struct md_page).
- Correct a long-standing error in vm_object_page_remove(). Specifically,
pmap_remove_all() must not be called on fictitious pages. To date,
fictitious pages have been allocated from zeroed memory, effectively
hiding this problem because the fictitious pages appear to have an empty
pv list.
- Rewrite the comments describing vm_object_page_remove() to better
describe what it does. Add an assertion.
Approved by: re (kib), alc
When invoking the udp_send() from udp6_send() due to use of a v6-mapped
IPv4 address, first drop the udbinfo and inpcb locks, which will otherwise
be recursed. This leads to a potential minor race, but is preferable to a
deadlock when acquiring a read lock after a write lock on the inpcb.
MFC after: 3 days
Reported by: Norbert Papke <[email protected]>, lioux
Approved by: re (kib)
Tested by: Norbert Papke <[email protected]>, lioux
When doing rfork(0), i.e. separating curproc VM from any other user of
the same vmspace, decrement the reference count of the shared LDT instead
of a newly-made copy. Code factually removed LDT from the process that
did rfork(0).
Introduce user_ldt_deref() function that does decrement of refcount for
the struct proc_ldt, and call it in the rfork(0) case on the shared LDT.
Approved by: re (kensmith)
The user_ldt_alloc() function shall return with dt_lock locked.
The user_ldt_free() function shall return with dt_lock unlocked.
Error handling code in both functions do not handle this, fix it by
doing necessary lock/unlock.
While there, fix minor style nits.
Approved by: re (kensmith)
Remove warning about static LDT segment allocation. Applications
continue using it after ~7 years since warning was introduced, and there
is no reason to discourage them.
Approved by: re (kensmith)
To date, our implementation of munmap(2) has required that the
entirety of the specified range be mapped. Specifically, it has
returned EINVAL if the entire range is not mapped. There is not,
however, any basis for this in either SuSv2 or our own man page.
Moreover, neither Linux nor Solaris impose this requirement. This
revision removes this requirement.
Approved by: re (kib)
Essentially, neither madvise(..., MADV_DONTNEED) nor madvise(..., MADV_FREE)
work. (Moreover, I don't believe that they have ever worked as intended.)
The explanation is fairly simple. Both MADV_DONTNEED and MADV_FREE perform
vm_page_dontneed() on each page within the range given to madvise(). This
function moves the page to the inactive queue. Specifically, if the page is
clean, it is moved to the head of the inactive queue where it is first in
line for processing by the page daemon. On the other hand, if it is dirty,
it is placed at the tail. Let's further examine the case in which the page
is clean. Recall that the page is at the head of the line for processing by
the page daemon. The expectation of vm_page_dontneed()'s author was that
the page would be transferred from the inactive queue to the cache queue by
the page daemon. (Once the page is in the cache queue, it is, in effect,
free, that is, it can be reallocated to a new vm object by vm_page_alloc()
if it isn't reactivated quickly enough by a user of the old vm object.) The
trouble is that nowhere in the execution of either MADV_DONTNEED or
MADV_FREE is either the machine-independent reference flag (PG_REFERENCED)
or the reference bit in any page table entry (PTE) mapping the page cleared.
Consequently, the immediate reaction of the page daemon is to reactivate the
page because it is referenced. In effect, the madvise() was for naught.
The case in which the page was dirty is not too different. Instead of being
laundered, the page is reactivated.
Note: The essential difference between MADV_DONTNEED and MADV_FREE is
that MADV_FREE clears a page's dirty field. So, MADV_FREE is always
executing the clean case above.
This revision changes vm_page_dontneed() to clear both the machine-
independent reference flag (PG_REFERENCED) and the reference bit in all PTEs
mapping the page.
Approved by: re (kib), alc
Check whether we've recorded this tick in ts_ticks on another cpu in
sched_tick() to prevent multiple increments for one tick. This pushes
the value out of range and breaks priority calculation.
Approved by: re (rwatson)
New Revision: 182818
URL: http://svn.freebsd.org/changeset/base/182818
Log:
Export the IPFW_DEFAULT_RULE outside ip_fw2.c. This number in not only
the default rule number but also the maximum rule number. User space
software such as ipfw and natd should be aware of its value. The
software that already includes ip_fw.h should use the defined value. All
other a expected to use sysctl (as discussed on net@).
MFC after: 5 days.
Discussed on: net@
Modified:
head/sys/netinet/ip_fw.h
head/sys/netinet/ip_fw2.c
New Revision: 182823
URL: http://svn.freebsd.org/changeset/base/182823
Log:
Use IPFW_DEFAULT_RULE instead of hardcoded value since now it is
available.
MFC after: 5 days.
Modified:
head/sbin/ipfw/ipfw2.c
New Revision: 182825
URL: http://svn.freebsd.org/changeset/base/182825
Log:
Check rule numbers against maximum value to avoid rules cleanup due
to overflow.
MFC after: 5 days.
Modified:
head/sbin/natd/natd.c
New Revision: 183012
URL: http://svn.freebsd.org/changeset/base/183012
Log:
Make the commet for the default rule number more clear.
Submitted by: yar@
Modified:
head/sys/netinet/ip_fw.h
Approved by: re (kensmith)
change the code to include "thread" argument to the vn_lock()
which got removed in HEAD:
Getdents requires padding with 2 bytes instead of 1 byte
as with getdents64. The last byte is used for storing
the d_type, add this to plain getdents case where it was
missing before. Also change the code to use strlcpy instead
of plain strcpy. This changes fix the getdents crash we
had reports about (hl2 server etc.)
PR: kern/117010
MFC after: 1 week
Submitted by: Dmitry Chagin (dchagin@)
Tested by: MITA Yoshio <mita ee.t.u-tokyo.ac jp>
Approved by: kib (mentor)
Approved by: re (kensmith)
Implement WNOWAIT flag for wait4(2). It specifies that process whose status
is returned shall be kept in the waitable state.
Add WSTOPPED as an alias for WUNTRACED.
MFC r182424 (by davidxu):
Don't remove queued SIGCHLD if options contain WNOWAIT, so other
threads still can be notified by the signal.
Approved by: re (kensmith)
Read ethernet address from ID registers for RTL8102E/RTL8102EL as
reading from EEPROM doesn't seem to work on these controllers.
Reported by: Milan Obuch ( freebsd-net at dino dot sk )
Tested by: Milan Obuch ( freebsd-net at dino dot sk )
Approved by: re (kensmith)
Remove the alignment of the align parameter. This is up to the caller to pass
in and it breaks tap(4) on strict alignment machines as m_uiotombuf is called
with ETHER_ALIGN.
Approved by: re (kensmith)
bge_tick(): do not touch PHY if link is up. This should solve problem with
extra input errors for some BCM57XX chips.
PR: kern/122295
Approved by: re (kensmith)
In FreeBSD 7.0 and beyond, pmap_growkernel() should pass VM_ALLOC_INTERRUPT
to vm_page_alloc() instead of VM_ALLOC_SYSTEM. VM_ALLOC_SYSTEM was the
logical choice before FreeBSD 7.0 because VM_ALLOC_INTERRUPT could not
reclaim a cached page. Simply put, there was no ordering between
VM_ALLOC_INTERRUPT and VM_ALLOC_SYSTEM as to which "dug deeper" into the
cache and free queues. Now, there is; VM_ALLOC_INTERRUPT dominates
VM_ALLOC_SYSTEM.
While I'm here, teach pmap_growkernel() to request a prezeroed page.
Approved by: re (kib), alc
Improve get_pv_entry()'s handling of low-memory conditions. After page
allocation fails and pv entries are reclaimed, there may be an unused pv
entry in a pv chunk that survived the reclamation. However, previously,
after reclamation, get_pv_entry() did not look for an unused pv entry in
a surviving pv chunk; it simply retried the page allocation. Now, it
does look for an unused pv entry before retrying the page allocation.
Note: This only applies to RELENG_7. Earlier branches use a different
pv entry allocator.
Approved by: re (kib), alc
- Tidy up: Add comments. Eliminate the pointless
malloc_type_allocated(..., 0) calls that occur when contigmalloc() has
failed. Eliminate the acquisition and release of the page queues lock
from vm_page_release_contig(). Rename contigmalloc2() to
contigmapping(), reflecting what it does.
- Make contigmalloc(9)'s page laundering more robust. Specifically, use
vm_pageout_fallback_object_lock() in vm_contig_launder_page() to better
handle a lock-ordering problem. Consequently, trylock's failure on the
page's containing object no longer implies that the page cannot be
laundered.
Approved by: re (kib), alc
r182887:
Fix typo which resulted in invalid configuration for JMC260.
r182888:
Add workaround for CRC errors seen at 100Mbps on JMC250 A2.
While here update chip revision number of JMC250/JMC260 from the
latest datasheet.
Approved by: re (kensmith)
on #ifdef INET, as we don't define udp6_usrreqs when IPv6 isn't
compiled into the kernel.
Reported by: bf <bf2006a at yahoo dot com>,
Kovacs Robert <robi at datanet.hu>
Approved by: re (kib)
Add soreceive_dgram(9), an optimized socket receive function for use by
datagram-only protocols, such as UDP. This version removes use of
sblock(), which is not required due to an inability to interlace data
improperly with datagrams, as well as avoiding some of the larger loops
and state management that don't apply on datagram sockets.
This is experimental code, so hook it up only for UDPv4 for testing; if
there are problems we may need to revise it or turn it off by default,
but it offers *significant* performance improvements for threaded UDP
applications such as BIND9, nsd, and memcached using UDP.
Tested by: kris, ps
Update copyright date in light of soreceive_dgram(9).
Use soreceive_dgram() and sosend_dgram() with UDPv6, as we do with UDPv4.
Tested by: ps
Remove XXXRW in soreceive_dgram that proves unnecessary.
Remove unused orig_resid variable in soreceive_dgram.
Submitted by: alfred
Note: in the MFC, we do enable sosend_dgram for UDPv6 by default (it was
already used for UDPv4), but use of soreceive_dgram for both UDPv4 and
UDPv6 is controlled by a new loader tunable,
net.inet.udp.soreceive_dgram_enabled as soreceive_dgram has less testing
exposure than sosend_dgram. We may wish to change the default (and
eliminate the tunable) in 7.2.
MFC requested by: gnn, kris, ps
Approved by: re (kib)
The pcb_gs32p should be per-cpu, not per-thread pointer. This is
location in GDT where the segment descriptor from pcb_gs32sd is
copied, and the location is in GDT local to CPU.
Approved by: re (kensmith)
Segment registers are stored in the uc_mcontext member of the struct
l_ucontext. To restore the registers content, trampoline needs to
dereference uc_mcontext instead of taking some undefined values from
l_ucontext.
Approved by: re (kensmith)
Bypass isa_probe_children(9) and directly call bus_generic_attach(9)
in order to avoid the invasive probes done by identify-routines of
ISA drivers, which may access unassigned addresses or those of
unrelated devices and thus in turn can trigger master/target aborts
as revealed by r182108 and ahc(4). I think that this is also the
cause of the hang previously seen on B100 blades during boot.
Bypassing isa_probe_children(9) also avoids adding ISA hints, which
just can be wrong for sparc64.
Approved by: re (kib)
Add one more SII3132 chip PCI ID found on Adaptec Serial ATA II RAID 1220SA.
Submitted by: Dmitry S. Luhtionov <[email protected]>
Approved by: re (kib)
and decrementing unp_rights, which may otherwise be corrupted. Be
slightly more conversative in where we read unp_rights.
This relates to one of the symptoms reported in the noted PR, but may not
correct the actual high system time problem. The reporter has confirmed
stability but not that the problem is eliminated. However, this is a
useful fix to a clear locking bug.
Note that this is not an MFC as the UNIX domain socket garbage collector
has been replaced in 8.x.
PR: 127024
Reported by: Anton Yuzhaninov <citrin at citrin dot ru>
Reviewed by: kib
Approved by: re (kib)
Apply updated patch from bin/92839 to avoid two possible buffer overflows.
PR: bin/92839
Submitted by: Helge Oldach <[email protected]>
Approved by: re (gnn)
Work around an integer division resulting in 0 and thus the
congestion window not being incremented, if cwnd > maxseg^2.
As suggested in RFC2581 increment the cwnd by 1 in this case.
See http://caia.swin.edu.au/reports/080829A/CAIA-TR-080829A.pdf
for more details.
Submitted by: Alana Huebner, Lawrence Stewart,
Grenville Armitage (caia.swin.edu.au)
Reviewed by: dwmalone, gnn, rpaulo, silby
Approved by: re (gnn)
Fix deactivation of speakers while plugging in headphones on Fujitsu
U1010, Lenovo 3k N200 and Acer Aspire 4715Z.
Reviewed by: attilio
PR: 126216, 126244, 127034
Submitted by: Anton E. Kartashev <[email protected]>,
Ganael Laplanche <[email protected]>,
Dennis Generaloff <[email protected]>
Requested by: joel
Approved by: re (kib, via joel), imp (mentor, implicit)
Obtained from: joel
firewall configurations to be configured (interfaces and attached networks)
from rc.conf rather than requiring users to edit /etc/rc.firewall directly.
Approved by: re (kensmith)
Validate scratch memory addresses for BPF_STX and BPF_LDX|BPF_MEM.
A badly written filter was able to reference invalid addresses,
even cause kernel crash.
Approved by: re (kensmith)
- r182172:
Embed scratch memory in the filter structure.
- r182173:
Fix a typo in copyrights.
- r182220:
Move empty filter handling to MI source.
- r182376:
Initialize scratch memory for JIT-compiled filter when it is allocated.
Previously it may have contained unnecessary (even sensitive) data from
the previous allocation.
As a (good) side effect, scratch memory may be used to store the previous
filter state(s) safely because it is allocated and freed with filter itself.
However, use it carefully because bpf_filter(9) does not have this behavior.
Approved by: re (kensmith)
In rev. 1.17 (r33548) of msdosfs_fat.c, relative cluster numbers were
replaced by file relative sector numbers as the buffer block number
when zero-padding a file during extension. Revert the change, it causes
wrong blocks filled with zeroes on seeking beyond end of file.
PR: kern/47628
Approved by: re (kensmith)
- When executing FreeBSD/amd64 binaries from FreeBSD/i386 or Linux/i386
processes, clear PCB_32BIT and PCB_GS32BIT bits.
- Reread the fs and gs bases from the msr unconditionally, not believing
the values in pcb_fsbase and pcb_gsbase, since usermode may reload
segment registers, invalidating the cache.
Approved by: re (kensmith)
causes packets that are looped back to have the wrong checksum when
transmitted on the wire.
PR: kern/119635
Reviewed by: rwatson
Approved by: re (rwatson)
In UDPv6, reduce scope of global udbinfo lock during append to last
matching socket by dropping it before udp6_append(), and remove
duplicate unlocks of udbinfo and inpcb in sysctl return path.
Approved by: re (kensmith)
Fix a bug, when a specially crafted ICMPV6 MLD packet could lead
to an integer divide by zero panic in the kernel, if the kernel was
run with hz<1000.
Neither i386, pc98, amd64 or sparc64 are affected in the currently
supported branches and default configuration.
Submitted by: Miikka Saukko, Ossi Herrala and Jukka Taimisto from
the CROSS project at Codenomicon Ltd. via CERT-FI.
Reviewed by: bz, rwatson
Approved by: re (SA blanket)
Approved by: so (simon)
Security: CVE-2008-2464
be part of the next version of sendmail. Putting it in now for the
upcoming 7-BETA and 6-BETA test releases.
Submitted by: Mike Tancsa
Approved by: re (kensmith)
+ Open ctty in non-blocking mode to avoid hangs during open and close(waiting
for the port to drain).
+ Handle "*" as a priority properly.
+ Test what is free'ed.
+ Dynamically determine length vs. hardcoding it.
+ Free the previous message buffer (f_prevline) only after logging all the
messages and just before the process exit. Also check f_prevline for NULL
before using it.
+ The time displayed is not synchornized with the other log destinations.
+ Fix a comment.
+ Remove extraneous NULL pointer check - the pointer is guaranteed to be
non-NULL.
For chips with a broken DC_ISR_RX_STATE which f.e. never signals
stopped nor the waiting state and also no other means to check
whether the receiver is idle (see also r163774), we have no choice
than to call mii_tick(9) unconditionally even in the case of the
DC_REDUCED_MII_POLL handling as far as the RX side is concerned.
This isn't necessarily worse than checking whether RX is idle
though because unlike as with TX we're racing with the hardware,
which might receive packets any time while we poll the MII, anyway.
Reported and tested by: Jacob Owens
Reviewed by: yongari
When getaudit(2) is unable to fit the terminal IPv6 address into the
space provided by its argument structure, return EOVERFLOW instead of
E2BIG. The latter is documented in Solaris's man page, but the
former is implemented. In either case, the caller should use
getaudit_addr(2) to return the IPv6 address.
Submitted by: sson
Obtained from: Apple, Inc.
Use ERANGE instead of EOVERFLOW selected in r182059, this seems more
appropriate even if Solaris doesn't document it (E2BIG) or use it
(EOVERFLOW).
Submitted by: nectar at apple dot com
Sponsored by: Apple, Inc.
Remove comments and #ifdef notyet'd code relating to directly dispatching
the IP multicast input code from the output path; we don't allow
reentrance of the input path from the IP output path, it must use the
netisr due to potential lock recursion.
When copying in and out current ICMPv6 filters on a raw IPv6 socket,
lock the inpcb and use a local stack variable to copy to/from userspace
so that sooptcopyin()/sooptcopyout() aren't called while holding an
rwlock.
While here, fix a bug in which a failed sooptcopyin() might lead to
partially consistent ICMPv6 filters on the socket by not ignoring the
error returned by sooptcopyin().
Remove broken code to replace st_mode value with ACCESSPERMS when
lstat(2) is called on symlinks -- this code appears never to have
worked. The PR this addresses suggests that the intended
original behavior is the right one, but as bde points out in the
PR comments, we do actually support storing a mode on symlinks,
so returning it seems reasonable.
This is consistent with Mac OS X, which despite documentation to
the contrary does return the mode set on a symlink, but not some
other platforms. The Single Unix Spec requires only that the
returned bits be "meaningful", which seems at best unhelpful as
advice goes.
PR: 25018
DDB scripting, textdumps, output capture, etc, all will appear in
FreeBSD 7.1 before 8.0 ships.
Spotted by: Ulrich Spoerlein <uspoerlein at gmail dot com>
DDB scripting, textdumps, output capture, etc, all will appear in
FreeBSD 7.1 before 8.0 ships.
Spotted by: Ulrich Spoerlein <uspoerlein at gmail dot com>
Adopt the slightly weaker consistency locking approach used in IPv4 raw
sockets for IPv6 raw sockets: separately lock the inpcb for determining
the destination address for a connect()'d raw socket at the rip6_send()
layer, and then re-acquire the inpcb lock in the rip6_output() layer to
query other options on the socket. Previously, the global raw IP socket
lock was used, which while correct and marginally more consistent, could
add significantly to global raw IP socket lock contention.
Decrease ping6's minimum allowed interval
from .01 to .000001.
Note that due to the architecture of ping6,
you are still limited to kern.hz pings per
second.
In mac_bsdextended's auditctl and acct policy access control checks,
return success if the passed vnode pointer is NULL (rather than
panicking). This can occur if either audit or accounting are
disabled while the policy is running.
Since the swapoff control has no real relevance to this policy,
which is concerned about intent to write rather than water under the
bridge, remove it.
PR: kern/126100
Reported by: Alan Amesbury <amesbury at umn dot edu>
- Fix baud on the Oxford OX16PCI954
- Add the Avlab Technology PCI IO 4S-850 4 port serial card.
- Add the VScom PCI-100L card.
- Add the Decision Computer Inc, PCCOM 8-port serial card.
PR: kern/110797, kern/72352, kern/69730
Further synchronization of copyrights, licenses, white space, etc from
Apple and from the OpenBSM vendor tree.
Obtained from: Apple Inc., TrustedBSD Project
Marginally decomplicate set/getsockopt code in ip6_output.c by simply
using the passed arguments explicitly and unconditionally rather than
testing them and calling panic(). The result is the same but easier
to read.
Rather than checking for a NULL so_pcb in raw_attach(), assert that
it's non-NULL, as all callers can and should already do the required
checking. Update comments a bit more to talk about rawcb allocation
for consumers.
Reviewed by: bz
Add sysctl subtree net.raw for generic raw socket infrastructure;
expose default send and receive socket buffer sizes using sysctls
so that they can be administered centrally.
Reviewed by: bz
Remove unused support for local and foreign addresses in generic raw
socket support. These utility routines are used only for routing and
pfkey sockets, neither of which have a notion of address, so were
required to mock up fake socket addresses to avoid connection
requirements for applications that did not specify their own fake
addresses (most of them).
Quite a bit of the removed code is #ifdef notdef, since raw sockets
don't support bind() or connect() in practice. Removing this
simplifies the raw socket implementation, and removes two (commented
out) uses of dtom(9).
Fake addresses passed to sendto(2) by applications are ignored for
compatibility reasons, but this is now done in a more consistent way
(and with a comment). Possibly, EINVAL could be returned here in
the future if it is determined that no applications depend on the
semantic inconsistency of specifying a destination address for a
protocol without address support, but this will require some amount
of careful surveying.
NB: This does not affect netinet, netinet6, or other wire protocol
raw sockets, which provide their own independent infrastructure with
control block address support specific to the protocol.
Reviewed by: bz
and r180715 from head to stable/7:
Minor white space synchronization to Apple version of security audit.
Comment typo fix.
Comment fix.
Use #define<tab> rather than #define<space>.
Generally avoid <space><tab> as a white space anomoly.
Further minor white space tweaks.
Remove unneeded \ at the end of a macro.
Further minor style fixes to audit.
Obtained from: Apple, Inc.
In preparation to sync Apple and FreeBSD versions of security audit,
pick up the Apple Computer -> Apple change in their copyright and
license templates.
Obtained from: Apple Inc.
Explicitly tell that one needs to start a context address with a
backslash if he/she wants to use a non-traditional delimiter, i.e.,
anything other than a slash. That is, /abc/ works as is, but xabcx
needs to be spelled as \xabcx.
Add appropriate markup.
Bump Dd.
The libc acl_valid(3) function validates the contents of a POSIX.1e ACL.
This change removes the requirement that an ACL contain no ACL_USER
entries with a uid the same as those of a file, or ACL_GROUP entries
with a gid the same as those of a file. This requirement is not in the
specification, and not enforced by the kernel's ACL implementation.
Reported by: Iustin Pop <iusty at k1024 dot org>
Invoke err() with a format string rather than directly with a passed
command line argument.
Submitted by: Alfredo Ortega <alfredo at coresecurity dot com>
Thanks to: Core Security Technologies
Clarify comments and prototypes in raw_cb.h:
- the protosw entries are used directly
- the usrreq functions are library routines, generally wrapped by
consumers rather than being used directly
- the usrreq structure entries are likewise typically wrapped
Remove the rather incorrect #if 0'd pr_input_t prototype for raw_input.
Remove two netatm-specific test parts.
Spotted by: bz
For reasons not entirely clear to me, svn merge didn't merge the deletions,
so I had to do that manually and apply mergeinfo using --record-only.
Remove netatm from HEAD as it is not MPSAFE and relies on the now removed
NET_NEEDS_GIANT. netatm has been disconnected from the build for ten
months in HEAD/RELENG_7. Specifics:
- netatm include files
- netatm command line management tools
- libatm
- ATM parts in rescue and sysinstall
- sample configuration files and documents
- kernel support as a module or in NOTES
- netgraph wrapper nodes for netatm
- ctags data for netatm.
- netatm-specific device drivers.
Reviewed by: bz
Discussed with: bms, bz, harti
MFC discussed with: des, peter
Revert the r167541: "Remove unneeded getinoquota() call in the
ufs_access()." The call to getinoquota in ufs_access() serves the
purpose of instantiating inode dquot from the vn_open(). Since quotas
are accounted only for the inodes with already attached dquot, removal
of the call prevented opened inodes from participation in the quota
calculations.
Since ufs_access() may be called with the vnode being only shared
locked, upgrade (and then downgrade) vnode lock if calling
getinoquota().
MFC r182115:
Put the relocked variable from the r182111 into the #ifdef QUOTA braces
to prevent warning about unused var on the !QUOTA kernels.
In nmount(), when we see the "force" option,
set the MNT_FORCE flag, but do not persist "force"
in the options list, since it is a command, not a persistent property
of a mount.
Similarly, when we see "reload", set MNT_RELOAD,
but delete "reload" from the options list.
Cache the cred locally in _syncache_add() while holding the locks, so
we can be sure that it's valid.
In case we abort early free it again else put it into the syncache.
We need the cred in the syncache to be able to restrict what will be
exportet by the sysctl helper function syncache_pcblist() (to netstat)
within jails.
PR: kern/126493
the kernel with CTF symbols by default. This fixes builds of 7.x on 6.x
machines. The build of dtrace tools can be re-enabled when it is fixed to
not break 6.x upgrades. I'm not sure if we need to bootstrap the library
bits differently (perhaps the libegacy needs to include libelf and
libdwarf?).
Because bfe(4) knows interrupt mask value there is no need to read
interrupt mask register again. This saves one register access per
each interrupt.
Also don't try to process frames when driver is not running.
Remove bfe_link in softc and introduce two new flags to mark
link state and detach request.
While I'm here make sure established link is IFM_10_T or
IFM_100_TX as bfe(4) just supports 10/100Mbps media.
o Sort includes and add <endian.h> to support endianness.
o Removed unneeded header files.
o bus_dma(9) fix:
- created parent tag with 1GB dma address limit with no
alignment restrictions.
- set 4096 alignment limit for Tx/Rx descriptor rings.
- separate Rx buffer tag from Tx buffer tag such that Tx tag
allows up-to 16 segments while Rx buffer tag only allows
single segment.
- it seems the controller has no alignment restrictions on Tx/Rx
buffers. Remove ETHER_ALIGN alignment restriction in Tx/Rx
buffers.
- created a spare Rx dma map which would be used to cope with
failure of loading a dma map.
- make sure to load full Tx/Rx descriptor size for Tx/Rx
descriptor dma maps, previously bfe(4) used to load single
descriptor size for each descriptor rings. I have no idea how
it could be run without problems.
- don't blindly cast bus_addr_t type to 32bits in bfe_dma_map().
- created bfe_dma_free() to free allocated dma memory/tags.
- make sure to invoke bus_dmamap_sync(9) before/after processing
descriptor rings/buffers. Because the hardware has severe dma
address space limitation, bounce-buffers would be always used
on systems with more than 1GB memory during
descriptors/buffers access.
- added Tx descriptor ring initialization function,
bfe_list_tx_init().
- moved producer/consumer index initialization to
bfe_list_tx_init() and bfe_list_rx_init() from
bfe_chip_reset().
- added bfe_discard_buf() which will update loaded descriptors
without unloading/reloading the dma map to speed up error
recovery.
- implemented Tx side bus_dmamap_load_mbuf_sg(9). The number of
segments allowed was chosen to be 16 which should be enough for
non-TSO capable hardwares. Setting SOF bit of Tx descriptor is
done in the last to avoid potential race.
- don't give up sending frames in bfe_start() until the hardware
lacks free descriptors.
- added XXX comment to second kick command and possible workaround.
- implemented Rx side bus_dmamap_load_mbuf_sg(9).
- removed bfe_dma_map_desc() as it's not needed anymore after
the conversion to bus_dmamap_load_mbuf_sg(9).
- added endianness support. With this change bfe(4) should work
on any architectures that can create bounce buffers within 1GB
address range.
- add missing bus_dmamap_sync() in bfe_tx_eof()/bfe_rx_eof().
o Use PCI_BAR instead of hardcoded value to set BARs.
Simplified register access with bus_write_4(9)/bus_read_4(9) and
removed bfe_btag, bfe_bhandle, bfe_vhandle in softc as it's not
used anymore.
o Reorder device detach logic such that bfe_detach() is also used
for handling driver attach failure case.
o Remove unnecessary KASSERT in bfe_detach().
o Remove bfe_rx_cnt, bfe_up, bfe_vpd_prodname, bfe_vpd_readonly in
softc. It's not used at all.
o Remove BFE_RX_RING_SIZE/BFE_RX_RING_SIZE/BFE_LINK_DOWN.
Import the uuid_enc_le(), uuid_dec_le(), uuid_enc_be() and
uuid_dec_be() functions. These routines are not part of the
DCE RPC API. They are provided for convenience.
Reviewed by: marcel
Obtained from: NetBSD
There's a race in kmem(4) between checking whether a page is resident
in the kernel and copying it out, causing a panic when faulting on a
nofault entry. Handle this case gracefully by letting the kernel copy
functions return EFAULT instead. As such this change addresses the
same problem as r154721 does for i386.
MFamd64: r133413
In syscall, always make a copy of parameters from trapframe, this
becauses some syscalls using set_mcontext can sneakily change
parameters and later when those syscalls references parameters,
they will wrongly use register values in mcontext_t.
PR: 72998
The PCI specifications don't explain the details on how to calculate
the latency based on the Min_Gnt register so use the algorithm found
in OpenSolaris as they probably know how to interpret the value Sun
puts into these registers (previously, the latency calculated for
66MHz was most likely wrong) and for bridges additionally set up the
secondary latency register. Also set up the bridge control register
the way it's done in OpenSolaris. As the latency register don't apply
to PCI-Express and the bridge control setup wasn't tested on sun4v
(besides most likely not being needed), expand the #ifndef SUN4V
accordingly.
Support for Apple BMAC ethernet controller and associated DBDMA support and required changes to macio and scc(4) to support multiple interrupts on macio children.
Approved by: grehan (mentor)
- Don't IPI the current CPU.
- Don't remove the current CPU from the rendezvous mask. Otherwise the
smp_rendezvous_action routine will get an incorrect count of CPUs and
won't wait for all CPUs at each barrier (it will wait for N-1).
r180955
- Out with some printfs.
- Fix a initialization of last_tsn_used
- Fix handling of mapped IPv4 addresses
r180956
Fix build breakage - kthread_exit() in 8 now has no arguments
<AND>
- Add back 0 argument for 7.
1) Adds the rest of the VIMAGE change macros
2) Adds some __UserSpace__ on some of the common defines that
the user space code needs
3) Fixes a bug when we send up data to a user that failed. We
need to a) trim off the data chunk headers, if present, and
b) make sure the frag bit is communicated properly for the
msgs coming off the stream queues... i.e. we see if some
of the msg has been taken.
Obtained from: jeli contributed the VIMAGE changes on this pass Thanks Julain!
From:r179783
- Macro-izes the packed declaration in all headers.
- Vimage prep - these are major restructures to move
all global variables to be accessed via a macro or two.
The variables all go into a single structure.
- Asconf address addition tweaks (add_or_del Interfaces)
- Fix rwnd calcualtion to be more conservative.
- Support SACK_IMMEDIATE flag to skip delayed sack
by demand of peer.
- Comment updates in the sack mapping calculations
- Invarients panic added.
- Pre-support for UDP tunneling (we can do this on
MAC but will need added support from UDP to
get a "pipe" of UDP packets in.
- clear trace buffer sysctl added when local tracing on.
From:r179786
- Fixes foobar on my part. Some missing virtualization macros from
specific logging cases.
From r179803
- only one functino to destroy an SCTP stack sctp_finish()
- Make it so this function also arranges for any threads
created by the image to do a kthread_exit()
- sctputil.c - If debug is on, the INPKILL timer can deref a freed value.
Change so that we save off a type field for display and
NULL inp just for good measure.
- sctp_output.c - Fix it so in sending to the loopback we use the
src address of the inbound INIT. We don't want
to do this for non local addresses since otherwise
we might be ingressed filtered so we need to use
the best src address and list the address sent to.
Obtained from: time bug - Neil Wilson
- Adds support for the multi-asconf (From Kozuka-san)
- Adds some prepwork (Not all yet) for vimage in particular
support the delete the sctppcbinfo.xx structs. There is
still a leak in here if it were to be called plus we stil
need the regrouping (From Me and Michael Tuexen)
- Adds support for UDP tunneling. For BSD there is no
socket yet setup so its disabled, but major argument
changes are in here to emcompass the passing of the port
number (zero when you don't have a udp tunnel, the default
for BSD). Will add some hooks in UDP here shortly (discussed
with Robert) that will allow easy tunneling. (Mainly from
Peter Lei and Michael Tuexen with some BSD work from me :-D)
- Some ease for windows, evidently leave is reserved by their
compile move label leave: -> out:
- Define changes in sctp.h
- Bug in CA that does not get us incrementing the PBA properly which
made us more conservative.
- comment updated in sctp_input.c
- memsets added before we log
- added arg to hmac id's
Bring in support for the MC8755 Sierra UMTS card.
Submitted by: Robert Blacquiere <robert at blacquiere dot nl>
Approved by: imp (mentor, implicit)
MFC after: 1 week
Approved by: imp (mentor, implicit)
With MFC help from: des (thanks!)
pattern-matching tests. Two bug fixes:
* Don't remove leading '/' from patterns to be matched.
This aligns the pattern-matching with GNU tar and with earlier
versions of bsdtar.
* Write unedited paths for -t. This makes the pattern-matching
behavior, in particular, a lot more transparent. The cost is
that you have no good way to preview the effects of pathname
substitutions.
PR: bin/117909
With SECURE_NODOTDOT, this isn't needed because we refuse to restore
anything with '..' in the path. Without, we used to refuse path/..
as a special case (on the grounds that it was silly), but "cpio -p .."
is a common and perfectly valid idiom that incidentally copies "."
to "..".
Before this, the often-recommended incantation
find -d . | cpio -p <target>
fails to properly carry through dir metadata because each
file copy implicitly creates the parent dir, which cpio subsequently
refuses to overwrite. With this patch, the incantation works
with or without the -d option to find because without it, there
is no implicit dir creation, and with it, the subsequent dir
restore will update the metadata on the dir.
- Use m_collapse(9) instead of m_defrag(9) if possible. This results
in a noticeable reduction in system time spent.
- If bus_dmamap_load_mbuf_sg(9) fails with EFBIG and we already have
defragmented the mbuf chain, don't bother to defragment and load it
a second time just yet as it's likely to fail again anyway.
Update the comment regarding the workaround for the BlackBird
TICK_COMPARE bug and the instruction alignment used for it based
on information found in the OpenSolaris source.
PHY only and not also in the case of an external PHY currently
doing full duplex, which accidentally got broken in r172334.
It's still not clear to me why we need to enable the buffer for
an internal PHY though.
- Count excess and late collisions as output errors. [1]
- Count receive errors as input errors. [1]
Obtained from: NetBSD [1]
- Add kbdmux(4); since sunkbd(4) was tought to emulate atkbd(4) like
ukbd(4) does and that emulation was enabled by default, all three of
them work together with kbdmux(4) out of the box just fine.
- Fix some whitespace bugs.
Don't use memcpy() to copy several bytes.
Store IDs is host order. It is not so important to bloat code for it.
Combine m_adj() and M_PREPEND() into single M_PREPEND().
Add hash table lookup for a fully connected raw sockets.
This gives significant performance improvements when many raw sockets used.
Benchmarks of mpd handeling 1000 simultaneous PPTP connections show up to 50%
performance boost. With higher number of connections benefit becomes even
bigger. PopTop snd others should also get some benefits.
MFC r180833, r180874
According to in_pcb.h protocol binding information has double locking.
It allows access it while list travercing holding only global pcbinfo lock.
This relaxed locking noticably increses receive socket lookup performance.
Increase UDBHASHSIZE from 16 to 128 items.
Previous value was chosen 10 years ago and not very effective now.
This change gives several percents speedup on 1000 L2TP mpd links.
- r179967, r179968, r179977, r179978:
Rehash and clean up BPF JIT compiler macros to emit opcodes closer
to GNU as(1) generated codes and micro-optimize.
- r181644, r181645:
Replace number of stack usages with registers. Note amd64 version
does not use stack any more because it has more registers.
- r181697:
Remove unnecessary jump instructions of zero offsets.
- r181700, r181848, r181853:
Correctly check unsignedness of all registers used for load instructions
with (in)direct offsets and sync. with sys/net/bpf_filter.c
- r181648, r181649, 181846:
Update copyrights, fix style(9) nits, remove unused macros, and make
JIT compilers compilable on user land.
In the hid parser, if a INPUT/OUTPUT/FEATURE item is skipped, its
corresponding USAGE should be skipped as well.
Tested by: Grzegorz Blach
PR: usb/125941
Introduce a new loader tunable "hw.ata.ata_dma_check_80pin", defaulting
to 1. This can be used to disable the 80pin cable check on systems which
forget to set the bit -- such as certain laptops and Soekris boards.
Sync sys/compat/ndis to HEAD.
- Correct the calculation for the number of 100ns intervals since January 1,
1601. The 1601 - 1970 period was in seconds rather than 100ns units.
- Remove duplication by having NdisGetCurrentSystemTime call ntoskrnl_time.
- Implement functions required by some ndis drivers.
- Fix a panic when it occurred during initializing the ndis driver because it
try to read network address through ifnet structure which is NULL until the
ndis driver's initialization is finished.
- fix a page fault that it occurred during ifp is NULL. This bug happens when
NDIS driver's initialization is failed and NDIS driver's trying to call
NdisWriteErrorLogEntry().
when NDIS framework try to query/set informations NDIS drivers can
return NDIS_STATUS_PENDING. In this case, it's waiting for 5 secs to
get the response from drivers now. However, some NDIS drivers can send
the response before NDIS framework gets ready to receive it so we might
always be blocked for 5 secs in current implementation. NDIS framework
should reset the event before calling NDIS driver's callback not after.
handle .INF files for PCMCIA correctly that specify multiple entries in
their [Manufacturer] sections and prevent a case that NDIS_PCI_DEV_TABLE
definition was always emitted that it's only emitted once if a .INF file
is for PCI.
Fix a panic that a priority value which is passed to cv_broadcastpri(9)
can be < 0. We don't ignore a `increment' argument but at least we keep
a priority value of NDIS threads over PRI_MIN_KERN.
Reviewed by: thompsa
s/printf/device_printf/g
Don't hard code function name in device_printf() and use __func__.
While I'm here nuke bfe_unit in softc as it's not needed anymore.
Add glxsb(4) driver for the Security Block in AMD Geode LX processors (as
found in Soekris hardware, for instance). The hardware supports
acceleration of AES-128-CBC accessible through crypto(4) and supplies
entropy to random(4).
Nuke local jumbo allocator and switch to use of UMA backed page
allocator for jumbo frame.
o Removed unneeded jlist lock which was used to manage jumbo
buffers.
o Don't reinitialize hardware if MTU was not changed.
o Added additional check for minimal MTU size.
o Added a new tunable hw.skc.jumbo_disable to disable jumbo frame
support for the driver. The tunable could be set for systems that
do not need to use jumbo frames and it would save
(9K * number of Rx descriptors) bytes kernel memory.
o Jumbo buffer allocation failure is no longer critical error for
the operation of sk(4). If sk(4) encounter the allocation failure
it just disables jumbo frame support and continues to work without
user intervention.
With these changes jumbo frame performance of sk(4) was slightly
increased and users should not encounter jumbo buffer allocation
failure. Previously sk(4) tried to allocate physically contiguous
memory, 3388KB for 256 Rx descriptors. Sometimes that amount of
contiguous memory region could not be available for running systems
which in turn resulted in failure of loading the driver.
Nuke local jumbo allocator and switch to use of UMA backed page
allocator for jumbo frame. Also remove unneeded jlist lock which
is no longer required to protect jumbo buffers.
With these changes jumbo frame performance of nfe(4) was slightly
increased and users should not encounter jumbo buffer allocation
failure anymore.
Restore link state handling which was broken in rev 1.69.
Also report current link state while auto-negotiation is in
progress.
With this change link loss should be reported within a second
and drivers that rely on link state should work.
Implement the per-open file data for the cdev.
The td_fpop member of the struct thread is appended to the end, and cleared
in the thread allocator to keep struct thread KBI-compatible on RELENG_7.
MFC r181635:
Remove unnecessary locking around pointer fetch.
Introduce an UMA backend page allocator for the jumbo frame zones that
allocates physically contiguous memory.
MFC after: 3 months
Requested and reviewed by: Kip Macy
Tested by: Andrew Gallatin and Pyun YongHyeon
Approved by: alc
Reintroduce UMA_SLAB_KMAP; however, change its spelling to
UMA_SLAB_KERNEL for consistency with its sibling UMA_SLAB_KMEM.
(UMA_SLAB_KMAP met its original demise in revision 1.30 of
vm/uma_core.c.) UMA_SLAB_KERNEL is now required by the jumbo frame
allocators. Without it, UMA cannot correctly return pages from the
jumbo frame zones to the VM system because it resets the pages' object
field to NULL instead of the kernel object. In more detail, the jumbo
frame zones are created with the option UMA_ZONE_REFCNT. This causes
UMA to overwrite the pages' object field with the address of the slab.
However, when UMA wants to release these pages, it doesn't know how to
restore the object field, so it sets it to NULL. This change teaches
UMA how to reset the object field to the kernel object.
Crashes reported by: kris
Fix tested by: kris
Approved by: alc
Fix a regression introduced in r179289 splitting up ip6_savecontrol()
into v4-only vs. v6-only inp_flags processing.
When ip6_savecontrol_v4() is called from ip6_savecontrol() we
were not passing back the **mp thus the information will be missing
in userland.
Istead of going with a *** as suggested in the PR we are returning
**mp now and passing in the v4only flag as a pointer argument.
PR: kern/126349
r178376, r178377, r178378, r178419, r179412, r179414, r180127, r180338,
r180343, r180344, r180346, r180348, r180368, r180422, r180429, r180536,
r180558, r180589, r181364, r181365 from head to stable/7:
Introduce and use rwlocks throughout the inpcbinfo and inpcb infrastructure,
and protocols that depend on that infrastructure, including UDP, TCP, and
IP raw sockets. Significant parts of this work were reviewed by Bjoern Zeeb,
and tested by Paul Saab, Kris Keneway, and George Neville-Neil, whose
contributions to this work are greatly appreciated.
Tested by: ps, kris, gnn, Mike Tancsa <mike at sentex dot net>
Reviewed by: bz, des
5416 and similar chips grew another region in the pci clock domain
where register accesses do not pass through the byte-lane hardware;
extend the register op macros to deal with this
* Enhance the chunk map to support run coalescing, and substantially reduce
the number of red-black tree operations performed.
* Remove unused code.
* Fix arena_run_reg_dalloc() to use the entire precomputed division table.
* Improve lock preemption performance for hyperthreaded CPUs.
Don't forget to set MAKEFLAGS in the childs' environment
from the .MAKEFLAGS global variable even if it's empty or
unset. This means setting MAKEFLAGS to just an empty string
in the latter case.
The non-POSIX environment variable MAKE was superseded
by MAKEFLAGS ages ago, so don't mention it in comments.
Update the manpage accordingly and make the whole description of
MAKEFLAGS and .MAKEFLAGS more consistent as this change indeed
brings more consistency into the reliable behaviour of make(1).
Give more details in the manpage on the following topics:
o How global, command-line, and environment variables relate.
o What peculiarities the -f option has WRT ${MAKEFLAGS}.
(.Dd in the manpage is already beyond the date of those changes
in HEAD.)
Add a new ioctl for changing the read filter (BIOCSETFNR). This is
just like BIOCSETF but it doesn't drop all the packets buffered on
the discriptor and reset the statistics.
Also, when setting the write filter, don't drop packets waiting to
be read or reset the statistics.
(Micro)optimization of cpu_switch for amd64.
Because r173004 (pure kernel threads) is not MFCed to stable/7, I use
P_KTHREAD flag from curthread->td_proc->p_flag instead of TDP_KTHREAD
flag from curthread->td_pflags to test whether the fs/gs bases need to
be restored [1].
No objections for MFC from: peter
Suggested by: jhb [1]
MFC r180992:
Bring back the save/restore of the %ds, %es, %fs and %gs registers for
the 32bit images on amd64.
The end result is almost complete syncronization of the
amd64/amd64/cpu_switch.S between head and stable/7, besides TDP_KTHREAD
difference.
Set magic fbsd:nokeywords property
Remove Theory, which isn't part of the zoneinfo module but came out
of /head/usr.sbin/zic (and isn't installed from there neither).
MFC of tzdata2008c
- Africa/Morocco will have DST in 2008.
- Asia/Choibalsan should be GMT+08:00.
- Asia/Pakistan will have DST in 2008.
MFC of tzdata2008d
- Mauritius will have a DST experiment between 2008-11-01 and 2009-03-31.
- Add/Fix historical data for C-Eur, the SovietZone, Germany,
Bahamas, San Luis.
- Add information about West Para (America/Santarem)
- America/Eirunepe and America/Rio_Branco go to UTC-4
MFC on tzdata2008e:
- Fix dates in 2008/2009 for Africa/Mauritius.
- Leap second notification for the end of 2008.
Update the units library file.
- Merge changes from NetBSD and OpenBSD.
- Add the Euro as a primitive unit, add old converted currency and
pegged currency (Obtained from Wikipedia)
- Rename "dollar" to "usdollar" as primitive unit, remove non-pegged
currency and add pegged currency (Obtained from Wikipedia)
- Updated the accuracy of a lot of constants (Obtained from Wikipedia)
PR: bin/106545 bin/88252
Submitted by: trasz<[email protected]>, J Vinopal <[email protected]>
Note that some of the changes that were mfc'ed to powerpc actually affect
other platforms. This hoisting brings those changes to the others.
This adds atomic_fetchadd_long to the rest, and adds
atomic_readandclear_ptr to ia64. While I have not compile tested this, it
looks harmless.
had several "all revs" merges. If this is exported up to the root of sys
as-is, then it records that 'all revs' of head have been merged for the
entire sys tree, which they have not.
Work is in progress to sanitize the current state and prevent it from
happening again.
User may do "mount -o snapshot ...", that causes new FFS mount to be
performed with snapshot option, while the mp->mnt_opt is NULL.
Protect against NULL pointer dereference.
MFC r181528:
Revert r181345.
Move the NULL pointer check to the vfs_deleteopt() function.
Delete unused files in the window(1) directory that contain a colon.
During the import of the 4.4BSD Lite sources, four files got added to
the repository called :tt, :tty, :var and :ww. They seem to contain some
kind of debug information. These files aren't used/installed anywhere.
Unfortunately the colons in the filenames prevents us from checking out
the source tree on file systems that don't support colons (such as FAT).
Just remove these unneeded files to keep SVN happy.
Reported by: Rohit Tripathi <rohit trip gmail com>
Improve VT_WAITACTIVE semantics.
- Wait for requested vty activation regardless its open state.
- Remove redundant console cleanup.
MFC r181286:
Lower the priority of the sleep in the syscons for "waitvt" wchan to
PZERO + 1.
Calling linker_load_dependencies() while holding the module'
vnode lock may cause a LOR between kld_sx lock and vnode lock.
linker_load_dependencies() drops kld_sx, and another thread may attempt
to load the same kld.
Cumulatively, these implement CRC32 validation when reading Zip
archives and the test suite updates to ensure that CRC32
checking really will fail on a damaged entry and succeed on
a valid one.
> Check that lseek(2) succeeds and puts us where we expect. [1]
>
> While we're here, fix a long-standing bug in the handling of write(2)
> errors: The API changed from "return # of bytes written" to "return
> status code" almost 4 years ago, so instead of returning (-1) we need
> to return ARCHIVE_FATAL.
>
> Found by: Coverity Prevent [1]
> We only use the string "?rwxrwxrwx " once, so inline it rather than
> declaring a variable which points to it. Aside from eliminating a
> line of code and one level of unnecessary indirection, this eliminates
> a false positive in Coverity.
stable/7/lib/libarchive was already almost identical to
head/lib/libarchive@177777. This matches it up exactly
(except that I declined to resurrect the .cvsignore file)
and records that alignment in svn:mergeinfo.
r181272:
Use ANSI C declarations for all functions.
r181273:
Remove register keyword.
r181274:
Remove return keyword at the end of functions that return void.
r181275:
Rearrange conditional compilation directives. This makes syntax
highlighting work in vim.
Don't enable TSO by default. Users of RTL8169/8110 reported
watchdog timeout issues and the root cause seems to stem from
silicon bug of controller. Personally I couldn't reproduce it on
RTL8169 controller but it seems it's dependent on usage pattern.
For newer PCIe based controllers I have no TSO complaints but
turning off TSO would be more safe. Users who are sure that
their controller works with TSO can still reenable the TSO with
ifconfig(8).
The number of bits reserved for MSS in RealTek controllers is
11bits. This limits the maximum interface MTU size in TSO case
as upper stack should not generate TCP segments with MSS greater
than the limit. Armed with this information, disable TSO if
interface MTU is greater than the limit.
Implement ratelimiting for debug messages. For now, allow at most
one message per second. In the future might add a sysctl knob for
each socket family to fine tune this.
Add rw_try_rlock() and rw_try_wlock() to rwlocks.
These functions try the specified operation (rlocking and wlocking) and
true is returned if the operation completes, false otherwise.
The KPI is enriched by this commit, so __FreeBSD_version bumping and
manpage updating will happen soon.
Requested by: jeff, kris
Trylocks were implemented, remove stale comment
Discussed with: attilio, jhb
Detect if the application has cleared the environ variable by setting
the first value (environ[0]) to NULL. This is in addition to the
current detection of environ being replaced, which includes being set to
NULL. Without this fix, the environment is not truly wiped, but appears
to be by getenv() until an *env() call is made to alter the enviroment.
This change is necessary to support those applications that use this
method for clearing environ such as Dovecot and Postfix. Applications
such as Sendmail and the base system's env replace environ (already
detected). While neither of these methods are defined by SUSv3, it is
best to support them due to historic reasons and in lieu of a clean,
defined method.
Add extra units tests for clearing environ using four different methods:
1. Set environ to NULL pointer.
2. Set environ[0] to NULL pointer.
3. Set environ to calloc()'d NULL-terminated array.
4. Set environ to static NULL-terminated array.
Noticed by: Timo Sirainen
Reviewed by: ache
- Bring in auditing support of coredumps
- Merge supporting tweaks which initialized some variables and
fixed a proc lock leak in certain error conditions.
Add support for the ASUS P535 PDA
PR: kern/126097
Submitted by: Anton Kartashev <[email protected]>
Approved by: imp (mentor, implicit)
MFC after: 3 days
Approved by: imp (mentor, implicit)
- Never use getenv("HOME") without checking for NULL and non-zero (kevlo)
- If we can't open a calendar file, don't guess why. Check the error
return and print a useful message (grog)
The TrustedBSD MAC Framework named struct ipq instances 'ipq', which is the
same as the global variable defined in ip_input.c. Instead, adopt the name
'q' as found in about 1/2 of uses in ip_input.c, preventing a collision on
the name. This is non-harmful, but means that search and replace on the
global works less well (as in the virtualization work), as well as indexing
tools.
Reported by: julian
Introduce locking around use of ifindex_table, whose use was previously
unsynchronized. While races were extremely rare, we've now had a
couple of reports of panics in environments involving large numbers of
IPSEC tunnels being added very quickly on an active system.
- Add accessor functions ifnet_byindex(), ifaddr_byindex(),
ifdev_byindex() to replace existing accessor macros. These functions
now acquire the ifnet lock before derefencing the table.
- Add IFNET_WLOCK_ASSERT().
- Add static accessor functions ifnet_setbyindex(), ifdev_setbyindex(),
which set values in the table either asserting of acquiring the ifnet
lock.
- Use accessor functions throughout if.c to modify and read
ifindex_table.
- Rework ifnet attach/detach to lock around ifindex_table modification.
Note that these changes simply close races around use of ifindex_table,
and make no attempt to solve the probem of disappearing ifnets. Further
refinement of this work, including with respect to ifindex_table
resizing, is still required.
In a future change, the ifnet lock should be converted from a mutex to an
rwlock in order to reduce contention.
Reviewed and tested by: brooks
Update this manual page to describe the extattr_list_file() and the
extattr_list_fd() functions.
PR: 108142
Submitted by: Richard Dawe <[email protected]>
Reviewed by: kientzle
Be smarter about disabling interface capabilities. TOE/TSO/TXCSUM will only be
disabled if one (or more) of the member interfaces does not support it. Always
turn off LRO since we can not bridge a combined frame.
to those in r172955, only don't rename any externally accessible symbols.
This moves the policy modules in stable/7 to being closer to those in
head without disrupting the KBI. While here, also synchronize some
amount of white space.
Obtained from: TrustedBSD Project
Rename raw_append() to rip_append(): the raw_ prefix is generally used
for functions in the generic raw socket library (raw_cb.c, raw_usrreq.c),
and they are not used for IPv4 raw sockets.
Rename several functions in if_lmc with potential name collisions with
global symbols, such as raw_input and raw_output, to have lmc_ prefixes.
This doesn't affect actual functionality since the functions are static,
but will limit the opportunities for current confusion and future
difficulty.
cvs rev. 1.208 in_pcb.c, 1.108 in_pcb.h, 1.92 in6_pcb.c, 1.21 in6_pcb.h
For consistency take lport as u_short in in{,6}_pcblookup_local.
All callers either pass in an u_short or u_int16_t.
cvs rev. 1.91 in6_pcb.c, 1.52,1.53 in6_src.c, 1.43 ip6_var.h
rev. 1.80 raw_ip6.c, 1.91 udp6_usrreq.c
Change the parameters to in6_selectsrc():
- pass in the inp instead of both in6p_moptions and laddr.
- pass in cred for upcoming prison checks.
Document required locking in in6_sleectsrc() in case an inp is
passed in by adding an assert.
Requested by: rwatson
Change the exit status for 0 and 2 to be the same as with ping(1)
and be usable in scripts, etc.
This also changes the semantics in case when we lose one of n packets.
In that case, before we exited by SIG, now we exit with return(0).
Submitted by: Gert Doering (gert space.net)
Add new device id for ICH8M, which supports greater than UDMA33 mode
when it worked as generic IDE.
PR: 125422
Submitted by: Andrey V. Elsukov <bu7cher at yandex dot ru>
Approved by: imp (mentor, implicit)
MFC after: 1 week
Approved by: imp (mentor, implicit)
Add support for the ICH9 in non AHCI mode (RAID mode).
Submitted by: Andrey V. Elsukov <bu7cher at yandex dot ru>
Tested by: Vitalij L. Fadeev <fvl at mail dot ru>
Approved by: imp (mentor, implicit)
MFC after: 1 week
Approved by: imp (mentor, implicit)
Add an XXX comment regarding a bug I introduced when modifying the behavior
of audit log vnode rotation: on shutdown, we may not properly drain all
pending records, which could lead to lost records during system shutdown.
When allocating temporary storage to hold a TCP/IP packet header
template, use an M_TEMP malloc(9) allocation rather than an mbuf
with mtod(9) and dtom(9). This eliminates the last use of
dtom(9) in TCP.
Move the head of byte-level advisory lock list from the
filesystem-specific vnode data to the struct vnode. Provide the
default implementation for the vop_advlock and vop_advlockasync.
Purge the locks on the vnode reclaim by using the lf_purgelocks().
The default implementation is augmented for the nfs and smbfs.
In the nfs_advlock, push the Giant inside the nfs_dolock.
Before the change, the vop_advlock and vop_advlockasync have taken the
unlocked vnode and dereferenced the fs-private inode data, racing with
with the vnode reclamation due to forced unmount. Now, the vop_getattr
under the shared vnode lock is used to obtain the inode size, and
later, in the lf_advlockasync, after locking the vnode interlock, the
VI_DOOMED flag is checked to prevent an operation on the doomed vnode.
MFC r178247:
Fix compilation with LOCKF_DEBUG.
As was announced on the stable@, the MFC changes the VFS KBI on RELENG_7.
Approved by: re (kensmith)
Fix empty mailto (-m "") handling: somehow I missed all checks but the first,
hence output would be written to the wrong filehandle.
Submitted by: reg
Approved by: yar (implicit)
MFC after: ASAP
Pointy hat to: marck
Use logic or, not binary or, when deciding whether or not a system call
exit requires entering the audit code. The result is much the same,
but they mean different things.
Submitted by: Diego Giagio <dgiagio at gmail dot com>
Pair the VOP_OPEN call from do_execve() with the reciprocal VOP_CLOSE.
Note: the change needed small adaptation to RELENG_7 because fexecve(2)
is not merged into the branch.
- Add socket option for setting and retrieving the congestion control algorithm.
The name used is to allow compatibility with Linux.
- add rcv_nxt, snd_nxt, and toe offload id to FreeBSD-specific
extension fields for tcp_info
Factor out the v4-only vs. the v6-only inp_flags processing in
ip6_savecontrol in preparation for udp_append() to no longer
need an WLOCK as we will no longer be modifying socket options.
Requested by: rwatson
Reviewed by: gnn
Move IFF_NEEDSGIANT warning from if_ethersubr.c to if.c so it is displayed
for all network interfaces, not just ethernet-like ones.
Upgrade it to a louder WARNING and be explicit that the flag is obsolete.
Support for IFF_NEEDSGIANT will be removed in a few months (see arch@ for
details) and will not appear in 8.0.
Upgrade if_watchdog to a WARNING.
After the commit of SVN rev 180236, wilko@ noticed that the approach
doesn't work on the Alpha platform: machine/elf.h doesn't include
sys/elf32.h there.
PR: related to bin/124906
Approved by: bde@
- Increase the size of the salt in pw(8) from 8 to 32 (same as in pam_unix(8)).
This makes blowfish password hashes look normal when set using
pw(8)/adduser(8). [1]
- Make it possible to have a '/' in the salt.
PR: 121146 [1]
Submitted by: Jaakko Heinonen [1]
Approved by: rwatson (mentor)
MFC after: 1 month
Since we create a DMA tag "mtag" for TX map with bus_dmamap_create(),
we must synchronize such a map against "mtag" with bus_dmamap_sync(),
not the tag designated for RX map.
Don't let hacksync() call bus_dmamap_sync(9) on DMA maps which
are not initialized. This fixes a panic on sparc64 where calling
bus_dmamap_sync(9) on NULL DMA maps is fatal.
Refactor certain ARM bus space methods: instead of having multiple copies of
the same code introduce sys/arm/arm/bus_space_generic.c for a shared set of
routines.
Take the first baby step towards unifying and cleaning up arminit():
- Pull all the code to deal with the trampoline stuff into one
centeralized place and use it from everywhere.
- Some minor style tidiness
KERNBASE + 0x00200000 is the same thing as KERNVIRTADDR on this
platform, so use the latter in preference to the former. This makes
the fake_preload setup be the same between kb920x_machdep.c and
avila_machdep.c....
Improve mac+phy configuration so that hints can be used to describe
layouts different than the defaults:
o hint.npe.0.mac="A", "B", etc. specifies the window for MAC register accesses
o hint.npe.0.mii="A", "B", etc. specifies PHY registers
o hint.npe.1.phy=%d specifies the PHY to map to a port
Workaround design botch in usb: blindly mixing bus_dma with PIO does not
work on architectures with a write-back cache as the PIO writes end up
in the cache which the sync(BUS_DMASYNC_POSTREAD) in usb_transfer_complete
then discards; compensate in the xfer methods that do PIO by pushing the
writes out of the cache before usb_transfer_complete is called.
Correct cache handling for xfer requests marked URQ_REQUEST: many (if not
all uses) involve a read but usbd_start_transfer only does a PREWRITE; change
this to BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE as I'm not sure if any
users do write+read.
Correct the logic : we can just invalidate the cache lines, and not
write-back them, only if PREWRITE is not set, and if the buffer is
cache-line aligned.
Add DDB "show conifhk" command, which lists hooks currently waiting
for completion in run_interrupt_driven_config_hooks(). This is
helpful when trying to figure out which device drivers have gone
into la-la land during boot-time autoconfiguration.
Rather than simply waiting silently and indefinitely for all
interrupt-driven configuration handlers to complete, print out a
diagnostic message every 60 second indicating which handlers are
still running. Do this at most 5 times per run so as to avoid
scrolling out any useful information from the kernel message
buffer.
The interval of 60 seconds was selected based on a best guess as
to the nature of "long enough" and may want to be tuned higher
or lower depending on real-world tolerances.
If run_interrupt_driven_config_hooks() waits 360 seconds and INVARIANTS
is compiled into the kernel, then panic.
Discussed with: scottl
Add -m option to cron(8), overriding default mail recipient for cron
mails, unless explicitly provided by MAILTO= line in crontab. This
feature can be useful in massive hosting environment, where most users
do not care about autogenerated mails.
Setting recipient to null string disables default mails at all.
Approved by: yar
introduced for the KSE case in the r177083. Both were done by jeff,
MFC is needed due to recent cpuset(2) commit to RELENG_7.
r177083:
KSE may free a thread that was never actually forked. This will leave
td_cpuset NULL. Check for this condition before dereferencing the
cpuset.
r177369:
Restore the NULL check for td_cpuset. This can happen if a partially
constructed thread was torn down as is the case when we fail to allocate
a kernel stack.
and assignment. This is mostly synched up with what is in HEAD with the
following exceptions:
- I didn't MFC any of the interrupt binding stuff as it requires other
changes and I figured this change was large enough as it is.
- The sched_affinity() implementation for ULE in HEAD depends on the newer
CPU topology stuff as well as other changes in ULE. Rather than
backport all of that, I implemented sched_affinity() using the existing
CPU topology and ULE code in 7.x. Thus, any bugs in the ULE affinity
stuff in 7 are purely my fault and not Jeff's.
Note that, just as in HEAD, cpusets currently don't work on SCHED_4BSD (the
syscalls will succeed, but they don't have any effect).
Tested by: brooks, ps
Make it atomic for the devfs_populate_loop() to see the setting of
SI_ALIAS flag and initialization of the si_parent when alias is created.
Assert that supplied parent device is not NULL.
Fix a multicast handling regression on VT6105M introduced in
vr(4) overhauling(r177050).
It seems that filtering multicast addresses with multicast CAM
entries require accessing 'CAM enable bit' for each CAM entry.
Subsequent accessing multicast CAM control register without
toggling the 'CAM enable bit' seem to no effects.
In order to fix that separate CAM setup from CAM mask configuration
and CAM entry modification. While I'm here add VLAN CAM filtering
feature which will be enabled in future(FreeBSD now can receive
VLAN id insertion/removal event from vlan(4) on the fly).
For VT6105M hardware, explicitly disable VLAN hardware tag
insertion/stripping and enable VLAN CAM filtering for VLAN id 0.
This shall make non-VLAN frames set VR_RXSTAT_VIDHIT bit in Rx
status word.
Added multicast/VLAN CAM address definition to header file.
PR: kern/125010, kern/125024
Fix VR_RXSTAT_RX_OK bit definition which lasted for more than 9
years. All datasheet I have indicates the bit 15 is the
VR_RXSTAT_RX_OK. The bit 14 is reserved for all Rhine family
except VT6105M. VT6105M uses that bit to indicate a VLAN frame
with matching CAM VLAN id.
Use the VR_RXSTAT_RX_OK instead of VR_RXSTAT_RXERR when vr(4)
checks the validity of received frame.
This should fix occasional dropping frames on VT6105M.
* Fix typos in znew(1) script (yar, r176133 + r180136);
* Make it clear that gzcat expects each argument to be
separate files. (r180126).
* License change in unbzip2.c (r180135)
In keeping with style(9)'s recommendations on macros, use a ';'
after each SYSINIT() macro invocation. This makes a number of
lightweight C parsers much happier with the FreeBSD kernel
source, including cflow's prcc and lxr.
Discussed with: imp, rink
The requirement to place a ; after each SYSINIT definition has not been
MFC'd, as this might break the compile third-party modules, but merging
the actual ; additions reduces diffs against 8.x making it easier to
merge other changes.
- Use __FBSDID.
- Merge macros depending on the flags being preserved between calls
into a single "__asm"-statement as GCC doesn't guarantee their
consecutive output even when using consecutive "__asm __volatile"-
statement for them. Remove the otherwise unnecessary "__volatile". [1]
- The inline assembler instructions used here alter the condition
codes so add them to the clobber list accordingly.
- The inline assembler instructions used here uses output operands
before all input operands are consumed so add appropriate modifiers.
Pointed out by: bde [1]
The kqueue_register() function assumes that it is called from the top of
the syscall code and acquires various event subsystem locks as needed.
The handling of the NOTE_TRACK for EVFILT_PROC is currently done by
calling the kqueue_register() from filt_proc() filter, causing recursive
entrance of the kqueue code. This results in the LORs and recursive
acquisition of the locks.
Implement the variant of the knote() function designed to only handle
the fork() event. It mostly copies the knote() body, but also handles
the NOTE_TRACK, removing the handling from the filt_proc(), where it
causes problems described above. The function is called from the fork1()
instead of knote().
When encountering NOTE_TRACK knote, it marks the knote as influx
and drops the knlist and kqueue lock. In this context call to
kqueue_register is safe from the problems.
An error from the kqueue_register() is reported to the observer as
NOTE_TRACKERR fflag.
PR: 108201
Fix a longstanding bug, from Otto Moerbeck:
if we're reducing a rule that has an empty
right hand side and the yacc stackpointer is pointing at the very
end of the allocated stack, we end up accessing the stack out of
bounds by the implicit $$ = $1 action
Obtained from: OpenBSD
Add a diagnostic note about "transmission error ... tx underrun, increasing
tx start threshold ..." Looking around on the mailing lists, and even having
one of these cards I agree the messages should be documented.
Bump doc date.
PR: 88477
In case of interface initialization failure remove struct in_ifaddr* from
in_ifaddrhashtbl in in_ifinit because error handler in in_control removes
entries only for AF_INET addresses. If in_ifinit is called for the cloned
inteface that has just been created its address family is not AF_INET and
therefor LIST_REMOVE is not called for respective LIST_INSERT_HEAD and
freed entries remain in in_ifaddrhashtbl and lead to memory corruption.
PR: kern/124384
MFC after: 3 weeks
Keep proper track of nsegs counter: sem_free is called for all
allocated semaphores, so it's wrong to increase it conditionally,
in this case for every over-the-limit semaphore nsegs is decreased
without being previously increased.
PR: kern/123685
MFC after: more then 1 month
Renew semaphore's pointer after wakeup since during msleep
sem_base may have been modified by destroying one of semaphores
and semptr would not be valid in this case.
PR: kern/123731
MFC after: 1 month
Silence warning about missing IoGetDeviceObjectPointer by implementing
a simple stub that always returns STATUS_SUCCESS.
Submitted by: Paul B. Mahol <[email protected]>
Reviewed by: thompsa
Add driver support for PCIe adapters based on JMicron JMC250
gigabit ethernet and JMC260 fast ethernet controllers. ATM jme(4)
supports all hardware features except RSS and multiple Tx/Rx queue.
In these days most ethernet controller vendors take a ply of
concealing hardware detailes from open source developers. As
contrasted with these vendors JMicron provided all necessary
information needed to write a stable driver during driver writing
and answered many questions I had. They even helped fixing driver
bugs with protocol analyzer. Many thanks to JMicron for their
support of FreeBSD.
H/W donated by: JMicron
Add driver support for RTL8102E and RTL8102EL which is the second
generation of RTL810x PCIe fast ethernet controller. Note, Tx/Rx
descriptor format is different from that of first generation of
RTL8101E series. Jumbo frame is not supported for RTL810x
family.
Add basic support for RTL8168C, RTL8168CP, RTL8111C and RTL8111CP.
ATM Tx/Rx checksum offload is supported but TSO and jumbo frame is
not yet supported. Because these newer controllers use different
descriptor formats, a flag RL_FLAG_DESCV2 flag was introduced to
handle that case in Tx/Rx handler. Also newer controllers seems to
require to not touch 'enable Tx/Rx bit' in RL_CPLUS_CMD register
so don't blindly try to set that bits.
Note, it seems that there is still power-saving related issue where
driver fails to attach PHY. Rebooting seems to fix that issue but
number of required reboots varys.
Many thanks to users that helped during developement. I really
appreciate their patient and test/feedbacks.
Display detected chip revision in device attach. This will help to
diagnose revision specific issues in future. Also add 0x to notify
that the revision number is in hex form.
In device detach don't access ifnet structure unless device is
attached. This fixes NULL pointer dereference when polling(9) is
active and unsupported hardware is detected in device attach.
Improve the output of kldload(8) to show which module can't be loaded.
Was: kldload: Unsupported file type
Is now: kldload: /boot/modules/test.ko: Unsupported file type
PR: kern/121276
Submitted by: Edwin Groothuis <[email protected]>
Approved by: bde (mentor)
MFC after: 1 week
Instead of allocating variables for each events/hardware flags, use
a dedicated flag that represents controller capabilities/events.
This will simplify many part of code that requires different
workaround for each controller revisions and will enhance
readability.
While I'm here move PHY wakeup code up before mii_phy_probe() which
seems to help to wake PHY in some cases.
After the change of r176757 re(4) no longer relys on reading
RL_TXCFG register to identify a device in device probe. Reflect the
fact by modifing device description with general ethernet
controller family.
Note, rl_basetype in struct rl_type is not used and the more
detailed information is provided with rl_hwrev structure.
gaames/fortune: add FORTUNE_PATH env var, so ports of fortunes can work sanely
This patch adds an environment variable FORTUNE_PATH, which
works like PATH for fortune files.
PR: bin/36867
Submitted by: Alan Eldridge <[email protected]>
[patch] fortune -e implementation bug
Fix the behaviour of "-e file1 file2" to equally pick them
instead of only picking the first one.
PR: bin/70182
Submitted by: Martin Kulas <[email protected]>
SVN rev 180349 on 2008-07-07 13:08:30Z by remko
Fix some spelling errors (improper review from my
side).
Submitted by: ed, danger
Submitted by: Florian Smeets
o The FreeBSD bus_dmamap_sync(9) supports ored together flags for quite
some time now so collapse calls accordingly.
o Given that gem_load_txmbuf() is allowed to fail resulting in a packet
drop also for quite some time now implement the functionality of
gem_txcksum() by means of m_pullup(9), which de-obfuscates the code
and allows to always retrieve the correct length of the IP header.
o Add missing BUS_DMASYNC_PREREAD when syncing the control DMA maps in
gem_rint() and gem_start_locked().
o Correct some bus_barrier(9) calls to do a read/write barrier as we
do a read after a write. Add some missing ones in gem_mii_readreg()
and gem_mii_writereg().
o According to the Apple GMAC driver, the GEM ASIC specification and
the OpenSolaris eri(7D) the TX FIFO threshold has to be set to 0x4ff
for the Gigabit variants and 0x100 for the ERI in order do avoid TX
underruns.
o In gem_init_locked():
- be conservative and enable the RX and TX MACs,
- don't clear GEM_LINK otherwise we don't ever mark the link as up
again if gem_init_locked() is called from gem_watchdog(),
- remove superfluous setting of sc_ifflags.
o Don't bother to check whether the interface is running or whether its
queue is empty before calling gem_start_locked() in gem_tint(), the
former will check these anyway.
o Call gem_start_locked() in gem_watchdog() in order to try to get
some more packets going.
o In gem_mii_writereg() after reseting the PCS restore its configuration.
GMAC testing: grehan, marcel
Add missing information for geom_mirror metadata.
PR: 124434
Submitted by: Philip M. Golluci <pgolluci at p6m7g8 dot com>
MFC after: 3 days
Prodded through: bugbusters@
Approved by: imp (mentor, implicit)
Remove a bogusly introduced rtalloc_ign() in rev. 1.335/SVN 178029,
generating an RTM_MISS for every IP packet forwarded making user space
routing daemons unhappy.
PR: kern/123621, kern/124540, kern/122338
The config-recursive target is not run during the normal install process, move
it down to where it belongs.
Document 'all-depends-list' target and bump doc date.
PR: 119519
Submitted by: Yuri Pankov <[email protected]>
Reviewed by: flz
- This code was intially obtained from NetBSD, but it's missing licence
statement. Add the one from the current NetBSD version.
- Add description about a missing return value [1]
PR: docs/75995
Submitted by: Tarc <[email protected]>
- sched_4bsd is no longer a default system scheduler on some
architectures, so call it "traditional" instead.
- sched_ule is no longer buggy or experimental (according to
rev. 1.7 of sched_ule(4)), so don't call it experimental
(reported by a user on stable@).
On 64 bit architectures, you can run 32 bit executables and the rtld can trace them, but ldd(1) doesn't know yet how to detect them:
[/] root@ed-exigent>ldd `which httpd`
ldd: /usr/local/sbin/httpd: can't read program header
ldd: /usr/local/sbin/httpd: not a dynamic executable
But...
[/] root@ed-exigent>LD_32_TRACE_LOADED_OBJECTS==1 `which httpd`
libm.so.4 => /lib32//libm.so.4 (0x280c8000)
libaprutil-1.so.2 => /usr/local/lib/libaprutil-1.so.2 (0x280de000)
libexpat.so.6 => /usr/local/lib/libexpat.so.6 (0x280f2000)
libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x28110000)
libapr-1.so.2 => /usr/local/lib/libapr-1.so.2 (0x281fd000)
libcrypt.so.3 => /lib32//libcrypt.so.3 (0x2821d000)
libpthread.so.2 => not found (0x0)
libc.so.6 => /lib32//libc.so.6 (0x28235000)
libpthread.so.2 => /usr/lib32/libpthread.so.2 (0x2830d000)
Added support in ldd(1) for the LD_32_xxx environment variables if
the architecture of the machine is >32 bits. If we ever go to 128
bit architectures this excercise will have to be repeated but thanks
to earlier commits today it will be relative simple.
PR: bin/124906
Submitted by: edwin
Approved by: bde (mentor)
Add age(4), a driver for Attansic/Atheros L1 gigabit ethernet
controller. L1 has several threshold/timer registers and they
seem to require careful tuned parameters to get best
performance. Datasheet for L1 is not available to open source
driver writers so age(4) focus on stability and correctness of
basic Tx/Rx operation. ATM the performance of age(4) is far from
optimal which in turn means there are mis-programmed registers or
incorrectly configured registers.
Currently age(4) supports all known hardware assistance including
- MSI support.
- TCP Segmentation Offload.
- Hardware VLAN tag insertion/stripping.
- TCP/UDP checksum offload.
- Interrupt moderation.
- Hardware statistics counter support.
- Jumbo frame support.
- WOL support.
L1 gigabit ethernet controller is mainly found on ASUS
motherboards. Note, it seems that there are other variants of
hardware as known as L2(Fast ethernet) and newer gigabit ethernet
(AR81xx) from Atheros. These are not supported by age(4) and
requires a seperate driver. Big thanks to all people who reported
feedback or tested patches.
Tested by: kevlo, bsam, Francois Ranchin < fyr AT fyrou DOT net >
Thomas Nystroem < thn AT saeab DOT se >
Roman Pogosyan < asternetadmin AT gmail DOT com >
Derek Tattersal < dlt AT mebtel DOT net >
Oliver Seitz < karlkiste AT yahoo DOT com >
Set bridge MAC addresses to the MAC address of their first interface unless
locally configured. This is more in line with the behaviour of other popular
bridging implementations and makes bridges more predictable after reboots for
example.
Add support for PORT/EPRT FTP commands in lowercase.
Use strncasecmp() instead of huge local implementation to reduce code size.
Check space presence after command/code.
PR: kern/73034
r180312, r180313, r180326):
A driver to monitor AMD K8 CPU temperature via builtin sensors.
This should now be fairly stable as all known bugs have been corrected.
Rev. 1.8 broke matching on lines where the failure mode is at the head
of the message, such as:
Jun 30 10:49:21 rogue sshd[17553]: Invalid user iceman from 127.0.0.1
PR: conf/124569
Submitted by: Taku <[email protected]>
- install the example wpa_supplicant.conf file to the share/examples/etc
directory [1]
- add the FILES section to the wpa_supplicant.conf.5 file, so that people
will be able to detect the example configuration file easier. [2]
PR: docs/121821 [2]
Add et(4), a port of DragonFly's Agere ET1310 10/100/Gigabit
Ethernet device driver, written by sephe@
Obtained from: DragonFly
Sponsored by: iXsystems
MFC after: 2 weeks
- markup fixes
- advise to use rc script to SIGHUP mountd
- add some missing words
- add information about possiblity of using /prefix network notation [1]
PR: docs/124373 [1]
Obtained from: NetBSD [1]
When NETATALK is compiled into the kernel, at_rmx.c is required regardless
of whether NETATALKDEBUG is enabled, so make building it conditional on
NETATALK instead. This problem appears to have been present from the time
that the netatalk implementation was imported.
PR: 124456
Submitted by: Nathan Whitehorn <whitehorn at wisc dot edu>
stable/7:
Consistently check IPFW and DUMMYNET privileges in the configuration
routines for those modules, rather than in the raw socket code. This
each privilege check to occur in exactly once place and avoids
duplicate checks across layers.
Sponsored by: nCircle Network Security, Inc.
When sendto(2) is called with an explicit destination address
argument, call mac_socket_check_connect() on that address before
proceeding with the send. Otherwise policies instrumenting the
connect entry point for the purposes of checking destination
addresses will not have the opportunity to check implicit
connect requests.
Sponsored by: nCircle Network Security, Inc.
Don't use LK_DRAIN before calling VOP_FSYNC() in the panic case for
audit trail failure -- this doesn't contribute anything, and might
arguably be wrong.
MFC after: 1 week
Requested by: attilio
Notice that the previous commit merging r179178 was in fact for
audit_worker.c:1.25, but the same description applies.
Don't use LK_DRAIN before calling VOP_FSYNC() in the panic case for
audit trail failure -- this doesn't contribute anything, and might
arguably be wrong.
Requested by: attilio
Support for filtering on major device number was removed in rev. 1.7 or
rule.c. Update man page example accordingly.
Submitted by: Mateusz Guzik <[email protected]>
PR: docs/124892
Fix test for waiting AIFs in aac_poll(). This seems to solve the
problem where Adaptec's arcconf monitoring tool hangs after producing
its expected output.
Add the missing support for Asus Eee PC in acpi_asus(4).
This includes hotkeys support and sysctl variables to control camera
and card reader. These new sysctls don't have CTFLAG_ANYBODY set.
While there add entries to devd.conf related to the Eee volume keys.
Reviewed by: phillip
Also tested by: lme (previous version)
When testing whether to enter the audit argument gathering code, rather
than checking whether audit is enabled globally, instead check whether
the current thread has an audit record. This avoids entering the audit
code to collect argument data if auditing is enabled but the current
system call is not of interest to audit.
Sponsored by: Apple, Inc.
Rename debug.ddb.capture.bytes sysctl to debug.ddb.capture.bufoff in
order to match the internal variable name.
Add a new sysctl debug.ddb.capture.inprogress to export the inprogress
variable.
Add USB ids for the Epson DX7400 / CX7300 multifunction scanner printer
card reader.
On passing, also MFC similar entries for other epson MFP devices.
MFC after: 3 days
stable/7:
Continue on-going campaign to replace lockmgr locks with sx locks where
the specific semantics of lockmgr aren't required: update UFS1 extended
attributes to protect its data structures using an sx lock.
While here, update comments on lock granularity.
- Add locking to all filesystem operations in fdescfs and flag it as MPSAFE.
- Use proper synhronization primitives to protect the internal fdesc node cache
used in fdescfs.
- Properly initialize and uninitalize hash.
- Remove unused functions.
Since fdescfs might recurse on itself, adding proper locking to it needed some
tricky workarounds in some parts to make it work. For instance, a descriptor in
fdescfs could refer to an open descriptor to itself, thus forcing the thread to
recurse on vnode locks. Because of this, other race conditions also had to be
fixed.
Approved by: kib (mentor)
Reviewed by: kib (mentor)
Tested by: pho
resource to a CPU. A bus_bind_intr(9) wrapper routine similar to
bus_setup/teardown_intr() is added for device drivers to use. Currently
it is supported on amd64, i386, and sparc64 via nexus(4) methods that
simply call the intr_bind() routine.
- Add a new method to interrupt events (ie_assign_cpu) for binding events
to CPUs.
- Bind ithreads to CPUs in their main loop (this is the original
implementation, it may be changed if the cpuset stuff is MFC'd).
- Add intr_event_bind().
- Implement ie_assign_cpu() and a 'intr_bind()' wrapper on amd64, i386,
and sparc64.
Honour the logical current working directory ($PWD) when using config's
-d destdir option. For an automounted src tree using the logical cwd
in the Makefile keeps amd(8)'s mount timeout refreshed. Code to check
$PWD's validity cribbed from pwd(1).
Discussed on hackers@.
MFC 179269-179270
- delete "snapshot" from options list after we convert mount option to MNT_SNAPSHOT flag
- do not perform string to flag conversions for mount option which are converted
further up in vfs_donmount() in vfs_mount.c
vfs_mount.c:
MFC 179268
- Do not convert the "snapshot" string to the MNT_SNAPSHOT flag here, since
we do it further down in ffs_vfsops.c
PR: 122833
Rewrite node's r/w/q-lock semantics using only atomics instead of mutex
and atomics combination. Mutex is now used only for queue protection.
Also avoid unneded extra swi scheduling calls.
Add memory barriers to the node locking operations.
Add some comments.
Sort IP addresses before hashing them for the signature. Otherwise carp
is sensitive to address configuration order.
PR: kern/121574
Reported by: Douglas K. Rand, Wouter de Jong
Obtained from: OpenBSD (rev 1.114 + fixes)
Make m_megapullup() more intelligent:
- to increase performance do not reallocate mbuf when possible,
- to support up to 16K packets (was 2K max) use mbuf cluster of proper size.
This change depends on recent ng_nat and ip_fw_nat changes.
Increase LINK_TABLE_OUT_SIZE from 101 to 4001 like LINK_TABLE_IN_SIZE
to reduce performance degradation under heavy outgoing scan/flood.
Scalability is now much more important then several kilobytes of RAM.
Remove unneded TCP-specific expiration handeling. Before this connected
TCP sessions could never expire. Now connected TCP sessions will expire
after 24hours of inactivity.
Simplify HouseKeeping() to avoid several mul/div-s per packet. Taking into
account increased LINK_TABLE_OUT_SIZE, precision is still much more then
required.
Pass really available buffer size to libalias instead of MCLBYTES constant.
MCLBYTES constant were used with believe that m_megapullup() always moves
date into a fresh cluster that may become not so.
PKT_ALIAS_FOUND_HEADER_FRAGMENT result is not an error, so pass that packet.
This fixes packet fragmentation handeling.
Pass really available buffer size to libalias instead of MCLBYTES constant.
MCLBYTES constant were used with believe that m_megapullup() always moves
date into a fresh cluster that sometimes may become not so.
Ethernet hardware address stored in DC_AL_PAR0/DC_AL_PAR1 register
is in little endian form. Likewise setting DC_AL_PAR0/DC_AL_PAR1
register expect the address to be in little endian form. For big
endian architectures the address should be swapped to get correct
one.
Change setting/getting ethernet hardware address to big endian
architecture frendly.
Reported by: Robert Murillo ( billypilgrim782001 at yahoo dot com )
Tested by: Robert Murillo ( billypilgrim782001 at yahoo dot com )
* Implement more compact red-black trees, thus reducing memory usage
by ~0.5-1%.
* Add a separate tree to track dirty-page-containing chunks, thus
improving worst case allocation performance.
* Fix a deadlock in base_alloc() for the error (OOM) path.
* Catch integer overflow for huge allocations when using sbrk(2).
* Fix bit vector initialization for run headers. This fix has no
practical impact for correct programs. Incorrect programs will
potentially experience allocation failures rather than memory
corruption, both of which are "undefined behavior".
- Fix some style bugs and remove another banal comment missed in
rev. 1.46.
- Move the KASSERT on gem_add_rxbuf() to the right spot and add an
equivalent one to gem_disable_tx().
- Split the registers into two halves in preparation for SBus
support. [1]
Obtained from: NetBSD (loosely) [1]
- Use the revamped code from the gem(4) PCI front-end, which
doesn't require parts of the Expansion ROM to be copied around,
for obtaining the MAC address on !OFW platforms.
- Don't unnecessarily cache bus space tag and handle nor RIDs
in the softcs of the front-ends.
- Don't use function calls in initializers.
- Let the SBus front-end depend on sbus(4).
o Disable HMEDEBUG by default.
o Add CTASSERTs ensuring that HME_NRXDESC and HME_NTXDESC are set to
legal values.
o Use appropriate maxsize, nsegments and maxsegsize parameters when
creating DMA tags and correct some comments related to them.
o The FreeBSD bus_dmamap_sync(9) supports ored together flags for quite
some time now so collapse calls accordingly.
o Add missing BUS_DMASYNC_PREREAD when syncing the control DMA maps in
hme_rint() and hme_start_locked().
o Keep state of the link state and use it to enable or disable the MAC
in hme_mii_statchg() accordingly as well as to return early from
hme_start_locked() in case the link is down.
o Introduce a sc_flags and use it to replace individual members like
sc_pci.
o Add bus_barrier(9) calls to hme_mac_bitflip(), hme_mii_readreg(),
hme_mii_writereg() and hme_stop() to ensure the respective bit
has been written before we starting polling on it and for the right
bits to change.
o Rather just returning in case hme_mac_bitflip() fails and leaving us
in an undefined state report the problem and move on; chances are
the requested configuration will become active shortly after.
o Don't call hme_start_locked() in hme_init_locked() unconditionally
but only after calls to hme_init_locked() when it's appropriate, i.e.
in hme_watchdog().
o Add a KASSERT which asserts nsegs is valid also to hme_load_txmbuf().
o In hme_load_txmbuf():
- use a maximum of the newly introduced HME_NTXSEGS segments instead
of the incorrect HME_NTXQ, which reflects the maximum TX queue
length, for loading the mbufs and put the DMA segments back onto
the stack instead of the softc as 16 should be ok there.
- use the common errno(2) return values instead of homegrown ones,
- given that hme_load_txmbuf() is allowed to fail resulting in a
packet drop for quite some time now implement the functionality of
hme_txcksum() by means of m_pullup(9), which de-obfuscates the code
and allows to always retrieve the correct length of the IP header, [1]
- also add a KASSERT which asserts nsegs is valid,
- take advantage of m_collapse(9) instead of m_defrag(9) for
performance reasons.
o Don't bother to check whether the interface is running or whether its
queue is empty before calling hme_start_locked() in hme_tint(), the
former will check these anyway.
o In hme_intr() call hme_rint() before hme_tint() as gem_tint() may
take quite a while to return when it calls hme_start_locked().
o Get rid of sc_debug and just check if_flags for IFF_DEBUG directly.
o Add a shadow sc_ifflags so we don't reset the chip when unnecessary.
o Handle IFF_ALLMULTI correctly. [2]
o Use PCIR_BAR instead of a homegrown macro.
o Replace sc_enaddr[6] with sc_enaddr[ETHER_ADDR_LEN].
o Use the maximum of 256 TX descriptors for better performance as using
all of them has no additional static cost rather than using just half
of them.
Reported by: rwatson [2]
Suggested by: yongari [1]
Reviewed by: yongari
o Redefine G_PART_SCHEME_DECLARE() from populating a private
linker set to declaring a proper module.
o Add support for PC-9800 partition tables.
o Change the order from SI_ORDER_FIRST to SI_ORDER_ANY (within
SI_SUB_DRIVERS) to avoid loading schemes before all the GEOM
classes have been loaded and initialized.
o Add the bootcode verb for installing boot code.
o Implement the G_PART_DUMPCONF method for all 6 schemes.
Fix remaining nits from PR bin/39905.
Check for write failure while building temp files.
Correctly set file group when restore is run by a user other than root.
Use safer string handling.
Fixes the "getfile: lost data" panic when restoring older dumps.
Fix spurious "Header with wrong dumpdate" message.
Try to detect a Synaptics touchpad before IntelliMouse. Some touchpads will
pretend to be IntelliMouse (which have a few more features than generic mice)
causing the IntelliMouse probe to work and the Synaptics code never to be
called.
This should not break "real" IntelliMouse because the Synaptics detection code
is fairly specific.
PR: kern/120833
Submitted by: Eygene Ryabinkin <rea-fbsd -at- codelabs.ru>
rev. 1.30 of sys/sys/pipe.h
AKA r179243.
Another problem caused by the knlist_cleardel() potentially dropping
PIPE_MTX().
Since the pipe_present is cleared before (potentially) sleeping, the
second thread may enter the pipeclose() for the reciprocal pipe end.
The test at the end of the pipeclose() for the pipe_present == 0 would
succeed, allowing the second thread to free the pipe memory. First
threads then accesses the freed memory after being woken up.
Properly track the closing state of the pipe in the pipe_present.
Introduce the intermediate state that marks the pipe as mostly
dismantled but might be sleeping waiting for the knote list to be
cleared. Free the pipe pair memory only when both ends pass that point.
Use INSERT_OBJECT_INT_LINK_INDEX macro instead of TAILQ_INSERT_TAIL when
filling the table of ALTQ queues retrieved from the kernel.
It is possible for the kernel to return the queues not by pa.altq.qid order.
When this happens, pf_snmp would only partially fill its table.
PR: bin/120974
Submitted by: Mykola Dzham <i -at- levsha.org.ua>
We can call ia64_flush_dirty() when the corresponding process is
locked or not. As such, use PROC_LOCKED() to determine which case
it is and lock the process when not.
This is a manual merge. No merge history is created.
sys/sparc64/isa/isa.c 1.21; sys/sparc64/pci/ofw_pci.h 1.12;
sys/sparc64/pci/ofw_pci_if.m 1.10; sys/sparc64/pci/psycho.c 1.76;
sys/sun4v/sun4v/hv_pci.c 1.5
Remove the MD isa_irq_pending() and the underlying PCI-specific
infrastructure. Its only consumer ever was sio(4) and thus was
unused on sparc64 since removing the last traces of sio(4) in
sparc64 configuration files in favor for uart(4) over three
years ago. If similar functionality is required again it should
be brought back as an MD intr_pending() which works for all
busses by using for example interrupt controller hooks.
sym_hipd.c 1.70
- Const'ify firmware and lookup-tables.
- Obsolete redundant inst_name and unit members of struct sym_hcb.
- Fix three more NULL vs. 0 confusions.
- Use device_set_softc(9) to tell the bus layer that this driver
allocates a instance of struct sym_hcb itself.
- Use bus_{read,write}_*(9) instead of bus_space_{read,write}_*(9)
in order to get rid of bus space handle and tag in struct sym_hcb.
- Remove unused members related to bus addresses in struct sym_hcb.
- sym(4) takes care of allocating an instance of struct sym_hcb
itself so don't let newbus allocate it as an unused softc also.
- Add basic MPSAFE locking. This includes changing the sym(4) CCBs
to be allocated up-front instead of on demand as needed. Besides
making these allocations more likely to succeed, this also solves
the problem of calling bus_dmamap_create(9) with the SIM mutex
held.
- Use NULL instead of 0 for pointers.
- Remove superfluous returns in functions returning void.
- In sym_alloc_lcb_tags() return directly instead of jumping
to a label which just returns.
- Fix some spelling in comments.
- Remove trailing whitespace.
- Make failure to route a ISA interrupt non fatal. Apparently the
Blade 1500/SX1500 boards have inherited the firmware bug of the
AX1105 mainboards to not include an interrupt map entry for the
parallel port controller (for the AX1105 the heuristic code for
E450s probably erroneously kicks in and guesses an interrupt).
- Take advantage of bus_generic_setup_intr(9).
- Fix some whitespace bugs.
intr_machdep.h 1.19 (partial); mp_machdep.c 1.40; psycho.c 1.75;
sbus.c 1.47; upa.c 1.10
o Rename ic_eoi to ic_clear to emphasize the functions it points
don't send and EOI which works like on amd64/i386 and blocks all
interrupts on the relevant interrupt controller.
o Replace the post_filter and post_inthread hooks registered when
creating the interrupt events with just ic_clear as on sparc64 we
don't need to do any disable->EOI->enable dance to unblock all but
the relevant interrupt while running the filter or handler; just
not clearing the interrupt already has the same effect.
o Merge from amd64/i386:
- Split the intr_table_lock into an sx lock used for most things,
and a spin lock to protect intrcnt_index.
- Add support for binding interrupts to CPUs and initial shuffling
interrupts arround in a round-robin fashion.
Rev. 1.274 put the ttyrel() call before the destroy_dev() in the
ttyfree(), freeing the tty. Since destroy_dev() may call d_purge()
cdevsw method, that is the ttypurge() for the tty, the code ends up
accessing freed tty structure.
Put the ttyrel() after destroy_dev() in the ttyfree. To prevent the
panic the rev. 1.274 provided fix for, check the TS_GONE in sysctl
handler and refuse to provide information on such tty.
The dev_refthread() in the tty_gettp() may fail, because Giant is taken
in the giant_trick routines after the dev_refthread increments the
si_threadcount. Remove assert, do not perform dev_relthread() for failed
dev_refthread(), and handle failure in the tty_gettp() callers (cdevsw
tty methods).
Bluetooth SIG is being difficult and keep moving specification
documents away from being public accessible. Replace link to
the Bluetooth specification document with the document name.
Pointed out by: SoftLover < slserg at uic dot tula dot ru >
Release pcm mutex before calling snd_clone_unref(), which in turns might
calling destroy_dev() with sleepable malloc(9). The entire opetation
is being serialized through pcm cv from top down, so dropping mutex is
rather safe.
Reported by: delphij
Move "1000baseT" from IFM_SUBTYPE_ETHERNET_DESCRIPTIONS to
IFM_SUBTYPE_ETHERNET_ALIASES: there is already "1000baseTX" in
IFM_SUBTYPE_ETHERNET_DESCRIPTIONS. This doesn't change ifconfig
behaviour.
PR: 45793 (maybe)
Approved by: rwatson (mentor)
MFC after: 1 month
hu_HU.ISO8859-2.src r1.9
hu_HU.UTF-8.src r1.4
- The names of the months and the days are in lowercase according to the
Hungarian spelling, change them accordingly
devctl_process_running(): Check for devsoftc.inuse == 1 instead of
devsoftc.async_proc != NULL because the latter might not be true
sometimes.
This way /etc/rc.suspend gets executed.
Reviwed by: njl
Submitted by: Mitsuru IWASAKI <iwasaki at jp.FreeBSD.org>
Tested also by: Andreas Wetzel <mickey242 at gmx.net>
if_bge.c rev. 1.205, 1.209, 1.210
Summary:
In some situations we were not clearing pending link state attentions.
Because of this we were not getting further interrupts for link state
changes, thus never went into iface UP state and thus could not transmit.
The only way out of this was an incoming packet generating an rx interrupt
and making us call into bge_link_upd.
What we do now is force an interrupt at the end of bge_ifmedia_upd_locked
so we will call bge_link_upd, clear the link state attention and get
further interrupts.
While the initial version was not expected to work with all chips
the later update in rev. 1.210 is.
PR: kern/111804
Tested by: phk, scottl (initial version)
Thanks for your help to: davidch, Broadcom
devclass_get_maxunit() returns n+1 with n starting at 0.
So if we have channel 0..3 devclass_get_maxunit is 4.
It's never been a problem as devclass_get_device() has
caught any possibly bad input.
Add ';' missed with the SYSINIT changes.
Not noticed by tb as TCP_SIGNATURE is not in LINT.
(this MFC ahead of the MFC of the other SYSINIT ';' chnages)
Kqueue_scan() may sleep when encountered the influx knotes. On the other
hand, it may cause other threads to sleep since kqueue_scan() may mark
some knotes as infux. This could lead to the deadlock.
Before kqueue_scan() sleeps, wakeup the threads that are waiting for the
influx knotes produced by this thread.
The kqueue_close() encountering the KN_INFLUX knotes on the kq being
closed is the legitimate situation. For instance, filedescriptor with
registered events may be closed in parallel with closing the kqueue.
Properly handle the case instead of asserting that this cannot happen.
code, this can cause a panic due to a recusion on the TX Lock.
Also sync up other changes in HEAD, all trivial, added PCI ID
and #ifdef's to make the driver compile on 6.3.
Dummynet has a limit of 100 slots queue size (or 1MB, if you give
the limit in bytes) hard coded into both the kernel and userland.
Make both these limits a sysctl, so it is easy to change the limit.
If we are walking the IPv6 header chain and we hit an IPPROTO_NONE
header, then don't try to pullup anything, because there is no next
header if we hit IPPROTO_NONE. Set ulp to a non-NULL value so the
search for an upper layer header terinates.
moused.8 rev 1.62
Improve the virtual scrolling mechanism to make middle clicking less
difficult. Add a -L option (yet another option, indeed!) which changes
the speed of scrolling and change -U to only affect the scroll threshold.
This should make middle-clicking a much more pleasant experience.
Submitted by: Aragon Gouveia <aragon -at- phat.za.net>
rev. 1.126 of libexec/rtld-elf/rtld.c
rev. 1.5 of libexec/rtld-elf/rtld_lock.c
rev. 1.3 of libexec/rtld-elf/rtld_lock.h
Fix the problem with the C++ exception handling for the multithreaded
programs.
From the PR description:
The gcc runtime's _Unwind_Find_FDE function, invoked during exception
handling's stack unwinding, is not safe to execute from within multiple
threads. FreeBSD' s dl_iterate_phdr() however permits multiple threads
to pass through it though. The result is surprisingly reliable infinite
looping of one or more threads if they just happen to be unwinding at
the same time.
Introduce the new lock that is write locked around the dl_iterate_pdr,
thus providing required exclusion for the stack unwinders.
PR: threads/123062
Submitted by: Andy Newman <an at atrn org>
Reviewed by: kan
ofw_pcib_subr.h 1.4; ofw_pcibus.c 1.18; psycho.c 1.74; psychovar.h 1.18
On sparc64 machines with multiple host-PCI-bridges these bridges
have separate configuration spaces so by definition they implement
different PCI domains. Thus change psycho(4) to use PCI domains
instead of reenumerating all PCI busses so they have globally unique
bus numbers and drop support for reenumerating busses in the OFW PCI
code.
Make -t <tty> optional in server mode. If not specified use stdin/stdout.
Document this. Do not require channel number in server mode. If not
specified - bind to ''wildcard'' channel zero. Real channel number will
be obtained automatically and registered with local sdpd(8). While I'm
here fix serial port service registration.
Submitted by: luigi
Tested by: Helge Oldach <freebsd-bluetooth at oldach dot net>
rev. 1.15 of lib/libc/gen/readdir.c
rev. 1.11 of lib/libc/gen/telldir.c
rev. 1.3 of lib/libc/gen/telldir.h
Do not read away the target directory entry when encountering deleted
files after a seekdir().
The seekdir shall set the position for the next readdir operation.
When the _readdir_unlocked() encounters deleted entry, dd_loc is
already advanced. Continuing the loop leads to premature read of
the target entry.
Submitted by: Marc Balmer <mbalmer at openbsd org>
Obtained from: OpenBSD
Only return 1 from sync_vnode() in cases where the vnode is still at the
head of the sync list. This prevents sched_sync() from re-queueing a
vnode which may have been freed already.
Approved by: jeff
Use separate UMA zone for data items allocation. It is a partial
rev. 1.149 rework.
It allows to save several percents of CPU time on SMP by using UMA's
internal per-CPU allocation limits instead of own global variable
each time updated with atomics.
Also it restores NG_WAITOK flag processing.
PR: kern/123741
The first of thirteen patches by Ed that resolves a documentation
issue in termios.4, ttydefaults.h does not exist in /usr/include
but in /usr/include/sys.
MFC after: 3 days
Submitted by: Ed Schouten (ed at 80386 dot nl)
Add four utility functions related to struct grp processing modeled in-part
after similar calls related to struct pwd in libutil/pw_util.c:
- gr_equal()
Perform a deep comparison of two struct grp's. It does a thorough, yet
unoptimized comparison of all the members regardless of order.
- gr_make()
Create a string (see group(5)) from a struct grp.
- gr_dup()
Duplicate a struct grp. Returns a value that is a single contiguous
block of memory.
- gr_scan()
Create a struct grp from a string (as produced by gr_make()).
src/lib/libutil/Makefile: rev 1.66 -> 1.67
src/lib/libutil/gr_util.c: rev 0 -> 1.1
src/lib/libutil/libutil.h: rev 1.46 -> 1.47
Define the size_t type since readpassphrase(3) requires it in its
definition and sys/types.h is not listed within the synopsis of the man
page.
src/include/readpassphrase.h: rev 1.2 -> 1.3
- Remove the BUS_HANDLE_MIN checking in the __BUS_DEBUG_ACCESS macro;
for UPA it should have fulfilled its purpose by now and Fireplane-
and JBus-based machines are way to messy in organization to implement
something equivalent.
- Fix a bunch of style(9) bugs.
only work if there's just one interface doing dhcp. This version implements
the same logic as the version in the PR, but uses pgrep to be less verbose.
PR: conf/95905
counter.c 1.7; iommu.c 1.47
- Use the name returned by device_get_nameunit(9) for the name of the
counter-timer timecounter so the associated SYSCTL nodes don't clash on
machines having multiple U2P and U2S bridges as well as establishing a
clear mapping between these bridges and their timecounter device.
- Don't bother setting up a "nice" name for the IOMMU, just use the name
returned by device_get_nameunit(9), too.
- Fix some minor style(9) bugs.
- Use __FBSDID in counter.c
- Use more appropriate maxsize, nsegments and maxsegsize parameters
when creating the parent bus DMA tag. While at it correct the style
and a nearby comment.
- Take advantage of m_collapse(9) for performance reasons.
unset the given variable name (removing it from the environment, instead
of just setting it to a null value).
[* = 1.10->1.11 env.1, 1.20 env.c]
PR: bin/65649
o Change the warning dialog for the 'W' command in both the label
and partition editors to reflect the fact that this is a stand-alone
application, not sysinstall(8).
o Change an instance of sade(8) refering to itself as sysinstall(8) in
a confirmation dialog.
don't set sniffer mode to ON when the driver is running with the
monitor mode. This solves a problem that sometimes mangled frames
are passed.
Submitted by: Werner Backes <werner_at_bit-1.de>
Tested by: Werner Backes <werner_at_bit-1.de>
PR: kern/121608
Approved by: thompsa (mentor)
from HEAD to RELENG_7:
Add "ddb capture print" and "ddb capture status" commands do ddb(8),
alowing the DDB output capture buffer to be easily extracted from
user space. Both of these commands include -M/-N arguments, allowing
them to be used with kernel crash dumps (or /dev/mem).
This makes it easier to use DDB scripting and output capture with
minidumps or full dumps rather than with text dumps, allowing DDB
output (scripted or otherwise) to be easily extracted from a crash
dump.
Discussed with: brooks, jhb
When writing trailers in sendfile(2), don't call kern_writev()
while holding the socket buffer lock. These leads to an
immediate panic due to recursing the socket buffer lock. This
bug was introduced in uipc_syscalls.c:1.240, but masked by
another bug until that was fixed in uipc_syscalls.c:1.269.
Note that the current fix isn't perfect, but better than
panicking: normally we guarantee that simultaneous invocations
of a system call to write on a stream socket won't be
interlaced, which is ensured by use of the socket buffer sleep
lock. This is guaranteed for the sendfile headers, but not
trailers. In practice, this is likely not a problem, but
should be fixed.
Pointy hat to: andre (1.240), cperciva (1.269)
of the archive structure, not the write-specific portion.
(This is a bungle from back when the generic and write-specific portions
were first separated and the write-specific part accidentally ended
up with copies of some of the generic fields.) In particular,
archive_format() and archive_format_name() now work correctly
on write handles.
Coerce if_loop.c in the general direction of style(9):
- Use ANSI function declarations
- Remove use of 'register' keyword
- Prefer style(9) return parens, white space
- Trim trailing whitespace at ends of lines.
which are also likely to be irrelevant for sun4v (there's no SBus on sun4v
and only some EBus devices). While at it fix some style bugs according to
style.Makefile(5) where appropriate.
Add system hang-up process when VOP_READDIR of unionfs_nodeget()
returns not end of the file status on debug mode (DIAGNOSTIC defined)
kernel.
Submitted by: Masanori OZAWA ([email protected])
Add a dummynet_enable knob to go with firewall_enable. If this knob
is enabled dummynet(4) is added to the list of required modules.
Discussed on: #freebsd-bugbusters (rwatson, trhodes)
PR: conf/79196
date: 2008/03/06 14:01:10; author: mtm; state: Exp; lines: +1 -1
The rarpd(8) daemon must be instructed to start on all interfaces or a
specific one. Instruct it to listen on all interfaces so that enabling
it in rc.conf(5) works "out of the box."
PR: conf/121406
Submited by: trasz
scandir(3) previously used st_size to obtain an initial estimate
of the array length needed to store all the directory entries.
Although BSD has historically guaranteed that st_size is the size
of the directory file, POSIX does not, and more to the point, some
recent filesystems such as ZFS use st_size to mean something else.
The fix is to not stat the directory at all, set the initial
array size to 32 entries, and realloc it in powers of 2 if that
proves insufficient.
PR: 113668
Use LOCK_FILE and LOCK_LINE with lockmgr(), add the wrapper protecting for
the public namespace for userland inclusion.
Now lockmgr depends by sys/lock.h header on RELENG_7 too.
Have the man page catch up with the namespace pollution cleanup that
occurred between 2001-2003. Thanks to bde for the history lesson[1]
concerning sys/types.h and the many system calls that at one time
(pre-2001) were required by POSIX to include it.
1. http://lists.freebsd.org/pipermail/freebsd-arch/2008-April/008126.html
src/lib/libc/sys/mkdir.2: rev 1.25 -> 1.26
revision 1.219
Replace the non-MPSAFE timeout(9) API in ffs_softdep.c with the MPSAFE
callout_* API (e.g. callout_init_mtx(9)). This was one of the numerous
items on the http://wiki.freebsd.org/SMPTODO list.
When sending packets directly to the DHCP server, use a socket and send
directly rather than bogusly sending it out as a link layer broadcast
(which fails to be received on some networks).
PR: bin/96018
MFC after: 2 weeks
Delay the global registration of the struct ifnet in if_alloc() until after
we're certain the allocation will entierly succeed. This fixes a leak in a
fairly unlikely case.
Reported by: vijay singh <vijjus at rocketmail dot com>
In in_pcbnotifyall() and in6_pcbnotify(), use LIST_FOREACH_SAFE() and
eliminate unnecessary local variable caching of the list head pointer,
making the code a bit easier to read.
Remove Giant acquisition around soreceive() and sosend() in fifofs.
The bug that caused us to reintroduce it is believed to be fixed,
and Kris says he no longer sees problems with fifofs in highly
parallel builds.
Pointed out by: kris
Provide more detailed information about each procstat(1) display mode,
including a key to fields in each mode and flag abbreviations.
Note: mention of POSIX shared memory in the man page has been removed
in the MFC, as explicit kernel support for pshm hasn't been merged to
RELENG_7 yet.
dereferencing uap throughout. On ia64 uap points into the trapframe
and the call to set_mcontext() in this function will change the
trapframe. Consequently, when we dereference uap afterwards we can
best qualify the behaviour as undefined. By putting the arguments
in local variables we also improve code-generation, because the
compiler is not forced to reload after every function call.
Caught by: Christian Kandeler <[email protected]>
Initialize variable "now" before using it (it is used by the LEFTEARTH
macro)
PR: 121418
Submitted by: Atsuo Ohki
Approved by: rwatson (mentor)
MFC after: 1 month
src/sys/netinet/ip_dummynet.h 1.41
src/sys/netinet/ip_dummynet.c 1.111-1.114
src/sys/netinet/ip_fw_pfil.c 1.26
src/sys/net/if_bridge.c 1.107
src/sys/net/if_ethersubr.c 1.240
src/sbin/ipfw/ipfw.8 1.206
- style(9) cleanup.
- dummynet_io() declaration has changed.
- Alter packet flow inside dummynet and introduce 'fast' mode of dummynet
operation: allow certain packets to bypass dummynet scheduler. Benefits are:
-- lower latency: if packet flow does not exceed pipe bandwidth, packets
will not be (up to tick) delayed (due to dummynet's scheduler granularity).
-- lower overhead: if packet avoids dummynet scheduler it shouldn't reenter
ip stack later. Such packets can be fastforwarded.
-- recursion (which can lead to kernel stack exhaution) eliminated. This fix
long existed panic, which can be triggered this way:
kldload dummynet
sysctl net.inet.ip.fw.one_pass=0
ipfw pipe 1 config bw 0
for i in `jot 30`; do ipfw add 1 pipe 1 icmp from any to any; done
ping -c 1 localhost
- New sysctl nodes:
net.inet.ip.dummynet.io_fast - enables 'fast' dummynet io
net.inet.ip.dummynet.io_pkt - packets passed to dummynet
net.inet.ip.dummynet.io_pkt_fast - packets avoided dummynet scheduler
net.inet.ip.dummynet.io_pkt_drop - packets dropped by dummynet
- Workaround p->numbytes overflow, which can result in infinite loop inside
dummynet module (prerequisite is using queues with "fat" pipe).
PR: kern/113548 kern/121955
o Rename cpu_thread_setup() to cpu_thread_alloc() to better communicate that
it relates to (is called by) thread_alloc()
o Add cpu_thread_free() which is called from thread_free() to counter-act
cpu_thread_alloc().
i386: Have cpu_thread_free() call cpu_thread_clean() to preserve behaviour.
ia64: Have cpu_thread_free() call mtx_destroy() for the mutex initialized
in cpu_thread_alloc().
files: sys/amd64/amd64/vm_machdep.c:1.256
sys/arm/arm/vm_machdep.c:1.35
sys/i386/i386/vm_machdep.c1.284
sys/ia64/ia64/machdep.c:1.227
sys/ia64/ia64/vm_machdep.c:1.95
sys/kern/kern_thread.c:1.260
sys/powerpc/powerpc/vm_machdep.c:1.117
sys/sparc64/sparc64/vm_machdep.c:1.77
sys/sun4v/sun4v/vm_machdep.c:1.8
sys/sys/proc.h:1.495
- Take advantage of bus_dmamap_load_mbuf_sg(9).
- Take advantage of m_collapse(9).
- Sync with other NIC drivers and prepend a TX mbuf if the first attempt
to load it fails with an error other than EFBIG and stop trying instead
of freeing it and keeping on trying to enqueue more mbufs. Also ensure
the driver queue isn't empty before trying to enqueue mbufs in order to
reduce locking operations.
- In xl_ifmedia_upd() add a missing XL_UNLOCK(). [1]
- Const'ify the xl_devs array.
- Remove an outdated comment.
PR: 113406 [1]
- Const'ify the bus_stream_asi and bus_type_asi arrays.
- Replace hard-coded functions names missed in bus_machdep.c rev. 1.44
with __func__.
- Break some long lines.
Take the route mtu into account, if available, when sending an
ICMP unreach, frag needed. Up to now we only looked at the
interface MTU. Make sure to only use the minimum of the two.
In case IPSEC is compiled in, loop the mtu through ip_ipsec_mtu()
to avoid any further conditional maths.
Without this, PMTU was broken in those cases when there was a
route with a lower MTU than the MTU of the outgoing interface.
PR: kern/122338
Tested by: Mark Cammidge mark peralex.com
Back out rev. 1.161 (1.157.2.2) and
switch back to optimized TCP options ordering.
A lot of testing has shown that the problem people were seeing was due
to invalid padding after the end of option list option, which was corrected
in tcp_output.c rev. 1.146 (1.141.2.4).
Thanks to: anders@, s3raphi, Matt Reimer
Thanks to: Doug Hardie and Randy Rose, John Mayer, Susan Guzzardi
Special thanks to: dwhite@ and BitGravity
Discussed with: silby
Don't touch MSI enable bit in RL_CFG2 register. For unknown reason
clearing MSI enable bit for MSI capable hardwares resulted in Tx
problems. MSI enable bit is set only when MSI is requested from
user.
In revision 1.70, 1.71 and 1.84 re(4) tried to workaround checksum
offload bugs by manual padding for short IP/UDP frames. Unfortunately
it seems that these workaround does not work reliably on newer PCIe
variants of RealTek chips.
To workaround the hardware bug, always pad short frames if Tx IP
checksum offload is requested. It seems that the hardware has a
bug in IP checksum offload handling. NetBSD manually pads short
frames only when the length of IP frame is less than 28 bytes but I
chose 60 bytes to safety. Also unconditionally set IP checksum
offload bit in Tx descriptor if any TCP or UDP checksum offload is
requested. This is the same way as Linux does but it's not
mentioned in data sheet.
For MSI capable hardwares, enable MSI enable bit in RL_CFG2
register. If MSI was disabled by hw.re.msi_disable tunable
expliclty clear the MSI enable bit.
VLAN hardware tag information should be set for all desciptors of a
multi-descriptor transmission attempt. Datasheet said nothing about
this requirements. This should fix a long-standing VLAN hardware
tagging issues with re(4).
Always honor configured VLAN/checksum offload capabilities.
Previously re(4) used to blindly enable VLAN hardware tag stripping
and Rx checksum offload regardless of enabled optional features of
interface.
Don't map memory/IO resource in device probe and just use PCI
vendor/revision/sub device id of the hardware to probe it.
This is the same way as NetBSD does and it enhances readabilty
a lot.
Overhaul re(4).
o Increased number of Rx/Tx descriptors to 256 for 8169 GigEs
because it's hard to push the hardware to the limit with default
64 descriptors.
TSO requires large number of Tx descriptors to pass a full sized
TCP segment(65535 bytes IP packet) to hardware. Previously it
consumed 32 Tx descriptors, assuming MCLBYTES DMA segment size,
to send the TCP segment which means re(4) couldn't queue more
than two full sized IP packets.
For 8139C+ it still uses 64 Rx/Tx descriptors due to its hardware
limitations. With this changes there are (very) small waste of
memory for 8139C+ users but I don't think it would affect 8139C+
users for most cases.
o Various bus_dma(9) fixes.
- The hardware supports DAC so allow 64bit DMA operations.
- Removed BUS_DMA_ALLOC_NOW flag.
- Increased DMA segment size to 4096 from MCLBYTES because TSO
consumes too many descriptors with MCLBYTES DMA segment size.
- Tx/Rx side bus_dmamap_load_mbuf_sg(9) support. With these
changes the code is more readable than previous one and got a
(slightly) better performance as it doesn't need to pass/
decode arguments to/from callback function.
- Removed unnecessary callback function re_dmamap_desc() and
nuked rl_dmaload_arg structure which was used in the callback.
- Additional protection for DMA map load failure. In case of
failure reuse current map instead of returning a bogus DMA
map.
- Deferred DMA map unloading/sync operation for maximum
performance until we really need to load new DMA map. If we
happen to reuse current map(e.g. input error) there is no need
to sync/unload/load again.
- The number of allowable Tx DMA segments for a mbuf chains are
now 32 instead of magic nseg value. If the number of available
Tx descriptors are short enough to send highly fragmented mbuf
chains an optimized re_defrag() is called to collapse mbuf
chains which is supposed to be much faster than m_defrag(9).
re_defrag() was borrowed from ath(4).
- Separated Rx/Tx DMA tag from a common DMA tag such that Rx DMA
tag correctly uses DMA maps that were created with DMA alignment
restriction(8bytes alignments). Tx DMA tag does not have such
alignment limitation.
- Added additional sanity checks for DMA ring map load failure.
- Added additional spare Rx DMA map for graceful handling of Rx
DMA map load failure.
- Fixed misused bus_dmamap_sync(9) and added missing
bus_dmamap_sync(9) in re_encap()/re_txeof()/re_rxeof().
o Enabled TSO again as re(4) have reasonable number of Tx
descriptors.
o Don't touch DMA address of a Tx descriptor in re_txeof(). It's
not needed.
o Fix incorrect update of if_ierrors counter. For Rx buffer
shortage it should update if_qdrops as the buffer is reused.
o Added checks for unsupported H/W revisions and return ENXIO for
these hardwares. This is required to remove resource allocation
code in re_probe as other drivers do in device probe routine.
o Modified descriptor index manipulation macros as it's now possible
to have different number of descriptors for Rx/Tx.
o In re_start, to save a lock operation, use IFQ_DRV_IS_EMPTY before
trying to invoke IFQ_DRV_DEQUEUE. Also don't blindly call re_encap
since we already know the number of available Tx descriptors in
advance.
o Removed RL_TX_DESC_THLD which was used to reserve RL_TX_DESC_THLD
descriptors in Tx path. There is no such a limitation mentioned in
8139C+/8169/8110/8168/8101/8111 datasheet and it seems to work ok
without reserving RL_TX_DESC_THLD descriptors.
o Fix a comment for RL_GTXSTART. The register is 8bits register.
o Added comments for 8169/8139C+ hardware restrictions on descriptors.
o Removed forward declaration for "struct rl_softc", it's not needed.
o Added a new structure rl_txdesc for Tx descriptor managements and
a structure rl_rxdesc for Rx descriptor managements.
o Removed unused member variable rl_intlock in driver softc. There are
still several unused member variables which are supposed to be used
to access hardware statistics counters. But it seems that accessing
hardware counters were not implemented yet.
The final stage of the big CDDL file move. These files were repo
copied in head to their new location under the 'cddl' directories
of src and src/sys and then added for this branch. The build has
been using the files in their new locations for a few days now.
Introduce a new F_DUP2FD command to fcntl(2), for compatibility with
Solaris and AIX.
fcntl(fd, F_DUP2FD, arg) and dup2(fd, arg) are functionnaly equivalent.
Document it.
Add some regression tests (identical to the dup2(2) regression tests).
PR: 120233
Submitted by: Jukka Ukkonen
Approved by: rwaston (mentor)
MFC after: 1 month
audit_bsm_klib.c:1.15, audit_bsm_token.c:1.15, audit_pipe.c:1.15,
audit_syscalls.c:1.26, audit_trigger.c:1.8, audit_worker.c:1.23
from HEAD to RELENG_7:
Use __FBSDID() for $FreeBSD$ IDs in the audit code.
Merge changes from NetBSD on humanize_number.c, 1.8 -> 1.13
Significant changes:
- rev. 1.11: Use PRId64 instead of a cast to long long and %lld to print
an int64_t.
- rev. 1.12: Fix a bug that humanize_number() produces "1000" where it
should be "1.0G" or "1.0M". The bug reported by Greg Troxel.
PR: 118461
PR: 102694
Approved by: rwatson (mentor)
Obtained from: NetBSD
MFC after: 1 month
from HEAD to REENG_7:
Make naming of include guards for MAC Framework include files more
consistent with other kernel include guards (don't start with _SYS).
rev. 1.151: Remove impossible (hk_peer == NULL) check.
rev. 1.152: Remove ng_setisr() call from ng_dequeue().
rev. 1.153: There is no need to erase hook->hk_node before freeing hook.
rev. 1.154: Use new atomic_fetchadd() primitive instead of looping atomic_cmpset().
rev. 1.158: ng_address_hook() microoptimization.
- add support for T3C
- add multicast support
- update copyrights
- add infrastructure for multiple transmit queues
- add support for compiling firmware in to the kernel
- add conditional define for enabling link at device attach
- exit tick handler if shutdown is in progress
- add sysctls for dumping transmit queues
- use jumbo clusters for large packets
- add pcpu caching
- add inline mbuf header on receive
- upgrade to version 5.0 of the firmware
Supported by: Chelsio Inc.
Fix possible buffer overrun on 64-bit arch when generating MAC
address for tap interface.
Reported by: Marc Lorner < marc dot loerner at hob dot de >
Reviewed by: bms
It seems that RealTek 8129/8139 chip reports invalid length of
received frame under certain conditions. wpaul said the length
0xfff0 is special meaning that indicates hardware is in the
process of copying a packet into host memory. But it seems
there are other cases that hardware is busy or stuck in bad
situation even if the received frame length is not 0xfff0.
To work-around this condition, add a check that verifys that
recevied frame length is in valid range. If received length is out
of range reinitialize hardware to recover from stuck condition.
These files were repocopied for HEAD. The repo copy process renames
tags, adding a prefix of 'old_', so the history for these files is
in old_RELENG_7 etc.
Add missing device in tunefs entry.
PR: docs/122702
Submitted by: Yoshihiro Ota <[email protected]>
MFC After: 3 days
MFC rev 1.5 gjournal.8
I keep taking timemachines to get back in time. Update the
year to 2008.
Noticed by: ceri
Remove ftp.hk.super.net, the DNS isn't pointing to anything at the moment.
I tested this as well as the submitter and couldn't resolve this either,
since I dont want to "announce" dead mirrors, I'll remove it from the
list.
PR: 122567
Submitted by: vs
Approved by: imp (mentor, implicit for trivial changes)
MFC after: 1 week
Approved by: imp (mentor, implicit)
Avoid error cascades when trying to monitor a host that doesn't resolve in
DNS. Tighten error handling when attempting to communicate with the userland
part of rpc.lockd.
Add rfcomm_pppd_server rc script to allow start rfcomm_pppd(8) in server
mode at boot time. Multiple profiles can be started at the same time.
The whole idea is very similar to the ppp rc script.
Document Bluetooth knobs in rc.conf(5)
Set defaults for the rfcomm_pppd_server rc script
- Add write(2) support for psm(4) in native operation level. Now arbitrary
commands can be written to /dev/psm%d and status can be read back from it.
- Clean up and fix style(9) nits.
o sf(4) repocopied from sys/pci to sys/dev/sf
Overhaul sf(4) to make it run on all architectures and implement
checksum offoload by downloading AIC-6915 firmware. Changes are
o Header file cleanup.
o Simplified probe logic.
o s/u_int{8,16,32}_t/uint{8,16,32}_t/g
o K&R -> ANSI C.
o In register access function, added support both memory mapped and
IO space register acccess. The function will dynamically detect
which method would be choosed.
o sf_setperf() was modified to support strict-alignment
architectures.
o Use SF_MII_DATAPORT instead of hardcoded value 0xffff.
o Added link state/speed, duplex changes handling task q. The task q
is also responsible for flow control settings.
o Always hornor link up/down state reported by mii layers. The link
state information is used in sf_start() to determine whether we
got a valid link.
o Added experimental flow-control setup. It was commented out but
will be activated once we have flow-cotrol infrastructure in mii
layer.
o Simplify IFF_UP/IFCAP_POLLING and IFF_PROMISC handling logic. Rx
filter always honors promiscuous mode.
o Implemented suspend/resume methods.
o Reorganized Rx filter routine so promiscuous mode changes doesn't
require interface re-initialization.
o Reimplemnted driver probe routine such that it looks for matching
device from supported hardware list table. This change will help to
add newer hardware revision to the driver.
o Use ETHER_ADDR_LEN instead of hardcoded value.
o Prefer memory space register mapping over I/O space as the hardware
requires lots of register access to get various consumer/producer
index. Failing to get memory space mapping, sf(4) falls back to I/O
space mapping. Use of memory space register mapping requires
somewhat large memory space(512K), though.
o Switch to simpler bus_{read,write}_{1,2,4}.
o Use PCIR_BAR macro to get BARs.
o Program PCI cache line size if the cache line size was set to 0
and enable PCI MWI.
o Add a new sysctl node 'dev.sf.N.stats' that shows various MAC
counters for Rx/Tx statistics.
o Add a sysctl node to configure interrupt moderation timer. The
timer defers interrupts generation until time specified in timer
control register is expired. The value in the timer register is in
units of 102.4us. The allowable range for the timer is 0 - 31
(0 ~ 3.276ms).
The default value is 1(102.4us). Users can change the timer value
with dev.sf.N.int_mod sysctl(8) variable/loader(8) tunable.
o bus_dma(9) conversion
- Enable 64bit DMA addressing.
- Enable 64bit descriptor format support.
- Apply descriptor ring alignment requirements(256 bytes alignment).
- Apply Rx buffer address alignment requirements(4 bytes alignment).
- Apply 4GB boundary restrictions(Tx/Rx ring and its completion ring
should live in the same 4GB address space.)
- Set number of allowable number of DMA segments to 16. In fact,
AIC-6915 doesn't have a limit for number of DMA segments but it
would be waste of Tx descriptor resource if we allow more than 16.
- Rx/Tx side bus_dmamap_load_mbuf_sg(9) support.
- Added alignment fixup code for strict-alignment architectures.
- Added endianness support code in Tx/Rx descriptor access.
With these changes sf(4) should work on all platforms.
o Don't set if_mtu in device attach, it's handled in ether_ifattach.
o Use our own callout to drive watchdog timer.
o Enable VLAN oversized frames and announce sf(4)'s VLAN capability
to upper layer.
o In sf_detach(), remove mtx_initialized KASSERT as it's not possible
to get there without initialzing the mutex. Also mark that we're
about to detaching so active bpf listeners do not panic the system.
o To reduce PCI register access cycles, Rx completion ring is
directly scanned instead of reading consumer/producer index
registers. In theory, Tx completion ring also can be directly
scanned. However the completion ring is composed of two types
completion(1 for Tx done and 1 and DMA done). So reading producer
index via register access would be more safer way to detect the
ring wrap-around.
o In sf_rxeof(), don't use m_devget(9) to align recevied frames. The
alignment is required only for strict-alignment architectures and
now the alignment is handled by sf_fixup_rx() if required. The
removal of the copy operation in fast path should increase Rx
performance a lot on non-strict-alignemnt architectures such as
i386 and amd64.
o In sf_newbuf(), don't set descriptor valid bit as sf(4) is
programmed to run with normal mode. In normal mode, the valid bit
have no meaning. The valid bit should be used only when the
hardware uses polling(prefetch) mode. The end of descriptor queue
bit could be used if needed, but sf(4) relys on auto-wrapping of
hardware on 256 descriptor queue entries so both valid and
descriptor end bit are not used anymore.
o Don't disable generation of Tx DMA completion as said in datasheet
and use the Tx DMA completion entry instead of relying on Tx done
completion entry. Also added additional Tx completion entry type
check in Tx completion handler.
o Don't blindly reset watchdog timer in sf_txeof(). sf(4) now unarm
the the watchdog only if there are no active Tx descriptors in Tx
queue.
o Don't manually update various counters in driver, instead, use
built-in MAC statistic registers to update them. The statistic
registers are updated in every second.
o Modified Tx underrun handlers to increase the threshold value
in units of 256 bytes. Previously it used to increase 16 bytes
at a time which seems to take too long to stabalize whenever Tx
underrun occurrs.
o In interrupt handler, additional check for the interrupt is
performed such that interrupts only for this device is allowed to
process descriptor rings. Because reading SF_ISR register clears
all interrtups, nuke writing to a SF_ISR register.
o Tx underrun is abonormal condition and SF_ISR_ABNORMALINTR includes
the interrupt. So there is no need to inspect the Tx underrun again
in main interrupt loop.
o Don't blindly reinitialize hardware for abnormal interrupt
condition. sf(4) reintializes the hardware only when it encounters
DMA error which requires an explicit hardware reinitialization.
o Fix a long standing bug that incorrectly clears MAC statistic
registers in sf_init_locked.
o Added strict-alignment safe way of ethernet address reprogramming
as IF_LLADDR may return unaligned address.
o Move sf_reset() to sf_init_locked in order to always reset the
hardware to a known state prior to configuring hardware.
o Set default Rx DMA, Tx DMA paramters as shown in datasheet.
o Enable PCI busmaster logic and autopadding for VLAN frames.
o Rework sf_encap.
- Previously sf(4) used to type 0 of Tx descriptor with padding
enabled to store driver private data. Emebedding private data
structures into descriptors is bad idea as the structure size
would be different between 64bit and 32bit architectures. The
type 0 descriptor allows fixed number of DMA segments in
a descriptor format and provides relatively simple interface to
manage multi-fragmented frames.
However, it wastes lots of Tx descriptors as not all frames are
fragmented as the number of allowable segments in a descriptor.
- To overcome the limitation of type 0 descriptor, switch to type
2 descriptor which allows 64bit DMA addressing and can handle
unliumited number of fragmented DMA segments. The drawback of
type 2 descriptor is in its complexity in managing descriptors
as driver should handle the end of Tx ring manually.
- Manually set Tx desciptor queue end mark and record number of
used descriptors to reclaim used descriptors in sf_txeof().
o Rework sf_start.
- Honor link up/down state before attempting transmission.
- Because sf(4) uses only one of two Tx queues, use low priority
queue instead of high one. This will remove one shift operation
in each Tx kick command.
- Cache last produder index into softc such that subsequenet Tx
operation doesn't need to access producer index register.
o Rewrote sf_stats_update to include all available MAC statistic
counters.
o Employ AIC-6915 firmware from Adaptec and implement firmware
download routine and TCP/UDP checksum offload.
Partial checksum offload support was commented out due to the
possibility of firmware bug in RxGFP.
The firmware can strip VLAN tag in Rx path but the lack of firmware
assistance of VLAN tag insertion in transmit side made it useless
on FreeBSD. Unlike checksum offload, FreeBSD requires both Tx/Rx
hardware VLAN assistance capability. The firmware may also detect
wakeup frame and can wake system up from states other than D0.
However, the lack of wakeup support form D3cold state keep me from
adding WOL capability. Also detecting WOL frame requires firmware
support but it's not yet known to me whether the firmware can
process the WOL frame.
o Changed *_ADDR_HIADDR to *_ADDR_HI to match other definitions of
registers.
o Added definitioan to interrupt moderation related constants.
o Redefined SF_INTRS to include Tx DMA done and DMA errors. Removed
Tx done as it's not needed anymore.
o Added definition for Rx/Tx DMA high priority threshold.
o Nuked unused marco SF_IDX_LO, SF_IDX_HI.
o Added complete MAC statistic register definition.
o Modified sf_stats structure to hold all MAC statistic regiters.
o Nuke various driver private padding data in Tx/Rx descriptor
definition. sf(4) no longer requires private padding. Also remove
unused padding related definitions. This greatly simplifies
descriptor manipulation on 64bit architectures.
o Becase we no longer pad driver private data into descriptor,
remove deprecated/not-applicable comments for padding.
o Redefine Rx/Tx desciptor status. sf(4) doesn't use bit fileds
anymore to support endianness.
o Import AIC-6915 firmware for GFP from Adaptec.
Make ALTQ cope with disappearing interfaces (particularly common with mpd
and netgraph in gernal). This also allows to add queues for an interface
that is not yet existing (you have to provide the bandwidth for the
interface, however).
PR: kern/106400, kern/117827
Tested by: Florian Smeets, Boris S.
pmap.c 1.171; spitfire.c 1.6; tlb.c 1.9
- Do as the comment in pmap_bootstrap() suggests and flush all non-locked
TLB entries possibly left over by the firmware and also do so while
bootstrapping APs.
- Use __FBSDID.
- add _umtx_op_err function to improve stability because of errno
changed by application signal handler code.
- use kernel based userland rwlock to implement pthread_rwlock,
improve performance in most cases.
- Const'ify the dc_devs array.
- Correct the maxsize parameter when creating the mbufs busdma tag to
reflect the actual requirement of dc(4).
- Move the KASSERT in dc_newbuf() to the right spot.
- Also convert the TX side to take advantage of bus_dmamap_load_mbuf_sg(9).
- Move the comment regarding dc_start_locked() to the right spot.
Add support for displaying a process' current working directory, root
directory, and jail directory within procstat. While this functionality
is available already in fstat, encapsulating it in the kern.proc.filedesc
sysctl makes it accessible without using kvm and thus without needing
elevated permissions.
The new procstat output looks like:
PID COMM FD T V FLAGS REF OFFSET PRO NAME
76792 tcsh cwd v d -------- - - - /usr/src
76792 tcsh root v d -------- - - - /
76792 tcsh 15 v c rw------ 16 9130 - -
76792 tcsh 16 v c rw------ 16 9130 - -
76792 tcsh 17 v c rw------ 16 9130 - -
76792 tcsh 18 v c rw------ 16 9130 - -
76792 tcsh 19 v c rw------ 16 9130 - -
I am also bumping __FreeBSD_version for this as this new feature will be
used in at least one port.
Reviewed by: rwatson
Approved by: rwatson
Note that in the MFC, __FreeBSD_version is not bumped as we will bump it
once (shortly) for all procstat(1) MFC changes together.
procstat_kstack.c:1.3, procstat_threads.c:1.3, procstat_vm.c:1.2 from
HEAD to RELENG_7:
WARNS fixes: mainly constness and avoid comparing signed with
unsigned by making array indicies unsigned. Also note one or two
unused parameters.
kern_sync.c:1.305, proc.h:1.499 from HEAD to RELENG_7:
Don't zero td_runtime when billing thread CPU usage to the process;
maintain a separate td_incruntime to hold unbilled CPU usage for
the thread that has the previous properties of td_runtime.
When thread information is requested using the thread monitoring
sysctls, export thread td_runtime instead of process rusage runtime
in kinfo_proc.
This restores the display of individual ithread and other kernel
thread CPU usage since inception in ps -H and top -SH, as well for
libthr user threads, valuable debugging information lost with the
move to try kthreads since they are no longer independent processes.
There is universal agreement that we should rewrite the process and
thread export sysctls, but this commit gets things going a bit
better in the mean time. Likewise, there are resevations about the
continued validity of statclock given the speed of modern processors.
Reviewed by: attilio, emaste, jhb, julian
Note: in MFC, td_incruntime is added to the end of struc thread,
rather than the pre-zero'd section, and manually zero'd on thread
creation, in order to avoid a negative ABI impact for third-party
kernel modules.
In "show lockedvnods" DDB command, use db_printf() rather than printf()
so that the results end up in the DDB output stream rather than the
console output stream.
This should likely also be done for the vprint() function it calls.
Return ESRCH when a kernel stack is queried on a process in execve() --
p_candebug() will return EAGAIN which, if the other process never
leaves execve(), will result in the sysctl spinning and never returning
to userspace. Processes should always eventually leave execve(), but
spinning in kernel while we wait is bad for countless reasons, and
particularly harmful if execve() itself is deadlocked.
Possibly we should return another error, or return a marker indicating
the thread is in execve() so it can be reported that way in userspace.
Reported by: kris
and procstat_files.c:1.2 from HEAD to RELENG_7:
Add 'COMM' column to a few more output modes of procstat(1). The only
one it's missing from is the VM display, where there's really not room,
and the file output display is looking quite cramped.
Use m_collapse(9) to collapse mbuf chains instead of relying on
shortest possible chain of mbufs of m_defrag(9). What we want is
chains of mbufs that can be safely stored to a Tx descriptor which
can have up to STGE_MAXTXSEGS mbufs. The ethernet controller does
not need to align Tx buffers on 32bit boundary. So the use of
m_defrag(9) was waste of time.
Implement WOL capability.
- Turn on WOL bits in suspend/shutdown method.
- WOL is disabled in resume routine as WOL can interfere normal
Rx operation.
- Move stge_reset() to stge_init_locked() as resetting hardware
clears configured Rx information which in turn results in
non-working Rx module after suspend/shutdown operation.
o vr(4) repocopied from sys/pci to sys/dev/vr.
Teach vr(4) to use bus_dma(9) and major overhauling to handle link
state change and reliable error recovery.
o Moved vr_softc structure and relevant macros to header file.
o Use PCIR_BAR macro to get BARs.
o Implemented suspend/resume methods.
o Implemented automatic Tx threshold configuration which will be
activated when it suffers from Tx underrun. Also Tx underrun
will try to restart only Tx path and resort to previous
full-reset(both Rx/Tx) operation if restarting Tx path have failed.
o Removed old bit-banging MII interface. Rhine provides simple and
efficient MII interface. While I'm here show PHY address and PHY
register number when its read/write operation was failed.
o Define VR_MII_TIMEOUT constant and use it in MII access routines.
o Always honor link up/down state reported by mii layers. The link
state information is used in vr_start() to determine whether we
got a valid link.
o Removed vr_setcfg() which is now handled in vr_link_task(), link
state taskqueue handler. When mii layer reports link state changes
the taskqueue handler reprograms MAC to reflect negotiated duplex
settings. Flow-control changes are not handled yet and it should
be revisited when mii layer knows the notion of flow-control.
o Added a new sysctl interface to get statistics of an instance of
the driver.(sysctl dev.vr.0.stats=1)
o Chip name was renamed to reflect the official name of the chips
described in VIA Rhine I/II/III datasheet.
REV_ID_3065_A -> REV_ID_VT6102_A
REV_ID_3065_B -> REV_ID_VT6102_B
REV_ID_3065_C -> REV_ID_VT6102_C
REV_ID_3106_J -> REV_ID_VT6105_A0
REV_ID_3106_S -> REV_ID_VT6105M_A0
The following chip revisions were added.
#define REV_ID_VT6105_B0 0x83
#define REV_ID_VT6105_LOM 0x8A
#define REV_ID_VT6107_A0 0x8C
#define REV_ID_VT6107_A1 0x8D
#define REV_ID_VT6105M_B1 0x94
o Always show chip revision number in device attach. This shall help
identifying revision specific issues.
o Check whether EEPROM reloading is complete by inspecting the state
of VR_EECSR_LOAD bit. This bit is self-cleared after the EEPROM
reloading. Previously vr(4) blindly spins for 200us which may/may
not enough to complete the EEPROM reload.
o Removed if_mtu setup. It's done in ether_ifattach().
o Use our own callout to drive watchdog timer.
o In vr_attach disable further interrupts after reset. For VT6102 or
newer hardwares, diable MII state change interrupt as well because
mii state handling is done by mii layer.
o Add more sane register initialization for VT6102 or newer chips.
- Have NIC report error instead of retrying forever.
- Let hardware detect MII coding error.
- Enable MODE10T mode.
- Enable memory-read-multiple for VT6107.
o PHY address for VT6105 or newer chips is located at fixed address 1.
For older chips the PHY address is stored in VR_PHYADDR register.
Armed with these information, there is no need to re-read
VR_PHYADDR register in miibus handler to get PHY address. This
saves one register access cycle for each MII access.
o Don't reprogram VR_PHYADDR register whenever access to a register
located at a PHY address is made. Rhine fmaily allows reprogramming
PHY address location via VR_PHYADDR register depending on
VR_MIISTAT_PHYOPT bit of VR_MIISTAT register. This used to lead
numerous phantom PHYs attached to miibus during phy probe phase and
driver used to limit allowable PHY address in mii register accessors
for certain chip revisions. This removes one more register access
cycle for each MII access.
o Correctly set VLAN header length.
o bus_dma(9) conversion.
- Limit DMA access to be in range of 32bit address space. Hardware
doesn't support DAC.
- Apply descriptor ring alignment requirements(16 bytes alignment)
- Apply Rx buffer address alignment requirements(4 bytes alignment)
- Apply Tx buffer address alignment requirements(4 bytes alignment)
for Rhine I chip. Rhine II or III has no Tx buffer address
alignment restrictions, though.
- Reduce number of allowable number of DMA segments to 8.
- Removed the atomic(9) used in descriptor ownership managements
as it's job of bus_dmamap_sync(9).
With these change vr(4) should work on all platforms.
o Rhine uses two separated 8bits command registers to control Tx/Rx
MAC. So don't access it as a single 16bit register.
o For non-strict alignment architectures vr(4) no longer require
time-consuming copy operation for received frames to align IP
header. This greatly improves Rx performance on i386/amd64
platforms. However the alignment is still necessary for
strict-alignment platforms(e.g. sparc64). The alignment is handled
in new fuction vr_fixup_rx().
o vr_rxeof() now rejects multiple-segmented(fragmented) frames as
vr(4) is not ready to handle this situation. Datasheet said nothing
about the reason when/why it happens.
o In vr_newbuf() don't set VR_RXSTAT_FIRSTFRAG/VR_RXSTAT_LASTFRAG
bits as it's set by hardware.
o Don't pass checksum offload information to upper layer for
fragmented frames. The hardware assisted checksum is valid only
when the frame is non-fragmented IP frames. Also mark the checksum
is valid for corrupted frames such that upper layers doesn't need
to recompute the checksum with software routine.
o Removed vr_rxeoc(). RxDMA doesn't seem to need to be idle before
sending VR_CMD_RX_GO command. Previously it used to stop RxDMA
first which in turn resulted in long delays in Rx error recovery.
o Rewrote Tx completion handler.
- Always check VR_TXSTAT_OWN bit in status word prior to
inspecting other status bits in the status word.
- Collision counter updates were corrected as VT3071 or newer
ones use different bits to notify collisions.
- Unlike other chip revisions, VT86C100A uses different bit to
indicate Tx underrun. For VT3071 or newer ones, check both
VR_TXSTAT_TBUFF and VR_TXSTAT_UDF bits to see whether Tx
underrun was happend. In case of Tx underrun requeue the failed
frame and restart stalled Tx SM. Also double Tx DMA threshold
size on each failure to mitigate future Tx underruns.
- Disarm watchdog timer only if we have no queued packets,
otherwise don't touch watchdog timer.
o Rewrote interrupt handler.
- status word in Tx/Rx descriptors indicates more detailed error
state required to recover from the specific error. There is no
need to rely on interrupt status word to recover from Tx/Rx
error except PCI bus error. Other event notifications like
statistics counter overflows or link state events will be
handled in main interrupt handler.
- Don't touch VR_IMR register if we are in suspend mode. Touching
the register may hang the hardware if we are in suspended state.
Previously it seems that touching VR_IMR register in interrupt
handler was to work-around panic occurred in system shutdown
stage on SMP systems. I think that work-around would hide
root-cause of the panic and I couldn't reproduce the panic
with multiple attempts on my box.
o While padding space to meet minimum frame size, zero the pad data
in order to avoid possibly leaking sensitive data.
o Rewrote vr_start_locked().
- Don't try to queue packets if number of available Tx descriptors
are short than that of required one.
o Don't reinitialize hardware whenever media configuration is
changed. Media/link state changes are reported from mii layer if
this happens and vr_link_task() will perform necessary changes.
o Don't reinitialize hardware if only PROMISC bit was changed. Just
toggle the PROMISC bit in hardware is sufficient to reflect the
request.
o Rearrganed the IFCAP_POLLING/IFCAP_HWCSUM handling in vr_ioctl().
o Generate Tx completion interrupts for every VR_TX_INTR_THRESH-th
frames. This reduces Tx completion interrupts under heavy network
loads.
o Since vr(4) doesn't request Tx interrupts for every queued frames,
reclaim any pending descriptors not handled in Tx completion
handler before actually firing up watchdog timeouts.
o Added vr_tx_stop()/vr_rx_stop() to wait for the end of active
TxDMA/RxDMA cycles(draining). These routines are used in vr_stop()
to ensure sane state of MAC before releasing allocated Tx/Rx
buffers. vr_link_task() also takes advantage of these functions to
get to idle state prior to restarting Tx/Rx.
o Added vr_tx_start()/vr_rx_start() to restart Rx/Tx. By separating
Rx operation from Tx operation vr(4) no longer need to full-reset
the hardware in case of Tx/Rx error recovery.
o Implemented WOL.
o Added VT6105M specific register definitions. VT6105M has the
following hardware capabilities.
- Tx/Rx IP/TCP/UDP checksum offload.
- VLAN hardware tag insertion/extraction. Due to lack of information
for getting extracted VLAN tag in Rx path, VLAN hardware support
was not implemented yet.
- CAM(Content Addressable Memory) based 32 entry perfect multicast/
VLAN filtering.
- 8 priority queues.
o Implemented CAM based 32 entry perfect multicast filtering for
VT6105M. If number of multicast entry is greater than 32, vr(4)
uses traditional hash based filtering.
o Reflect real Tx/Rx descriptor structure. Previously vr(4) used to
embed other driver (private) data into these structure. This type
of embedding make it hard to work on LP64 systems.
o Removed unused vr_mii_frame structure and MII bit-baning
definitions.
o Added new PCI configuration registers that controls mii operation
and mode selection.
o Reduced number of Tx/Rx descriptors to 128 from 256. From my
testing, increasing number of descriptors above than 64 didn't help
increasing performance at all. Experimentations show 128 Rx
descriptors seems to help a lot reducing Rx FIFO overruns under
high system loads. It seems the poor Tx performance of Rhine
hardwares comes from the limitation of hardware. You wouldn't
satuarte the link with vr(4) no matter how fast CPU/large number of
descriptors are used.
o Added vr_statistics structure to hold various counter values.
Add a new function is_default_interface() which determines if this
interface is one with the default route (or there isn't one). Use it to
decide if we should adjust the default route and /etc/resolv.conf.
Fix the delete of the default route. The if statement was totally bogus
and the delete only worked due to a typo. [1]
Reported by: Jordan Coleman <jordan at JordanColeman dot com> [1]
Check for P_WEXIT before PHOLD() on a process in kstack and vm query
sysctls, as PHOLD() asserts !P_WEXIT.
Reported by: Michael Plass <mfp49_freebsd at plass-family dot net>
RELENG_7:
Display per-thread command line in TDNAME field for -k and -t; if
no per-thread name is available or the name is identical to the
process name, display "-" instead. Very slightly shrink the COMM
entry to make a bit more room, although this doesn't help with
stack traces much.
Suggested by: thompsa
When a symbol name can't be resolved, return "??" as the name, rather
than "Unknown func", in order to avoid putting spaces in what ideally
is a string separated by white space.
procstat_args.c:1.1, procstat_basic.c:1.1, procstat_bin.c:1.1,
procstat_cred.c:1.1, procstat_files.c:1.1, procstat_kstack.c:1.1,
procstat_threads.c:1.1, and procstat_vm.c:1.1 from HEAD to RELENG_7:
Add procstat(1), a process inspection utility. This provides both some
of the missing functionality from procfs(4) and new functionality for
monitoring and debugging specific processes. procstat(1) operates in
the following modes:
-b Display binary information for the process.
-c Display command line arguments for the process.
-f Display file descriptor information for the process.
-k Display the stacks of kernel threads in the process.
-s Display security credential information for the process.
-t Display thread information for the process.
-v Display virtual memory mappings for the process.
Further revision and modes are expected.
Testing, ideas, etc: cognet, sam, Skip Ford <skip at menantico dot com>
Wesley Shields <wxs at atarininja dot org>
RELENG_7:
Add another new sysctl in support of the forthcoming procstat(1) to
support its -k argument:
kern.proc.kstack - dump the kernel stack of a process, if debugging
is permitted.
This sysctl is present if either "options DDB" or "options STACK" is
compiled into the kernel. Having support for tracing the kernel
stacks of processes from user space makes it much easier to debug
(or understand) specific wmesg's while avoiding the need to enter
DDB in order to determine the path by which a process came to be
blocked on a particular wait channel or lock.
date: 2008/03/07 00:01:19; author: delphij; state: Exp; lines: +61 -68
Merge revisions 1.10 and 1.11 from DragonFly:
- Use real getopt() handling instead of the hand-rolled and
IOCCC-worthy "Micro getopt()" macros, plus clean up to the
option handling code:
* Sort the options in the switch statement;
* Plug piddling memory leaks when processing repeated options
by freeing strings before allocating them for a second time;
* Die with a fatal error if the requested report file cannot
be opened for appending;
* Don't call init() before usage() (to prevent the usage
message being mangled by changes to the terminal settings;)
- Clean up the usage message, both in usage() and in the main
program comment, both stylistically (sort and combine options)
and for accuracy (following the manual page, make note of the -s
and -S flags, and use the term 'send' instead of 'say' to reduce
confusion (SAY is the name of a command for output to the user,
not the connection.))
Obtained from: DragonFly
amd64/conf/GENERIC:1.489, amd64/include/stack.h:1.1, arm/db_trace.c:1.14,
arm/stack_machdep.c:1.1, arm/include/stack.h:1.1, NOTES:1.1457,
files:1.1254, files.amd64:1.115, files.arm:1.19, files.i386:1.588,
files.ia64:1.94, files.powerpc:1.67, files.sparc64:1.93, files.sun4v:1.13,
options:1.610, i386/conf/GENERIC:1.478, i386/db_trace.c:1.80,
i386/stack_machdep.c:1.1, i386/include/stack.h:1.1, ia64/conf/GENERIC:1.93,
ia64/db_machdep.c:1.6, ia64/stack_machdep.c:1.1, kern/subr_stack.c:1.5,
pc98/conf/GENERIC:1.299, powerpc/conf/GENERIC:1.73,
powerpc/include/stack.h:1.1, powerpc/db_trace.c:1.14,
powerpc/stack_machdep.c:1.1, sparc64/conf/GENERIC:1.129,
sparc64/include/stack.h:1.1, sparc64/db_trace.c:1.27,
sparc64/stack_machdep.c:1.1, sun4v/conf/GENERIC:1.16,
sun4v/include/stack.h:1.1, sun4v/db_trace.c:1.2, sun4v/stack_machdep.c:1.1,
sys/stack.h:1.4 from HEAD to RELENG_7:
Break out stack(9) from ddb(4):
- Introduce per-architecture stack_machdep.c to hold stack_save(9).
- Introduce per-architecture machine/stack.h to capture any common
definitions required between db_trace.c and stack_machdep.c.
- Add new kernel option "options STACK"; we will build in stack(9) if it
is defined, or also if "options DDB" is defined to provide
compatibility with existing users of stack(9).
Add new stack_save_td(9) function, which allows the capture of a
stacktrace of another thread rather than the current thread, which the
existing stack_save(9) was limited to. It requires that the thread be
neither swapped out nor running, which is the responsibility of the
consumer to enforce.
Update stack(9) man page.
Build tested: amd64, arm, i386, ia64, powerpc, sparc64, sun4v
Runtime tested: amd64 (rwatson), arm (cognet), i386 (rwatson)
Merge i386/stack_machdep.c:1.2 from HEAD to RELENG_7:
Remove duplicate $FreeBSD$ tag.
Merge files.pc98:1.359, pc98/include/stack.h:1.1 from HEAD to RELENG_7:
Catch up pc98 for i386 stack(9) changes:
Add stub stack.h for pc98 that includes i386 pc98.
Add i386 stack_machdep.c to files.pc98.
Spotted by: tinderbox
user.h:1.71 from HEAD to RELENG_7:
Add two new sysctls in support of the forthcoming procstat(1) to support
its -f and -v arguments:
kern.proc.filedesc - dump file descriptor information for a process, if
debugging is permitted, including socket addresses, open flags, file
offsets, file paths, etc.
kern.proc.vmmap - dump virtual memory mapping information for a process,
if debugging is permitted, including layout and information on
underlying objects, such as the type of object and path.
These provide a superset of the information historically available
through the now-deprecated procfs(4), and are intended to be exported
in an ABI-robust form.
stack.h:1.3, redzone.c:1.2 from HEAD to RELENG_7:
Modify stack(9) stack_print() and stack_sbuf_print() routines to use new
linker interfaces for looking up function names and offsets from
instruction pointers. Create two variants of each call: one that is
"DDB-safe" and avoids locking in the linker, and one that is safe for
use in live kernels, by virtue of observing locking, and in particular
safe when kernel modules are being loaded and unloaded simultaneous to
their use. This will allow them to be used outside of debugging
contexts.
Modify two of three current stack(9) consumers to use the DDB-safe
interfaces, as they run in low-level debugging contexts, such as inside
lockmgr(9) and the kernel memory allocator.
Update man page.
The kernel linker includes a number of utility functions to look up symbol
information in support of DDB(4); these functions bypass normal linker
locking as they may run in contexts where locking is unsafe (such as the
kernel debugger).
Add a new interface linker_ddb_search_symbol_name(), which looks up a
symbol name and offset given an address, and also
linker_search_symbol_name() which does the same but *does* follow the
locking conventions of the linker.
Unlike existing functions, these functions place the name in a
caller-provided buffer, which is stable even after linker locks have been
released. These functions will be used in upcoming revisions to stack(9)
to support kernel stack trace generation in contexts as part of a live,
rather than suspended, kernel.
audit_private.h:1.17 from HEAD to RELENG_7:
Rename several audit functions in the global kernel symbol namespace to
have audit_ on the front:
- canon_path -> audit_canon_path
- msgctl_to_event -> audit_msgctl_to_event
- semctl_to_event -> audit_semctl_to_event
Note that audit.c:1.38 is not merged as changes it depends on have also not
yet been merged.
- Simplify the error handling
- Nuke licence clause 3 & 4
- Drop frames to any of the reserved multicast addresses
- Remove duplicated code for testing local packets.
that we can remove the file as early as possible, but shut up nextboot at this
moment if the operation is failed, because /boot is not necessarily a part of /;
the newly added second run is placed in rc.d/mountlate after all filesystems were
mounted.
Bring the DIAGNOSTICS section in ed.4 closer to reality by removing missing
diagnostic messages and adding a few found in the code.
PR: 51891
Properly Xref device.hints(5).
Sync with rev 1.63 of NetBSD's ums.c:
If a mouse has both a wheel and a Z direction we report both.
XXX Due to tradition the wheel is reported as the Z direction (and the Z
direction as W).
Now Apple's Mighty Mouse is fully supported, except the X11 mouse driver
doesn't know what to do with the new coordinate.
Calling RequestSupplementAdapterInfo before RequestAdapterInfo appears
to trip a bug causing the latter to return a zeroed struct
aac_adapter_info. This causes two issues. One is cosmetic only --
a verbose boot prints information about the controller, and shows all
zero:
aac0: Unknown processor 0MHz, 0MB memory (0MB cache, 0MB execution),
unknown battery platform
The second problem is that the firmware version information is stored
away for aac_rev_check, for userland tools (like aaccli) to query via
the FSACTL_MINIPORT_REV_CHECK and FSACTL_LNX_MINIPORT_REV_CHECK ioctls.
When aaccli encounters this issue it prints
Command Error: <The current AFAAPI.DLL is too old to work with the
current controller software.>
Move the RequestSupplementAdapterInfo call after RequestAdapterInfo,
which seems to fix both problems.
imp@ has already done this in HEAD, refer to revision 1.476 of
i386/conf/GENERIC and revision 1.486 of amd64/conf/GENERIC. It seems only fair
to do the same in RELENG_7.
Discussed with: imp
Approved by: re (bmah, kensmith)
Rather than copying out the full audit trigger record, which includes
a queue entry field, just copy out the unsigned int that is the trigger
message. In practice, auditd always requested sizeof(unsigned int), so
the extra bytes were ignored, but copying them out was not the intent.
Replace somewhat awkward audit trail rotation scheme, which involved the
global audit mutex and condition variables, with an sx lock which protects
the trail vnode and credential while in use, and is acquired by the system
call code when rotating the trail. Previously, a "message" would be sent
to the kernel audit worker, which did the rotation, but the new code is
simpler and (hopefully) less error-prone.
Obtained from: TrustedBSD Project
rev. 1.277 of sys/kern/vfs_mount.c
rev. 1.332 of sys/sys/vnode.h
rev. 1.222 of sys/ufs/ffs/ffs_softdep.c
Yield the cpu in the kernel while iterating the list of the
vnodes belonging to the mountpoint. Also, yield when in the
softdep_process_worklist() even when we are not going to sleep due to
buffer drain.
Fix a buffer overflow in the processing of various SCSI commands. This
likely fixes a great number of weird problems that have been reported
with this driver.
Use the new command file feature of ddb(8) to support setting ddb(4)
scripts at boot. This is currently disabled by default. /etc/ddb.conf
contains some potentially reasonable default scripts.
PR: conf/119995
Submitted by: Scot Hetzel <swhetzel at gmail dot com> (Earlier version)
- Switch from timeval to bintime, to use 1/(2^20) of seconds instead of
microseconds. It allows to use bit shifts instead of some heavy 64bit
mul/div math operations.
- Account all node stats at the shape mode.
- Do not check destination hook presence, it will be done by netgraph.
- Use u_int instead of int in some places to simplify type conversions.
- Use NG_SEND_DATA_ONLY() macro instead of selfmade equivalent.
Add a /S mode to DDB "ex" command, which interprets and prints the
value at the requested address as a symbol. For example, "ex /S
aio_swake" prints the name of the function currently registered in
via aio_swake hook.
The change as committed differs slightly from the patch in the PR,
as I force the size of the retrieved value (and the automatic
address increment) to be sizeof(void *). This seems to provide
the most useful auto-increment behavior, and defaults using the
default size (4), which is not sizeof(void *) on 64-bit platforms.
PR: 57976
Submitted by: Dan Strick <strick at covad.net>
Use dump_write() instead of direct calls to di->dumper() in textdumps.
Textdumps already do pretty much the same sanity checking, but
abstractions and seatbelts are both useful.
Allow DDB_CAPTURE_DEFAULTBUFSIZE and DDB_CAPTURE_MAXBUFSIZE to be
overridden at compile-time using kernel options of the same names.
Rather than doing a compile-time CTASSERT of buffer sizes being
even multiples of block sizes, just adjust them at boottime, as
the failure mode is more user-friendly.
MFC after: 2 months
PR: 119993
Suggested by: Scot Hetzel <swhetzel at gmail dot com>
Some PS/2 mice (at least the A4Tech X-7xx) need to be set to Intelli mode
first before they can be set to Explorer mode.
PR: kern/118578
Submitted by: Andriy Gapon <[email protected]> (I added some comments)
Reviewed by: philip
Import uslcom(4) from OpenBSD - this is a driver for Silicon Laboratories
CP2101/CP2102 based USB serial adapters.
Reviewed by: imp, emaste
Obtained from: OpenBSD
Rename DB_ constants in db_capture.c to DDB_ so that when they are
exposed as kernel compile options, they have more meaningful names.
PR: 119993
MFC after: 2 months
Suggested by: Scot Hetzel <swhetzel at gmail dot com>
Teach savecore(8) how to extract textdump(4) dumps.
Update savecore(8) man page to reflect textdump additions.
Merge savecore.c:1.80 from HEAD to RELENG_7:
Compare kernel dump header magic with textdump magic using strncmp()
rather than the memcmp() which is used for regular dumps: the
textdump string is one character shorter, so we need to stop
comparing at the end of the string.
Use independent version checking logic for architecture-specific
version number vs. textdump version number, as the version sequences
may (someday) differ.
Run into by: rrs
Add textdump(4) man page to describe the textdump facility and provide
some stock formulas for use.
Update ddb(4) to reference the textdump(4) page, list the textdump
commands, and suggest using them with scripts and output capture.
Update HISTORY section.
Hook up textdump(4) to build.
db_textdump.c:1.1, ddb.h:1.46, kern_shutdown.c:1.187 from HEAD to
RELENG_7:
Add textdump(4) facility, which provides an alternative form of kernel
dump using mechanically generated/extracted debugging output rather than
a simple memory dump. Current sources of debugging output are:
- DDB output capture buffer, if there is captured output to save
- Kernel message buffer
- Kernel configuration, if included in kernel
- Kernel version string
- Panic message
Textdumps are stored in swap/dump partitions as with regular dumps, but
are laid out as ustar files in order to allow multiple parts to be stored
as a stream of sequentially written blocks. Blocks are written out in
reverse order, as the size of a textdump isn't known a priori. As with
regular dumps, they will be extracted using savecore(8).
One new DDB(4) command is added, "textdump", which accepts "set",
"unset", and "status" arguments. By default, normal kernel dumps are
generated unless "textdump set" is run in order to schedule a textdump.
It can be canceled using "textdump unset" to restore generation of a
normal kernel dump.
Several sysctls exist to configure aspects of textdumps;
debug.ddb.textdump.pending can be set to check whether a textdump is
pending, or set/unset in order to control whether the next kernel dump
will be a textdump from userspace.
While textdumps don't have to be generated as a result of a DDB script
run automatically as part of a kernel panic, this is a particular useful
way to use them, as instead of generating a complete memory dump, a
simple transcript of an automated DDB session can be captured using the
DDB output capture and textdump facilities. This can be used to
generate quite brief kernel bug reports rich in debugging information
but not dependent on kernel symbol tables or precisely synchronized
source code. Most textdumps I generate are less than 100k including
the full message buffer. Using textdumps with an interactive debugging
session is also useful, with capture being enabled/disabled in order to
record some but not all of the DDB session.
aac.c 1.134, aac_disk.c 1.45, aacreg.h 1.25, aacvar.h 1.51:
Add 64-bit array support for RAIDs > 2TB. This corresponds to ~ Adaptec
driver build 15317.
Tested on:
Adaptec 2230S, Firmware 4.2-0 (8205)
ICP ICP5085BL, Firmware 5.2-0 (12814)
aac.c 1.136, aac_ioctl.h 1.13:
Implement FSACTL_LNX_GET_FEATURES and FSACTL_GET_FEATURES ioctls. RAID
tools (e.g. arcconf) need this to be able to create arrays larger than 2TB.
Submitted by: Adaptec, via driver build 15317
The RELENG_7 and HEAD drivers are in sync as of this commit.
aac.c 1.131:
Diff reduction to Adaptec driver build 15317 (refactoring and code shuffling):
- Resource allocation in aac_alloc (moved from from aac_init)
- Interrupt setup in aac_setup_intr (from aac_attach)
- Container probing in aac_get_container_info (from aac_startup and
aac_handle_aif)
- Firmware status check moved to aac_check_firmware from aac_init
aac.c 1.132, aac_cam.c 1.31, aad_debug.c 1.24, aac_disk.c 1.44,
aac_pci.c 1.67, aacvar.h 1.50:
Diff reduction to Adaptec's driver (around build 15317): catch up with a
change in debugging routines.
The fwprintf macro in the AAC_DEBUG case (mapping to printf) isn't from the
Adaptec driver.
aac.c 1.135:
Add \n to the end of a printf string and remove it from panic strings.
Define a new kernel dump "architecture", TEXTDUMPMAGIC, which is used
to identify textdumps in the swap/dump partition. While textdumps
aren't really an architecture, they are architecture-neutral and so
don't really correspond to any existing architecture.
Define a version number for textdumps, KERNELDUMP_TEXT_VERSION, of 1.
ddb.h:1.1, ddb_script.c:1.1 from HEAD to RELENG_7:
Add command-line tool ddb(8), which allows DDB(4) scripts to be
managed from userspace. It is largely a wrapper for sysctl()
calls, but because the sysctls for adding and removing scripts
are awkward to use directly, this provides an easier-to-use
interface.
db_lex.h:1.15, db_main.c:1.7, db_script.c:1.1-1.2, ddb.h:1.45 from HEAD
to RELENG_7:
Add a simple scripting facility to DDB(4), allowing the user to
define a set of named scripts. Each script consists of a list of DDB
commands separated by ";"s that will be executed verbatim. No higher
level language constructs, such as branching, are provided for:
scripts are executed by sequentially injecting commands into the DDB
input buffer.
Four new commands are present in DDB: "run" to run a specific script,
"script" to define or print a script, "scripts" to list currently
defined scripts, and "unscript" to delete a script, modeled on shell
alias commands. Scripts may also be manipulated using sysctls in the
debug.ddb.scripting MIB space, although users will prefer to use the
soon-to-be-added ddb(8) tool for usability reasons.
Scripts with certain names are automatically executed on various DDB
events, such as entering the debugger via a panic, a witness error,
watchdog, breakpoint, sysctl, serial break, etc, allowing customized
handling.
Remove duplicate $FreeBSD$ that snuck in.
uart_dev_at91usart.c:1.13, scsi_low.h:1.9, subr_ntoskrnl.c:1.94,
OsdDebug.c:1.14, dcons_os.c:1.20, ofw_consle.c:1.37,
dev/sio.c:1.473, syscons.c:1.454, uart_core.c:1.23,
union_subr.c:1.96, i386/machdep.c:1.664, i386/mp_watchdog.c:1.6,
ia64/machdep.c:1.228, kern_clock.c:1.206, kern_shutdown.c:1.186,
subr_kdb.c:1.25, subr_witness.c:1.239, vfs_subr.c:1.711,
ng_base.c:1.140, cbus/sio.c:1.247, pc98/machdep.c:1.399,
aim/machdep.c:1.107, pswitch.c:1.7, mac_test.c:19.3,
psycho.c:1.73, sparc64/machdep.c:1.140, sparc64/trap.c:1.89,
hvcons.c:1.7, sun4v/machdep.c:1.17, sun4v/trap.c:1.17, kdb.h:1.6
from HEAD to RELENG_7:
Add a new 'why' argument to kdb_enter(), and a set of constants to use
for that argument. This will allow DDB to detect the broad category of
reason why the debugger has been entered, which it can use for the
purposes of deciding which DDB script to run.
Assign approximate why values to all current consumers of the
kdb_enter() interface.
For ABI/KPI reasons, the MFC creates a new function, kdb_enter_why(),
with the new argument, updating existing consumers to use that,
preserving kdb_enter() with the current argument, and wrapping it around
kdb_enter_why().
Rewrite node to support multiple hooks, alike to ng_l2tp, to use one pair
of pptpgre and ksocket nodes for all calls between two peers. This patch
modifies node's API by adding new "session_%04x" hook names support, while
keeping backward compatibility.
stdio.h: 1.61
Allow an application to define FOPEN_MAX (like we allow for OPEN_MAX
in sys/syslimits.h).
awk/Makefile: 1.17
Allow awk to handle 64 files instead of just 20.
Import change from KAME, rev. 1.362 kame/kame/sys/netkey/key.c
In case of "new SA", we must check the hard lifetime of the old SA
to find out if it is not permanent and we can delete it.
Document the removal data for usbdevs.h and usbdevs_data.h,
sort the entry into it's correct place (behind 200407XX before
200406XX because we have an explicit date here).
PR: misc/122098
Submitted by: "John Hein" <[email protected]>
MFC after: 3 days
Approved by: imp (mentor, implicit)
In route.c in newroute() there's a call to exit(0) if the command was
'get'. Since rtmsg() always gets called and returns 0 on success and -1
on failure, it's possible to exit with a suitable exit code by calling
exit(ret != 0) instead, as is done at the end of newroute().
PR: bin/112303
Submitted by: [email protected]
MFC after: 1 week
Approved by: imp (mentor, implicit)
MFC rev. 1.3 of sys/compat/linux/linux_futex.h:
o Add stub support for some new futex operations,
so the annoying message is not printed.
o Don't warn about FUTEX_FD not being implemented
and return ENOSYS instead of 0 (eg. success).
o Clear FUTEX_PRIVATE_FLAG as we actually implement
only private futexes so there is no reason to
return ENOSYS when app asks for a private futex.
We don't reject shared futexes because they worked
just fine with our implementation so far.
Approved by: kib (mentor)
Tested by: bsam
aac.c r1.129 aac_ioctl.h r1.12:
Add ioctls FSACTL_SEND_LARGE_FIB, FSACTL_SEND_RAW_SRB,
FSACTL_LNX_SEND_LARGE_FIB, and FSACTL_LNX_SEND_RAW_SRB, and correct size
checks on FIBs passed in from userspace. Both changes were obtained from
Adaptec's driver build 15317. Adaptec's commandline RAID tool arcconf uses
these ioctls when creating a RAID-10 array (and probably other operations
too).
aac.c r1.130:
Restore creation of passthrough devices with newer controller firmware by
putting the correct size in the fib header. Presumably the older firmware
silently ignored a bad size field.
(This change tested with a 3805 controller. Passthrough devices were
created when running firmware build 12814, but not 15323 or later. With
this change they're created for both old and new firmware versions.)
Submitted by: Adaptec
rev. 1.682 of sys/amd64/amd64/machdep.c
rev. 1.16 of sys/amd64/ia32/ia32_signal.c
rev. 1.33 of sys/amd64/linux32/linux32_sysvec.c
rev. 1.666 of sys/i386/i386/machdep.c
rev. 1.152 of sys/i386/linux/linux_sysvec.c
rev. 1.39 of sys/i386/svr4/svr4_machdep.c
rev. 1.402 of sys/pc98/pc98/machdep.c
Modify the signal handler frame setup code to clear the DF {e,r}flags
bit on the amd64/i386 for the signal handlers.
db_main.c:1.6, db_output.c:1.38, ddb.h:1.44 from HEAD to RELENG_7:
Add a new DDB(4) facility, output capture. Input and output from DDB
may be captured to a memory buffer for later inspection using sysctl(8),
or in the future, to a textdump.
A new DDB command, "capture", is added, which accepts arguments "on",
"off", "reset", and "status".
A new DDB sysctl tree, debug.ddb.capture, is added, which can be used to
resize the capture buffer and extract buffer contents.
- Check device masks and bypass printing headers if capable device does
not exist. /etc/rc.d/mixer tried to restore non-existent recording
source because /var/var/db/mixer*-state contains '=rec' for example.
- Remove hardcoded mixer2 and mixer3 and do the right thing.
- Replace getopt(3) with hand-rolled option parser. It was not able
to handle 'mixer -rec mic' although it is a valid command.
- Make '-s' and '-S' mutualy exclusive as mixer(8) says.
- Do not re-read recording source unless it has been modified.
- Clean up code and fix style(9) nits.
Prefer clock_gettime(2) over gettimeofday(2) and use CLOCK_MONOTONIC_FAST.
It is only used to track elapsed time and it does not have to be precise.
Fix compiler warnings and style(9) bugs.
Separate SDP parameters data structures for the BNEP based profiles.
Generalize Service Availability SDP parameter creation.
Add mandatory "security description" SDP parameter to the PANU profile
Pointed-out by: Iain Hibbert < plunky at rya-online dot net >
Make sysctl_kern_arnd return a random buffer instead of a random long,
as it is expected by userland (stack protector guard setup for example).
PR: 119129
Approved by: rwatson (mentor)
MFC after: 1 month
rev. 1.24 of sys/fs/devfs/devfs_rule.c
rev 1.218 of sys/vm/vm_mmap.c
Do not dereference cdev->si_cdevsw, use the dev_refthread() to properly
obtain the reference.
rev. 1.210 of sys/kern/kern_conf.c
rev. 1.236 of sys/sys/conf.h
Fix two races in the handling of the d_gianttrick for the D_NEEDGIANT
drivers.
Do not free the memory allocated for the gianttrick cdevsw while holding
the dev_mtx.
Replace reference from vinum.8 to gvinum.8, it was advised in the PR to
replace this with vinum.4, but that's the kernel interface manual, which
is not appropriate in my understanding. I think that gvinum is a suitable
replacement for this.
PR: docs/121938
Submitted by: "Federico" <federicogalvezdurand at yahoo dot com>
MFC after: 3 days
Alert properly when we have stale mounts left after interupting
a tinybsd build. If we do not do this, we can accidentally remove
critical files from directories like /lib (if mounted).
PR: misc/121763
Submitted by: Richard Arends < richard at unixguru dot nl >
MFC after: 3 days
Approved by: imp (mentor, implicit)
Correct IPsec behaviour with a 'use' level in SP but no SA available.
In that case return an continue processing the packet without IPsec.
PR: 121384
Reported by: Cyrus Rahman (crahman gmail.com)
Tested by: Cyrus Rahman (crahman gmail.com) [slightly older version]
Remove the "Fast " from the
"Fast IPsec: Initialized Security Association Processing." printf.
People kept asking questions about this after the IPsec shuffle.
This still is the Fast IPsec implementation so no worries that it would
be any slower now. There are no functional changes.
Correct reference counting on the SP for outgoing IPv6 IPsec connections.
PR: 121374
Reported by: Cyrus Rahman (crahman gmail.com)
Tested by: Cyrus Rahman (crahman gmail.com)
#if 0 out a currently unsued (and incomplete) function: ip6_ipsec_mtu().
No need to compile 'dead' code.
I am leaving it in because we will have to review the concept and
should use the common function in various places.
The check for errors from the mount command did not work as
intended because another command (echo) is executed between
the mount command and the check.
Reported by: Sergey Baturov <[email protected]>
Add session ID hashing to speedup incoming packets dispatch in case
of many connections working via the same tunnel. For example, in case
of full "client <-> LAC <-> LNS" setup.
Move setting of MNTK_MPSAFE flag before UFS1 extended attribute
auto-start so that the flag is set before we start performing I/O
in the auto-start routine.
Suggested by: kib
HEAD to RELENG_7:
Remove custom queue macros in Coda, replacing them with queue(9) tailq
macros. The only semantic change was the need to add a vc_opened field
to struct vcomm since we can no longer use the request queue returning
to an uninitialized state to hold whether or not the device is open.
Fix link state handling in bfe(4).
o conversion to callout(9) API.
o add a missing driver lock in bfe_ifmedia_sts().
o use our callout to drive watchdog timer.
o restart Tx routine if pending queued packets are present in
watchdog handler.
o unarm watchdog timer only if there are no queued packets.
o don't blindly reset phy and let phy driver handle link change
request in bfe_init_locked().
o return the status of mii_mediachg() to caller in
bfe_ifmedia_upd(). Previously it always returned 0 to caller.
o add check for IFF_DRV_RUNNING flag as well as IFF_DRV_OACTIVE
in bfe_start_locked().
o implement miibus_statchg method that keeps track of current
link state changes as well as negotiated speed/duplex/
flow-control configuration.
Reprogram MAC to appropriate duplex state. Flow-control
configuration was also implemented but commented out at the
moment. The flow-control configuration will be enabled again
after we have general flow-control framework in mii layer.
Plug memory leak in jumbo buffer allocation failure path.
Patch in the PR was modified to check active jumbo buffers in use
and other possible jumbo buffer leak.
Jumbo buffer usage in lge(4) still wouldn't be reliable due to lack
of driver lock in local jumbo buffer allocator. Either introduce
a new lock to protect jumbo buffer or switch to UMA backed page
allocator for jumbo frame is required.
PR: kern/78072
To overcome hardware checksum offload bug msk(4) used to compute
TCP/UDP checksum in driver for short frames. For frames that requires
hardware VLAN tag insertion, the checksum offload trick does not
work due to changes of checksum offset in mbuf after the VLAN tag.
Disable hardware checksum offload for VLAN interface to fix the bug.
Workaround GMAC hardware hang of Yukon II on the receipt of pause
frames. This bug seems to happen on certain hardware model/revision
(e.g. 88E8053) but it's not identified which hardwares are affected.
Revision 1.4 of if_mskreg.h was not enough to workaround the bug.
To workaround it, inrease GMAC FIFO threshold by one FIFO word to
flush received pause frames.
- Retire npe_defrag(), gem_defrag(), msk_defrag(), nfe_defrag(), and
re_defrag() and use m_collapse() instead.
- Replace a reference to ath_defrag() in a comment in if_wpi.c with
m_collapse().
Add support for the NAP, GN and PANU profiles to the sdpd(8).
It should be mentioned that a somewhat similar patch was
submitted by Rako < rako29 at gmail dot com >
Add structures to hold SDP parameters for the NAP, GN and PANU profiles.
It should be mentioned that a somewhat similar patch was submitted by
Rako < rako29 at gmail dot com >
o In preparation for basing a new driver on this one:
- ANSIfy
- try to bring closer to style(9)
- remove banal comments.
o Add my copyright for having done lots of fixes and improvements.
Some PIIX4 chipsets need to be told to generate Stop Breaks by
setting
the appropriate bit in the DEVACTB register.
This change allows the C2 state on those systems to work as expected.
Reviewed by: njl
Submitted by: Andriy Gapon <avg at icyb.net.ua>
- Make Disk_Names() behave as documented in libdisk(3): return an array
of disk names, where you must free each pointer, as well as the array
by hand. [1]
- Destaticize "disks" in Disk_Names, it has no reasons to be static.
PR: kern/96077 [1]
PR: kern/114110 [1]
MFC after: 1 month
Approved by: rwatson (mentor)
Remove a superfluous line in run_interrupt_driven_config_hooks(),
next_entry is already initialized during TAILQ_FOREACH_SAFE().
PR: kern/119604
Approved by: rwatson (mentor)
MFC after: 1 month
o Add support for BSD disklabels (option GEOM_PART_BSD)
o Add support for VTOC8 disklabels (option GEOM_PART_VTOC8)
o Avoid false positives detecting MBRs
Improve apply callback error reporting:
Before this patch callback returned result of the last finished call chain.
Now it returns last nonzero result from all call chain results in this request.
As soon as this improvement gives reliable error reporting, it is now possible
to remove dirty workaround in ng_socket, made to return ENOBUFS error statuses
of request-response operations. That workaround was responsible for returning
ENOBUFS errors to completely unrelated requests working at the same time
on socket.
Enhance realpath(1) in a number of ways:
- Allow realpath to accept multiple paths on the command line.
- Add -q to suppress warnings if some paths can't be processed, and use
getopt(3) to process flags.
- Print the path being requested rather than a possibly partially
processed path when a failure occurs so that you can tell which of
several passed paths did fail.
PR: 112920
Submitted by: Ighighi <[email protected]>
Make chflags(1) more chmod(1)-like (and more feature complete):
- Add -v to print file names as they are processed; -vv prints the flags
change as well.
- Add -f to ignore failures with the same semantics as chflags(1), neither
printing an error nor affecting the return code.
- Don't try to set the flags if they won't change.
I made minor cosmetic tweaks to the code in the patch.
PR: 112827
Submitted by: Ighighi <ighighi at gmail.com>
When gzipping to a target file, only set the source file flags on the
target file after the timestamp has been set; otherwise setting the
timestamp will fail if the flags don't permit it (i.e., uchg).
PR: 120208
Submitted by: Ighighi <ighighi at gmail.com>
Don't auto-start or allow extattrctl for UFS2 file systems, as UFS2 has
native extended attributes. This didn't interfere with the operation of
UFS2 extended attributes, but the code shouldn't be running for UFS2.
The possibly interruptible msleep in coda_call() means well, but is
fundamentally fairly confused about how signals work and when it is
appropriate for upcalls to be interrupted. In particular, we should
be exempting certain upcalls from interruption, we should not always
eventually time out sleeping on a upcall, and we should not be
interrupting the sleep for certain signals that we currently are
(including SIGINFO). This code needs to be reworked in the style of
NFS interruptible mounts.
Use sbuf routines to construct core dump filenames rather than custom
string buffer handling, making the code both easier to read and more
robust against string-handling bugs.
In Coda, flush the attribute cache for a cnode when its fid is
changed, as its synthesized inode number may have changed and we
want stat(2) to pick up the new inode number.
Update cache flushing behavior in light of recent namecache and
access cache improvements:
- Flush just access control state on CODA_PURGEUSER, not the full
namecache for /coda.
- When replacing a fid on a cnode as a result of, e.g.,
reintegration after offline operation, we no longer need to
purge the namecache entries associated with its vnode.
RELENG_7:
Implement a rudimentary access cache for the Coda kernel module,
modeled on the access cache found in NFS, smbfs, and the Linux coda
module. This is a positive access cache of a single entry per file,
tracking recently granted rights, but unlike NFS and smbfs,
supporting explicit invalidation by the distributed file system.
For each cnode, maintain a C_ACCCACHE flag indicating the validity
of the cache, and a cached uid and mode tracking recently granted
positive access control decisions.
Prefer the cache to venus_access() in VOP_ACCESS() if it is valid,
and when we must fall back to venus_access(), update the cache.
Allow Venus to clear the access cache, either the whole cache on
CODA_FLUSH, or just entries for a specific uid on CODA_PURGEUSER.
Unlike the Coda module on Linux, we don't flush all entries on a
user purge using a generation number, we instead walk present
cnodes and clear only entries for the specific user, meaning it is
somewhat more expensive but won't hit all users.
Since the Coda module is agressive about not keeping around
unopened cnodes, the utility of the cache is somewhat limited for
files, but works will for directories. We should make Coda less
agressive about GCing cnodes in VOP_INACTIVE() in order to improve
the effectiveness of in-kernel caching of attributes and access
rights.
coda_subr.h:1.12, coda_vnops.c:1.94, coda_vnops.h:1.24,
coda_namecache.c:1.26, coda_namecache.h:1.15, Makefile:1.18,
from HEAD to RELENG_7:
Rather than having the Coda module use its own namecache, use the global
VFS namecache, as is done by the Coda module on Linux. Unlike the Coda
namecache, the global VFS namecache isn't tagged by credential, so use
ore conservative flushing behavior (for now) when CODA_PURGEUSER is
issued by Venus.
This improves overall integration with the FreeBSD VFS, including
allowing __getcwd() to work better, procfs/procstat monitoring, and so
on. This improves shell behavior in many cases, and improves ".."
handling. It may lead to some slowdown until we've implemented a
specific access cache, which should net improve performance, but in the
mean time, lookup access control now always goes to Venus, whereas
previously it didn't.
Add an option to register DUN (Dial-Up Networking) service on the same
RFCOMM channel if needed. There is really no good reason to not to support
this. AT-command exchange can be faked with chat script in ppp.conf.
Padding after EOL option must be zeros according to RFC793 but
the NOPs used are 0x01.
While we could simply pad with EOLs (which are 0x00), rather use an
explicit 0x00 constant there to not confuse poeple with 'EOL padding'.
Put in a comment saying just that.
Early MFC requested by: silby
because of more people reporting problems on net@
stdio is currently limited to file descriptors not greater than
{SHRT_MAX}, so {STREAM_MAX} should be no greater than that. (This
does not exactly meet the letter of POSIX but comes reasonably close
to it in spirit.)
When the state of the interface changes rapidly enough there is a race
where dhclient is in the process of exiting due to the link going down
when the link coming up causes devd to try and start a new one. This
results is the link being up, but no dhclient running.
Work around this race by checking a second time after a one second delay
before refusing to start a dhclient instance due to one already being
running.
During PREINIT, when giving the interface the address 0.0.0.0, do it as an
alias to avoid distrubing other addresses.
PR: bin/119255
Submitted by: Jaakko Heinonen <jh at saunalahti dot fi>
Teach gunzip that .tbz and .tbz2 uncompress to .tar, in a manner similar to
its existing understanding that .tgz uncompresses to .tar.
PR: 121519
Submitted by: Ighighi <ighighi at gmail.com>
Improve handling of the tinybsd application wrt ports. Ports that
have dependencies or need to install a new user/group, are not
problematic anymore.
PR: 121367
Submitted by: Richard Arends < richard at unixguru dot nl >
MFC after: 3 days
Approved by: imp (mentor, implicit)
To avoid control data losses, do not acknowledge recieving of control packet
if netgraph reported error while delivering to destination.
Reset 'next send' counter to the last requested by peer on ack timeout,
to resend all subsequest packets after lost one again without additional hints.
Send only one incoming notification at a time to reduce queue
trashing and improve performance.
Remove waitflag argument from ng_ksocket_incoming2(), it means nothing
as function call was queued by netgraph.
Remove node validity check, as node validity guarantied by netgraph.
Update comments.
coda_kernel.h:1.7, coda_namecache.c:1.25, coda_namecache.h:1.14,
coda_opstats.h:1.8, coda_pioctl.h:1.10, coda_psdev.c:1.43,
coda_psdev.h:1.8, coda_subr.c:1.35, coda_subr.h:1.11,
coda_venus.c:1.30, coda_venus.h:1.11, coda_vfsops.c:1.79,
coda_vfsops.h:1.14, coda_vnops.c:1.92, coda_vnops.h:1.23 from HEAD
to RELENG_7:
Since we're now actively maintaining the Coda module in the FreeBSD source
tree, restyle everything but coda.h (which is more explicitly shared
across systems) into a closer approximation to style(9).
Remove a few more unused function prototypes.
Add or clarify some comments.
Minor differences required in the MFC due to diverging VFS locking in
HEAD vs RELENG_7.
Add "show sysregs" command to ddb. On i386, this gives gdt, idt, ldt,
cr0-4, etc. Support should be added for other platforms that have a
different set of registers for system use.
When killing a user process from DDB, check that the requested signal is
> 0 rather than >= 0, or we will panic when trying to deliver the signal.
PR: 100802
Submitted by: Valerio Daelli <valerio.daelli at gmail.com>
Reserve two bytes at the end of the DDB input line in db_readline() to
hold the newline and nul terminator. Otherwise, there are cases where
garbage may end up in the command history due to a lack of a nul
terminator, or input may end up without room for a newline.
PR: 119079
Submitted by: Michael Plass <[email protected]>
coda_psdev.c:1.42, coda_psdev.h:1.7, coda_venus.c:1.29,
coda_vfsops.c:1.78, coda_vfsops.h:1.13, coda_vnops.c:1.91,
coda_vnops.h:1.22 from HEAD to RELENG_7:
Various further non-functional cleanups to coda:
- Rename print_vattr to coda_print_vattr and make static, rename
print_cred to coda_print_cred.
- Remove unused coda_vop_nop.
- Add XXX comment because coda_readdir forwards to the cache vnode's
readdir rather than venus_readdir, and annotate venus_readdir as
unused.
- Rename vc_nb_* to vc_*.
- Use d_open_t, d_close_t, d_read_t, d_write_t, d_ioctl_t and d_poll_t
for prototyping vc_* as that is the intent, don't use our own
definitions.
- Rename coda_nb_statfs to coda_statfs, rename NB_SFS_SIZ to
CODA_SFS_SIZ.
- Replace one more OBE reference to NetBSD with a reference to FreeBSD.
- Tidy up a little vertical whitespace here and there.
- Annotate coda_nc_zapvnode as unused.
- Remove unused vcodattach.
- Annotate VM_INTR as unused.
- Annotate that coda_fhtovp is unused and doesn't match the FreeBSD
prototype, so isn't hooked up to vfs_fhtovp. If we want NFS export of
Coda to work someday, this needs to be fixed.
- Remove unused getNewVnode.
- Remove unused coda_vget, coda_init, coda_quotactl prototypes.
Remove unused devtomp(), which exploited UFS-specific knowledge to find
the mountpoint for a specific device. This was implemented incorrectly,
a bad idea in a fundamental sense, and also never used, so presumably
a long-idle debugging function.
Since Coda is effectively a stacked file system, use VOP_EOPNOTSUPP
for vop_bmap; delete the existing stub that returned either EINVAL
or EOPNOTSUPP, and had unreachable calls to VOP_BMAP on the cache
vnode.
1.278 sys/netinet/ip_output.c
1.114 sys/netinet6/ip6_output.c
1.26 sys/netipsec/ipsec.c
1.15 sys/netipsec/ipsec.h
1.4 sys/netipsec/ipsec6.h
Rather than passing around a cached 'priv', pass in an ucred to
ipsec*_set_policy and do the privilege check only if needed.
Try to assimilate both ip*_ctloutput code blocks calling ipsec*_set_policy.
Implement 128 items node name hash for faster name search.
Increase node ID hash size from 32 to 128 items.
Increase default queue items allocation limit from 512 to 4096 items
to avoid terrible unpredicted effects for netgraph operation of their
exhaustion while allocating control messages.
Add separate configurable 512 items limit for data items allocation
for DoS/overload protection.
1.75 sys/kern/kern_jail.c
1.8 sys/netinet/ip_options.c
1.78 sys/netinet6/in6.c
1.113 sys/netinet6/ip6_output.c
1.41 sys/netinet6/ip6_var.h
1.76 sys/netinet6/raw_ip6.c
1.85 sys/netinet6/udp6_usrreq.c
[ previously MFCed by rwatson 1.18 sys/sys/priv.h belonging to this change ]
Replace the last susers calls in netinet6/ with privilege checks.
Introduce a new privilege allowing to set certain IP header options
(hop-by-hop, routing headers).
Leave a few comments that we would like to address later.
Discussed with: rwatson
coda_vfsops.c:1.74, coda_vnops.c:1.87, coda_vnops.h:1.20 from HEAD
to RELENG_7:
The Coda module was originally ported to NetBSD from Mach by rvb, and
then later to FreeBSD. Update various NetBSD-related comments: in some
cases delete them because they don't appply, in others update to say
FreeBSD as they still apply but in FreeBSD (and might for that matter
no longer apply on NetBSD), and flag one case where I'm not sure
whether it applies.
Before invoking vnode operations on cache vnodes, acquire the vnode
locks of those vnodes. Probably, Coda should do the same lock sharing/
pass-through that is done for nullfs, but in the mean time this ensures
that locks are adequately held to prevent corruption of data structures
in the cache file system.
Assuming most operations came from the top layer of Coda and weren't
performed directly on the cache vnodes, in practice this corruption was
relatively unlikely as the Coda vnode locks were ensuring exclusive
access for most consumers.
This causes WITNESS to squeal like a pig immediately when Coda is used,
rather than waiting until file close; I noticed these problems because
of the lack of said squealing.
NB: Because WITNESS in RELENG_7 doesn't yet support lockmgr, said
squealing doesn't yet happen in RELENG_7, but will do if/when lockmgr
grows support for WITNESS there.
Remove undefined coda excluded by #if 1 #else, which previously protected
vget() calls using inode numbers to query the root of /coda, which is not
needed since we now cache the root vnode with the mountpoint.
When redrawing an input line, count backspaces to get to the beginning of
the input field from the current cursor location, rather than the end of
the input line, as the cursor may not be at the end of the line.
Otherwise, we may overshoot, overwriting a bit of the previous line and
failing to fully overwrite the current line.
PR: 119079
Submitted by: Michael Plass <[email protected]>
sys/sparc64/sparc64/ata_machdep.c 1.1
The Sun disk label only uses 16-bit fields for cylinders, heads and
sectors so the geometry of large IDE disks has to be adjusted.
Though we are currently not interested in the EDD3 flag,
Enhanced Disk Drive Specification Ver 3.0 defines that the version
of extension in AH would be 30h.
Correct the check for that to be >=30h instead of >3h.
rev. 1.372
Fix indentation (whitespace changes only).
rev. 1.373
Some "cleanup" of tcp_mss():
- Move the assigment of the socket down before we first need it.
No need to do it at the beginning and then drop out the function
by one of the returns before using it 100 lines further down.
- Use t_maxopd which was assigned the "tcp_mssdflt" for the corrrect
AF already instead of another #ifdef ? : #endif block doing the same.
- Remove an unneeded (duplicate) assignment of mss to t_maxseg just before
we possibly change mss and re-do the assignment without using t_maxseg
in between.
Fix bugs when allocating and passing information of current lifetime and
soft lifetime [1] introduced in rev. 1.21 of key.c.
Along with that, fix a related problem in key_debug
printing the correct data.
While there replace a printf by panic in a sanity check.
PR: 120751
Submitted by: Kazuaki ODA (kazuaki aliceblue.jp) [1]
Validate the id16 values gathered from ACPI (previously a TODO
item).
Style changes by me and njl.
Submitted by: Takeharu KATO <takeharu1219 at ybb.ne.jp>
PR: 119350
Log:
- Remove kH and *6 from xterm. They are defined to the same key as @7 (kp_end).
As ncurses has the limitation that it returns the first matched key symbol,
you can not use END in ncurses based program, like mutt, with xterm.
- Add @8 (kp_enter) definition for xterm so you can use ENTER in xterm with
ncurses based program.
I also found that NetBSD's xterm does the same thing.
PR: 100150
Reported by: Arseny Nasokin <tarc at tarc.po.cs.msu.su>
Discussed with: Thomas Dickey, Ulrich Spoerlein <uspoerlein at gmail.com>
Reviewed by: freebsd-arch@
* Avoid re-zeroing memory in calloc() when possible.
* Use pthread mutexes where possible instead of libc "spinlocks", and
actually spin some during contention before blocking.
* Implement dynamic load balancing of thread-->arena mapping.
* Avoid floating point math in order to avoid increased context switch
overhead for applications that otherwise would not use floating point
math.
* Restructure how sbrk() and mmap() are used to acquire memory mappings.
This provides a way to force malloc to only use sbrk(), which can be
useful in the context of resource limits.
* Reduce the number of mmap() calls typically necessary when allocating
a chunk.
* Track dirty unused pages so that they can be purged if they exceed a
threshold.
* Try to realloc() large objects in place.
* Manage page runs with trees instead of chunk maps, which allows
logarithmic-time run allocation.
Make session ID generator to use session ID hash.
Make session ID generator thread-safe.
Use more compact LIST instead of TAILQ for session hash.
Add all listening hooks into LIST to simplify searches.
Use ng_findhook() instead of own equal implementation.
Replace the use of warnx() with direct output to stderr using _write().
This reduces the size of a statically-linked binary by approximately 100KB
in a trivial "return (0)" test application. readelf -S was used to verify
that the .text section was reduced and that using strlen() saved a few
more bytes over using sizeof(). Since the section of code is only called
when environ is corrupt (program bug), I went with fewer bytes over fewer
cycles.
I made minor edits to the submitted patch to make the output resemble
warnx().
src/lib/libc/stdlib/getenv.c: rev 1.12 -> 1.13
Submitted by: kib bz
Approved by: wes (mentor)
Add the -M command-line option, which will set home directory
permissions. Works both in interactive or batch mode. This is
a heavily modified version of the patch submitted in the PR.
PR: bin/105060
date: 2008/02/16 00:16:49; author: delphij; state: Exp; lines: +2 -1
Allow underscore in domain names while resolving. While having underscore
is a violation of RFC 1034 [STD 13], it is accepted by certain name servers
as well as other popular operating systems' resolver library.
Bugs are mine.
Obtained from: ume
Zero sc->vnode if mdsetcred() fails.
This fixes the panic which happens when mdcreate_vnode() calls vn_close()
and mddestroy() calls it again further down the error handling path.
HEAD to RELENG_7:
Further clean up sorflush:
- Expose sbrelease_internal(), a variant of sbrelease() with no
expectations about the validity of locks in the socket buffer.
- Use sbrelease_internel() in sorflush(), and as a result avoid
initializing and destroying a socket buffer lock for the temporary
stack copy of the actual buffer, asb.
- Add a comment indicating why we do what we do, and remove an XXX
since things have gotten less ugly in sorflush() lately.
This makes socket close cleaner, and possibly also marginally faster.
Properly return the error from mls_subject_privileged() in the ifnet
relabel check for MLS rather than returning 0 directly.
This problem didn't result in a vulnerability currently as the central
implementation of ifnet relabeling also checks for UNIX privilege, and
we currently don't guarantee containment for the root user in mac_mls,
but we should be using the MLS definition of privilege as well as the
UNIX definition in anticipation of supporting root containment at some
point.
Submitted by: Zhouyi Zhou <zhouzhouyi at gmail dot com>
Sponsored by: Google SoC 2007
In tcp_ctloutput(), don't hold the inpcb lock over sooptcopyin(), rather,
drop the lock and then re-acquire it, revalidating TCP connection state
assumptions when we do so. This avoids a potential lock order reversal
(and potential deadlock, although none have been reported) due to the
inpcb lock being held over a page fault.
PR: 102752
Reviewed by: bz
Reported by: Václav Haisman <v dot haisman at sh dot cvut dot cz>
Update netisr comment for the SMPng world order: netisr is no longer
implemented using the ISR facility, and cannot be triggered by calling
splnet()/splx().
Linuxulator mmap(2) issue, re(4) data corruption issue, TCP options
issue, page footer in release documentation, wrong KDE version number.
Reviewed by: kensmith
Submitted by: a cast of several
rev. 1.3 of linux_misc.h,
rev. 1.217 of linux_misc.c:
Sanitize arguments to linux_mremap().
Check that only MREMAP_FIXED and MREMAP_MAYMOVE flags are specified.
Check for the page alignment of the addr argument.
Add the groupmod '-d' option to pw to allow the deletion of existing users
from a group without the need to perform the same operation by replacing
the existing list via the '-M' option. The '-M' option requires someone
to fetch the existing members with pw, deleting the undesired members from
the list and sending the altered list back to pw.
src/usr.sbin/pw/pw.c: rev 1.32 -> 1.33
src/usr.sbin/pw/pw_group.c: rev 1.15 -> 1.16
src/usr.sbin/pw/pw.8: rev 1.42 -> 1.43
Approved by: wes (mentor)
in the wrong place, which could cause a incorrect accounting undre
certain error conditions. And worse when we have a duplicate
connect we called TCB_LOCK() not TCB_UNLOCK().... which will
lead to a system lockup (escalting lock wait scenario).
- Add a new 'add-kld <kld>' command to locate a kld and load its symbols.
- If the quiet flag is specified, don't dump the unread portion of the
message buffer on startup.
- Remove the warnx() from kgdb_lookup() and add it in callers where a
failed lookup is warning worthy.
- Add a shared library backend for kernel files that treats klds as shared
libraries and auto-load symbols for klds on startup.
- Build a section table from the kernel file so that 'info files' output
looks sane.
rev 1.597
Give usr.bin/kdump/kdump_subr.c the same treatment as usr.bin/kdump/ioctl.c
and usr.bin/truss/ioctl.c. This is the correct way to address the problem
that arises when doing an incremental build after a header used by kdump
has been removed (cf. i4b disconnect a while ago)
Explained by: ru
MFC after: 2 weeks
rev 1.598
Satisfy a particularly obstinate nit-picker :)
Approved by: imp (mentor, implicit for trivial changes), des
(I am doing several MFC's for him)
rev 1.10
Rewrite to consume significantly less memory, by using find -s instead of
find | sort. As a bonus, this simplifies the logic considerably. Also
remove the bogus "overruning the args to ls" comment and the corresponding
"-n 20" argument to xargs; the whole point with xargs is precisely that it
knows how large the argument list can safely get.
Note that the first run of the updated script may hypotheticall produce
false positives due to differences between find's and sort's sorting
algorithm. I haven't seen this during testing, but others might.
MFC after: 2 weeks
Approved by: imp (mentor, implicit for trivial changes), des
(doing some MFC's for him)
commas due to our deconstruction of the line in cf/feature/dnsbl.m4.
PR: 120038
Submitted by: mattijs vreeling
Revision Changes Path
1.36 +1 -1 src/etc/sendmail/freebsd.mc
MFOpenBSD rev 1.393 pf.conf.5
do not describe `/' as solidus; from Allen (freebsd pr120484);
PR: 120484
Submitted by: Allen <alandsidel at 1001islington dot com>
MFC After: 3 days
src/etc/defaults/rc.conf 1.323
src/etc/rc.firewall 1.54
src/share/man/man5/rc.conf.5 1.333 (by chinsan)
Original log:
Improve kernel NAT support in rc.firewall
- Allow IP in firewall_nat_interface, just like natd_interface
- Allow additional configuration parameters passed to ipfw via
firewall_nat_flags
- Document firewall_nat_* in defaults/rc.conf
Tested by: Albert B. Wang <abwang at gmail.com> MFC after: 1 month
Introduce a new privilege allowing to set certain IP header options
(hop-by-hop, routing headers).
Leave a few comments to be addressed later.
(Note: This does not MFC the use of the privilege, only the definition of
the privilege.)
Fix calculation of descriptor tag checksums. According to ECMA-167, Part 4,
7.2.3, bytes 0-3 and 5-15 are used to calculate the checksum of a descriptor
tag.
Approved by: emax (mentor)
Add privilege PRIV_NNPFS_DEBUG for use with Arla/nnpfs. This privilege
will authorize debugging system calls.
(Slightly sooner than the 1 month MFC time I specified, but it's just a
privilege definition, not a use of the privilege).
date: 2007/10/21 22:50:11; author: rwatson; state: Exp; lines: +1 -0
Add PRIV_VFS_STAT privilege, which will allow overriding policy limits on
the right to stat() a file, such as in mac_bsdextended.
Obtained from: TrustedBSD Project
- Remove duplicate tputs.3 from MLINK. As we use termcap in the bsae, remove
the one links to curs_terminfo.
Submitted by: David Naylor <blackdragon at highveldmail.co.za>
On Montecito processors, the instruction cache is in fact not
coherent with the data caches. Implement a quick fix to allow
us to boot on Montecito, while I'm working on a better fix in
the mean time.
Commit made on Montecito-based Itanium...
Add `hw.ciss.nop_message_heartbeat' tunable (default disabled) for
NOP-message polling in ciss_periodic().
Note that setting the tunable to non-zero can be workaround only for
`ADAPTER HEARTBEAT FAILED' problem, and may freeze the system w/o
the problem.
- Fix a typo in a comment.
- Fix whitespace according to style(9).
- Sync the comment describing why we have to wait in nsphy_reset()
with nsphyter_reset(). It's true that the manual tells to not do a
reset within 500us of applying power but that's unlikely the cause
of problems seen here. Generally having to wait 500us after a reset
however is.
* Formats are now only bid once per file, not once per entry
(Affects archive_read.c, most format readers, internals manpage)
* Correct tar/cpio history in libarchive_formats manpage
* Avoid unnecessary copies in {write,read}_compression_none
(significant performance boost for uncompressed archives!)
* Protect against zero-length writes in gzip/bzip2 compressors
* Tar reader: improve hardlink length heuristics, GNU tar --posix
--sparse support, related fixes to SCHILY.realsize handling
* Cpio reader: recover from sync errors
* Cpio writer: pad symlinks properly in newc format
* Ar writer: close out empty archive correctly
* Zip reader: ignore PK00 header, code cleanups from des@
* Iso9660 reader: support device node entries
* archive_write_disk: support hardlinks with bodies, enforce
maximum file size
* Reconnect progress callback from archive_read_extract()
* New: archive_entry_strmode()
* New: mtree reader
* New: "linkresolver" makes it easier to do hardlink resolution
* UUencode test reference files (be nice to CVS)
* New test: exercise very large entries (2G up to 1T) in tar archives
* New test: Detailed verification of cpio odc and newc formats
* New test: Various strategies for restoring multiple links to a file
* New tests: Various compatibility checks against gzip, zip, old tar, etc.
* New test: cpio recovery from damaged archives
* New test: mtree reading
* Improved statistics reporting from test harness
* Plus minor portability improvements
date: 2008/01/12 00:54:47; author: delphij; state: Exp; lines: +4 -0
Plug memory leaks that is observed when argbuf or argspc is used in the
context.
Submitted by: Michal Vranek <michal.vran
* -l now always has the POSIX behavior (GNU tar recently adjusted their
-l to comply with POSIX, so bsdtar no longer has to guess what the
user really meant).
* More complete COPYING information.
* Various portability fixes and minor configuration changes.
This brings bsdtar into line with -CURRENT, except for one change that
relies on a new libarchive feature that hasn't been MFCed yet.
Add 1000baseTX support for the nve driver, which is known here and there.
Also mention that the driver sometimes returns '10baseTX' as output instead
of 100baseTX (which is the case at that moment).
PR: docs/115284
Submitted by: Julian Stacey Jhs <jhs at berklix dot org>
MFC After: 3 days
Attempt to describe the ''auto'' type a bit better in the default
section (if nothing had been specified, or if the auto type had
been specified, a default layout is used).
PR: docs/116047
Submitted by: Ian Smith <smithi at nimnet dot asn dot au>
Minor modifications by me.
Make the warning a bit less 'broad' then it used to be. The access
is seems to be a problem for SUID applications, which we like to
prevent as much as possible.
PR: docs/39530
Submitted by: Soren Spies <sspies at apple dot com>
MFC After: 3 days
Improve readability for the hosts.equiv file regarding the notation
of hostnames.
PR: docs/35953
Submitted by: "Gary W. Swearingen" <swear at blarg dot net>
With minor modifications by me.
Use nfsrv_destroycache() only once, else it crashes the server.
PR: kern/118152
Submitted by: Bjoern Groenvall <bg at sics dot se>
Approved by: imp (mentor, a while ago already), jhb
MFC After: 3 days
Approved by: imp (mentor, implicit)
- Add extra paths for GEOM_LIBRARY_PATH to the fixit environment to enable all
geom commands in a chrooted environment on the livefs cd.
PR: misc/120169
Approved by: pjd (mentor)
Allow watch(8) to use more than 10 snp* devices. This limitation was purely
due to the way watch(8) looks for available snoop devices.
PR: bin/118286
Submitted by: Mykola Zubach <[email protected]>
Reviewed by: rwatson, csjp, imp (all a long time ago)
Approved by: imp (mentor) (long time ago)
Fix bootparamd on 64 bit platforms - at least amd64 was broken due to the
code believing long == 64 bits and using it to store/compare IPv4 addresses.
PR: bin/112163
Submitted by: Tyler Spivey <[email protected]>
Reviewed by: imp
Approved by: imp (mentor)
bytes >= 0x80 were formatted as 0xff, causing the authentication
to fail.
Note: fast MFC to RELENG_7 and RELENG_7_0 to get the changes in
time for 7.0-RC2.
Approved by: re (kensmith)
Implement stack protection based on GET_STACK_USAGE() macro.
This fixes system panics possible with complicated netgraph setups
and allows to avoid unneded extra queueing for stack unwrapping.
Implement stack protection based on GET_STACK_USAGE() macro.
This fixes system panics possible with complicated netgraph setups
and allows to avoid unneded extra queueing for stack unwrapping.
Enter the sleep state immediately without waiting for timeout if
devd(8) is not running such as the system in single user mode.
Approved by: re (kensmith)
- Avoid data copying when it is possible. bpf_filter() is able to work
directly on mbuf chain
- Prepare hooks direct pointers on setup to avoid heavy ng_findhook() calls
during operarion.
Unbreak detection of cryptodev support for FreeBSD which was broken
with OpenSSL 0.9.8 import.
Note that this does not enable cryptodev by default, as it was the
case with OpenSSL 0.9.7 in FreeBSD base, but this change makes it
possible to enable cryptodev at all.
this copes with the fact that during a fork the child may get
really screwy state in the threading system due to the
sudden vaporisation of it's sibling threads.
down some DCMD's without any data. Thanks to Dell and LSI for helping
to provide clues to figure out this problem. Now MegaCli can upgrade
the firmware and should work identical when run on Linux.
Add device id for 88E8058(Yukon EC Ultra) which is found on 3rd
generation MacBooks.
Unfortunately 88E8058 supports one MSI message so msk(4) needs more
generic way to handle the MSI capability.
PR: 118110
Make phy respond only at address 0. This makes phy driver attached
only at address 0 which is supposed to be the only valid phy address
on Marvell PHY. The more correct solution would be masking PHY
address ranges allowable in PHY probe routine. Unfortunately,
FreeBSD has no way to retrict the PHY address ranges or to pass special
flags to PHY driver.
This change assumes that PHY hardwares attached to msk(4) would be
Marvell made 88E11xx PHY.
With this changes the phantom phys attached on 88E8036(Yukon FE)
should disappear.
o Don't hardcode that Yukon FE has 16KB SRAM. In fact, Yukon FE has
only 4KB SRAM.
o Rework setting Tx/Rx RAM buffer size. Give receiver 2/3 of memory
and round it down to the multiple of 1024. The RAM buffer size of
Yukon II should be multiple of 1024. This fixes bogus RAM buffer
configuration used in Yukon FE.
Drop maintaing hardware feature(bug) lists for Yukon II. We don't have
publicly available datasheet for Yukon II and don't know what
bug/workaround exist for the specific hardware revision. Also I don't
think the vendor will release hardware errata in near future.
The hardware feature lists were not used at all except setting water
mark registers. Since msk(4) should know exact chip model/revision
number to decide which hardware capability could be used the extra
feature lists were redundant.
Various fixes for EC Ultra.
o Enable jumbo frame support for EC Ultra and disable jumbo frame
for FE.
o Enable store and forward mode for standard MTU sized frame.
o Enable TSO for EC Ultra. However TSO/checksum offload is disabled
for jumbo frame case. Because EC Ultra can't use store and forward
mode for jumbo frame TSO/checksum offload is not available.
o Adjust Tx GMAC almost empty threshold value and add a jumbo frame
water mark. The maic value was obtained from Marvell's sk98lin
driver.
o Fix EC Ultra chip revision number.
By definition promiscuous mode should see all unicast frames as well
as multicast/broadcast frames. Previously re(4) ignored multicast
frames in promiscuous mode. The RTL8169 datasheet was not clear
how it handles multicast frames in promiscuous mode.
PR: kern/118572
IEEE 802.3 Annex 28B.3 explicitly specifies the following relative
priorities of the technologies supported by 802.3 Selector Field
value.
1000BASE-T full duplex
1000BASE-T
100BASE-T2 full duplex
100BASE-TX full duplex
100BASE-T2
100BASE-T4
100BASE-TX
10BASE-T full duplex
10BAST-T
However PHY drivers didn't honor the order such that 100BASE-T4 had
higher priority than 100BASE-TX full duplex. Fix that long standing
bugs such that have PHY drivers choose the highest common denominator
ability.
Fix a bug in dcphy which inadvertently aceepts 100BASE-T4.
PR: 92599
sctp_input.c:1.67, sctp_peeloff.c:1.17, sctputil.c:1.73,
socketvar.h:1.161 from HEAD to RELENG_7:
Correct two problems relating to sorflush(), which is called to flush
read socket buffers in shutdown() and close():
- Call socantrcvmore() before sblock() to dislodge any threads that
might be sleeping (potentially indefinitely) while holding sblock(),
such as a thread blocked in recv().
- Flag the sblock() call as non-interruptible so that a signal
delivered to the thread calling sorflush() doesn't cause sblock() to
fail. The sblock() is required to ensure that all other socket
consumer threads have, in fact, left, and do not enter, the socket
buffer until we're done flushin it.
To implement the latter, change the 'flags' argument to sblock() to
accept two flags, SBL_WAIT and SBL_NOINTR, rather than one M_WAITOK
flag. When SBL_NOINTR is set, it forces a non-interruptible sx
acquisition, regardless of the setting of the disposition of SB_NOINTR
on the socket buffer; without this change it would be possible for
another thread to clear SB_NOINTR between when the socket buffer mutex
is released and sblock() is invoked.
Reviewed by: bz, kmacy
Reported by: Jos Backus <jos at catnook dot com>
a socket is closed as it gets auth'd data in. (sctp_auth.c)
- Reverts the priority back to 0, do not change prioritys (sctp_bsd_addr.c)
- Fixes a wrap error in calculation of gap ack segments that
wrap the TSN number. (sctp_indata.c)
- Fixes a comment, and also moves a lock up to cover the pulling
of the VRF from the inp structure. (sctp_pcb.c)
Annotate two possible bugs in a comment: (1) we allocate and explicitly
prepend a data mbuf in front of a header mbuf without moving the header
to the new mbuf, and (2) a possible alignment problem on architectures
with strict alignment as reported in kern/4184.
PR: kern/4184 (1)
Add additional robustness to at_aarpinput() by testing for broadcast
addresses as the source of an AARP request. While this PR was submitted
in the context of work in OpenBSD to port netatalk (in 1997), I've
synchronized the code more to our ARP input routine, which had similar
requirements.
Submitted by: Denton Gentry
PR: kern/4184
> revision 1.7
> date: 2008/01/16 13:54:40; author: remko; state: Exp; lines: +9 -6
> Dont accidentally remove a filesocket which is still in use. This gives
> problems when the DRM driver is loaded and the AIXGL extension is loaded
> , the AIXGL driver requests a drm_close and this will cause the radeon
> driver to fail while starting X windows.
>
> PR: kern/114688
> Submitted by: vehemens <vehemens at verizon dot net>
> Prodded by: Robert Noland
> Approved by: imp (mentor, a while ago already), anholt
1. yar's "dry run" patch to Makefile
2. Add zfs to the list of filesystems to check in
periodic/security/100.chksetuid
3. GC the nfslocking script, which has been superseded by lockd and statd
4. Add security warning to rc.d/jail
5. Add stop_cmd=':' to those rc.d scripts that do not start services,
but did not already have a stop_cmd.
Rev. 1.6 made it impossible to use rc.d/kerberos with the krb5 port.
Re-implement the change so that the script once again works with
the krb5 port.
Submitted by: kensmith (slightly modified)
Hide ipfw internal data structures behind IPFW_INTERNAL rather than
exposing them to all consumers of ip_fw.h. These structures are
used in both ipfw(8) and ipfw(4), but not part of the user<->kernel
interface for other applications to use, rather, shared
implementation.
Reported by: Paul Vixie <paul at vix dot com>
sys/kern/vfs_aio.c; revision 1.237
sys/sys/event.h; revision 1.38
When asked to use kqueue, AIO stores its internal state in the
`kn_sdata' member of the newly registered knote. The problem is that
this member is overwritten by a call to kevent(2) with the EV_ADD flag,
targetted at the same kevent/knote. For instance, a userland application
may set the pointer to NULL, leading to a panic.
A testcase was provided by the submitter.
PR: kern/118911
Submitted by: MOROHOSHI Akihiko <[email protected]>
Fix an error in bit shifting logic for network addresses. The route
command would add incorrect routing entries if network numbers weren't
fully "spelled" out according to their class. For example:
# route add 128.0/16 (works)
# route add 128/16 (doesn't work)
# route add 193.0.0/24 (works)
# route add 193/24 (doesn't work)
Also, rework the way a netmask is deduced from network number if
it [netmask] is not specified.
Submitted by: Nuno Antunes <[email protected]> (mostly)
the rejected mail reports to tally the rejects per blacklist without
providing details about individual sender hosts. The default configuration
keeps the reports in their original form.
In rev. 1.156, the convertion of the minor number to the unit number
resulted in the argument to the make_dev() to be a unit number.
Correct this by supplying a minor number to make_dev(), and using
the unit number for the calculation of the slave tty name.
- Follow POSIX specification when moving a directory to an existing
directory across devices.
- Improve consistency and remove some style bugs of earlier versions.
This version passes all tests of tools/regression/bin/mv/regress.sh 1.6
PR: bin/118367
Add support for optional "AC-Name\Service-Name" syntax at NGM_PPPOE_CONNECT
argument. It allows ppp, mpd or any other node consumer to request
connection to specified access concentrator.
Proposed by: Alexander A. Burylov <[email protected]>
Remove ng_pppoe_sendpacket() function to simplify code as it is called
as much times as it has cases inside of it.
Split ng_pppoe_rcvdata() function into three hook-specific ones
to simplify code and reduce stack usage.
date: 2008/01/12 00:11:26; author: delphij; state: Exp; lines: +4 -4
- Handle the case where interface from "middle" is missing by
more carefully inspecting the return value from sysctl(3). [1]
- Use calloc instead of malloc+memset of zero.
Submitted by: Alexander Chernikov <admin su29 net> [1]
PR: bin/119581
MFC after: 2 weeks
----------------------------------------------------------------------------
Instead of manually freeing the packet options structure (and not even doing
a good job of it) in the copypktopts() function, just call ip6_clearpktopts()
directly. Otherwise, the callers of this function would end up freeing the
memory twice.
Reviewed by: jinmei
PR: kern/116360
----------------------------------------------------------------------------
udf_vget() shall vgone() the vnode when the file_entry cannot be allocated
or read from the volume. Otherwise, half-constructed vnode could be found
later and cause panic when accessed.
PR: 118322
tcp_usrreq.c:1.313 removed tcbinfo locking from tcp_usr_accept(), which
while in principle a good idea, opened us up to a race inherrent to
the syncache's direct insertion of incoming TCP connections into the
"completed connection" listen queue, as it transpires that the socket
is inserted before the inpcb is fully filled in by syncache_expand().
The bug manifested with the occasional returning of 0.0.0.0:0 in the
address returned by the accept() system call, which occurred if accept
managed to execute tcp_usr_accept() before syncache_expand() had copied
the endpoint addresses into inpcb connection state.
Re-add tcbinfo locking around the address copyout, which has the effect
of delaying the copy until syncache_expand() has finished running, as
it is run while the tcbinfo lock is held. This is undesirable in that
it increases contention on tcbinfo further, but a more significant
change will be required to how the syncache inserts new sockets in
order to fix this and keep more granular locking here. In particular,
either more state needs to be passed into sonewconn() so that
pru_attach() can fill in the fields *before* the socket is inserted, or
the socket needs to be inserted in the incomplete connection queue
until it is actually ready to be used.
Reported by: glebius (and kris)
Tested by: glebius
Approved: re (kensmith)
Add fsck_4.2bsd and fsck_ufs as hard links to fsck_ffs in /stand on
the MFS image so that (for example) "fsck /dev/ad0s1a" will work.
Without this you needed (for example) "fsck -t ffs /dev/ad0s1a" (or
needed to run fsck_ffs instead of fsck).
Versions being MFCed:
1.62 src/release/amd64/boot_crunch.conf
1.62 src/release/i386/boot_crunch.conf
1.12 src/release/ia64/boot_crunch.conf
1.63 src/release/pc98/boot_crunch.conf
1.5 src/release/powerpc/boot_crunch.conf
1.9 src/release/sparc64/boot_crunch.conf
1.2 src/release/sun4v/boot_crunch.conf
Move unlock of global UNIX domain socket lock slightly lower in
unp_connect(): it is expected to return with the lock held, and two
possible error paths otherwise returned with it unlocked.
The fix committed here is slightly different from the patch in the
PR, but along an alternative line suggested in the PR.
PR: 119778
Submitted by: James Juran <james dot juran at baesystems dot com>
Approved by: re (gnn)
coda_vnops.c:1.79:
Borrow the VM object associated with an underlying cache vnode with the
Coda vnode derived from it, in the style of nullfs. This allows files
in the Coda file system to be memory-mapped, such as with execve(2) or
mmap(2).
Reported by: Rune <u+openafsdev-sr55 at chalmers dot se>
coda_vnops.c:1.80:
Lock the new directory vnode returned by coda_mkdir(), as this is required
by FreeBSD's vnode locking protocol.
coda_vnops.c:1.81:
Use VOP_NULL rather than VOP_PANIC for Coda's vop_print routine, so as
to avoid panicking in DDB show lockedvnods.
cnode.h:1.22, coda_namecache.h:1.12, coda_psdev.c:1.40, coda_vfsops.c:1.70:
Don't declare functions as extern.
Move all extern variable definitions to associated .h files, move some
extern variable definitions between include files to place them more
appropriately.
coda_vnops.c:1.82:
Don't acquire an additional vnode reference to a vnode when it is opened
and then release it when it is closed: we rely on the caller to keep the
vnode around with a valid reference. This avoids vrele() destroying the
vnode vop_close() is being called from during a call to vop_close(), and
a crash due to lockmgr recursing the vnode lock when a Coda unmount
occurs.
coda_vfsops.c:1.71:
Zero mi_rotovp and coda_ctlvp immediately after calling vrele() on the
vnodes during coda_unmount() in order to detect errant use of them
after the vnode references may no longer be valid.
No need to clear the VV_ROOT flag on mi_rootvp flag (especially after
the vnode reference is no longer valid) as this isn't done on other
file systems.
coda_vfsops.c:
Rework coda_statfs(): no longer need to zero the statfs structure or
fill out all fields, just fill out the ones the file system knows
about. Among other things, this causes the outpuf of "mount" and
"df" to make quite a bit more sense as /dev/cfs0 is specified as the
mountfrom name.
coda_vnops.c:1.83:
Improve default vnode operation handling for Coda:
- Don't specify vnode operations for mknod, lease, and advlock--let them
fall through to vop_default.
- Implement vop_default with &default_vnodeops, rather than with
VOP_PANIC, so that unimplemented vnode operations are handled in more
sensible ways than panicking, such as EOPNOTSUPP on ACL queries
generated by bsdtar, or mknod.
coda_namecache.h:1.13:
Remove unused oldhash definition from Coda namecache.
coda_vnops.c:1.84:
Replace references to VOP_LOCK() w/o LK_RETRY to vn_lock() with LK_RETRY,
avoiding extra error handling, or in some cases, missing error handling.
Discussed with: kib
coda_vnops.c:1.85:
Put "coda_rdwr: Internally Opening" printf generated by in-kernel writes
to files, such as ktrace output, under CODA_VERBOSE. Otherwise, each
such call to VOP_WRITE() results in a kernel printf.
Obtained from: NetBSD
In the rev. 1.153, the one place for converting minor number to unit
was missed. As result, pty_create_slave() may index out of the names[]
bounds, creating wrong slave tty names.
ffs_balloc_ufsX() routines, in the case of recovering from the failed
allocation, free the indirect blocks before clearing the disk pointers,
that could lead to the softupdate inconsistencies in the case of the
machine or disk crash at the wrong time.
Rearrange the recover code to do the ffs_blkfree() after the second
ffs_syncvnode(), that clears the pointers chain.
The ffs_balloc() routines, whan allocating the indirect blocks for
the inode, do the rollback in case the allocation failed (due to
insufficient free space or quota limits). But, the code does leaves the
buffers corresponding to the inoirect blocks on the vnode bufobj list.
This causes several assertion failures (for instance, "ffs_truncate3"
in ffs_truncate()) to fail, and could result in the indirect block
aliasing problem, like writing the context of such blocks to random
disk location.
Remove the buffers from the bufobj properly.
silent NULL pointer dereference in the i386 and sparc64 pmap_pinit()
when the kmem_alloc_nofault() failed to allocate address space. Both
functions now return error instead of panicing or dereferencing NULL.
The reason for MFCing this so late in release cycle is, according to
marius@, because
> it fixes the crashing (though no panic) of the test suite
> of the graphic/OpenEXR port on sparc64. This test suite is run
> (and required to succeed) during the package build and that's
> why portmgr@ bitch about at it as OpenEXR is a dependency of KDE
> which in turn is supposed to end up on the release CD images.
Revisions MFCed:
1.677 of src/sys/amd64/amd64/machdep.c
1.592 of src/sys/amd64/amd64/pmap.c
1.88 of src/sys/arm/arm/pmap.c
1.27 of src/sys/arm/at91/kb920x_machdep.c
1.22 of src/sys/arm/sa11x0/assabet_machdep.c
1.8 of src/sys/arm/xscale/i80321/ep80219_machdep.c
1.29 of src/sys/arm/xscale/i80321/iq31244_machdep.c
1.3 of src/sys/arm/xscale/i8134x/crb_machdep.c
1.6 of src/sys/arm/xscale/ixp425/avila_machdep.c
1.41 of src/sys/compat/pecoff/imgact_pecoff.c
1.26 of src/sys/compat/svr4/imgact_svr4.c
1.660 of src/sys/i386/i386/machdep.c
1.596 of src/sys/i386/i386/pmap.c
1.68 of src/sys/i386/ibcs2/imgact_coff.c
1.56 of src/sys/i386/linux/imgact_linux.c
1.226 of src/sys/ia64/ia64/machdep.c
1.192 of src/sys/ia64/ia64/pmap.c
1.102 of src/sys/kern/imgact_aout.c
1.179 of src/sys/kern/imgact_elf.c
1.56 of src/sys/kern/imgact_gzip.c
1.310 of src/sys/kern/kern_exec.c
1.287 of src/sys/kern/kern_fork.c
1.236 of src/sys/kern/kern_kse.c
1.253 of src/sys/kern/kern_proc.c
1.352 of src/sys/kern/kern_sig.c
1.63 of src/sys/kern/kern_thr.c
1.257 of src/sys/kern/kern_thread.c
1.397 of src/sys/pc98/pc98/machdep.c
1.104 of src/sys/powerpc/powerpc/machdep.c
1.10 of src/sys/powerpc/powerpc/pmap_dispatch.c
1.139 of src/sys/sparc64/sparc64/machdep.c
1.167 of src/sys/sparc64/sparc64/pmap.c
1.16 of src/sys/sun4v/sun4v/machdep.c
1.40 of src/sys/sun4v/sun4v/pmap.c
1.493 of src/sys/sys/proc.h
1.78 of src/sys/sys/signalvar.h
1.80 of src/sys/vm/pmap.h
1.79 of src/sys/vm/vm_extern.h
1.226 of src/sys/vm/vm_glue.c
1.390 of src/sys/vm/vm_map.c
Requested by: marius
Tested by: Peter Holm, marius (make universe and sparc64 runs)
Approved by: re (kensmith)
Fix unload of the fdc.ko:
Wakeup the thread doing the fdc_detach() when the fdc worker thread exits.
Write access to the write-protected floppy shall call device_unbusy() to
pair the device_busy() in the fd_access().
Call zil_commit() (if ZIL is not disabled) after every non-read request
(BIO_WRITE and BIO_FLUSH) as it is done is Solaris. The difference is
that Solaris calls it only for sync requests, but we can't say in GEOM
if the request is sync or async, so we do it for every request.
Approved by: re (gnn)
This fixes replacing drive in place, eg. zpool replace tank da1 da1.
Before the fix, it complained that device is already open.
Obtained from: OpenSolaris
Approved by: re (gnn)
When one tries to allocate memory with the M_WAITOK flag and we are short in
address space in kmem map call vm_lowmem event in a loop and wait a bit for
subsystems to reclaim some memory which in turn will reclaim address space as
well.
Note, this is a work-around.
Reviewed by: alc
Approved by: alc, re (gnn)
- In vfs_scanopt(), make sure that the mount option value is not NULL
before calling vsscanf().
PR: 118531
MFC: 1.268
- Internally convert "rdonly" mount option to "ro".
Approved by: re (kensmith)
Back when I committed the arm port, I've been asked to move
memcpy/memset/memcmp and friends from libkern/arm to arm/arm/support.S, and so
I did, but in the process, I didn't add the appropriate copyrights.
This is a major oversight from me, and I apology to the NetBSD people for it.
Approved by: re (mux)
> Change sysinstall's handling of X11 stuff. Doing it in pieces was
> probably the right thing to do a while ago but xorg has progressed
> to the point that for novice users (who are the ones expected to think
> installing X11 during an install...) it's best to just install the
> whole x11/xorg metaport for them. This removes the X11 sub-menus
> and sets it up so you just select whether or not you want X11. While
> here garbage collect an X11 configuration menu I missed removing when
> I removed support for attempting xorg configuration from inside sysinstall
> a while ago.
Approved by: re (hrs)
Fix some bugs in the FreeBSD 4/5/6 pci(4) IOCTLs compatibility code:
- Use the correct offsets when copying out the results of PCIOCGETCONF_OLD.
This happened to not affect the 64-bit architectures because there the
addition of pc_domain to struct pcisel didn't change the overall size of
struct pci_conf.
- Always copy the name and unit information to conf_old so it's also part
of the output once this information is cached in dinfo.
- Use the correct type for flags in struct pci_match_conf_old. This
change is more or less cosmetic though.
Approved by: re (gnn)
Increase control channel xmit queue to 128 packets.
Previous value 16 was too small for real LAC as temporal activity
spike cound easily overflow queue demanding tunnel disconnection due
to possible state inconsistency.
Approved by: re (gnn)
Add a workaround for a deadlock between the rt_setgate() and rt_check()
functions. It is easily triggered by running routed, and, I expect, by
running any other daemon that uses routing sockets.
Approved by: re (kensmith)
Implement a workaround of the datacorruption problem on ServerWorks
HT1000 chipsets. The HT1000 DMA engine seems to not always like 64K
transfers and sometimes barfs data all over memory leading to instant
chrash and burn.
Also fix 48bit adressing issues, apparently newer chips needs 16bit
writes and not the usual fifo thing.
HW donated by: Travis Mikalson at TerraNovaNet
Original work: sos
Approved by: re (kensmith)
order to determine whether a program is running with multithreading
support. This check causes __gthread_active_p() to always return 1
however, regardless of whether the program was actually compiled with
-pthread or not, due to the fact that the FreeBSD libc contains a
pthread_cancel() stub. Fix this by using the __gthread_active_p()
version that GCC uses for Solaris and which actively checks for a
working POSIX threads implementation (if such functions exist) instead
of checking for the mere existence of corresponding functions.
On platforms without TLS support, i.e. on arm and sparc64 due to the
lack of GNU TLS support for these archs in binutils 2.15., the false
positives returned by __gthread_active_p() for non-threaded programs
cause the exception handling implementation GCC uses in this case to
crash. This is because GCC assumes that the POSIX threading functions
actually work when __gthread_active_p() returns 1 while in fact the
corresponding stubs in libc just immediately return.
Given that __gthread_active_p() is also used in a couple of other
places besides exception handling, this bug has great potential to
also cause problems in other areas and on all archs.
This is committed to RELENG_7 directly in order to get a fix into
RELENG_7_0 as soon as possible while allowing to loop the official
fix back into the vendor branch and not taking gthr-posix.h off the
vendor branch in HEAD.
PR: 119289
Reviewed by: obrien (plus style fix)
Approved by: re (kensmith)
r1.62:
- Document icase variable of make search, which can be used to control
case-sensitivity
r1.63:
- Document PORT_DBDIR
r1.64:
- Remove incomplete sentence fragment
Approved by: re (hrs)
Do not allow the SNPSTTY ioctl for the snoop device that has a tty
attached. Otherwise, the snp->snp_tty would be overwritten, while the
tty line discipline still set to the snpdisc. Then snplwrite() causes
panic because ttytosnp() cannot find the snp. (And do it at the proper
place, from rev. 1.107).
MFC rev. 1.107:
The snp_target == NULL implies the snp_tty == NULL. Remove the code
that is put under snp_target == NULL and snp_tty != NULL clause.
In snpclose(), do the snp_detach() before scheduling the snp device
destruction. Otherwise, after the return from snpclose(), the snp
device is already removed from the snp_list, but tty is still in
snooped state. Any attempt to do i/o on such tty cause panic because
ttytosnp() returns NULL.
Approved by: re (kensmith)
Fix a panic where if the mbuf was consumed by the filter for requeueing
(dummynet), ipsec_filter() would return the empty error code and the ipsec
code would continue to forward/deference the null mbuf.
Approved by: re (gnn)
> Plug a memory leak. Once any given package (e.g. perl) was installed
> we would leak a saved screen for every other package we tried to install
> that listed perl as one of its dependencies. When installing things
> like gnome and kde that wound up being a LOT of leaked memory.
Approved by: re (bmah)
Remove process limits for datasize and stacksize which are unlimited
during a "normal login" (thanks to /etc/login.conf) but not when
sysinstall is running as part of an installation. Fixups for error
messages and a comment that became untrue.
Approved by: re (bmah)
> For the INDEX file to be used on disc1 of the 7.0-RELEASE the longest
> "build dependencies" field is 5,108 characters which overflows the
> length of the junk buffer by a teeny bit. This whole section needs
> much more error checking but for now just completely ignore stuff
> we have no interest in instead of copying it to someplace we don't
> use in the process.
Approved by: re (bmah)
In openprom_ioctl() ensure appropriate permissions and that data isn't
NULL and doesn't point to a NULL pointer before dereferencing it.
Approved by: re (kensmith)
When IPSEC fails to allocate policy state for an inpcb, and MAC is in use,
free the MAC label on the inpcb before freeing the inpcb.
Submitted by: tanyong <tanyong at ercist dot iscas dot ac dot cn>,
zhouzhouyi
Approved by: re (kensmith)
> Add support for disc3. Depending on architecture the combination of
> kde3 and gnome2 is at least 670Mb which would mean if we stick with
> just disc1/disc2 the only packages we could provide on the iso's
> would be X11, kde3, and gnome2...
Approved by: re (rwatson)
> A few more adjustments needed because of changes in xorg. Just installing
> xorg-server doesn't include any video drivers so install xorg-drivers as
> well. And if font-alias isn't installed the X server won't start,
> complaining it can't find the font "fixed".
Approved by: re (rwatson)
Fix a MAC label leak for POSIX semaphores, in which per-policy labels
would be properly disposed of, but the global label structure for the
semaphore wouldn't be freed.
Reported by: tanyong <tanyong at ercist dot iscas dot ac dot cn>,
zhouzhouyi
Approved by: re (kensmith)
Fix leaking MAC labels for IPv6 inpcbs by adding missing MAC label
destroy call; this transpired because the inpcb alloc path for IPv4/IPv6
is the same code, but IPv6 has a separate free path. The results was
that as new IPv6 TCP connections were created, kernel memory would
gradually leak.
Reported by: tanyong <tanyong at ercist dot iscas dot ac dot cn>,
zhouzhouyi
Approved by: re (kensmith)
- Use the macro to check the port status has it will also test if its
administratively down (!IFF_UP)
- Use the same parameters to lagg_link_active() to get the backup port as in
the output path, this didnt actually matter in practice as sc_primary is
always the first on the port list.
Approved by: re (kensmith)
When the bridge has an address and a packet comes in for it then drop it if
the link has been marked discarding by Spanning Tree.
Approved by: re (kensmith)
Disallow the legacy USB circuit to generate an SMI# via an ICH
register (MacBooks only).
This allows MacBooks to boot in SMP mode without any trick and
solves
the timer problems with HZ=1000.
Approved by: re (kensmith), njl (mentor)
Disallow the legacy USB circuit to generate an SMI# via an ICH
register (MacBooks only).
This allows MacBooks to boot in SMP mode without any trick and solves
the timer problems with HZ=1000.
Approved by: re (kensmith), njl (mentor)
4k/9k and 16k clusters, the old sysctl's were just empty
things that just set delusional numbers that had no effect :-(
- Add an initial limit each to be 1/2 of the previous value starting
at 2k.. i.e. limit for 4k = 1/2 of 2k, limit for 9k = 1/2 4k etc.
Reviewed by: [email protected]
Approved by: [email protected] (gnn)
date: 2007/11/03 17:33:41; author: scottl; state: Exp; lines: +2 -1
Ever since the module registration system was introduced to this driver,
it's been printing out scary messages about "Unhanded Event Notify Frame"
that are needlessly worrisome to users. Change this warning to only print
out at an elevated debugging level.
Approved by: re (kensmith)
Limit total hardware playback channels to just 1. The reliability of
it's multi DAC / playback channels is not that good. Enabling vchans
make the bug more visible since playback allocation will look for
possible free hardware channels first (i.e: the next DAC, the very first
has been consumed by vchan mixer) which in this case has been proven faulty.
Tested by: Dominic Fandrey <LoN_Kamikaze at gmx dot de>
URL: http://lists.freebsd.org/pipermail/freebsd-stable/2007-December/039022.html
Approved by: re (kensmith)
Disable AC97 microphone channel. Due to the channel allocation priority
that favours true hardware channel, the first instance of recording
request will grab this channel (the first channel is being used as
vchan master). In many cases, it is not really work as intended and give
false impression of broken recording.
PR: kern/118546
Approved by: re (kensmith)
- nid 28 for Acer @ ALC268 should be identified as analog CD input pin,
though it doesn't provides proper (sane, valid, usable, etc) analog CD
playback due to its stripped down nature.
- Add speaker/headphone controls for HP Compaq DC7700 Small Form Factor PC
@ ALC262. [1]
Submitted by: [1] Carlos A. M. dos Santos <unixmania at gmail dot com>
Approved by: re (kensmith)
Eliminate compilation warnings due to the use of non-static inlines
through the introduction and use of the __gnu89_inline attribute.
Approved by: re (kensmith)
Use curthread instead of the FIRST_THREAD_IN_PROC for vnlru and syncer,
when applicable.
Aquire Giant slightly later for vnlru.
In the syncer, aquire the Giant only when a vnode belongs to the
non-MPsafe fs.
In both speedup_syncer() and syncer_shutdown(), remove the syncer thread from
the lbolt sleep queue after the syncer state is modified, not before.
Approved by: re (kensmith)
aac.c:1.124
aacvar.h:1.49
Allow simultaneous opens of the device for issuing commands to the
controller. This is merged from Adaptec driver build 11669.
aac.c:1.125
aac_pci.c:1.66
aacreg.h:1.24
Add family support to allow the driver to attach to new devices that
share the same interface.
aac_cam.c:1.30
Merge from Adaptec a 64 bit fix and a workaround for luns != 0
returning CAM_SEL_TIMEOUT on SAS controllers, which prevented
passthrough devices from being created.
Approved by: re (kensmith)
Teach dhclient(8) about net80211 link (association) status.
Especially it helps ndis(4) where it is used with wpa_supplicant(8)
since 0.5.8 is imported. Previously ndis_events(8) was used to notify
link status to wpa_supplicant but it is defuct now, i. e., external event
notification mechanism is removed by the vendor and there is no substitute
for ndisulator yet.
Reviewed by: brooks
OK'd by: sam
Approved by: re (kensmith)
sending, once the locks are all unlocked to
do the copy's in, its possible that other
events could then raise the number of bytes
outstanding pushing it so not all the message
would fit. This would then cause us to send
only part of the message. This fix makes it
so we keep a "reserved" amount that can be
kept in mind when making calculations to send.
- rcv msg args with a NULL/NULL for to/tolen will return
an error incorrectly for the 1-2-1 model.
- We were not doing 0 len return correctly and not
setting socantrcv() more correctly. Previouly we "fixed"
this area by taking out the socantrcv()
since we then could not get the data out. The correct fix
is to still flag the socket but alow a by-pass route to
continue to read until all data is consumed.
- Fix the initial buf calculation to be more friendly, calc is
the same but we use different variable to make it easier
amongst the different code versions.
- Signedness issue with one of the new var's (this is an issue
mainly in apple but with the right -Wall it could effect us too).
- optimize the initialization of the SB max variables.
- Missing lock(s) when sending data and moving it to the
outqueue.
- If a mbuf alloc fails during moving to outqueue the
reassembly of the old mbuf chain was incorrect.
- some_taken becomes a counter in sctputil.c instead of a set to 1.
- Fix a panic to be only under invarients and have a proper recovery
in reading messages.
- msg_flags needed to be set to the value collected not or'd.
- More fixes for lock misses on the transfer of data to
the sent_queue. Sometimes I wonder why any code
ever works :-)
- Fix the pad of the last mbuf routine, It was working improperly
on non-4 byte aligned chunks which could cause memory overruns.
Approved by: [email protected](gnn)
* Add preliminary SATA ATAPI support for sii 3132/3124 chips.
* Fix speed report on Intel SATA chips in compat mode.
* Fix broken detect of JMicron 368.
Related revisions:
- ata-chipset.c: 1.208, 1.210
- ata-disk.c.c: 1.205
Approved by: re (kensmith), sos
MFC rev 1.2 if_wpireg.h
MFC rev 1.1 if_wpivar.h
MFC rev 1.3 wpi.4
o Initial Import of Intel 3945abg Wireless Lan Controller (wpi) driver
o Turn off debug output
o Fix WEP compatiblity
o Handle missed beacons correctly
MFC includes firmware & LICENSE as well.
Approved by: re (kensmith), mlaier (comentor)
Correct an error under COUNT_IPIS within pmap_lazyfix_action(): Increment
the counter that the pointer refers to, not the pointer.
Approved by: re (kensmith)
Fix a potential bug in pmap :
We used to allocate the domains 0-14 for userland, and leave the domain 15
for the kernel. Now supersections requires the use of domain 0, so we
switched the kernel domain to 0, and use 1-15 for userland.
How it's done currently, the kernel domain could be allocated for a
userland process.
So switch back to the previous way we did things, set the first available
domain to 0, and just add 1 to get the real domain number in the struct pmap.
Reported by: Mark Tinguely <tinguely AT casselton DOT net>
Approved by: re (kensmith)
sys/arm/include/asmacros.h rev 1.7
sys/arm/include/atomic.h rev 1.23
Close a race.
The RAS implementation would set the end address, then the start
address. These were used by the kernel to restart a RAS sequence if
it was interrupted. When the thread switching code ran, it would
check these values and adjust the PC and clear them if it did.
However, there's a small flaw in this scheme. Thread T1, sets the end
address and gets preempted. Thread T2 runs and also does a RAS
operation. This resets end to zero. Thread T1 now runs again and
sets start and then begins the RAS sequence, but is preempted before
the RAS sequence executes its last instruction. The kernel code that
would ordinarily restart the RAS sequence doesn't because the PC isn't
between start and 0, so the PC isn't set to the start of the sequence.
So when T1 is resumed again, it is at the wrong location for RAS to
produce the correct results. This causes the wrong results for the
atomic sequence.
The window for the first race is 3 instructions. The window for the
second race is 5-10 instructions depending on the atomic operation.
This makes this failure fairly rare and hard to reproduce.
Mutexs are implemented in libthr using atomic operations. When the
above race would occur, a lock could get stuck locked, causing many
downstream problems, as you might expect.
Also, make sure to reset the start and end address when doing a syscall, or
a malicious process could set them before doing a syscall.
Reviewed by: imp, ups (thanks guys)
Approved by: re (kensmith)
Pointy hat to: cognet
date: 2007/11/26 19:08:08; author: sos; state: Exp; lines: +1 -1
Use device_set_desc_copy in the generic ident as its used on a temp buffer.
Approved by: re (kensmith)
zic(8) should exit the loop when the end of the string is reached
due to the call to error(). The problem found by doing fuzz testing.
Approved by: re (kensmith)
To reduce the impact of possible removal of the syscalls required by
libkse in FreeBSD 8.0, do not build or install static versions of libkse
(i.e. libkse*.a) in the default case. Static versions will be built and
installed if libthr is not built or if libkse is the default threading
library.
Discussed on: freebsd-arch
Approved by: re (kensmith)
rev 1.323 of src/sys/amd64/amd64/trap.c
rev 1.310 of src/sys/i386/i386/trap.c
Fix the ABI change of the signal delivered on the access to the page
with insufficient protection mode.
Approved by: re (kensmith)
rev 1.182 of src/sys/kern/imgact_elf.c
rev 1.288 of src/sys/kern/init_main.c
rev 1.312 of src/sys/kern/kern_exec.c
rev 1.85 of src/sys/kern/kern_mib.c
rev 1.496 of src/sys/sys/proc.h
rev 1.262 of src/sys/sys/systm.h
Implement fetching of the __FreeBSD_version from the ELF ABI-tag note.
The value is read into the p_osrel member of the struct proc. p_osrel
is set to 0 for the binaries without the note.
Approved by: re (kensmith)
Check for the program headers alignment of the ELF images before
dereferencing. Unaligned access could cause panic on strict alignment
architectures.
Approved by: re (kensmith)
principle, the current devfs-based cloning facilit makes the current
user<->kernel protocol for allocating new pts nodes difficult or
impossible to do without leading to resource leaks or race conditions.
We tentatively plan to reintroduce ptmx/pts support in FreeBSD 7.1 once
a fixed version has settled out in HEAD. People who really want to run
with the current code can re-enable it but it will require tweaking
conf files and unifdef'ing it. By removing it now before the release,
we avoid having to support the current allocation protocol in future
releases in order to provide backwards compatibility with older libc's.
Discussed with: cognet, erwin
Approved by: re (kensmith)
Plug two potential (root-only, local) information leaks. buf is not
initialized before use and returned integrally instead of up to size.
Submitted by: Ilja van Sprundel <ilja -at- netric.org>
Reviewed by: secteam
Approved by: re (kensmith)
Plug two potential (root-only, local) information leaks. buf is not
initialized before use and returned integrally instead of up to size.
Submitted by: Ilja van Sprundel <ilja -at- netric.org>
Reviewed by: secteam
Approved by: re (kensmith)
Always honor promiscuous flag prior to programming Rx multicast
filter. This fixes a regression introduced in rev 1.89.
PR: 114632
Approved by: re (kensmith)
Apparently some NVIDIA NICs store ethernet address in reverse order
while other variants have inorder ethernet address for the same
chipset. Override ethernet address ordering if we already know how
it was stored. This fixes the use of inversed ethernet address on
MCP67.
Approved by: re (kensmith)
Make TSO work with IPSEC compiled into the kernel.
The lookup hurts a bit for connections but had been there anyway
if IPSEC was compiled in. So moving the lookup up a bit gives us
TSO support at not extra cost.
Approved by: re (kensmith)
sys/sparc64/pci/psycho.c 1.71, 1.72;
sys/sparc64/pci/psychovar.h 1.17
- Add the PCI side of the HOST-PCI bridge itself to the bus. This
is required by the X.Org PCI domains code and additionally needs
a workaround for Hummingbird and Sabre bridges as these don't
allow their config headers to be read at any width, which is an
unusual behavior.
- In psycho(4) take advantage of DEFINE_CLASS_0 and use more
appropriate types for some softc members.
Approved by: re (kensmith)
"Revert revision 1.4.
Intel CPUs with family 0x6, model 0xE and later (i.e., Intel Core(TM))
have a PMC architecture that differs somewhat from previous CPUs in
family 0x6. Even though the basic programming model is similar, the
documented set of legal values that may be loaded into their PMC MSRs
differs from that of the previous PMCs in family 0x6 and reusing bit
values legal for the older PMCs could result in undefined behaviour in
the general case."
Approved by: re (gnn)
arm/at91/kb920x_machdep.c rev 1.24, 1.25 and 1.26
arm/at91/std.at91 rev 1.4
arm/at91/std.kb920x rev 1.5
arm/at91/at91rm92reg.h rev 1.6
conf/options.arm 1.18
Small tweaks to be able to load the kernel at a different address than
0x20000000 + add an option to override the default value of the master clock
frequency.
arm/at91/if_ate.c rev 1.21:
In ate_get_mac(), try to get the mac address in the right order, at least
in the same order as it's set in ate_set_mac.
arm/conf/HL200: config file for the Hot-e HL200
Approved by: re (kensmith)
Let opt be an array. Though &opt[0] == opt == &opt, &opt is highly
confusing and hard to understand so change it to just opt and
remove the extra cast no longer/not needed.
Approved by: re (kensmith)
Expand the EXAMPLES section for atacontrol.8
PR: docs/117310
Submitted by: Ted Mittelstaedt <tedm at ipinc dot net>
with minor modifications by me.
Approved by: re (hrs)
Remove mentionings of kern.dumpdev which is no longer available.
PR: docs/113570
Submitted by: lawrance
MFC After: 3 days (where applicable)
Approved by: re (hrs)
Sync with md(4)'s information regarding the swap backend.
PR: docs/115721
Submitted by: Stefan Lambrev <[email protected]>
MFC After: 3 days
Every newline should start on it's own line. I didn't do that in the
previous commit, so make it happen now.
Prodded by: brueffer
Approved by: re (hrs)
The nfe driver will first appear in 7.0 and not in 6.x
PR: i386/118264
Submitted by: "Julian H. Stacey" <jhs at berklix dot org>
Nod from: yongari
Approved by: re (hrs)
Add information about the ICH6 and ICH7 being supported since recently.
MFC rev 1.20 ichsmb_pci.c
Add the Intel 82801FB (ICH6) SMBus controller and the
Intel 82801GB (ICH7) SMBus controller.
PR: 85106 [1]
PR: 99663 [2]
Approved by: imp (mentor), jhb
Submitted by: Oliver Fromme <olli at lurza.secnetix dot de>, [1]
Arthur Hartwig <arthur dot hartwig at nokia dot com>, [1]
Lowell Gilbert <lgfbsd at be-well dot ilk dot org> [2]@
MFC After: 3 days
Approved by: re (hrs), imp (mentor, implicit)
Add information about the 845M card that I recently committed support
for.
MFC rev 1.44 agp_i810.c
Add the 845M GMCH controller.
PR: 114802
Approved by: imp (mentor), anholt (private mail)
Submitted by: Alex Goncharov <algo1 at comcast dot net>
MFC After: 3 days
Approved by: re (hrs), imp (mentor, implicit)
Simplify adaptive spinning algorithm which should make things faster
when sleeping / waking up waiters.
Also fix a bug with rw_try_upgrade() when adaptive spinning is enabled
as turnstile_lookup() will recurse on ts_lock that will never be
released [1].
[1] Reported by: jeff with Nokia help
Tested by: pho, kris (earlier, bugged version of rwlock part)
Discussed with: jhb, jeff
Approved by: re
Fix 3 issues relating to the use of "auth" rules in IPFilter, from sourceforge:
1837014 Kernel panics after authentication of an outgoing packet
1836992 Potential bugs in packet auth code (w/patches)
1836967 Kernel panic when using auth rule with keep state
and another reported only to FreeBSD by Andiry (see PR)
PR: kern/118251
Submitted by: Andriy Syrovenko <[email protected]>
Reviewed by: darrenr
Approved by: re
- Remove magic number and fit max rx buffer size accurately.
- Patch registers CR47 and CR157 on devices that require it.
- Fix power calibration setting on ZD1211B.
Obtained from: OpenBSD
- Fix multicast transfer by properly reprogram multicast global
hash table, which in turns fix promiscuous mode and IPv6
autoconfiguration / local networking.
Reviewed by: sam, Weongyo Jeong
Tested using: Aztech WL230 , Belkin F5D7050, Unicorn WL-54G,
3COM 3CRUSB10075
Approved by: re (kensmith)
- Add missing MCP65 id which was accidentally removed in previous commit.
- Add Analog Devices AD1984 codec id.
- Enable pcbeep control for Acer + ALC268 (nid 29). Give enough (fake)
hints so the parser will grab it and allocate "speaker" control.
- Fix regression while preparing DAC and ADC for multichannel
format. Since playback policy is to output to every possible path,
ensure that each DAC is started.
Reported / Tested by: Guy Brand
Approved by: re (kensmith)
other routing daemons still rely on this interface and otherwise do not
function on 7.0. It has not been restored to 8-CURRENT, so this is not
an MFC.
Reviewed by: bms
Submitted by: Marko Zec <zec icir org>
Tested by: kensmith
Approved by: re (kensmith)
Newer Intel processors have better hyperthreading implementations than
the original ones, and FreeBSD's SMP and scheduler code has greatly
improved between 6.x and 7.x; so hyperthreading now provides a
non-trivial performance win.
Note that security issues involving shared caches and other
microarchitectural features (e.g., dynamic branch prediction tables)
still exist; consequently, it is recommended that hyperthreading be
turned off on systems with untrusted local users. This can be
performed by setting machdep.hyperthreading_allowed=0 in
/boot/loader.conf.
Hyperthreading will continue to be disabled by default on FreeBSD 6.x.
Requested by: core
Approved by: re (kensmith)
Security: See FreeBSD-SA-05:09.htt for background information.
When reactivating a cached page, reset the page's pool to the default
pool. (Not doing this before was a performance pessimization but not
a cause for panic.)
Approved by: re (kensmith)
o Acer Aspire 4520 laptop
- jack sensing / automute
o Toshiba Satellite A135-S4527 laptop
- jack sensing / automute
Tested by: lioux
o Apple Macbook 3 (is it?)
- require gpio0 (for speakers) and ovref50 (for headphone)
to make it works
- jack sensing / automute
Tested by: Ed Schouten
* Add Nvidia MCP67 controller ids.
* Be sensible about simmilar controller with multiple pci ids.
* Connect unused DAC/ADC to stream#0 rather than forcing each of them
managing their own stream.
Approved by: re (kensmith)
Remove kernel and module symbol files from disc1 (and the livecd if it
is enabled). This saves around 80MB (for i386) on the ISO images.
Note that this is only from the install media, not the installed
system where the symbols are still installed, if part of the release.
Should anybody want the symbols which match disc1/livecd, they can
just be extracted from the kernel distribution files.
Approved by: re (kensmith)
More carefully handle various cases in sysctl_drop(), such as unlocking
the inpcb when there's an inpcb without associated timewait state, and
not unlocking when the inpcb has been freed. This avoids a kernel panic
when tcpdrop(8) is run on a socket in the TIMEWAIT state.
Reported by: Rako <rako29 at gmail dot com>
Approved by: re (kensmith)
Remove hacks from the NFSv2/3 client intended to handle a lack of a
server-side RPC retranmission cache for non-idempotent operations: these
hacks substituted 0 (success) for the expected EEXIST in the event that
a target name already existed for LINK, SYMLINK, and MKDIR operations,
under the assumption that EEXIST represented a second application of the
original RPC rather than a true failure.
Background: certain NFS operations (in this case, LINK, SYMLINK, and
MKDIR) are not idempotent, as they leave behind persisting state on the
server that prevents them from being replayed without an error;if an UDP
RPC reply is lost leading to a retransmission by theclient, the second
reply will return EEXIST rather than success, asthe new object has
already been created. The NFS client previouslysilently mapped the
EEXIST return into success to paper over thisproblem.
However, in all modern NFS server implementations, a reply cache is kept
in order to retransmit the original reply to a retransmitted request,
rather than performing the operation a second time, allowing this hack
to be avoided. This allows link()-based filelocking over NFS to operate
correctly, as an application requestingthe creation of a new link for a
file to tell if it succeededatomically or not.
Other NFS clients, including Solaris and Linux, generally follow this
behavior for the same reasons. Most clients also now default to TCP,
which also helps avoid the issue of retransmitted but non-idempotent
requests in most cases.
Reported by: Adam McDougall <mcdouga9 at egr dot msu dot edu>,
Timo Sirainen <tss at iki dot fi>
Reviewed by: mohans
Approved by: re (kensmith)
Let sunkbd(4) emulate an AT keyboard by default.
This has the following benefits:
- allows to use the AT keyboard maps in share/syscons/keymaps with
sunkbd(4),
- allows to use kbdmux(4) with sunkbd(4),
- allows Sun RS232 keyboards to be configured and used the same
way as Sun USB keyboards driven by ukbd(4) (which also does AT
keyboard emulation) with X.Org, putting an end to the problem
of native support for the former in X.Org being broken over and
over again.
Approved by: re (kensmith)
Make VPD register access more robust:
- Implement timing out of VPD register access.
- Fix an off-by-one error of freeing malloc'd space when checksum is invalid.
- Fix style(9) bugs, i.e., sizeof cannot be followed by space.
- Retire now obsolete 'hw.pci.enable_vpd' tunable.
Approved by: re (kensmith)
Do not report MAC, TX, and RX stats via sysctl(8) with BCM5705+.
The register layout is little different from memory-mapped stats
in the previous generation chips. In fact, it is bad because
registers in this range are cleared after reading them.
Approved by: re (kensmith)
strees2 suite, to quote his letter, this change:
1. It removes the tn_lookup_dirent stuff. I think this cannot be fixed,
because nothing protects vnode/tmpfs node between lookup is done, and
actual operation is performed, in the case the vnode lock is dropped.
At least, this is the case with the from vnode for rename.
For now, we do the linear lookup in the parent node. This has its own
drawbacks. Not mentioning speed (that could be fixed by using hash), the
real problem is the situation where several hardlinks exist in the dvp.
But, I think this is fixable.
2. The patch restores the VV_ROOT flag on the root vnode after it became
reclaimed and allocated again. This fixes MPASS assertion at the start
of the tmpfs_lookup() reported by many.
Submitted by: kib
Approved by: re (kensmith)
Reloop OpenBSD rev. 1.563:
In pf_test_fragment(), ignore protocol-specific criteria for packets of
different protocols.
Cleanup pf interface mangement - esp. remove EVENTHANDLER before
unloading the coresponding code. This was lost during 4.1 import.
Bring back pf_if.c revs 1.8 and 1.6 also lost during last import:
- Use correct time for tzero when compiled in
- Don't use bogus interface addresses on ptp-interfaces with :0
Approved by: re (kensmith)
Garbage collect now-unused nfsrv_setcred() -- it's not only unused, but
also a purveyor of unfortunate (and now unsupported) direct frobbing of
struct ucred.
Approved by: re (kensmith)
The kernel uses two ways to write data on a pipe:
o buffered write, for chunks smaller than PIPE_MINDIRECT bytes
o direct write, for everything else
A call to writev(2) may receive struct iov of various size and the
kernel may have to switch from one solution to the other. Before doing
this, it must wake reader processes and any select/poll/kqueue up.
This commit fixes a bug where select/poll/kqueue are not triggered
when switching from buffered write to direct write. It adds calls to
pipeselwakeup().
I give more details on freebsd-arch@:
http://lists.freebsd.org/pipermail/freebsd-arch/2007-September/006790.html
This should fix issues with Erlang (lang/erlang) and kqueue.
Reported by: Rickard Green (Erlang)
Approved by: re (kensmith)
Test that p_textvp is non-NULL be dereferencing, as no executable vnode is
set for kernel processes.
Reported by: Skip Ford <skip at menantico dot com>
Approved by: re (kensmith)
date: 2007/10/18 08:41:52; author: delphij; state: Exp; lines: +2 -2
Do not bail out for cleanworld target just because
chflags is failed.
Approved by: re (kensmith)
- Merge all the ng_send_fn2* functions into one - ng_send_fn2(),
removing some copy&pasted code.
- Reduce copy and paste in ng_apply_item().
- Resurrect ng_send_fn() as a valid symbol, not a define.
Reviewed by: mav, julian
Approved by: re (kensmith)
Fix picobsd builds. Changes include:
- use proper make configuration for the build, using
${BINMAKE} as evaluated by ${VERSION}/src/Makefile
- remove -lmytinfo from crunch.conf
- remove support for login_access in tinyware/login
- remove "machine i386" from the kernel config file
It might actually be interesting to extend the script to do
a cross build for !i386 ...
Approved by: re
reducing the chance of device removal(PCCARD) panic by replacing the
timeout(9) with callout(9) APIs.
Tested by: dhw
Approved by: re (kensmith)
MFC after: 3 days
date: 2007/11/12 18:57:33; author: delphij; state: Exp; lines: +1 -1
Correct a stack overflow which will trigger panics when
mode= is specified, caused by incorrect format string
specified to vfs_scanopt() and subsequently vsscanf().
Pointed out by: kib
Submitted by: des
Approved by: re (kensmith)
> While checking over the libraries for 7.0-REL Kris found the following
> libraries had not had their versions bumped relative to 6.3-REL but
> had indeed been changed. We need to bump their version so they can be
> properly added to the compat6x port:
>
> libasn1.so.8 libgssapi.so.8 libhdb.so.8 libkadm5clnt.so.8
> libkadm5srv.so.8 libkafs5.so.8 libkrb5.so.8 libobjc.so.2
Versions being MFCed:
gnu/lib/libobjc/Makefile: 1.33
kerberos5/lib/Makefile.inc: 1.8
lib/libgssapi/Makefile: 1.3
Approved by: re (bmah)
Move the priv check before the malloc call for so_pcb.
In case attach fails because of the priv check we leaked the
memory and left so_pcb as fodder for invariants.
Approved by: re (kensmith)
Limit total playback channels to just 1, for ALi M5451.
The reliability of it's multi DAC / playback channels is
not that good. Enabling vchans make the bug more visible
since playback allocation will look for possible free
hardware channels first (i.e: the next DAC, the very first
has been consumed by vchan mixer) which in this case has
been proven faulty.
Reported / Tested by: Sascha Klauder
Approved by: re (kensmith)
layout. xorg-printserver still exists in the ports tree but it's marked
as depreciated and scheduled for removal.
Versions MFCed:
dist.c: 1.252
dist.h: 1.70
menus.c: 1.428
Approved by: re (bmah)
advertisement during low mem conditions.
- Fixes a compile error on mac-os (signedness stuff).
- Touches up some comments.
Approved by: [email protected] (Ken Smith)
Add SMB support for the MCP61 chipset.
PR: 108830
Submitted by: Edwin Mons <freebsd at edwinm dot ik dot nu>
Approbed by: imp (mentor)
Approved by: imp (mentor, implicit)
Approved by: re (kensmith)
Split decr_init() into two, with the section that reads the timebase
frequency from OpenFirmware moved out and into a routine that is called
from cpu_startup().
This allows correct reporting of the CPU clockspeed when printing out
CPU information at boot time.
Approved by: re (Ken Smith)
Add a missing priv check in key_attach to prevent non-su users
from messing with the spdb and sadb.
Problem sneaked in with the fast_ipsec+v6->ipsec merger by no
longer going via raw_usrreqs.pr_attach.
Approved by: re (kensmith)
1.75: Make ukbd_getc respect non-blocking behavior if one is requested;
1.76: Do not pass an address of local stack variable to
usbd_set_report_async.
Approved by: re (kensmith)
Update pf examples from OpenBSD to catch up with new stateful defaults and
other syntax changes. Move pf.conf from /etc to examples, too.
Approved by: re (kensmith)
Correct a copy and paste'o in phys_pager.c, we are talking about phys here
and not about devices.
PR: 93755
Approved by: imp (mentor, implicit when re-assigning the ticket to me).
Approved by: re (kensmith), imp (mentor)
In _pthread_key_create() ensure that libthr is initialized. This
fixes a NULL-dereference of curthread when libstdc+ initializes
the exception handling globals on archs we can't use GNU TLS due
to lack of support in binutils 2.15 (i.e. arm and sparc64), yet,
thus making threaded C++ programs compiled with GCC 4.2.1 work
again on these archs.
Approved by: re (kensmith)
Revision Changes Path
1.123 +5 -2 src/sys/dev/aac/aac.c
1.29 +17 -17 src/sys/dev/aac/aac_cam.c
Rework aac locking for MPSAFE CAM. This fixes a Giant mutex assertion
reported on freebsd-current [1].
Also dequeue all events in aac_release_command (instead of just one)
so that there's no risk of them getting stranded.
Reported by: Steven Brown [1]
Submitted by: scottl@
[1] http://lists.freebsd.org/pipermail/freebsd-current/2007-October/077928.html
Approved by: re
on duplicated code and support 64-bit LBAs for GPT. This also changes the
code to always use EDD on devices that support it which matches the rest of
the x86 bootstrap.
Approved by: re (kensmith)
where the L1 cache is shared between CPUs) to disabled for security
reasons. As in earlier releases, this can be changed by setting
machdep.hyperthreading_allowed=1 in /boot/loader.conf.
This is not an MFC -- no seatbelts in CURRENT.
Approved by: re (kensmith)
Security: See FreeBSD-SA-05:09.htt for background material.
Add comments explaining why all stores updating a non-kernel page table
must be globally performed before calling any of the TLB invalidation
functions.
With one exception, on amd64, this requirement was already met. Fix this
one case. Also, as a clarification, change an existing atomic op into a
release.
Approved by: re (kensmith)
Change wpa_supplicant to down the interface at the start of the init routine.
wpa_supplicant expects that it has exclusive access to the net80211 state so
when its starts poking in the WEP/WPA settings and the card is already
scanning it can cause net80211 to try and associate incorrectly with a
protected AP.
This is an inconvenience for firmware based cards such as iwi where it can be
sent an auth instruction with incomplete security info and cause a firmware
error.
Remove the 'ifconfig up' from network.subr since wpa_supplicant will
immediately down the interface again.
Approved by: re (gnn)
Eliminate spurious "Approaching the limit on PV entries, ..."
warnings by get_pv_entry().
Eliminate the direct call to pagedaemon_wakeup() by get_pv_entry().
Approved by: re (gnn)
used to configure a bridge on both and adds room for later MFCs.
The struct is part of the API/ABI and shouldnt be changed again (c/o rwatson)
Approved by: re (rwatson)
Allow RFCOMM servers to bind to a ''wildcard'' RFCOMM channel
zero (0). Actual RFCOMM channel will be assigned after listen(2)
call is done on a RFCOMM socket bound to a ''wildcard'' RFCOMM
channel zero (0).
Address locking issues in ng_btsocket_rfcomm_bind()
Submitted by: Heiko Wundram (Beenic) < wundram at beenic dot net >
Approved by: re (kensmith)
If the INDEX file cannot be opened, print the actual filename / path
pkg_version tried to open instead of just "INDEX" to make the actual
problem more clear (e.g. missing INDEX-8).
Approved by: re (kensmith)
mac_biba.c:1.108, mac_mls.c:1.89, mac_stub.c:1.69, mac_test.c:1.79 from
HEAD to RELENG_7:
Canonicalize naming of local variables for struct ksem and associated
labels to 'ks' and 'kslabel' to reflect the convention in posix_sem.c.
Obtained from: TrustedBSD Project
Approved by: re (kensmith)
- Select a tag gains ability to optionally save new tags
off in the timewait system.
- When looking up associations do not give back a stcb that
is in the about-to-be-freed state, and instead continue
looking for other candiates.
- New function to query to see if value is in time-wait.
- Timewait had a time comparison error that caused very
few vtags to actually stay in time-wait.
- When setting tags in time-wait, we now use the time
requested NOT a fixed constant value.
- sstat now gets the proper associd when we do the query.
- When we process an association, we expect the tag chosen
(if we have one from a cookie) to be in time-wait. Before
we would NOT allow the assoc up by checking if its good.
In theory this should have caused almost all assoc not
to come up except for the time-comparison bug above (this
bug was hidden by the time comparison bug :-D).
- Don't save tags for nonce values in the time-wait cache
since these are used only during cookie collisions and do
not matter if they are unique or not.
Approved by: [email protected] (Ken Smith)
Revisions:
1.21 src/sys/dev/sound/pci/atiixp.c
1.4 src/sys/dev/sound/pci/atiixp.h
Add support for trimmed down version of ATI SB600 AC97 audio
controller.
URL: http://www.ipc2u.de/catalog/P/PE/36486.html
PR: kern/117813
Submitted by: Klaus Mayr
Approved by: re (kensmith)
rgephy.c rev 1.17, rgephyreg.h rev 1.3
Add support for RealTek RTL8211B(L) PHY. It's based on the patch
made by Michael Eisele and the patch was slightly modified by me.
With this change several NVIDIA ethernet controllers(e.g. MCP61)
works.
RTL8211B(L) is RealTek's new gigabit PHY. The PHY has several
features including crossover correction, polarity correction as
well as supporting triple speed(10/100/1000bps). Data transfer
between MAC and PHY is via RGMII for 1000baseT, MII for
10baseT/100baseTX.
Unfortunately, RealTek used the same model number for RTL8211B(L)
PHY so there is no way to discriminate between RTL8211B(L) and its
predecessors. ATM RTL8211B uses revision number 2 so checking the
revision number seems to be only way to identify it.
rgephyreg.c rev 1.18
Setting sc->mii_anegticks to MII_ANEGTICKS_GIGE in rgephy_attach()
is redundant. mii_phy_add_media() already takes care of that.
Approved by: re (kensmith)
o RTL8169S/8110S integrated PHY and RTL8211B are gigabit PHYs so set
mii_anegticks to MII_ANEGTICKS_GIGE and use it. Previously it used
to MII_ANEGTICKS which may not be enough to wait before retrying
autonegotiation process at 1000bps.
o Reset autonegotation timer if media option is not IFM_AUTO or we
got a valid link.
o Announce link loss right after it happends.
o Autonegiation is retried every mii_anegticks seconds.
o Report link state changes right after setting autonegotiation.
Approved by: re (kensmith)
- Remove AU_.* hard-coded audit class constants, as udit classes are now
entirely dynamically configured using /etc/security/audit_class.
Obtained from: TrustedBSD Project
Approved by: re (kensmith)
- Fix bug in auditreduce(8) which resulted in a memory fault/crash when
the user specified an event name with -m.
- Remove AU_.* hard-coded audit class constants, as audit classes are now
entirely dynamically configured using /etc/security/audit_class.
Obtained from: TrustedBSD Project
Approved by: re (kensmith)
Replace use of AU_NULL with 0 when no audit classes are in use; this
supports the removal of hard-coded audit class constants in OpenBSM
1.0. All audit classes are now dynamically configured via the
audit_class database.
Obtained from: TrustedBSD Project
Approved by: re (kensmith)
of the full request size. This avoids a 32-bit overflow
problem skipping an exact multiple of 4GB and is faster
anyway because it allows the underlying I/O framework
to minimize copying.
In particular, this fixes bsdtar failing to properly skip
entries in uncompressed tar archives that are an exact
multiple of 4GB.
Approved by: re (Ken Smith)
01 - Enhanced LRO:
LRO feature is extended to support multi-buffer mode. Previously,
Ethernet frames received in contiguous buffers were offloaded.
Now, frames received in multiple non-contiguous buffers can be
offloaded, as well. The driver now supports LRO for jumbo frames.
02 - Locks Optimization:
The driver code was re-organized to limit the use of locks.
Moreover, lock contention was reduced by replacing wait locks
with try locks.
03 - Code Optimization:
The driver code was re-factored to eliminate some memcpy
operations. Fast path loops were optimized.
04 - Tag Creations:
Physical Buffer Tags are now optimized based upon frame size.
For better performance, Physical Memory Maps are now re-used.
05 - Configuration:
Features such as TSO, LRO, and Interrupt Mode can be configured
either at load or at run time. Rx buffer mode (mode 1 or mode 2)
can be configured at load time through kenv.
06 - Driver Statistics:
Run time statistics are enhanced to provide better visibility
into the driver performance.
07 - Bug Fixes:
The driver contains fixes for the problems discovered and
reported since last submission.
08 - MSI support:
Added Message Signaled Interrupt feature which currently uses 1
message.
message.
09 Removed feature:
Rx 3 buffer mode feature has been removed. Driver now supports 1,
2 and 5 buffer modes of which 2 and 5 buffer modes can be used
for header separation.
10 Compiler warning:
Fixed compiler warning when compiled for 32 bit system.
11 Copyright notice:
Source files are updated with the proper copyright notice.
Submitted by: Alicia Pena <Alicia dot Pena at neterion dot com>,
Muhammad Shafiq <Muhammad dot Shafiq at neterion dot com>
Approved by: re (gnn, kensmith)
In nmount(), if MNT_ROOT is in the mount flags, filter it
out instead of returning an error.
(1) This makes the behavior consistent with mount(2).
(2) This makes update mounts on the root file system work properly.
(3) The explicit checks for MNT_ROOTFS in src/sbin/fsck_ffs/main.c
and src/usr.sbin/mountd/mountd.c which were put in to
eliminate errors during update mounts on the root file system
can be removed.
The only place were MNT_ROOTFS can be validly set
is inside the kernel, i.e. with vfs_mountroot_try().
Approved by: re (gnn)
sysinstall had made bad assumptions about the behavior of getenv(3)
and the new getenv(3) doesn't behave the same as the old one did
if you call it with getenv("amd_enable=YES").
It was noted during review that the use of strdup(3) here is wrong
and should be checked for NULL. It's worth noting that's what I meant
when I said I conformed to sysinstall's style despite urges to do otherwise
in the original commit. sysinstall is in desperate need of some major
rototilling (or being thrown out...).
Approved by: re (rwatson)
Teach /etc/rc.d/ppp to start multiple instances of ppp.
ppp_profile variable can now contain multiple profiles.
Overrides for ppp mode and nat can go into ppp_$profile_mode
and ppp_$profile_nat variables respectively. If those are
not specified, defaults from ppp_mode and ppp_nat are used.
MFC: etc/rc.d/ppp v1.15
Teach /etc/rc.d/ppp how to start/stop individual instances
of ppp. This is an extension of previous commit.
Submitted by: Yuri Kurenkov < y dot kurenkov at init dot ru >
Reviewed by: mtm
Approved by: re (kensmith)
Apply a few changes from ipfilter-current:
* Do not hold any locks over calls to copyin/copyout.
* Clean up some #ifdefs
* fix a possible mbuf leak when NAT fails on policy routed packets
PR: 117216
Approved by: re
Correct an error in vm_map_sync(), nee vm_map_clean(), that has existed
since revision 1.1. Specifically, neither traversal of the vm map checks
whether the end of the vm map has been reached. Consequently, the first
traversal can wrap around and bogusly return an error.
Approved by: re (kensmith)
Change vm_page_cache_transfer() such that it does not transfer pages
that would have an offset beyond the end of the target object. Such
pages should remain in the source object.
Approved by: re (kensmith)
Small improvement for __isctype(): don't use __mb_sb_limit but
hardcode 128 here instead, since default locale never define anything
above 127 char.
Approved by: re (kensmith)
This matches the 6.x and earlier behavior where there is no (marginally
useful) /dev/nvram. When it was in isa/clock.c, it was mandatory.
Approved by: re (kensmith)
to store size. In particular, the pax 'size' attribute is required
for any file over 8G.
This seems to fix tar -cf - | tar -xf - when there are files
over 8G in the heirarchy being copied.
Approved by: re (Ken Smith)
Allow adding a user(s) to additional groups in batch mode as well.
Submitted by: Eygene Ryabinkin <[email protected]>
(modulo minor changes)
Approved by: re (kensmith)
The amd_map_program knob can potentially contain a command whose output
is then used as an argument to the amd program. This outpu may contain
newlines, but the script did not take care to strip those newlines before
apending it to rc_flags. Revision 1.72 of rc.subr(8) introduced changes that
exposed this problem (specifically putting the final eval'ed command in
quotes).[1]
Also, for correctness' sake, shell directives appended to the command-line
by the script should go into command_args, and not appended directly
to rc_flags.
Approved by: re (kensmith)
Properly drop the pf mutex around all copyout (consistency still
protected by the sx) and avoid a WITNESS panic. Overlooked during last
import.
Reported and tested by: Max N. Boyarov
Approved by: re (kensmith)
Implement new apply callback mechanism to handle item forwarding.
When item forwarded, refence counter is incremented, when item
processed, counter decremented. When counter reaches zero,
apply handler is getting called.
It allows to report connect() call status only when it is really completed.
Reviewed by: julian
Approved by: re (kensmith)
sys/sys/param.h 1.312, sys/sys/pciio.h 1.8
Add ABI backwards compatibility to the FreeBSD 4/5/6 versions of
the PCIOCGETCONF, PCIOCREAD and PCIOCWRITE IOCTLs, which was broken
with the introduction of PCI domain support.
As the size of struct pci_conf_io wasn't changed with that commit,
this unfortunately requires the ABI of PCIOCGETCONF to be broken
again in order to be able to provide backwards compatibility to
the old version of that IOCTL.
Approved by: re (kensmith)
older versions, update the "older" version to match what shipped in
6.2-RELEASE.
Also remove lukemftpd and OpenSSH notes, since those versions already
appeared in 6.2-RELEASE.
Approved by: re (implicitly)
The bridging output function puts the mbuf directly on the interfaces send
queue so the output network card must support the same tagging mechanism as
how the frame was input (prepended Ethernet header tag or stripped HW mflag).
Now the vlan Ethernet header is _always_ stripped in ether_input and the mbuf
flagged, only only network cards with VLAN_HWTAGGING enabled would properly
re-tag any outgoing vlan frames.
If the outgoing interface does not support hardware tagging then readd the vlan
header to the front of the frame. Move the common vlan encapsulation in to
ether_vlanencap().
Approved by: re (kensmith)
aligned, GCC 4.2.1 also generates code for sendudp() that assumes
this alignment. GCC 4.2.1 however doesn't 32-bit align wbuf, causing
the loader to crash due to an unaligned access of wbuf in sendudp()
when netbooting sparc64. Solve this by specifying wbuf as packed and
32-bit aligned, too. As for lastdata and readudp() this currently is
no issue when compiled with GCC 4.2.1, though give lastdata the same
treatment as wbuf for consistency and possibility of being affected
in the future.
- Sprinkle const on a lookup table.
Approved by: re (kensmith)
their MFC markers on RELENG_7): snd_envy24(4), snd_envy24ht(4),
snd_hda(4), snd_spicds(4), cxgb(4), fdisk(8) -p, etc/rc.d/sendmail
alias rebuild change.
For some important ports that were upgraded from some older version,
match the older version with the version that shipped with
6.2-RELEASE: GNOME, KDE, X.org.
Approved by: re (implicitly)
1. Determine the location of the rndc* binaries relative to $command
2. Make the stop routine work more like rc.subr's, but try rndc first
3. Allow the rndc.key file to be owned by root OR the named_uid user
Approved by: re (kensmith)
etc. that appeared in prior FreeBSD releases. This change is based on
reviewing the release notes for 6.1-RELEASE and 6.2-RELEASE.
There's still some more work to be done here but this is a good
checkpoint.
Approved by: re (implicitly)
Discussed with: hrs
Install getaudit_addr(2) and setaudit_addr(2) links to getaudit(2) and
setaudit(2).
Approved by: re (kensmith)
Submitted by: csjp
Obtained from: TrustedBSD Project
rev. 1.18 sys/i386/include/in_cksum.h
Fold multiple asm statements into one so that the compiler at a certain
optimization level (-march=pentium-mmx for example) does not insert
intermediate ops which would trash the carry.
Change both sys/i386/i386/in_cksum.c[1] and sys/i386/include/in_cksum.h.
To my best understanding the same problem was addressed in rev. 1.16
of src/sys/i386/include/in_cksum.h for just a single function 3y ago.
Reviewed by: jhb
Submitted by: Zhouyi ZHOU <zhouzhouyi FreeBSD.org> (intial version of [1])
PR: 115678, 69257
Approved by: re (kensmith)
tcp_syncache.c rev 1.131
tcp_usrreq.c rev 1.164
Pick the smallest possible TCP window scaling factor that will still allow
us to scale up to sb_max, aka kern.ipc.maxsockbuf.
Approved by: re (kensmith)
Correct an error of omission in the reimplementation of the page
cache: vnode_pager_setsize() must handle the case where a file is
truncated to a non-page-size-aligned boundary and there is a cached
page underlying the new end of file.
Approved by: re (gnn)
- fix a bug during cookie collision that prevented an
association from coming up in a specific restart case.
- Fix it so the shutdown-pending flag gets removed (this is
more for correctness then needed) when we enter shutdown-sent
or shutdown-ack-sent states.
- Fix a bug that caused the receiver to sometimes NOT send
a SACK when a duplicate TSN arrived. Without this fix
it was possible for the association to fall down if the
- Deleted primary destination is also stored when SCTP_MOBILITY_BASE.
(Previously, it is stored when only SCTP_MOBILITY_FASTHANDOFF)
- Fix a locking issue where we might call send_initiate_ack() and
incorrectly state the lock held/not held. Also fix it so that
when we release the lock the inp cannot be deleted on us.
- Add the debug option that can cause the stack to panic instead
of aborting an assoc. This does not and should never show up
in options but is useful for debugging unexpected aborts.
- Add cumack_log sent to track sending cumack information for
the debug case where we are running a special log per assoc.
- Added extra () aroudn sctp_sbspace macro to avoid compile warnings.
Approved by: [email protected] (Ken Smith)
proper attribution. See also http://www.theguyintheglass.com/
MFC fortunes 1.243, fortunes-o.real 1.23, and limerick 1.12:
Fix a few small typos and remove a duplicate
Approved by: re (kensmith)
This changes give nullfs correctly work with latest unionfs.
Submitted by: Masanori Ozawa <[email protected]> (unionfs developer)
Reviewed by: jeff, kensmith
Approved by: re (kensmith)
Added whiteout behavior option. ``-o whiteout=always'' is default mode
(it is established practice) and ``-o whiteout=whenneeded'' is less
disk-space using mode especially for resource restricted environments
like embedded environments. (Contributed by Ed Schouten. Thanks)
Submitted by: Masanori Ozawa <[email protected]> (unionfs developer)
Reviewed by: jeff, kensmith
Approved by: re (kensmith)
Default copy mode has been changed from traditional-mode to transparent-mode.
Some folks who have reported some issues have solved with transparent mode.
We guess it is time to change the default copy mode. The transparent-mode is
the best in most situations.
Submitted by: Masanori Ozawa <[email protected]> (unionfs developer)
Reviewed by: jeff, kensmith
Approved by: re (kensmith)
- It has been become MPSAFE.
- Fixed lock panic issue under MPSAFE.
- Fixed panic issue whenever it locks vnode with reclaim.
- Fixed lock implementations not conforming to vnode_if.src style.
Submitted by: Masanori Ozawa <[email protected]> (unionfs developer)
Reviewed by: jeff, kensmith
Approved by: re (kensmith)
- Added support for vfs_cache on unionfs. As a result, you can use
applications that use procfs on unionfs.
- Removed unionfs internal cache mechanism because it has
vfs_cache support instead. As a result, it just simplified code of
unionfs.
- Fixed kern/111262 issue.
Submitted by: Masanori Ozawa <[email protected]> (unionfs developer)
Reviewed by: jeff, kensmith
Approved by: re (kensmith)
MFC: archive_write_set_format_cpio_newc.c 1.2
Non-regular files should have zero-length bodies. libarchive
flags this to clients by updating the entry description when
it writes the header.
Approved by: re (Ken Smith)
sys/sparc64/sparc64/elf_machdep.c 1.24
- Fix the handling of R_SPARC_OLO10, which is a bit of a special case
in the way we implement handling of relocations.
As for the kernel part this fixes the loading of lots of modules,
which failed to load due to unresolvable symbols when built after
the GCC 4.2.0 import. This wasn't due to a change in GCC itself
though but one of several changes in configuration done along the
import. Specfically, HAVE_AS_REGISTER_PSEUDO_OP, which causes GCC
to denote global registers used for scratch purposes and in turn
GAS uses R_SPARC_OLO10 relocations for, is now defined.
While at it replace some more ELF_R_TYPE which should have been
ELF64_R_TYPE_ID but didn't cause problems so far.
- Sync a sanity check between kernel and rtld(1) and change it to be
maintenance free regarding the type used for the lookup table.
- Sprinkle const on lookup tables.
- Use __FBSDID.
Approved by: re (kensmith)
date: 2007/10/16 18:32:37; author: cognet; state: Exp; lines: +3 -1
Backout rev 1.62, and revert to use -march=armv5te -D__XSCALE__ instead
of -mcpu=xscale for XScale.
gcc still has issues with -mcpu=xscale, and now crashes while building
systat.
Approved by: re (kensmith)
codecs. Codec at address 0 seems purely digital, or perhaps an HDMI
interface. Let the driver skip it and continue scanning the codecs
starting with address 2 (Realtek ALC885).
* Due to possibilities of future similar cases, put enough logic
in hdac_scan_codecs() to force codec scanning starting from
XX address via tunable "hint.pcm.%d.codec_index".
Reported / Tested by: Toomas Pelberg <[email protected]>
- Trivial headphone / speaker automute fixup for Fujitsu-Siemens
AMILO Si 1848 laptop.
Reported / Tested by: Ed <[email protected]>
- Trivial headphone / speaker automute fixup for Fujitsu-Siemens
Lifebook S7020D laptop.
Reported / Tested by: Jaromir Dvoracek <[email protected]>
- Some smart vendor trying to create interplanetary wormhole by
screwing pci config space during their BIOS update. The side effects
of their failure attempt includes mutilated hardware id, broken
speaker automuting and loosing the entire analog CD connectivity,
thus causing enough collateral damages to collapse the entire
universe. Move along with it.
Please exercise extra cautious when applying BIOS updates.
Reported / Tested by: Pietro Cerutti <[email protected]>
- assembled laptop, based on the MSI-1034
(662) which is now becoming MSI-034A.
- Fix no sound issues (on headphones) for Lenovo ThinkCentre A55 due
to global automute table entry which is not applicable for
non-laptops.
Reported / Tested by: Piotr Smyrak <[email protected]>
- Speaker mute control for HP DC7700 since the front headphone jack
does not generate any interesting unsolicited signal/response.
Reported / Tested by: tyop @ irc.freenode.net
Approved by: re (kensmith)
rev. 1.10
The POP daemon's temporary mail file has a leading dot ('.').
This was lost in the shell script rewrite of the rmuser command.
Approved by: re (kensmith)
The previous revision, updating vm_object_page_remove() for the new page
cache, did not account for the case where the vm object has nothing but
cached pages.
Approved by: re (kensmith)
Requested by: kensmith
Teach makewhatis.c to treat .SS with the same severity as .SH.
At least one port (net-mgmt/net-snmp) creates man-pages which are
in the format:
.SH NAME
The Net-SNMP agent \- The snmp agent responds to SNMP queries from manag
ement stations.
.PP
.SS "Modules"
At this moment, makewhatis determines the end of the .SH NAME section
as where it finds .SH again, but there is none here, is it "terminated"
by the .SS.
PR: bin/116706
Submitted by: edwin@
Approved by: re (Ken Smith), grog (mentor)
return EOF immediately on any attempts to read their data.
(Previously, it would return a zero-length block, then EOF,
which elicited bogus warnings from bsdtar.)
Also, correct the EOF return to correctly identify EOF
as part of an empty block at the correct offset.
Approved by: re (Ken Smith)
Fix two panics in lagg.
1. The locking was changed to shared but roundrobin mode still updated a
pointer in the softc with the next tx interface to use. This will panic
under high load. Change this to an atomically incremented sequence number
in order to choose the tx port in round robin.
2. IFQ_HANDOFF will free the mbuf if the queue is full, this will then be
freed again by lagg_start() and panic. Reorganised the error handling and
freeing to fix this.
Approved by: re (kensmith)
Print the ZFS ereport to the console if vfs.zfs.debug is set to help diagnose
problems with zfs-on-root since devd isnt running yet.
Approved by: re (kensmith)
revert 1.18: the negotiated rate set may not match the hal rate
tables, so using the hal's rateCodeToIndex array will produce wrong
indices for the negotiated rate set
Approved by: re (kensmith)
rev. 1.8 of src/lib/libutil/pidfile.c:
When pidfile is already locked and has zero length, do not return
success and zero pid from pidfile_read(). Return EAGAIN instead. Sleep
up to three times for 5 ms while waiting for pidfile to be written.
Approved by: re (kensmith)
NFS MP scaling changes.
- Eliminate the hideous nfs_sndlock that serialized NFS/TCP request senders
thru the sndlock.
- Institute a new nfs_connectlock that serializes NFS/TCP reconnects. Add
logic to wait for pending request senders to finish sending before
reconnecting. Dial down the sb_timeo for NFS/TCP sockets to 1 sec.
- Break out the nfs xid manipulation under a new nfs xid lock, rather than
over loading the nfs request lock for this purpose.
- Fix some of the locking in nfs_request.
Many thanks to Kris Kennaway for his help with this and for initiating the
MP scaling analysis and work. Kris also tested this patch thorougly.
Approved by: re@ (Ken Smith)
Technically, "7-STABLE" isn't the right name for
this directory but it will be after 7.0-RELEASE, and naming the
directory this way means we don't have to go fix it up later.
Approved by: re (implicitly)
Set the NFS server sockbuf high watermarks to the system defaults
(up form 32KB). The low highwatermark setting caused UDP fullsock
request drops, throttling thruput greatly.
Reported by: Kris Kennaway
Approved by: re@ (Ken Smith)
Not all VIA Rhine chips support 256 register space. So touching
VR_STICKHW register would result in unexpected results on these
hardwares. wpaul said the following for the issue.
The vr_attach() routine unconditionally does this for all supported
chips:
/*
* Windows may put the chip in suspend mode when it
* shuts down. Be sure to kick it in the head to wake it
* up again.
*/
VR_CLRBIT(sc, VR_STICKHW, (VR_STICKHW_DS0|VR_STICKHW_DS1));
The problem is, the VR_STICKHW register is not valid on all Rhine
devices. The VT86C100A chip, which is present on the D-Link DFE-530TX
boards, doesn't support power management, and its register space is
only 128 bytes wide. The VR_STICKHW register offset falls outside this
range. This may go unnoticed in most scenarios, but if you happen to have
another PCI device in your system which is assigned the register
space immediately after that of the Rhine, the vr(4) driver will
incorrectly stomp it. In my case, the BIOS on my test board decided
to put the register space for my PRO/100 ethernet board right next
to the Rhine, and the Rhine driver ended up clobbering the IMR register
of the PRO/100 device. (Long story short: the board kept locking up on
boot. Took me the better part of the morning suss out why.)
The strictly correct thing to do would be to check the PCI config space
to make sure the device supports the power management capability and only
write to the VR_STICKHW register if it does.
Instead of inspecting chip revision numbers for the availability of
VR_STICKHW register, check the existence of power management capability
of the hardware as wpaul suggested.
Reported by: wpaul
Suggested by: wpaul
OK'ed by: jhb
Approved by: re (kensmith)
- Mention that less v408 was MFC'ed.
- Mention tzdata2007h update. An in advance &merged; is
added so that we don't have to change this again when
it is actually MFC'ed.
Approved by: re (bmah)
DTrace is a comprehensive dynamic tracing framework for the Solaris Operating System. DTrace provides a powerful infrastructure that permits administrators, developers, and service personnel to concisely answer arbitrary questions about the behavior of the operating system and user programs.
.sp
.LP
The \fISolaris Dynamic Tracing Guide\fR describes how to use DTrace to observe, debug, and tune system behavior. Refer to this book for a detailed description of DTrace features, including the bundled DTrace observability
tools, instrumentation providers, and the D programming language.
.sp
.LP
The \fBdtrace\fR command provides a generic interface to the essential services provided by the DTrace facility, including:
.RS+4
.TP
.iet\(bu
.elo
Options that list the set of probes and providers currently published by DTrace
.RE
.RS+4
.TP
.iet\(bu
.elo
Options that enable probes directly using any of the probe description specifiers (provider, module, function, name)
.RE
.RS+4
.TP
.iet\(bu
.elo
Options that run the D compiler and compile one or more D program files or programs written directly on the command line
.RE
.RS+4
.TP
.iet\(bu
.elo
Options that generate anonymous tracing programs
.RE
.RS+4
.TP
.iet\(bu
.elo
Options that generate program stability reports
.RE
.RS+4
.TP
.iet\(bu
.elo
Options that modify DTrace tracing and buffering behavior and enable additional D compiler features
.RE
.sp
.LP
You can use \fBdtrace\fR to create D scripts by using it in a \fB#!\fR declaration to create an interpreter file. You can also use \fBdtrace\fR to attempt to compile D programs and determine their properties without actually enabling tracing using the \fB-e\fR option. See \fBOPTIONS\fR. See the \fISolaris Dynamic Tracing Guide\fR for detailed examples of how to use the \fBdtrace\fR utility to perform these tasks.
.SHOPTIONS
.sp
.LP
The arguments accepted by the \fB-P\fR, \fB-m\fR, \fB-f\fR, \fB-n\fR, and \fB-i\fR options can include an optional D language \fIpredicate\fR enclosed in slashes \fB//\fR and optional D language \fIaction\fR statement list enclosed in braces \fB{}\fR. D program code specified on the command line must be appropriately quoted to avoid intepretation of meta-characters by the shell.
.sp
.LP
The following options are supported:
.sp
.ne2
.mk
.na
\fB\fB-32\fR | \fB-64\fR\fR
.ad
.sp.6
.RS4n
The D compiler produces programs using the native data model of the operating system kernel. You can use the \fBisainfo\fR\fB-b\fR command to determine the current operating system data model. If the \fB-32\fR option is specified, \fBdtrace\fR forces
the D compiler to compile a D program using the 32-bit data model. If the \fB-64\fR option is specified, \fBdtrace\fR forces the D compiler to compile a D program using the 64-bit data model. These options are typically not required as \fBdtrace\fR selects the
native data model as the default. The data model affects the sizes of integer types and other language properties. D programs compiled for either data model can be executed on both 32-bit and 64-bit kernels. The \fB-32\fR and \fB-64\fR options also determine the ELF file format
(ELF32 or ELF64) produced by the \fB-G\fR option.
.RE
.sp
.ne2
.mk
.na
\fB\fB-a\fR\fR
.ad
.sp.6
.RS4n
Claim anonymous tracing state and display the traced data. You can combine the \fB-a\fR option with the \fB-e\fR option to force \fBdtrace\fR to exit immediately after consuming the anonymous tracing state rather than continuing to wait for new
data. See the \fISolaris Dynamic Tracing Guide\fR for more information about anonymous tracing.
.RE
.sp
.ne2
.mk
.na
\fB\fB-A\fR\fR
.ad
.sp.6
.RS4n
Generate \fBdriver.conf\fR(4) directives for anonymous tracing. This option constructs a set of \fBdtrace\fR(7D) configuration file directives to enable the specified probes for anonymous tracing and then exits. By default, \fBdtrace\fR attempts to store the directives to the file \fB/kernel/drv/dtrace.conf\fR. You can modify this behavior if you use the \fB-o\fR option to specify an alternate output file.
.RE
.sp
.ne2
.mk
.na
\fB\fB-b\fR\fIbufsz\fR\fR
.ad
.sp.6
.RS4n
Set principal trace buffer size (\fIbufsz\fR). The trace buffer size can include any of the size suffixes \fBk\fR, \fBm\fR, \fBg\fR, or \fBt\fR. If the buffer space cannot be allocated, \fBdtrace\fR attempts
to reduce the buffer size or exit depending on the setting of the \fBbufresize\fR property.
.RE
.sp
.ne2
.mk
.na
\fB\fB-c\fR\fIcmd\fR\fR
.ad
.sp.6
.RS4n
Run the specified command \fIcmd\fR and exit upon its completion. If more than one \fB-c\fR option is present on the command line, \fBdtrace\fR exits when all commands have exited, reporting the exit status for each child process as it
terminates. The process-ID of the first command is made available to any D programs specified on the command line or using the \fB-s\fR option through the \fB$target\fR macro variable. Refer to the \fISolaris Dynamic Tracing Guide\fR for more information
on macro variables.
.RE
.sp
.ne2
.mk
.na
\fB\fB-C\fR\fR
.ad
.sp.6
.RS4n
Run the C preprocessor \fBcpp\fR(1) over D programs before compiling them. You can pass options to the C preprocessor using the \fB-D\fR, \fB-U\fR, \fB-I\fR, and \fB-H\fR options. You can select the degree of C standard conformance if you use the \fB-X\fR option. For a description of the set of tokens defined by the D compiler when invoking the C preprocessor, see \fB-X\fR.
Define \fIname\fR when invoking \fBcpp\fR(1) (enabled using the \fB-C\fR option). If you specify the equals sign (\fB=\fR)
and additional \fIvalue\fR, the name is assigned the corresponding value. This option passes the \fB-D\fR option to each \fBcpp\fR invocation.
.RE
.sp
.ne2
.mk
.na
\fB\fB-e\fR\fR
.ad
.sp.6
.RS4n
Exit after compiling any requests and consuming anonymous tracing state (\fB-a\fR option) but prior to enabling any probes. You can combine this option with the \fB-a\fR option to print anonymous tracing data and exit. You can also combine this option with D
compiler options. This combination verifies that the programs compile without actually executing them and enabling the corresponding instrumentation.
Specify function name to trace or list (\fB-l\fR option). The corresponding argument can include any of the probe description forms \fIprovider:module:function\fR, \fImodule:function\fR, or \fIfunction\fR.
Unspecified probe description fields are left blank and match any probes regardless of the values in those fields. If no qualifiers other than \fIfunction\fR are specified in the description, all probes with the corresponding \fIfunction\fR are matched.
The \fB-f\fR argument can be suffixed with an optional D probe clause. You can specify more than one \fB-f\fR option on the command line at a time.
.RE
.sp
.ne2
.mk
.na
\fB\fB-F\fR\fR
.ad
.sp.6
.RS4n
Coalesce trace output by identifying function entry and return. Function entry probe reports are indented and their output is prefixed with \fB->\fR. Function return probe reports are unindented and their output is prefixed with \fB<-\fR\&. System call
entry probe reports are indented and their output is prefixed with \fB=>\fR. System call return probe reports are unindented and their output is prefixed with \fB<=\fR\&.
.RE
.sp
.ne2
.mk
.na
\fB\fB-G\fR\fR
.ad
.sp.6
.RS4n
Generate an ELF file containing an embedded DTrace program. The DTrace probes specified in the program are saved inside of a relocatable ELF object which can be linked into another program. If the \fB-o\fR option is present, the ELF file is saved using the pathname specified
as the argument for this operand. If the \fB-o\fR option is not present and the DTrace program is contained with a file whose name is \fB\fIfilename\fR.d\fR, then the ELF file is saved using the name \fB\fIfilename\fR.o\fR.
Otherwise the ELF file is saved using the name \fBd.out\fR.
.RE
.sp
.ne2
.mk
.na
\fB\fB-H\fR\fR
.ad
.sp.6
.RS4n
Print the pathnames of included files when invoking \fBcpp\fR(1) (enabled using the \fB-C\fR option). This option passes the \fB-H\fR option
to each \fBcpp\fR invocation, causing it to display the list of pathnames, one for each line, to \fBstderr\fR.
.RE
.sp
.ne2
.mk
.na
\fB\fB-h\fR\fR
.ad
.sp.6
.RS4n
Generate a header file containing macros that correspond to probes in the specified provider definitions. This option should be used to generate a header file that is included by other source files for later use with the \fB-G\fR option. If the \fB-o\fR option
is present, the header file is saved using the pathname specified as the argument for that option. If the \fB-o\fR option is not present and the DTrace program is contained with a file whose name is \fIfilename\fR\fB\&.d\fR, then the header file is saved
Specify probe identifier (\fIprobe-id\fR) to trace or list (\fB-l\fR option). You can specify probe IDs using decimal integers as shown by \fBdtrace\fR\fB-l\fR. The \fB-i\fR argument can be suffixed with an optional
D probe clause. You can specify more than one \fB-i\fR option at a time.
.RE
.sp
.ne2
.mk
.na
\fB\fB-I\fR\fIpath\fR\fR
.ad
.sp.6
.RS4n
Add the specified directory \fIpath\fR to the search path for \fB#include\fR files when invoking \fBcpp\fR(1) (enabled
using the \fB-C\fR option). This option passes the \fB-I\fR option to each \fBcpp\fR invocation. The specified \fIpath\fR is inserted into the search path ahead of the default directory list.
.RE
.sp
.ne2
.mk
.na
\fB\fB-L\fR\fIpath\fR\fR
.ad
.sp.6
.RS4n
Add the specified directory \fIpath\fR to the search path for DTrace libraries. DTrace libraries are used to contain common definitions that can be used when writing D programs. The specified \fIpath\fR is added after the default library
search path.
.RE
.sp
.ne2
.mk
.na
\fB\fB-l\fR\fR
.ad
.sp.6
.RS4n
List probes instead of enabling them. If the \fB-l\fR option is specified, \fBdtrace\fR produces a report of the probes matching the descriptions given using the \fB-P\fR, \fB-m\fR, \fB-f\fR, \fB-n\fR, \fB-i\fR,
and \fB-s\fR options. If none of these options are specified, this option lists all probes.
Specify module name to trace or list (\fB-l\fR option). The corresponding argument can include any of the probe description forms \fIprovider:module\fR or \fImodule\fR. Unspecified probe description fields are left blank and match
any probes regardless of the values in those fields. If no qualifiers other than \fImodule\fR are specified in the description, all probes with a corresponding \fImodule\fR are matched. The \fB-m\fR argument can be suffixed with an optional D
probe clause. More than one \fB-m\fR option can be specified on the command line at a time.
Specify probe name to trace or list (\fB-l\fR option). The corresponding argument can include any of the probe description forms \fIprovider:module:function:name\fR, \fImodule:function:name\fR, \fIfunction:name\fR,
or \fIname\fR. Unspecified probe description fields are left blank and match any probes regardless of the values in those fields. If no qualifiers other than \fIname\fR are specified in the description, all probes with a corresponding \fIname\fR are
matched. The \fB-n\fR argument can be suffixed with an optional D probe clause. More than one \fB-n\fR option can be specified on the command line at a time.
.RE
.sp
.ne2
.mk
.na
\fB\fB-o\fR\fIoutput\fR\fR
.ad
.sp.6
.RS4n
Specify the \fIoutput\fR file for the \fB-A\fR , \fB-G\fR, and \fB-l\fR options, or for the traced data itself. If the \fB-A\fR option is present and \fB-o\fR is not present, the default output file is \fB/kernel/drv/dtrace.conf\fR. If the \fB-G\fR option is present and the \fB-s\fR option's argument is of the form \fB\fIfilename\fR.d\fR and \fB-o\fR is not present, the default output file is \fB\fIfilename\fR.o\fR.
Otherwise the default output file is \fBd.out\fR.
.RE
.sp
.ne2
.mk
.na
\fB\fB-p\fR\fIpid\fR\fR
.ad
.sp.6
.RS4n
Grab the specified process-ID \fIpid\fR, cache its symbol tables, and exit upon its completion. If more than one \fB-p\fR option is present on the command line, \fBdtrace\fR exits when all commands have exited, reporting the exit status
for each process as it terminates. The first process-ID is made available to any D programs specified on the command line or using the \fB-s\fR option through the \fB$target\fR macro variable. Refer to the \fISolaris Dynamic Tracing Guide\fR for
Specify provider name to trace or list (\fB-l\fR option). The remaining probe description fields module, function, and name are left blank and match any probes regardless of the values in those fields. The \fB-P\fR argument can be suffixed with an optional D
probe clause. You can specify more than one \fB-P\fR option on the command line at a time.
.RE
.sp
.ne2
.mk
.na
\fB\fB-q\fR\fR
.ad
.sp.6
.RS4n
Set quiet mode. \fBdtrace\fR suppresses messages such as the number of probes matched by the specified options and D programs and does not print column headers, the CPU ID, the probe ID, or insert newlines into the output. Only data traced and formatted by D program
statements such as \fBtrace()\fR and \fBprintf()\fR is displayed to \fBstdout\fR.
.RE
.sp
.ne2
.mk
.na
\fB\fB-s\fR\fR
.ad
.sp.6
.RS4n
Compile the specified D program source file. If the \fB-e\fR option is present, the program is compiled but instrumentation is not enabled. If the \fB-l\fR option is present, the program is compiled and the set of probes matched by it is listed, but instrumentation
is not enabled. If none of \fB-e\fR, \fB-l\fR, \fB-G\fR, or \fB-A\fR are present, the instrumentation specified by the D program is enabled and tracing begins.
.RE
.sp
.ne2
.mk
.na
\fB\fB-S\fR\fR
.ad
.sp.6
.RS4n
Show D compiler intermediate code. The D compiler produces a report of the intermediate code generated for each D program to \fBstderr\fR.
.RE
.sp
.ne2
.mk
.na
\fB\fB-U\fR\fIname\fR\fR
.ad
.sp.6
.RS4n
Undefine the specified \fIname\fR when invoking \fBcpp\fR(1) (enabled using the \fB-C\fR option). This option passes the \fB-U\fR option to each \fBcpp\fR invocation.
.RE
.sp
.ne2
.mk
.na
\fB\fB-v\fR\fR
.ad
.sp.6
.RS4n
Set verbose mode. If the \fB-v\fR option is specified, \fBdtrace\fR produces a program stability report showing the minimum interface stability and dependency level for the specified D programs. DTrace stability levels are explained in further detail in the \fISolaris Dynamic Tracing Guide\fR.
.RE
.sp
.ne2
.mk
.na
\fB\fB-V\fR\fR
.ad
.sp.6
.RS4n
Report the highest D programming interface version supported by \fBdtrace\fR. The version information is printed to \fBstdout\fR and the \fBdtrace\fR command exits. Refer to the \fISolaris Dynamic Tracing Guide\fR for
more information about DTrace versioning features.
.RE
.sp
.ne2
.mk
.na
\fB\fB-w\fR\fR
.ad
.sp.6
.RS4n
Permit destructive actions in D programs specified using the \fB-s\fR, \fB-P\fR, \fB-m\fR, \fB-f\fR, \fB-n\fR, or \fB-i\fR options. If the \fB-w\fR option is not specified, \fBdtrace\fR does not
permit the compilation or enabling of a D program that contains destructive actions.
.RE
.sp
.ne2
.mk
.na
\fB\fB-x\fR\fIarg\fR [\fI=val\fR]\fR
.ad
.sp.6
.RS4n
Enable or modify a DTrace runtime option or D compiler option. The list of options is found in the \fISolaris Dynamic Tracing Guide\fR. Boolean options are enabled by specifying their name. Options with values are set by separating the option name and
value with an equals sign (\fB=\fR).
.RE
.sp
.ne2
.mk
.na
\fB\fB-X\fR\fBa | c | s | t\fR\fR
.ad
.sp.6
.RS4n
Specify the degree of conformance to the ISO C standard that should be selected when invoking \fBcpp\fR(1) (enabled using the \fB-C\fR option).
The \fB-X\fR option argument affects the value and presence of the \fB__STDC__\fR macro depending upon the value of the argument letter.
.sp
The \fB-X\fR option supports the following arguments:
.sp
.ne2
.mk
.na
\fB\fBa\fR\fR
.ad
.RS5n
.rt
Default. ISO C plus K&R compatibility extensions, with semantic changes required by ISO C. This is the default mode if \fB-X\fR is not specified. The predefined macro \fB__STDC__\fR has a value of 0 when \fBcpp\fR is invoked in conjunction
with the \fB-Xa\fR option.
.RE
.sp
.ne2
.mk
.na
\fB\fBc\fR\fR
.ad
.RS5n
.rt
Conformance. Strictly conformant ISO C, without K&R C compatibility extensions. The predefined macro \fB__STDC__\fR has a value of 1 when \fBcpp\fR is invoked in conjunction with the \fB-Xc\fR option.
.RE
.sp
.ne2
.mk
.na
\fB\fBs\fR\fR
.ad
.RS5n
.rt
K&R C only. The macro \fB__STDC__\fR is not defined when \fBcpp\fR is invoked in conjunction with the \fB-Xs\fR option.
.RE
.sp
.ne2
.mk
.na
\fB\fBt\fR\fR
.ad
.RS5n
.rt
Transition. ISO C plus K&R C compatibility extensions, without semantic changes required by ISO C. The predefined macro \fB__STDC__\fR has a value of 0 when \fBcpp\fR is invoked in conjunction with the \fB-Xt\fR option.
.RE
As the \fB-X\fR option only affects how the D compiler invokes the C preprocessor, the \fB-Xa\fR and \fB-Xt\fR options are equivalent from the perspective of D and both are provided only to ease re-use of settings from a C build environment.
.sp
Regardless of the \fB-X\fR mode, the following additional C preprocessor definitions are always specified and valid in all modes:
.RS+4
.TP
.iet\(bu
.elo
\fB__sun\fR
.RE
.RS+4
.TP
.iet\(bu
.elo
\fB__unix\fR
.RE
.RS+4
.TP
.iet\(bu
.elo
\fB__SVR4\fR
.RE
.RS+4
.TP
.iet\(bu
.elo
\fB__sparc\fR (on SPARC systems only)
.RE
.RS+4
.TP
.iet\(bu
.elo
\fB__sparcv9\fR (on SPARC systems only when 64-bit programs are compiled)
.RE
.RS+4
.TP
.iet\(bu
.elo
\fB__i386\fR (on x86 systems only when 32-bit programs are compiled)
.RE
.RS+4
.TP
.iet\(bu
.elo
\fB__amd64\fR (on x86 systems only when 64-bit programs are compiled)
.RE
.RS+4
.TP
.iet\(bu
.elo
\fB__\fI`uname -s`\fR_\fI`uname -r`\fR\fR (for example, \fB__SunOS_5_10\fR)
.RE
.RS+4
.TP
.iet\(bu
.elo
\fB__SUNW_D=1\fR
.RE
.RS+4
.TP
.iet\(bu
.elo
\fB__SUNW_D_VERSION=0x\fIMMmmmuuu\fR\fR
.sp
Where \fIMM\fR is the major release value in hexadecimal, \fImmm\fR is the minor release value in hexadecimal, and \fIuuu\fR is the
micro release value in hexadecimal. Refer to the \fISolaris Dynamic Tracing Guide\fR for more information about DTrace versioning.
.RE
.RE
.sp
.ne2
.mk
.na
\fB\fB-Z\fR\fR
.ad
.sp.6
.RS4n
Permit probe descriptions that match zero probes. If the \fB-Z\fR option is not specified, \fBdtrace\fR reports an error and exits if any probe descriptions specified in D program files (\fB-s\fR option) or on the command line (\fB-P\fR, \fB-m\fR, \fB-f\fR, \fB-n\fR, or \fB-i\fR options) contain descriptions that do not match any known probes.
.RE
.SHOPERANDS
.sp
.LP
You can specify zero or more additional arguments on the \fBdtrace\fR command line to define a set of macro variables (\fB$1\fR, \fB$2\fR, and so forth). The additional arguments can be used in D programs specified using the \fB-s\fR option
or on the command line. The use of macro variables is described further in the \fISolaris Dynamic Tracing Guide\fR.
.SHEXITSTATUS
.sp
.LP
The following exit values are returned:
.sp
.ne2
.mk
.na
\fB0\fR
.ad
.RS5n
.rt
Successful completion.
.sp
For D program requests, an exit status of \fB0\fR indicates that programs were successfully compiled, probes were successfully enabled, or anonymous state was successfully retrieved. \fBdtrace\fR returns \fB0\fR even if the specified tracing requests
encountered errors or drops.
.RE
.sp
.ne2
.mk
.na
\fB\fB1\fR\fR
.ad
.RS5n
.rt
An error occurred.
.sp
For D program requests, an exit status of \fB1\fR indicates that program compilation failed or that the specified request could not be satisfied.
.RE
.sp
.ne2
.mk
.na
\fB\fB2\fR\fR
.ad
.RS5n
.rt
Invalid command line options or arguments were specified.
.RE
.SHATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.sp
.TS
tab() box;
cw(2.75i) |cw(2.75i)
lw(2.75i) |lw(2.75i)
.
ATTRIBUTE TYPEATTRIBUTE VALUE
_
AvailabilitySUNWdtrc
_
Interface StabilitySee below.
.TE
.sp
.LP
The command-line syntax is Committed. The human-readable output is Uncommitted.
Loaded 100 of 8092 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.