mav [Wed, 6 Feb 2008 20:50:50 +0000 (20:50 +0000)]
MFC ng_base.c rev. 1.141-1.146:
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.
scottl [Wed, 6 Feb 2008 01:02:20 +0000 (01:02 +0000)]
Update the hptrr driver to version 1.2. This adds port multiplier support
for several cards. See the Highpoint website for more information. Again,
many thanks to Highpoint for their continued support of FreeBSD.
mav [Tue, 5 Feb 2008 19:48:04 +0000 (19:48 +0000)]
MFC rev. 1.23-1.24
- 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.
simon [Tue, 5 Feb 2008 18:10:31 +0000 (18:10 +0000)]
MFC 1.2:
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.
julian [Mon, 4 Feb 2008 19:59:40 +0000 (19:59 +0000)]
MFC changes from 1.14 for sys/lock.c and 1.127+1.128 for thread/thr_kern.c
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.
ambrisko [Sun, 3 Feb 2008 22:32:52 +0000 (22:32 +0000)]
MFC: Fix some bugs in dealing with DCMD's without data. MegaCli was sending
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.
scottl [Sun, 3 Feb 2008 16:18:55 +0000 (16:18 +0000)]
Update the hptiop driver to version 1.3. This adds support for the 4xxx
series of SAS adapters. Thanks again to Highpoint for their continued
support of FreeBSD.
yongari [Sun, 3 Feb 2008 08:12:58 +0000 (08:12 +0000)]
MFC if_msk.c rev 1.24 to RELENG_7.
Add MSI support for 88E8058(Yukon EC Ultra). Unlike other Yukon II
family 88E8058 supports only one MSI message. Teach msk(4) to handle
that case.
yongari [Sun, 3 Feb 2008 07:57:04 +0000 (07:57 +0000)]
MFC if_msk.c rev 1.23, if_mskreg.h 1.10 to RELENG_7.
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.
yongari [Sun, 3 Feb 2008 07:48:13 +0000 (07:48 +0000)]
MFC if_msk.c rev 1.22, if_mskreg.h 1.9 to RELENG_7.
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.
yongari [Sun, 3 Feb 2008 07:39:33 +0000 (07:39 +0000)]
MFC if_msk.c rev 1.21 to RELENG_7.
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.
yongari [Sun, 3 Feb 2008 07:35:04 +0000 (07:35 +0000)]
MFC if_msk.c rev 1.20, if_mskreg.h rev. 1.8 to RELENG_7
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.
yongari [Sun, 3 Feb 2008 07:26:11 +0000 (07:26 +0000)]
MFC if_msk.c rev 1.19, if_mskreg.h rev. 1.7 to RELENG_7
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.
yongari [Sun, 3 Feb 2008 05:32:55 +0000 (05:32 +0000)]
MFC e1000phy.c, rev 1.20 to RELENG_7
Reset autonegotation timer if media option is not IFM_AUTO.
Make mii_ticks advance, autonegiation is retried every
mii_anegticks seconds.
yongari [Sun, 3 Feb 2008 05:18:14 +0000 (05:18 +0000)]
MFC if_re.c, rev 1.100 to RELENG_7
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.
yongari [Sun, 3 Feb 2008 04:12:06 +0000 (04:12 +0000)]
MFC fix for IEEE 802.3 compliance of auto-negotiation process.
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.
rwatson [Fri, 1 Feb 2008 22:51:40 +0000 (22:51 +0000)]
Merge uipc_sockbuf.c:1.175, uipc_socket.c:1.304, uipc_syscalls.c:1.264,
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>
rrs [Thu, 31 Jan 2008 09:58:11 +0000 (09:58 +0000)]
- Fixes is a bug in sctp_auth that will cause a panic if
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)
rwatson [Wed, 30 Jan 2008 22:25:34 +0000 (22:25 +0000)]
Merge ddp_output.c:1.32 from HEAD to RELENG_7:
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.
rwatson [Wed, 30 Jan 2008 22:25:13 +0000 (22:25 +0000)]
Merge aarp.c:1.45 from HEAD to RELENG_7:
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.
kensmith [Tue, 29 Jan 2008 01:19:31 +0000 (01:19 +0000)]
MFC v1.7 (by request from remko because he is injured)
> 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
dougb [Tue, 29 Jan 2008 00:18:08 +0000 (00:18 +0000)]
MFC functional changes to etc:
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.
mtm [Mon, 28 Jan 2008 23:36:54 +0000 (23:36 +0000)]
MFC: ver. 1.7
Partial backout of rev. 1.6, but instead of putting
kerberos5_server_flags back in command_args, put it
where rc.subr(8) expects it: kerberos5_flags.
mtm [Mon, 28 Jan 2008 18:55:57 +0000 (18:55 +0000)]
MFC:
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.
rwatson [Mon, 28 Jan 2008 14:00:30 +0000 (14:00 +0000)]
Merge ipfw2.c:1.113, ip_fw.h:1.111, ip_fw2.c:1.180 from HEAD to RELENG_7:
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.
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.
mtm [Mon, 28 Jan 2008 07:37:08 +0000 (07:37 +0000)]
MFC: ver. 1.82-1.83
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.
dds [Sun, 27 Jan 2008 08:07:15 +0000 (08:07 +0000)]
MFC: A new configuration variable, daily_status_mail_rejects_shorten, allows
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.
mav [Sun, 27 Jan 2008 02:47:32 +0000 (02:47 +0000)]
MFC rev. 1.88
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 <burylov@mail.ru>
mav [Sun, 27 Jan 2008 02:45:41 +0000 (02:45 +0000)]
MFC rev 1.85-1.86
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.
delphij [Sat, 26 Jan 2008 21:59:10 +0000 (21:59 +0000)]
MFC revision 1.7
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.
mtm [Sat, 26 Jan 2008 06:49:27 +0000 (06:49 +0000)]
MFC: rev. 1.110
----------------------------------------------------------------------------
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.
kib [Fri, 25 Jan 2008 10:12:33 +0000 (10:12 +0000)]
MFC rev. 1.52:
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.