svn commit: r197702 - head/etc/rc.d

2009-10-01 Thread Hiroki Sato
Author: hrs
Date: Fri Oct  2 06:51:39 2009
New Revision: 197702
URL: http://svn.freebsd.org/changeset/base/197702

Log:
  The net.inet.tcp.log_in_vain accepts 0, 1 or 2, not Y/N.

Modified:
  head/etc/rc.d/netoptions

Modified: head/etc/rc.d/netoptions
==
--- head/etc/rc.d/netoptionsFri Oct  2 06:19:34 2009(r197701)
+++ head/etc/rc.d/netoptionsFri Oct  2 06:51:39 2009(r197702)
@@ -36,15 +36,18 @@ netoptions_start()
 
 netoptions_inet()
 {
-   if checkyesno log_in_vain; then
+   case ${log_in_vain} in
+   [12])
netoptions_init
echo -n " log_in_vain=${log_in_vain}"
-   ${SYSCTL_W} net.inet.tcp.log_in_vain=1 >/dev/null
-   ${SYSCTL_W} net.inet.udp.log_in_vain=1 >/dev/null
-   else
+   ${SYSCTL_W} net.inet.tcp.log_in_vain=${log_in_vain} >/dev/null
+   ${SYSCTL_W} net.inet.udp.log_in_vain=${log_in_vain} >/dev/null
+   ;;
+   *)
${SYSCTL_W} net.inet.tcp.log_in_vain=0 >/dev/null
${SYSCTL_W} net.inet.udp.log_in_vain=0 >/dev/null
-   fi
+   ;;
+   esac
 
if checkyesno tcp_extensions; then
${SYSCTL_W} net.inet.tcp.rfc1323=1 >/dev/null
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r197687 - head/sys/net

2009-10-01 Thread Tom Judge

Qing Li wrote:

Author: qingli
Date: Thu Oct  1 20:32:29 2009
New Revision: 197687
URL: http://svn.freebsd.org/changeset/base/197687

Log:
  The flow-table associates TCP/UDP flows and IP destinations with
  specific routes. When the routing table changes, for example,
  when a new route with a more specific prefix is inserted into the
  routing table, the flow-table is not updated to reflect that change.
  As such existing connections cannot take advantage of the new path.
  In some cases the path is broken. This patch will update the affected
  flow-table entries when a more specific route is added. The route
  entry is properly marked when a route is deleted from the table.
  In this case, when the flow-table performs a search, the stale
  entry is updated automatically. Therefore this patch is not
  necessary for route deletion.
  

Hi,

Will this fix the issue that I see visualising  its self as packet loss 
over a VPN tunnel?


The tunnel is an openvpn (tun mode) tunnel providing a route to 
192.168.201.0/24 however when I ping an address in this network with 
flowtable enabled I see 2-3 out of every 5-6 packets end up being sent 
out of bge0 (IP 172.17.XX.XX/23 GW 172.17.XX.1) to the default gateway 
(which responds with destination host unreachable) rather than down tun0.


Thanks

Tom

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197701 - head/etc/rc.d

2009-10-01 Thread Hiroki Sato
Author: hrs
Date: Fri Oct  2 06:19:34 2009
New Revision: 197701
URL: http://svn.freebsd.org/changeset/base/197701

Log:
  Revert the previous afexists() change.  Knobs configured explicitly by
  the user should not be ignored if possible even if the kernel does not
  support the prerequisite feature.
  
  Discussed with:   ume

Modified:
  head/etc/rc.d/faith
  head/etc/rc.d/static_arp
  head/etc/rc.d/stf

Modified: head/etc/rc.d/faith
==
--- head/etc/rc.d/faith Fri Oct  2 05:11:46 2009(r197700)
+++ head/etc/rc.d/faith Fri Oct  2 06:19:34 2009(r197701)
@@ -15,8 +15,6 @@ stop_cmd="faith_down"
 
 faith_up()
 {
-   afexists inet6 || return 0
-
case ${ipv6_faith_prefix} in
[Nn][Oo] | '')
;;
@@ -50,8 +48,6 @@ faith_up()
 
 faith_down()
 {
-   afexists inet6 || return 0
-
echo "Removing IPv6-to-IPv4 TCP relay capturing interface: faith0."
ifconfig faith0 destroy
${SYSCTL_W} net.inet6.ip6.keepfaith=0

Modified: head/etc/rc.d/static_arp
==
--- head/etc/rc.d/static_arpFri Oct  2 05:11:46 2009(r197700)
+++ head/etc/rc.d/static_arpFri Oct  2 06:19:34 2009(r197701)
@@ -44,8 +44,6 @@ static_arp_start()
 {
local e arp_args
 
-   afexists inet || return 0
-
if [ -n "${static_arp_pairs}" ]; then
echo -n 'Binding static ARP pair(s):'
for e in ${static_arp_pairs}; do
@@ -61,8 +59,6 @@ static_arp_stop()
 {
local e arp_args
 
-   afexists inet || return 0
-
if [ -n "${static_arp_pairs}" ]; then
echo -n 'Unbinding static ARP pair(s):'
for e in ${static_arp_pairs}; do

Modified: head/etc/rc.d/stf
==
--- head/etc/rc.d/stf   Fri Oct  2 05:11:46 2009(r197700)
+++ head/etc/rc.d/stf   Fri Oct  2 06:19:34 2009(r197701)
@@ -15,8 +15,6 @@ stop_cmd="stf_down"
 
 stf_up()
 {
-   afexists inet6 || return 0
-
case ${stf_interface_ipv4addr} in
[Nn][Oo] | '')
;;
@@ -69,8 +67,6 @@ stf_up()
 
 stf_down()
 {
-   afexists inet6 || return 0
-
echo "Removing 6to4 tunnel interface: stf0." 
ifconfig stf0 destroy
route delete -inet6 2002:e000:: -prefixlen 20 ::1
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197700 - in stable/8/sys: . amd64/amd64 amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci

2009-10-01 Thread Alan Cox
Author: alc
Date: Fri Oct  2 05:11:46 2009
New Revision: 197700
URL: http://svn.freebsd.org/changeset/base/197700

Log:
  MFC r197580
Temporarily disable the use of 1GB page mappings by the direct map.
  
  Approved by:  re (kib)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/amd64/pmap.c
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/amd64/amd64/pmap.c
==
--- stable/8/sys/amd64/amd64/pmap.c Fri Oct  2 02:28:59 2009
(r197699)
+++ stable/8/sys/amd64/amd64/pmap.c Fri Oct  2 05:11:46 2009
(r197700)
@@ -440,7 +440,7 @@ create_pagetables(vm_paddr_t *firstaddr)
if (ndmpdp < 4) /* Minimum 4GB of dirmap */
ndmpdp = 4;
DMPDPphys = allocpages(firstaddr, NDMPML4E);
-   if ((amd_feature & AMDID_PAGE1GB) == 0)
+   if (TRUE || (amd_feature & AMDID_PAGE1GB) == 0)
DMPDphys = allocpages(firstaddr, ndmpdp);
dmaplimit = (vm_paddr_t)ndmpdp << PDPSHIFT;
 
@@ -474,7 +474,7 @@ create_pagetables(vm_paddr_t *firstaddr)
 
/* Now set up the direct map space using either 2MB or 1GB pages */
/* Preset PG_M and PG_A because demotion expects it */
-   if ((amd_feature & AMDID_PAGE1GB) == 0) {
+   if (TRUE || (amd_feature & AMDID_PAGE1GB) == 0) {
for (i = 0; i < NPDEPG * ndmpdp; i++) {
((pd_entry_t *)DMPDphys)[i] = (vm_paddr_t)i << PDRSHIFT;
((pd_entry_t *)DMPDphys)[i] |= PG_RW | PG_V | PG_PS |
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r197654 - head/sys/dev/if_ndis

2009-10-01 Thread Sam Leffler
Bruce Evans wrote:
> On Thu, 1 Oct 2009, [utf-8] Dag-Erling Smørgrav wrote:
> 
>> Coleman Kane  writes:
>>> -if (sc->ndis_80211 && vap)
>>> +if ((sc->ndis_80211 != NULL) && (vap != NULL))
>>
>> sc->ndis_80211 is an int.  NULL is a pointer.
> 
> Also, the number of style bugs was doubled on (almost?) every changed line
> by adding 2 sets of unnecessary parentheses.

FWIW I simply asked he compare ptr's against NULL.  The excessive
paren's hurt my eyes too :-)

Sam
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197699 - head/etc/rc.d

2009-10-01 Thread Hiroki Sato
Author: hrs
Date: Fri Oct  2 02:28:59 2009
New Revision: 197699
URL: http://svn.freebsd.org/changeset/base/197699

Log:
  - Split routing_*() and option_*() to *_AF() and add afexists() check
for each address family.  Replace AF_static() with static_AF() for
consistency.
  
  - Display a message only if the user sets a non-default value, and set
a sysctl explicitly even if it is the default value.

Modified:
  head/etc/rc.d/routing

Modified: head/etc/rc.d/routing
==
--- head/etc/rc.d/routing   Fri Oct  2 02:27:49 2009(r197698)
+++ head/etc/rc.d/routing   Fri Oct  2 02:28:59 2009(r197699)
@@ -27,8 +27,24 @@ routing_start()
 
 routing_stop()
 {
+   local _af
+
static_stop "$@"
-   route -n flush
+   for _af in inet inet6; do
+   afexists ${_af} && eval routing_stop_${_af}
+   done
+}
+
+routing_stop_inet()
+{
+   route -n flush -inet
+}
+
+routing_stop_inet6()
+{
+   local i
+
+   route -n flush -inet6
for i in ${ipv6_network_interfaces}; do
ifconfig $i inet6 -defaultif
done
@@ -40,21 +56,11 @@ static_start()
_af=$1
 
case ${_af} in
-   inet)
-   do_static inet add
+   inet|inet6|atm)
+   do_static add ${_af}
;;
-   inet6)
-   do_static inet6 add
-   ;;
-   atm)
-   do_static atm add
-   ;;
-   *)
-   do_static inet add
-   if afexists inet6; then
-   do_static inet6 add
-   fi
-   do_static atm add
+   "")
+   do_static add inet inet6 atm
;;
esac
 }
@@ -65,21 +71,11 @@ static_stop()
_af=$1
 
case ${_af} in
-   inet)
-   do_static inet delete
-   ;;
-   inet6)
-   do_static inet6 delete
+   inet|inet6|atm)
+   do_static delete ${_af}
;;
-   atm)
-   do_static atm delete
-   ;;
-   *)
-   do_static inet delete
-   if afexists inet6; then
-   do_static inet6 delete
-   fi
-   do_static atm delete
+   "")
+   do_static delete inet inet6 atm
;;
esac
 }
@@ -87,13 +83,15 @@ static_stop()
 do_static()
 {
local _af _action
-   _af=$1
-   _action=$2
+   _action=$1
 
-   eval $1_static $2
+   shift
+   for _af in "$@"; do
+   afexists ${_af} && eval static_${_af} ${_action}
+   done
 }
 
-inet_static()
+static_inet()
 {
local _action
_action=$1
@@ -115,7 +113,7 @@ inet_static()
fi
 }
 
-inet6_static()
+static_inet6()
 {
local _action i
_action=$1
@@ -222,9 +220,9 @@ inet6_static()
esac
 }
 
-atm_static()
+static_atm()
 {
-   local _action i
+   local _action i route_args
_action=$1
 
if [ -n "${natm_static_routes}" ]; then
@@ -246,61 +244,93 @@ ropts_init()
 
 options_start()
 {
+   local _af
+
+   for _af in inet inet6 ipx; do
+   afexists ${_af} && eval options_${_af}
+   done
+[ -n "${_ropts_initdone}" ] && echo '.'
+}
+
+options_inet()
+{
if checkyesno icmp_bmcastecho; then
ropts_init
echo -n ' broadcast ping responses=YES'
-   sysctl net.inet.icmp.bmcastecho=1 >/dev/null
+   ${SYSCTL_W} net.inet.icmp.bmcastecho=1 > /dev/null
+   else
+   ${SYSCTL_W} net.inet.icmp.bmcastecho=0 > /dev/null
fi
 
if checkyesno icmp_drop_redirect; then
ropts_init
echo -n ' ignore ICMP redirect=YES'
-   sysctl net.inet.icmp.drop_redirect=1 >/dev/null
+   ${SYSCTL_W} net.inet.icmp.drop_redirect=1 > /dev/null
+   else
+   ${SYSCTL_W} net.inet.icmp.drop_redirect=0 > /dev/null
fi
 
if checkyesno icmp_log_redirect; then
ropts_init
echo -n ' log ICMP redirect=YES'
-   sysctl net.inet.icmp.log_redirect=1 >/dev/null
+   ${SYSCTL_W} net.inet.icmp.log_redirect=1 > /dev/null
+   else
+   ${SYSCTL_W} net.inet.icmp.log_redirect=0 > /dev/null
fi
 
if checkyesno gateway_enable; then
ropts_init
echo -n ' IPv4 gateway=YES'
-   sysctl net.inet.ip.forwarding=1 >/dev/null
-   fi
-
-   if checkyesno ipv6_gateway_enable; then
-   ropts_init
-   echo -n ' IPv6 gateway=YES'
-   sysctl net.inet6.ip6.forwarding=1 >/dev/null
+   ${SYSCTL_W} net.inet.ip.forwarding=1 > /dev/null
+   else
+   ${SYSCTL_W} net.inet.ip.forwarding=0 > /dev/null
fi
 
if checkyesno forward_sourcero

svn commit: r197698 - head/etc/rc.d

2009-10-01 Thread Hiroki Sato
Author: hrs
Date: Fri Oct  2 02:27:49 2009
New Revision: 197698
URL: http://svn.freebsd.org/changeset/base/197698

Log:
  - Fix logic inversion bug of net.inet.tcp.rfc1323[*].
  
  - Split netoptions_start() to netoptions_AF() and add afexists() check
for each address family.
  
  - Display a message only if the user sets a non-default value, and set
a sysctl explicitly even if it is the default value.
  
  Spotted by:   Pegasus Mc Cleaft[*]

Modified:
  head/etc/rc.d/netoptions

Modified: head/etc/rc.d/netoptions
==
--- head/etc/rc.d/netoptionsFri Oct  2 02:24:25 2009(r197697)
+++ head/etc/rc.d/netoptionsFri Oct  2 02:27:49 2009(r197698)
@@ -26,29 +26,48 @@ netoptions_init()
 
 netoptions_start()
 {
+   local _af
+
+   for _af in inet inet6; do
+   afexists ${_af} && eval netoptions_${_af}
+   done
+   [ -n "${_netoptions_initdone}" ] && echo '.'
+}
+
+netoptions_inet()
+{
if checkyesno log_in_vain; then
netoptions_init
echo -n " log_in_vain=${log_in_vain}"
-   ${SYSCTL_W} net.inet.tcp.log_in_vain="${log_in_vain}" >/dev/null
-   ${SYSCTL_W} net.inet.udp.log_in_vain="${log_in_vain}" >/dev/null
+   ${SYSCTL_W} net.inet.tcp.log_in_vain=1 >/dev/null
+   ${SYSCTL_W} net.inet.udp.log_in_vain=1 >/dev/null
+   else
+   ${SYSCTL_W} net.inet.tcp.log_in_vain=0 >/dev/null
+   ${SYSCTL_W} net.inet.udp.log_in_vain=0 >/dev/null
fi
 
if checkyesno tcp_extensions; then
+   ${SYSCTL_W} net.inet.tcp.rfc1323=1 >/dev/null
+   else
netoptions_init
-   echo -n ' rfc1323 extensions=NO'
+   echo -n ' rfc1323 extensions=${tcp_extensions}'
${SYSCTL_W} net.inet.tcp.rfc1323=0 >/dev/null
fi
 
-   if ! checkyesno tcp_keepalive; then
+   if checkyesno tcp_keepalive; then
+   ${SYSCTL_W} net.inet.tcp.always_keepalive=1 >/dev/null
+   else
netoptions_init
-   echo -n ' TCP keepalive=NO'
+   echo -n ' TCP keepalive=${tcp_keepalive}'
${SYSCTL_W} net.inet.tcp.always_keepalive=0 >/dev/null
fi
 
if checkyesno tcp_drop_synfin; then
netoptions_init
-   echo -n ' drop SYN+FIN packets=YES'
+   echo -n ' drop SYN+FIN packets=${tcp_drop_synfin}'
${SYSCTL_W} net.inet.tcp.drop_synfin=1 >/dev/null
+   else
+   ${SYSCTL_W} net.inet.tcp.drop_synfin=0 >/dev/null
fi
 
case ${ip_portrange_first} in
@@ -66,17 +85,17 @@ netoptions_start()
${SYSCTL_W} net.inet.ip.portrange.last=$ip_portrange_last 
>/dev/null
;;
esac
+}
 
-   if afexists inet6; then
-   if checkyesno ipv6_ipv4mapping; then
-   ${SYSCTL_W} net.inet6.ip6.v6only=0 >/dev/null
-   else
-   echo -n " no-ipv4-mapped-ipv6"
-   ${SYSCTL_W} net.inet6.ip6.v6only=1 >/dev/null
-   fi
+netoptions_inet6()
+{
+   if checkyesno ipv6_ipv4mapping; then
+   netoptions_init
+   echo -n " ipv4-mapped-ipv6=${ipv6_ipv4mapping}"
+   ${SYSCTL_W} net.inet6.ip6.v6only=0 >/dev/null
+   else
+   ${SYSCTL_W} net.inet6.ip6.v6only=1 >/dev/null
fi
-
-   [ -n "${_netoptions_initdone}" ] && echo '.'
 }
 
 load_rc_config $name
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197697 - in head/etc: . rc.d

2009-10-01 Thread Hiroki Sato
Author: hrs
Date: Fri Oct  2 02:24:25 2009
New Revision: 197697
URL: http://svn.freebsd.org/changeset/base/197697

Log:
  - Add AF_IPX and AF_NATM to afexists().
  
  - Add afexists() check to address family specific rc.d scripts.  A
script for an AF will be silently ignored if the kernel has no
support for the AF.

Modified:
  head/etc/network.subr
  head/etc/rc.d/defaultroute
  head/etc/rc.d/faith
  head/etc/rc.d/ip6addrctl
  head/etc/rc.d/static_arp
  head/etc/rc.d/stf

Modified: head/etc/network.subr
==
--- head/etc/network.subr   Fri Oct  2 01:45:11 2009(r197696)
+++ head/etc/network.subr   Fri Oct  2 02:24:25 2009(r197697)
@@ -356,6 +356,16 @@ afexists()
inet6)
${SYSCTL_N} net.inet6 > /dev/null 2>&1
;;
+   ipx)
+   ${SYSCTL_N} net.ipx > /dev/null 2>&1
+   ;;
+   atm)
+   if [ -x /sbin/atmconfig ]; then
+   /sbin/atmconfig diag list > /dev/null 2>&1
+   else
+   return 1
+   fi
+   ;;
*)
err 1 "afexists(): Unsupported address family: $_af"
;;

Modified: head/etc/rc.d/defaultroute
==
--- head/etc/rc.d/defaultroute  Fri Oct  2 01:45:11 2009(r197696)
+++ head/etc/rc.d/defaultroute  Fri Oct  2 02:24:25 2009(r197697)
@@ -20,6 +20,8 @@ defaultroute_start()
 {
local output carrier nocarrier nl
 
+   afexists inet || return 0
+
# Return without waiting if we don't have dhcp interfaces or
# if none of the dhcp interfaces is plugged in.
dhcp_interfaces=`list_net_interfaces dhcp`

Modified: head/etc/rc.d/faith
==
--- head/etc/rc.d/faith Fri Oct  2 01:45:11 2009(r197696)
+++ head/etc/rc.d/faith Fri Oct  2 02:24:25 2009(r197697)
@@ -15,6 +15,8 @@ stop_cmd="faith_down"
 
 faith_up()
 {
+   afexists inet6 || return 0
+
case ${ipv6_faith_prefix} in
[Nn][Oo] | '')
;;
@@ -48,6 +50,8 @@ faith_up()
 
 faith_down()
 {
+   afexists inet6 || return 0
+
echo "Removing IPv6-to-IPv4 TCP relay capturing interface: faith0."
ifconfig faith0 destroy
${SYSCTL_W} net.inet6.ip6.keepfaith=0

Modified: head/etc/rc.d/ip6addrctl
==
--- head/etc/rc.d/ip6addrctlFri Oct  2 01:45:11 2009(r197696)
+++ head/etc/rc.d/ip6addrctlFri Oct  2 02:24:25 2009(r197697)
@@ -9,6 +9,7 @@
 # KEYWORD: nojail
 
 . /etc/rc.subr
+. /etc/network.subr
 
 name="ip6addrctl"
 rcvar=`set_rcvar`
@@ -23,6 +24,8 @@ set_rcvar_obsolete ipv6_enable ipv6_pref
 
 ip6addrctl_prefer_ipv6()
 {
+   afexists inet6 || return 0
+
ip6addrctl flush >/dev/null 2>&1
ip6addrctl add ::1/128  50  0
ip6addrctl add ::/0 40  1
@@ -34,6 +37,8 @@ ip6addrctl_prefer_ipv6()
 
 ip6addrctl_prefer_ipv4()
 {
+   afexists inet6 || return 0
+
ip6addrctl flush >/dev/null 2>&1
ip6addrctl add :::0:0/9650  0
ip6addrctl add ::1/128  40  1
@@ -45,30 +50,27 @@ ip6addrctl_prefer_ipv4()
 
 ip6addrctl_start()
 {
-   if ifconfig lo0 inet6 >/dev/null 2>&1; then
-   # We have IPv6 support in kernel.
+   afexists inet6 || return 0
 
-   # install the policy of the address selection algorithm.
-   if [ -f /etc/ip6addrctl.conf ]; then
-   ip6addrctl flush >/dev/null 2>&1
-   ip6addrctl install /etc/ip6addrctl.conf
-   checkyesno ip6addrctl_verbose && ip6addrctl
+   # install the policy of the address selection algorithm.
+   if [ -f /etc/ip6addrctl.conf ]; then
+   ip6addrctl flush >/dev/null 2>&1
+   ip6addrctl install /etc/ip6addrctl.conf
+   checkyesno ip6addrctl_verbose && ip6addrctl
+   else
+   if checkyesno ipv6_prefer; then
+   ip6addrctl_prefer_ipv6
else
-   if checkyesno ipv6_prefer; then
-   ip6addrctl_prefer_ipv6
-   else
-   ip6addrctl_prefer_ipv4
-   fi
+   ip6addrctl_prefer_ipv4
fi
fi
 }
 
 ip6addrctl_stop()
 {
-   if ifconfig lo0 inet6 >/dev/null 2>&1; then
-   # We have IPv6 support in kernel.
-   ip6addrctl flush >/dev/null 2>&1
-   fi
+   afexists inet6 || return 0
+
+   ip6addrctl flush >/dev/null 2>&1
 }
 
 load_rc_config $name

Modified: head/etc/rc.d/static_arp
==

svn commit: r197696 - head/sys/netinet

2009-10-01 Thread Qing Li
Author: qingli
Date: Fri Oct  2 01:45:11 2009
New Revision: 197696
URL: http://svn.freebsd.org/changeset/base/197696

Log:
  Remove a log message from production code. This log message can be
  triggered by a misconfigured host that is sending out gratuious ARPs.
  This log message can also be triggered during a network renumbering
  event when multiple prefixes co-exist on a single network segment.
  
  MFC after:immediately

Modified:
  head/sys/netinet/in.c

Modified: head/sys/netinet/in.c
==
--- head/sys/netinet/in.c   Fri Oct  2 01:34:55 2009(r197695)
+++ head/sys/netinet/in.c   Fri Oct  2 01:45:11 2009(r197696)
@@ -1327,8 +1327,10 @@ in_lltable_rtcheck(struct ifnet *ifp, co
/* XXX rtalloc1 should take a const param */
rt = rtalloc1(__DECONST(struct sockaddr *, l3addr), 0, 0);
if (rt == NULL || (rt->rt_flags & RTF_GATEWAY) || rt->rt_ifp != ifp) {
+#ifdef DIAGNOSTICS
log(LOG_INFO, "IPv4 address: \"%s\" is not on the network\n",
inet_ntoa(((const struct sockaddr_in *)l3addr)->sin_addr));
+#endif
if (rt != NULL)
RTFREE_LOCKED(rt);
return (EINVAL);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197695 - head/sys/netinet

2009-10-01 Thread Qing Li
Author: qingli
Date: Fri Oct  2 01:34:55 2009
New Revision: 197695
URL: http://svn.freebsd.org/changeset/base/197695

Log:
  Previously, if an address alias is configured on an interface, and
  this address alias has a prefix matching that of another address
  configured on the same interface, then the ARP entry for the alias
  is not deleted from the ARP table when that address alias is removed.
  This patch fixes the aforementioned issue.
  
  PR:   kern/139113
  MFC after:3 days

Modified:
  head/sys/netinet/in.c

Modified: head/sys/netinet/in.c
==
--- head/sys/netinet/in.c   Fri Oct  2 01:07:28 2009(r197694)
+++ head/sys/netinet/in.c   Fri Oct  2 01:34:55 2009(r197695)
@@ -1060,6 +1060,8 @@ in_scrubprefix(struct in_ifaddr *target)
!(target->ia_ifp->if_flags & IFF_LOOPBACK)) {
error = ifa_del_loopback_route((struct ifaddr *)target,
   (struct sockaddr *)&target->ia_addr);
+   /* remove arp cache */
+   arp_ifscrub(target->ia_ifp, IA_SIN(target)->sin_addr.s_addr);
}
 
if ((target->ia_flags & IFA_ROUTE) == 0) {
@@ -1082,8 +1084,6 @@ in_scrubprefix(struct in_ifaddr *target)
prefix = target->ia_addr.sin_addr;
mask = target->ia_sockmask.sin_addr;
prefix.s_addr &= mask.s_addr;
-   /* remove arp cache */
-   arp_ifscrub(target->ia_ifp, IA_SIN(target)->sin_addr.s_addr);
}
 
IN_IFADDR_RLOCK();
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r197687 - head/sys/net

2009-10-01 Thread Qing Li
I misinterpreted the "Submitted by:" field.

I thought I put in the names of persons who reported the bug.

Disregard the "Submitted by" field for this checkin.

It's my code. Something breaks, my fault, email me ...

-- Qing


On Thu, Oct 1, 2009 at 1:32 PM, Qing Li  wrote:
> Author: qingli
> Date: Thu Oct  1 20:32:29 2009
> New Revision: 197687
> URL: http://svn.freebsd.org/changeset/base/197687
>
> Log:
>  The flow-table associates TCP/UDP flows and IP destinations with
>  specific routes. When the routing table changes, for example,
>  when a new route with a more specific prefix is inserted into the
>  routing table, the flow-table is not updated to reflect that change.
>  As such existing connections cannot take advantage of the new path.
>  In some cases the path is broken. This patch will update the affected
>  flow-table entries when a more specific route is added. The route
>  entry is properly marked when a route is deleted from the table.
>  In this case, when the flow-table performs a search, the stale
>  entry is updated automatically. Therefore this patch is not
>  necessary for route deletion.
>
>  Submitted by: simon, phk
>  Reviewed by:  bz, kmacy
>  MFC after:    3 days
>
> Modified:
>  head/sys/net/flowtable.c
>  head/sys/net/flowtable.h
>  head/sys/net/route.c
>
> Modified: head/sys/net/flowtable.c
> ==
> --- head/sys/net/flowtable.c    Thu Oct  1 20:11:42 2009        (r197686)
> +++ head/sys/net/flowtable.c    Thu Oct  1 20:32:29 2009        (r197687)
> @@ -830,7 +830,7 @@ fle_free(struct flentry *fle)
>  }
>
>  static void
> -flowtable_free_stale(struct flowtable *ft)
> +flowtable_free_stale(struct flowtable *ft, struct rtentry *rt)
>  {
>        int curbit = 0, count;
>        struct flentry *fle,  **flehead, *fleprev;
> @@ -866,8 +866,14 @@ flowtable_free_stale(struct flowtable *f
>                            curbit);
>                }
>  #endif
> -               while (fle != NULL) {
> -                       if (!flow_stale(ft, fle)) {
> +               while (fle != NULL) {
> +                       if (rt != NULL) {
> +                               if (__DEVOLATILE(struct rtentry *, fle->f_rt) 
> != rt) {
> +                                       fleprev = fle;
> +                                       fle = fle->f_next;
> +                                       continue;
> +                               }
> +                       } else if (!flow_stale(ft, fle)) {
>                                fleprev = fle;
>                                fle = fle->f_next;
>                                continue;
> @@ -916,6 +922,30 @@ flowtable_free_stale(struct flowtable *f
>                log(LOG_DEBUG, "freed %d flow entries\n", count);
>  }
>
> +void
> +flowtable_route_flush(struct flowtable *ft, struct rtentry *rt)
> +{
> +       int i;
> +       if (ft->ft_flags & FL_PCPU) {
> +               for (i = 0; i <= mp_maxid; i++) {
> +                       if (CPU_ABSENT(i))
> +                               continue;
> +
> +                       thread_lock(curthread);
> +                       sched_bind(curthread, i);
> +                       thread_unlock(curthread);
> +
> +                       flowtable_free_stale(ft, rt);
> +
> +                       thread_lock(curthread);
> +                       sched_unbind(curthread);
> +                       thread_unlock(curthread);
> +               }
> +       } else {
> +               flowtable_free_stale(ft, rt);
> +       }
> +}
> +
>  static void
>  flowtable_clean_vnet(void)
>  {
> @@ -933,14 +963,14 @@ flowtable_clean_vnet(void)
>                                sched_bind(curthread, i);
>                                thread_unlock(curthread);
>
> -                               flowtable_free_stale(ft);
> +                               flowtable_free_stale(ft, NULL);
>
>                                thread_lock(curthread);
>                                sched_unbind(curthread);
>                                thread_unlock(curthread);
>                        }
>                } else {
> -                       flowtable_free_stale(ft);
> +                       flowtable_free_stale(ft, NULL);
>                }
>                ft = ft->ft_next;
>        }
>
> Modified: head/sys/net/flowtable.h
> ==
> --- head/sys/net/flowtable.h    Thu Oct  1 20:11:42 2009        (r197686)
> +++ head/sys/net/flowtable.h    Thu Oct  1 20:32:29 2009        (r197687)
> @@ -51,5 +51,7 @@ struct flowtable *flowtable_alloc(int ne
>  int flowtable_lookup(struct flowtable *ft, struct mbuf *m,
>     struct route *ro, uint32_t fibnum);
>
> +void flowtable_route_flush(struct flowtable *ft, struct rtentry *rt);
> +
>  #endif /* _KERNEL */
>  #endif
>
> Modified: head/sys/net/route.c
> ==
> --- head/sys/net/rout

Re: svn commit: r197662 - head/sys/kern

2009-10-01 Thread Xin LI
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Konstantin Belousov wrote:
> Author: kib
> Date: Thu Oct  1 12:50:26 2009
> New Revision: 197662
> URL: http://svn.freebsd.org/changeset/base/197662
> 
> Log:
>   Do not dereference vp->v_mount without holding vnode lock and checking
>   that the vnode is not reclaimed.
>   
>   Noted by:   Igor Sysoev 
>   MFC after:  1 week

Thanks!

> Modified:
>   head/sys/kern/uipc_syscalls.c
> 
> Modified: head/sys/kern/uipc_syscalls.c
> ==
> --- head/sys/kern/uipc_syscalls.c Thu Oct  1 12:48:35 2009
> (r197661)
> +++ head/sys/kern/uipc_syscalls.c Thu Oct  1 12:50:26 2009
> (r197662)
> @@ -2086,9 +2086,11 @@ retry_space:
>   /*
>* Get the page from backing store.
>*/
> - bsize = vp->v_mount->mnt_stat.f_iosize;
>   vfslocked = VFS_LOCK_GIANT(vp->v_mount);
> - vn_lock(vp, LK_SHARED | LK_RETRY);
> + error = vn_lock(vp, LK_SHARED);
> + if (error != 0)
> + goto after_read;
> + bsize = vp->v_mount->mnt_stat.f_iosize;
>  
>   /*
>* XXXMAC: Because we don't have fp->f_cred
> @@ -2101,6 +2103,7 @@ retry_space:
>   IO_VMIO | ((MAXBSIZE / bsize) << 
> IO_SEQSHIFT),
>   td->td_ucred, NOCRED, &resid, td);
>   VOP_UNLOCK(vp, 0);
> + after_read:
>   VFS_UNLOCK_GIANT(vfslocked);
>   VM_OBJECT_LOCK(obj);
>   vm_page_io_finish(pg);
> 


- --
Xin LI http://www.delphij.net/
FreeBSD - The Power to Serve!
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (FreeBSD)

iEYEARECAAYFAkrFTIAACgkQi+vbBBjt66DwFgCgn1DSEwLvKdf05bwSWqe3cKwl
qZEAn28OF2G63pmKDzTB5mm2O9SaGuQB
=7Ae1
-END PGP SIGNATURE-
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197693 - in head/sys/i386: i386 include xen

2009-10-01 Thread Kip Macy
Author: kmacy
Date: Thu Oct  1 22:05:38 2009
New Revision: 197693
URL: http://svn.freebsd.org/changeset/base/197693

Log:
  make read_eflags and write_eflags accomplish the same effect on PVM as native,
  simplifying interrupt handling

Modified:
  head/sys/i386/i386/vm_machdep.c
  head/sys/i386/include/cpufunc.h
  head/sys/i386/xen/xen_machdep.c

Modified: head/sys/i386/i386/vm_machdep.c
==
--- head/sys/i386/i386/vm_machdep.c Thu Oct  1 21:44:30 2009
(r197692)
+++ head/sys/i386/i386/vm_machdep.c Thu Oct  1 22:05:38 2009
(r197693)
@@ -270,11 +270,7 @@ cpu_fork(td1, p2, td2, flags)
/*
 * XXX XEN need to check on PSL_USER is handled
 */
-#ifdef XEN
-   td2->td_md.md_saved_flags = 0;
-#else  
td2->td_md.md_saved_flags = PSL_KERNEL | PSL_I;
-#endif
/*
 * Now, cpu_switch() can schedule the new process.
 * pcb_esp is loaded pointing to the cpu_switch() stack frame
@@ -446,11 +442,7 @@ cpu_set_upcall(struct thread *td, struct
 
/* Setup to release spin count in fork_exit(). */
td->td_md.md_spinlock_count = 1;
-#ifdef XEN 
-   td->td_md.md_saved_flags = 0;   
-#else
td->td_md.md_saved_flags = PSL_KERNEL | PSL_I;
-#endif
 }
 
 /*

Modified: head/sys/i386/include/cpufunc.h
==
--- head/sys/i386/include/cpufunc.h Thu Oct  1 21:44:30 2009
(r197692)
+++ head/sys/i386/include/cpufunc.h Thu Oct  1 22:05:38 2009
(r197693)
@@ -49,8 +49,8 @@ extern u_int xen_rcr2(void);
 extern void xen_load_cr3(u_int data);
 extern void xen_tlb_flush(void);
 extern void xen_invlpg(u_int addr);
-extern int xen_save_and_cli(void);
-extern void xen_restore_flags(u_int eflags);
+extern void write_eflags(u_int eflags);
+extern u_int read_eflags(void);
 #endif
 
 struct region_descriptor;
@@ -293,7 +293,11 @@ ia32_pause(void)
 }
 
 static __inline u_int
+#ifdef XEN
+_read_eflags(void)
+#else  
 read_eflags(void)
+#endif
 {
u_int   ef;
 
@@ -335,7 +339,11 @@ wbinvd(void)
 }
 
 static __inline void
+#ifdef XEN
+_write_eflags(u_int ef)
+#else
 write_eflags(u_int ef)
+#endif
 {
__asm __volatile("pushl %0; popfl" : : "r" (ef));
 }
@@ -653,23 +661,15 @@ intr_disable(void)
 {
register_t eflags;
 
-#ifdef XEN
-   eflags = xen_save_and_cli();
-#else  
eflags = read_eflags();
disable_intr();
-#endif 
return (eflags);
 }
 
 static __inline void
 intr_restore(register_t eflags)
 {
-#ifdef XEN
-   xen_restore_flags(eflags);
-#else
write_eflags(eflags);
-#endif
 }
 
 #else /* !(__GNUCLIKE_ASM && __CC_SUPPORTS___INLINE) */

Modified: head/sys/i386/xen/xen_machdep.c
==
--- head/sys/i386/xen/xen_machdep.c Thu Oct  1 21:44:30 2009
(r197692)
+++ head/sys/i386/xen/xen_machdep.c Thu Oct  1 22:05:38 2009
(r197693)
@@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -101,6 +102,7 @@ void ni_sti(void);
 void
 ni_cli(void)
 {
+   CTR0(KTR_SPARE2, "ni_cli disabling interrupts");
__asm__("pushl %edx;"
"pushl %eax;"
);
@@ -345,33 +347,53 @@ xen_load_cr3(u_int val)
PANIC_IF(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
 }
 
-void
-xen_restore_flags(u_int eflags)
+#ifdef KTR
+static __inline u_int
+rebp(void)
 {
-   if (eflags > 1)
-   eflags = ((eflags & PSL_I) == 0);
+   u_int   data;
 
-   __restore_flags(eflags);
+   __asm __volatile("movl 4(%%ebp),%0" : "=r" (data)); 
+   return (data);
 }
+#endif
 
-int
-xen_save_and_cli(void)
+u_int
+read_eflags(void)
 {
-   int eflags;
-   
-   __save_and_cli(eflags);
+vcpu_info_t *_vcpu;
+   u_int eflags;
+
+   eflags = _read_eflags();
+_vcpu = &HYPERVISOR_shared_info->vcpu_info[smp_processor_id()]; 
+   if (_vcpu->evtchn_upcall_mask)
+   eflags &= ~PSL_I;
+
return (eflags);
 }
 
 void
+write_eflags(u_int eflags)
+{
+   u_int intr;
+
+   CTR2(KTR_SPARE2, "%x xen_restore_flags eflags %x", rebp(), eflags);
+   intr = ((eflags & PSL_I) == 0);
+   __restore_flags(intr);
+   _write_eflags(eflags);
+}
+
+void
 xen_cli(void)
 {
+   CTR1(KTR_SPARE2, "%x xen_cli disabling interrupts", rebp());
__cli();
 }
 
 void
 xen_sti(void)
 {
+   CTR1(KTR_SPARE2, "%x xen_sti enabling interrupts", rebp());
__sti();
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r197684 - head/sys/ddb

2009-10-01 Thread John Baldwin
On Thursday 01 October 2009 3:12:14 pm John Baldwin wrote:
> Author: jhb
> Date: Thu Oct  1 19:12:14 2009
> New Revision: 197684
> URL: http://svn.freebsd.org/changeset/base/197684
> 
> Log:
>   Put square backets ([]) around process names for system processes to patch
>   the behavior of ps(1).

Bah I should clarify that this just fixes the process name for multithreaded
kernel processes.  Single-threaded processes were already handled.

-- 
John Baldwin
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197692 - head/sys/kern

2009-10-01 Thread Ed Maste
Author: emaste
Date: Thu Oct  1 21:44:30 2009
New Revision: 197692
URL: http://svn.freebsd.org/changeset/base/197692

Log:
  In fill_kinfo_thread, copy the thread's name into struct kinfo_proc even
  if it is empty.  Otherwise the previous thread's name would remain in the
  struct and then be reported for this thread.
  
  Submitted by: Ryan Stone
  MFC after:1 week

Modified:
  head/sys/kern/kern_proc.c

Modified: head/sys/kern/kern_proc.c
==
--- head/sys/kern/kern_proc.c   Thu Oct  1 21:40:08 2009(r197691)
+++ head/sys/kern/kern_proc.c   Thu Oct  1 21:44:30 2009(r197692)
@@ -847,8 +847,7 @@ fill_kinfo_thread(struct thread *td, str
strlcpy(kp->ki_wmesg, td->td_wmesg, sizeof(kp->ki_wmesg));
else
bzero(kp->ki_wmesg, sizeof(kp->ki_wmesg));
-   if (td->td_name[0] != '\0')
-   strlcpy(kp->ki_ocomm, td->td_name, sizeof(kp->ki_ocomm));
+   strlcpy(kp->ki_ocomm, td->td_name, sizeof(kp->ki_ocomm));
if (TD_ON_LOCK(td)) {
kp->ki_kiflag |= KI_LOCKBLOCK;
strlcpy(kp->ki_lockname, td->td_lockname,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197691 - in head: bin/sh tools/regression/bin/sh/errors

2009-10-01 Thread Jilles Tjoelker
Author: jilles
Date: Thu Oct  1 21:40:08 2009
New Revision: 197691
URL: http://svn.freebsd.org/changeset/base/197691

Log:
  sh: Disallow mismatched quotes in backticks (`...`).
  
  Due to the amount of code removed by this, it seems that allowing unmatched
  quotes was a deliberate imitation of System V sh and real ksh. Most other
  shells do not allow unmatched quotes (e.g. bash, zsh, pdksh, NetBSD /bin/sh,
  dash).
  
  PR:   bin/137657

Added:
  head/tools/regression/bin/sh/errors/backquote-error2.0   (contents, props 
changed)
Modified:
  head/bin/sh/parser.c

Modified: head/bin/sh/parser.c
==
--- head/bin/sh/parser.cThu Oct  1 21:14:40 2009(r197690)
+++ head/bin/sh/parser.cThu Oct  1 21:40:08 2009(r197691)
@@ -82,7 +82,6 @@ struct heredoc {
 
 
 STATIC struct heredoc *heredoclist;/* list of here documents to read */
-STATIC int parsebackquote; /* nonzero if we are inside backquotes */
 STATIC int doprompt;   /* if set, prompt the user */
 STATIC int needprompt; /* true if interactive and at start of line */
 STATIC int lasttoken;  /* last token read */
@@ -1043,7 +1042,7 @@ readtoken1(int firstc, char const *synta
 endword:
if (syntax == ARISYNTAX)
synerror("Missing '))'");
-   if (syntax != BASESYNTAX && ! parsebackquote && eofmark == NULL)
+   if (syntax != BASESYNTAX && eofmark == NULL)
synerror("Unterminated quoted string");
if (varnest != 0) {
startlinno = plinno;
@@ -1303,7 +1302,6 @@ parsesub: {
 
 parsebackq: {
struct nodelist **nlpp;
-   int savepbq;
union node *n;
char *volatile str;
struct jmploc jmploc;
@@ -1311,11 +1309,9 @@ parsebackq: {
int savelen;
int saveprompt;
 
-   savepbq = parsebackquote;
if (setjmp(jmploc.loc)) {
if (str)
ckfree(str);
-   parsebackquote = 0;
handler = savehandler;
longjmp(handler->loc, 1);
}
@@ -1397,7 +1393,6 @@ done:
nlpp = &(*nlpp)->next;
*nlpp = (struct nodelist *)stalloc(sizeof (struct nodelist));
(*nlpp)->next = NULL;
-   parsebackquote = oldstyle;
 
if (oldstyle) {
saveprompt = doprompt;
@@ -1433,7 +1428,6 @@ done:
str = NULL;
INTON;
}
-   parsebackquote = savepbq;
handler = savehandler;
if (arinest || dblquote)
USTPUTC(CTLBACKQ | CTLQUOTE, out);

Added: head/tools/regression/bin/sh/errors/backquote-error2.0
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/regression/bin/sh/errors/backquote-error2.0  Thu Oct  1 
21:40:08 2009(r197691)
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+sh -c 'echo `echo .BA"DCODE.`
+echo ".BAD"CODE.' 2>&1 | grep -q BADCODE && exit 1
+echo '`"`' | sh -n 2>/dev/null && exit 1
+echo '`'"'"'`' | sh -n 2>/dev/null && exit 1
+exit 0
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197688 - head/sys/modules/acpi/acpi

2009-10-01 Thread Jung-uk Kim
Author: jkim
Date: Thu Oct  1 20:56:15 2009
New Revision: 197688
URL: http://svn.freebsd.org/changeset/base/197688

Log:
  Compile ACPI debugger and disassembler for kernel modules unconditionally.
  These files will generate almost empty object files without ACPI_DEBUG/DDB
  options.  As a result, size of acpi.ko will increase slightly.

Modified:
  head/sys/modules/acpi/acpi/Makefile

Modified: head/sys/modules/acpi/acpi/Makefile
==
--- head/sys/modules/acpi/acpi/Makefile Thu Oct  1 20:32:29 2009
(r197687)
+++ head/sys/modules/acpi/acpi/Makefile Thu Oct  1 20:56:15 2009
(r197688)
@@ -27,6 +27,10 @@
 KMOD=  acpi
 
 # ACPI CA sources
+SRCS+= dbcmds.c dbdisply.c dbexec.c dbfileio.c dbhistry.c dbinput.c dbstats.c
+SRCS+= dbutils.c dbxface.c
+SRCS+= dmbuffer.c dmnames.c dmopcode.c dmobject.c dmresrc.c dmresrcl.c
+SRCS+= dmresrcs.c dmutils.c dmwalk.c
 SRCS+= dsfield.c dsinit.c dsmethod.c dsmthdat.c dsobject.c dsopcode.c
 SRCS+= dsutils.c dswexec.c dswload.c dswscope.c dswstate.c
 SRCS+= evevent.c evgpe.c evgpeblk.c evmisc.c evregion.c evrgnini.c evsci.c
@@ -69,12 +73,6 @@ SRCS+=   cpufreq_if.h device_if.h isa_if.h
 # This obviously needs a better and more structural fix.
 SRCS+= opt_kstack_pages.h opt_nfs.h opt_apic.h opt_compat.h opt_hwpmc_hooks.h
 
-# Debugging support
-DBSRC= dbcmds.c dbdisply.c dbexec.c dbfileio.c dbhistry.c dbinput.c dbstats.c
-DBSRC+=dbutils.c dbxface.c
-DBSRC+=dmbuffer.c dmnames.c dmopcode.c dmobject.c dmresrc.c dmresrcl.c
-DBSRC+=dmresrcs.c dmutils.c dmwalk.c
-
 .if !defined(KERNBUILDDIR)
 .if KTR
 CFLAGS+=-DKTR
@@ -87,7 +85,6 @@ CFLAGS+=-DACPI_MAX_THREADS=${ACPI_MAX_TH
 .endif
 .if ACPI_DEBUG
 CFLAGS+=-DACPI_DEBUG
-SRCS+= ${DBSRC}
 opt_ddb.h: Makefile
echo "#define DDB 1" > ${.TARGET}
 .else
@@ -98,10 +95,12 @@ opt_ddb.h: Makefile
 
 # Machine-specific code such as sleep/wakeup
 SRCS+= acpi_machdep.c acpi_wakecode.h acpi_wakeup.c
-.if ${MACHINE} == "i386"
-SRCS+= madt.c assym.s
+SRCS+= assym.s madt.c
+CLEANFILES+=   acpi_wakecode.bin acpi_wakecode.h acpi_wakecode.o
+.if ${MACHINE_ARCH} == "amd64"
+SRCS+= opt_global.h
+CLEANFILES+=   acpi_wakedata.h
 .endif
-CLEANFILES+=   acpi_wakecode.h acpi_wakecode.o acpi_wakecode.bin ${DBSRC:.c=.o}
 
 acpi_wakecode.h: acpi_wakecode.S assym.s
${MAKE} -f ${.CURDIR}/../../../${MACHINE_ARCH}/acpica/Makefile \
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197687 - head/sys/net

2009-10-01 Thread Qing Li
Author: qingli
Date: Thu Oct  1 20:32:29 2009
New Revision: 197687
URL: http://svn.freebsd.org/changeset/base/197687

Log:
  The flow-table associates TCP/UDP flows and IP destinations with
  specific routes. When the routing table changes, for example,
  when a new route with a more specific prefix is inserted into the
  routing table, the flow-table is not updated to reflect that change.
  As such existing connections cannot take advantage of the new path.
  In some cases the path is broken. This patch will update the affected
  flow-table entries when a more specific route is added. The route
  entry is properly marked when a route is deleted from the table.
  In this case, when the flow-table performs a search, the stale
  entry is updated automatically. Therefore this patch is not
  necessary for route deletion.
  
  Submitted by: simon, phk
  Reviewed by:  bz, kmacy
  MFC after:3 days

Modified:
  head/sys/net/flowtable.c
  head/sys/net/flowtable.h
  head/sys/net/route.c

Modified: head/sys/net/flowtable.c
==
--- head/sys/net/flowtable.cThu Oct  1 20:11:42 2009(r197686)
+++ head/sys/net/flowtable.cThu Oct  1 20:32:29 2009(r197687)
@@ -830,7 +830,7 @@ fle_free(struct flentry *fle)
 }
 
 static void
-flowtable_free_stale(struct flowtable *ft)
+flowtable_free_stale(struct flowtable *ft, struct rtentry *rt)
 {
int curbit = 0, count;
struct flentry *fle,  **flehead, *fleprev;
@@ -866,8 +866,14 @@ flowtable_free_stale(struct flowtable *f
curbit);
}
 #endif 
-   while (fle != NULL) {   
-   if (!flow_stale(ft, fle)) {
+   while (fle != NULL) {
+   if (rt != NULL) {
+   if (__DEVOLATILE(struct rtentry *, fle->f_rt) 
!= rt) {
+   fleprev = fle;
+   fle = fle->f_next;
+   continue;
+   }
+   } else if (!flow_stale(ft, fle)) {
fleprev = fle;
fle = fle->f_next;
continue;
@@ -916,6 +922,30 @@ flowtable_free_stale(struct flowtable *f
log(LOG_DEBUG, "freed %d flow entries\n", count);
 }
 
+void
+flowtable_route_flush(struct flowtable *ft, struct rtentry *rt)
+{
+   int i;
+   if (ft->ft_flags & FL_PCPU) {
+   for (i = 0; i <= mp_maxid; i++) {
+   if (CPU_ABSENT(i))
+   continue;
+
+   thread_lock(curthread);
+   sched_bind(curthread, i);
+   thread_unlock(curthread);
+
+   flowtable_free_stale(ft, rt);
+
+   thread_lock(curthread);
+   sched_unbind(curthread);
+   thread_unlock(curthread);
+   }
+   } else {
+   flowtable_free_stale(ft, rt);
+   }
+}
+
 static void
 flowtable_clean_vnet(void)
 {
@@ -933,14 +963,14 @@ flowtable_clean_vnet(void)
sched_bind(curthread, i);
thread_unlock(curthread);
 
-   flowtable_free_stale(ft);
+   flowtable_free_stale(ft, NULL);
 
thread_lock(curthread);
sched_unbind(curthread);
thread_unlock(curthread);
}
} else {
-   flowtable_free_stale(ft);
+   flowtable_free_stale(ft, NULL);
}
ft = ft->ft_next;
}

Modified: head/sys/net/flowtable.h
==
--- head/sys/net/flowtable.hThu Oct  1 20:11:42 2009(r197686)
+++ head/sys/net/flowtable.hThu Oct  1 20:32:29 2009(r197687)
@@ -51,5 +51,7 @@ struct flowtable *flowtable_alloc(int ne
 int flowtable_lookup(struct flowtable *ft, struct mbuf *m,
 struct route *ro, uint32_t fibnum);
 
+void flowtable_route_flush(struct flowtable *ft, struct rtentry *rt);
+
 #endif /* _KERNEL */
 #endif

Modified: head/sys/net/route.c
==
--- head/sys/net/route.cThu Oct  1 20:11:42 2009(r197686)
+++ head/sys/net/route.cThu Oct  1 20:32:29 2009(r197687)
@@ -56,6 +56,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #ifdef RADIX_MPATH
 #include 
@@ -996,6 +997,9 @@ rtrequest1_fib(int req, struct rt_addrin
 {
int error = 0, needlock = 0;
register struct rtentry *rt;
+#ifdef FLOWTABLE
+   register struct rtentry *rt0;
+#endif
register struct radix_no

svn commit: r197684 - head/sys/ddb

2009-10-01 Thread John Baldwin
Author: jhb
Date: Thu Oct  1 19:12:14 2009
New Revision: 197684
URL: http://svn.freebsd.org/changeset/base/197684

Log:
  Put square backets ([]) around process names for system processes to patch
  the behavior of ps(1).

Modified:
  head/sys/ddb/db_ps.c

Modified: head/sys/ddb/db_ps.c
==
--- head/sys/ddb/db_ps.cThu Oct  1 18:58:26 2009(r197683)
+++ head/sys/ddb/db_ps.cThu Oct  1 19:12:14 2009(r197684)
@@ -189,13 +189,19 @@ db_ps(db_expr_t addr, boolean_t hasaddr,
if (cred != NULL && jailed(cred))
strlcat(state, "J", sizeof(state));
db_printf(" %-6.6s ", state);
-   if (p->p_flag & P_HADTHREADS)
+   if (p->p_flag & P_HADTHREADS) {
 #ifdef __LP64__
-   db_printf(" (threaded)  %s\n",
-   p->p_comm);
+   db_printf(" (threaded)  ");
 #else
-   db_printf(" (threaded)  %s\n", p->p_comm);
+   db_printf(" (threaded)  ");
 #endif
+   if (p->p_flag & P_SYSTEM)
+   db_printf("[");
+   db_printf("%s", p->p_comm);
+   if (p->p_flag & P_SYSTEM)
+   db_printf("]");
+   db_printf("\n");
+   }
FOREACH_THREAD_IN_PROC(p, td) {
dumpthread(p, td, p->p_flag & P_HADTHREADS);
if (db_pager_quit)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197683 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2009-10-01 Thread Xin LI
Author: delphij
Date: Thu Oct  1 18:58:26 2009
New Revision: 197683
URL: http://svn.freebsd.org/changeset/base/197683

Log:
  Return EOPNOTSUPP instead of EINVAL when doing chflags(2) over an old
  format ZFS, as defined in the manual page.
  
  Submitted by: pjd (response of my original patch but bugs are mine)
  MFC after:3 days

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Oct 
 1 18:37:16 2009(r197682)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Oct 
 1 18:58:26 2009(r197683)
@@ -4180,8 +4180,12 @@ zfs_freebsd_setattr(ap)
zflags = VTOZ(vp)->z_phys->zp_flags;
 
if (vap->va_flags != VNOVAL) {
+   zfsvfs_t *zfsvfs = VTOZ(vp)->z_zfsvfs;
int error;
 
+   if (zfsvfs->z_use_fuids == B_FALSE)
+   return (EOPNOTSUPP);
+
fflags = vap->va_flags;
if ((fflags & ~(SF_IMMUTABLE|SF_APPEND|SF_NOUNLINK|UF_NODUMP)) 
!= 0)
return (EOPNOTSUPP);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r197654 - head/sys/dev/if_ndis

2009-10-01 Thread Coleman Kane
On Fri, 2009-10-02 at 04:20 +1000, Bruce Evans wrote:
> On Thu, 1 Oct 2009, Coleman Kane wrote:
> 
> > On Fri, 2009-10-02 at 00:36 +1000, Bruce Evans wrote:
> >> On Thu, 1 Oct 2009, [utf-8] Dag-Erling Smørgrav wrote:
> >>
> >>> Coleman Kane  writes:
>  -if (sc->ndis_80211 && vap)
>  +if ((sc->ndis_80211 != NULL) && (vap != NULL))
> >>>
> >>> sc->ndis_80211 is an int.  NULL is a pointer.
> >>
> >> Also, the number of style bugs was doubled on (almost?) every changed line
> >> by adding 2 sets of unnecessary parentheses.
> >>
> >> Bruce
> >
> > Re-read style(9) more closely.
> 
> Do I need to read it at all :-).

I meant that in the past-tense first-person manner, sorry, not trying to
tell anyone what to do. ;) Should have written "I re-read style(9)...".

> 
> > Yes... the extra parentheses are superfluous, and should therefore be
> > removed. However, the current rev, which looks like this:
> >
> >  if ((sc->ndis_80211 != 0) && (vap != NULL))
> >
> > doesn't help the author shoot themselves in the foot as violating the
> > "explicitly compare values to zero" rule did in the earlier revision.
> 
> Actually I needed to count the style bugs more carefully -- 2 implicit
> comparisons with 0 or NULL (unless the first one is really boolean),
> but I only counted 1, while I counted 2 for the extra parentheses.

I think you're right about the ndis_80211. I got thrown off by the first
usage of it in the file which reads:
sc->ndis_80211++;

But it looks like 1) It is tested elsewhere as a boolean, and 2) That
statement really means sc->ndis_80211 = 1 (or = TRUE).

> 
> > I'll heed the request of the second-to-last paragraph of style(9) on
> > this particular change, not churning the SVN repo further, and make a
> > mental note for later.
> 
> Thanks.  I forgot about that paragraph being there.  I think churning
> repos doesn't matter much now if it ever did, but churning sources makes
> their history hard to understand.
> 
> Bruce
-- 
Coleman Kane


signature.asc
Description: This is a digitally signed message part


svn commit: r197682 - head/sys/dev/usb/controller

2009-10-01 Thread Andrew Thompson
Author: thompsa
Date: Thu Oct  1 18:37:16 2009
New Revision: 197682
URL: http://svn.freebsd.org/changeset/base/197682

Log:
  EHCI Hardware BUG workaround
  
  The EHCI HW can use the qtd_next field instead of qtd_altnext when a short
  packet is received. This contradicts what is stated in the EHCI datasheet.
  Also the total-bytes field in the status field of the following TD gets
  corrupted upon reception of a short packet!  We work this around in software 
by
  not queueing more than one job/TD at a time of up to 16Kbytes! The bug has 
been
  seen on multiple INTEL based EHCI chips.  Other vendors have not been tested
  yet.
  
  - Applications using /dev/usb/X.Y.Z, where Z is non-zero are affected, but not
applications using LibUSB v0.1, v1.2 and v2.0.
  - Mass Storage (umass) is affected.
  
  Submitted by: Hans Petter Selasky
  MFC after:3 days

Modified:
  head/sys/dev/usb/controller/ehci.c

Modified: head/sys/dev/usb/controller/ehci.c
==
--- head/sys/dev/usb/controller/ehci.c  Thu Oct  1 18:23:50 2009
(r197681)
+++ head/sys/dev/usb/controller/ehci.c  Thu Oct  1 18:37:16 2009
(r197682)
@@ -131,6 +131,7 @@ struct ehci_std_temp {
uint8_t auto_data_toggle;
uint8_t setup_alt_next;
uint8_t last_frame;
+   uint8_t can_use_next;
 };
 
 void
@@ -1207,11 +1208,6 @@ ehci_non_isoc_done_sub(struct usb_xfer *
 
xfer->td_transfer_cache = td;
 
-   /* update data toggle */
-
-   xfer->endpoint->toggle_next =
-   (status & EHCI_QTD_TOGGLE_MASK) ? 1 : 0;
-
 #if USB_DEBUG
if (status & EHCI_QTD_STATERRS) {
DPRINTFN(11, "error, addr=%d, endpt=0x%02x, frame=0x%02x"
@@ -1235,6 +1231,9 @@ ehci_non_isoc_done_sub(struct usb_xfer *
 static void
 ehci_non_isoc_done(struct usb_xfer *xfer)
 {
+   ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus);
+   ehci_qh_t *qh;
+   uint32_t status;
usb_error_t err = 0;
 
DPRINTFN(13, "xfer=%p endpoint=%p transfer done\n",
@@ -1248,6 +1247,17 @@ ehci_non_isoc_done(struct usb_xfer *xfer
}
 #endif
 
+   /* extract data toggle directly from the QH's overlay area */
+
+   qh = xfer->qh_start[xfer->flags_int.curr_dma_set];
+
+   usb_pc_cpu_invalidate(qh->page_cache);
+
+   status = hc32toh(sc, qh->qh_qtd.qtd_status);
+
+   xfer->endpoint->toggle_next =
+   (status & EHCI_QTD_TOGGLE_MASK) ? 1 : 0;
+
/* reset scanner */
 
xfer->td_transfer_cache = xfer->td_transfer_first;
@@ -1348,6 +1358,7 @@ ehci_check_transfer(struct usb_xfer *xfe
}
} else {
ehci_qtd_t *td;
+   ehci_qh_t *qh;
 
/* non-isochronous transfer */
 
@@ -1357,16 +1368,35 @@ ehci_check_transfer(struct usb_xfer *xfe
 */
td = xfer->td_transfer_cache;
 
+   qh = xfer->qh_start[xfer->flags_int.curr_dma_set];
+
+   usb_pc_cpu_invalidate(qh->page_cache);
+
+   status = hc32toh(sc, qh->qh_qtd.qtd_status);
+   if (status & EHCI_QTD_ACTIVE) {
+   /* transfer is pending */
+   goto done;
+   }
+
while (1) {
usb_pc_cpu_invalidate(td->page_cache);
status = hc32toh(sc, td->qtd_status);
 
/*
-* if there is an active TD the transfer isn't done
+* Check if there is an active TD which
+* indicates that the transfer isn't done.
 */
if (status & EHCI_QTD_ACTIVE) {
/* update cache */
-   xfer->td_transfer_cache = td;
+   if (xfer->td_transfer_cache != td) {
+   xfer->td_transfer_cache = td;
+   if (qh->qh_qtd.qtd_next & 
+   htohc32(sc, EHCI_LINK_TERMINATE)) {
+   /* XXX - manually advance to 
next frame */
+   qh->qh_qtd.qtd_next = 
td->qtd_self;
+   
usb_pc_cpu_flush(td->page_cache);
+   }
+   }
goto done;
}
/*
@@ -1545,7 +1575,6 @@ ehci_setup_standard_chain_sub(struct ehc
ehci_qtd_t *td;
ehci_qtd_t *td_next;
ehci_qtd_t *td_alt_next;
-   uint32_t qtd_altnext;
uint32_t buf_offset;
uint32_t average;
uint32_t len_old;
@@ -1554,7 +1583,6 @@ ehci_setup_standard_chain_sub(struct ehc
uint8_t precompute;
 
terminate = htohc32(temp->sc, EHCI_LINK_TERMINATE);
-   qtd_altnext

Re: svn commit: r197654 - head/sys/dev/if_ndis

2009-10-01 Thread Bruce Evans

On Thu, 1 Oct 2009, Coleman Kane wrote:


On Fri, 2009-10-02 at 00:36 +1000, Bruce Evans wrote:

On Thu, 1 Oct 2009, [utf-8] Dag-Erling Sm??rgrav wrote:


Coleman Kane  writes:

-   if (sc->ndis_80211 && vap)
+   if ((sc->ndis_80211 != NULL) && (vap != NULL))


sc->ndis_80211 is an int.  NULL is a pointer.


Also, the number of style bugs was doubled on (almost?) every changed line
by adding 2 sets of unnecessary parentheses.

Bruce


Re-read style(9) more closely.


Do I need to read it at all :-).


Yes... the extra parentheses are superfluous, and should therefore be
removed. However, the current rev, which looks like this:

 if ((sc->ndis_80211 != 0) && (vap != NULL))

doesn't help the author shoot themselves in the foot as violating the
"explicitly compare values to zero" rule did in the earlier revision.


Actually I needed to count the style bugs more carefully -- 2 implicit
comparisons with 0 or NULL (unless the first one is really boolean),
but I only counted 1, while I counted 2 for the extra parentheses.


I'll heed the request of the second-to-last paragraph of style(9) on
this particular change, not churning the SVN repo further, and make a
mental note for later.


Thanks.  I forgot about that paragraph being there.  I think churning
repos doesn't matter much now if it ever did, but churning sources makes
their history hard to understand.

Bruce___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

svn commit: r197681 - head/lib/libc/gen

2009-10-01 Thread Joe Marcus Clarke
Author: marcus (doc,ports committer)
Date: Thu Oct  1 18:23:50 2009
New Revision: 197681
URL: http://svn.freebsd.org/changeset/base/197681

Log:
  Correct the pthread stub prototype for pthread_mutexattr_settype to allow for
  the type argument.  This is known to fix some pthread_mutexattr_settype()
  invocations, especially when it comes to pulseaudio.
  
  Approved by:  kib
deischen (threads)
  MFC after:3 days

Modified:
  head/lib/libc/gen/_pthread_stubs.c

Modified: head/lib/libc/gen/_pthread_stubs.c
==
--- head/lib/libc/gen/_pthread_stubs.c  Thu Oct  1 17:22:03 2009
(r197680)
+++ head/lib/libc/gen/_pthread_stubs.c  Thu Oct  1 18:23:50 2009
(r197681)
@@ -222,7 +222,7 @@ STUB_FUNC1(pthread_mutex_trylock, PJT_MU
 STUB_FUNC1(pthread_mutex_unlock, PJT_MUTEX_UNLOCK, int, void *)
 STUB_FUNC1(pthread_mutexattr_destroy, PJT_MUTEXATTR_DESTROY, int, void *)
 STUB_FUNC1(pthread_mutexattr_init, PJT_MUTEXATTR_INIT, int, void *)
-STUB_FUNC1(pthread_mutexattr_settype, PJT_MUTEXATTR_SETTYPE, int, void *)
+STUB_FUNC2(pthread_mutexattr_settype, PJT_MUTEXATTR_SETTYPE, int, void *, int)
 STUB_FUNC2(pthread_once,   PJT_ONCE, int, void *, void *)
 STUB_FUNC1(pthread_rwlock_destroy, PJT_RWLOCK_DESTROY, int, void *)
 STUB_FUNC2(pthread_rwlock_init,PJT_RWLOCK_INIT, int, void *, void *)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r197654 - head/sys/dev/if_ndis

2009-10-01 Thread Coleman Kane
On Fri, 2009-10-02 at 00:36 +1000, Bruce Evans wrote:
> On Thu, 1 Oct 2009, [utf-8] Dag-Erling Smørgrav wrote:
> 
> > Coleman Kane  writes:
> >> -  if (sc->ndis_80211 && vap)
> >> +  if ((sc->ndis_80211 != NULL) && (vap != NULL))
> >
> > sc->ndis_80211 is an int.  NULL is a pointer.
> 
> Also, the number of style bugs was doubled on (almost?) every changed line
> by adding 2 sets of unnecessary parentheses.
> 
> Bruce

Re-read style(9) more closely.

Yes... the extra parentheses are superfluous, and should therefore be
removed. However, the current rev, which looks like this:

  if ((sc->ndis_80211 != 0) && (vap != NULL))

doesn't help the author shoot themselves in the foot as violating the
"explicitly compare values to zero" rule did in the earlier revision.

I'll heed the request of the second-to-last paragraph of style(9) on
this particular change, not churning the SVN repo further, and make a
mental note for later.

-- 
Coleman Kane


signature.asc
Description: This is a digitally signed message part


svn commit: r197680 - in head/sys: fs/fifofs kern sys

2009-10-01 Thread Edward Tomasz Napierala
Author: trasz
Date: Thu Oct  1 17:22:03 2009
New Revision: 197680
URL: http://svn.freebsd.org/changeset/base/197680

Log:
  Provide default implementation for VOP_ACCESS(9), so that filesystems which
  want to provide VOP_ACCESSX(9) don't have to implement both.  Note that
  this commit makes implementation of either of these two mandatory.
  
  Reviewed by:  kib

Modified:
  head/sys/fs/fifofs/fifo_vnops.c
  head/sys/kern/subr_acl_posix1e.c
  head/sys/kern/vfs_default.c
  head/sys/kern/vfs_subr.c
  head/sys/sys/vnode.h

Modified: head/sys/fs/fifofs/fifo_vnops.c
==
--- head/sys/fs/fifofs/fifo_vnops.c Thu Oct  1 17:12:52 2009
(r197679)
+++ head/sys/fs/fifofs/fifo_vnops.c Thu Oct  1 17:22:03 2009
(r197680)
@@ -119,7 +119,6 @@ static struct filterops fifo_notsup_filt
 struct vop_vector fifo_specops = {
.vop_default =  &default_vnodeops,
 
-   .vop_access =   VOP_EBADF,
.vop_advlock =  fifo_advlock,
.vop_close =fifo_close,
.vop_create =   VOP_PANIC,

Modified: head/sys/kern/subr_acl_posix1e.c
==
--- head/sys/kern/subr_acl_posix1e.cThu Oct  1 17:12:52 2009
(r197679)
+++ head/sys/kern/subr_acl_posix1e.cThu Oct  1 17:22:03 2009
(r197680)
@@ -61,6 +61,9 @@ vaccess_acl_posix1e(enum vtype type, uid
accmode_t acl_mask_granted;
int group_matched, i;
 
+   KASSERT((accmode & ~(VEXEC | VWRITE | VREAD | VADMIN | VAPPEND)) == 0,
+   ("invalid bit in accmode"));
+
/*
 * Look for a normal, non-privileged way to access the file/directory
 * as requested.  If it exists, go with that.  Otherwise, attempt to

Modified: head/sys/kern/vfs_default.c
==
--- head/sys/kern/vfs_default.c Thu Oct  1 17:12:52 2009(r197679)
+++ head/sys/kern/vfs_default.c Thu Oct  1 17:22:03 2009(r197680)
@@ -83,12 +83,17 @@ static int  dirent_exists(struct vnode *v
  *
  * If there is no specific entry here, we will return EOPNOTSUPP.
  *
+ * Note that every filesystem has to implement either vop_access
+ * or vop_accessx; failing to do so will result in immediate crash
+ * due to stack overflow, as vop_stdaccess() calls vop_stdaccessx(),
+ * which calls vop_stdaccess() etc.
  */
 
 struct vop_vector default_vnodeops = {
.vop_default =  NULL,
.vop_bypass =   VOP_EOPNOTSUPP,
 
+   .vop_access =   vop_stdaccess,
.vop_accessx =  vop_stdaccessx,
.vop_advlock =  vop_stdadvlock,
.vop_advlockasync = vop_stdadvlockasync,
@@ -326,6 +331,16 @@ out:
 }
 
 int
+vop_stdaccess(struct vop_access_args *ap)
+{
+
+   KASSERT((ap->a_accmode & ~(VEXEC | VWRITE | VREAD | VADMIN |
+   VAPPEND)) == 0, ("invalid bit in accmode"));
+
+   return (VOP_ACCESSX(ap->a_vp, ap->a_accmode, ap->a_cred, ap->a_td));
+}
+
+int
 vop_stdaccessx(struct vop_accessx_args *ap)
 {
int error;

Modified: head/sys/kern/vfs_subr.c
==
--- head/sys/kern/vfs_subr.cThu Oct  1 17:12:52 2009(r197679)
+++ head/sys/kern/vfs_subr.cThu Oct  1 17:22:03 2009(r197680)
@@ -3520,6 +3520,9 @@ vaccess(enum vtype type, mode_t file_mod
accmode_t dac_granted;
accmode_t priv_granted;
 
+   KASSERT((accmode & ~(VEXEC | VWRITE | VREAD | VADMIN | VAPPEND)) == 0,
+   ("invalid bit in accmode"));
+
/*
 * Look for a normal, non-privileged way to access the file/directory
 * as requested.  If it exists, go with that.

Modified: head/sys/sys/vnode.h
==
--- head/sys/sys/vnode.hThu Oct  1 17:12:52 2009(r197679)
+++ head/sys/sys/vnode.hThu Oct  1 17:22:03 2009(r197680)
@@ -685,6 +685,7 @@ int vop_stdlock(struct vop_lock1_args *)
 intvop_stdputpages(struct vop_putpages_args *);
 intvop_stdunlock(struct vop_unlock_args *);
 intvop_nopoll(struct vop_poll_args *);
+intvop_stdaccess(struct vop_access_args *ap);
 intvop_stdaccessx(struct vop_accessx_args *ap);
 intvop_stdadvlock(struct vop_advlock_args *ap);
 intvop_stdadvlockasync(struct vop_advlockasync_args *ap);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197679 - in head: crypto/openssh crypto/openssh/openbsd-compat secure/libexec/sftp-server secure/libexec/ssh-keysign secure/usr.bin/scp secure/usr.bin/sftp secure/usr.bin/ssh secure/us...

2009-10-01 Thread Dag-Erling Smorgrav
Author: des
Date: Thu Oct  1 17:12:52 2009
New Revision: 197679
URL: http://svn.freebsd.org/changeset/base/197679

Log:
  Upgrade to OpenSSH 5.3p1.

Added:
  head/crypto/openssh/roaming.h
 - copied unchanged from r197675, vendor-crypto/openssh/dist/roaming.h
  head/crypto/openssh/roaming_common.c
 - copied unchanged from r197675, 
vendor-crypto/openssh/dist/roaming_common.c
  head/crypto/openssh/roaming_dummy.c
 - copied unchanged from r197675, vendor-crypto/openssh/dist/roaming_dummy.c
  head/crypto/openssh/schnorr.h
 - copied unchanged from r197675, vendor-crypto/openssh/dist/schnorr.h
Modified:
  head/crypto/openssh/   (props changed)
  head/crypto/openssh/ChangeLog
  head/crypto/openssh/README
  head/crypto/openssh/README.platform
  head/crypto/openssh/auth-pam.c
  head/crypto/openssh/auth-passwd.c
  head/crypto/openssh/auth-sia.c
  head/crypto/openssh/auth1.c
  head/crypto/openssh/auth2-jpake.c
  head/crypto/openssh/auth2-kbdint.c
  head/crypto/openssh/auth2-none.c
  head/crypto/openssh/auth2-passwd.c
  head/crypto/openssh/auth2-pubkey.c
  head/crypto/openssh/auth2.c
  head/crypto/openssh/canohost.c
  head/crypto/openssh/canohost.h
  head/crypto/openssh/channels.c
  head/crypto/openssh/clientloop.c
  head/crypto/openssh/config.h
  head/crypto/openssh/config.h.in
  head/crypto/openssh/defines.h
  head/crypto/openssh/gss-genr.c
  head/crypto/openssh/includes.h
  head/crypto/openssh/jpake.c
  head/crypto/openssh/jpake.h
  head/crypto/openssh/kex.c
  head/crypto/openssh/kex.h
  head/crypto/openssh/kexdhs.c
  head/crypto/openssh/kexgexs.c
  head/crypto/openssh/monitor.c
  head/crypto/openssh/monitor_mm.c
  head/crypto/openssh/monitor_wrap.c
  head/crypto/openssh/monitor_wrap.h
  head/crypto/openssh/openbsd-compat/bsd-cygwin_util.c
  head/crypto/openssh/openbsd-compat/bsd-cygwin_util.h
  head/crypto/openssh/openbsd-compat/daemon.c
  head/crypto/openssh/openbsd-compat/getrrsetbyname.c
  head/crypto/openssh/openbsd-compat/openssl-compat.c
  head/crypto/openssh/openbsd-compat/openssl-compat.h
  head/crypto/openssh/openbsd-compat/port-aix.c
  head/crypto/openssh/openbsd-compat/port-aix.h
  head/crypto/openssh/packet.c
  head/crypto/openssh/packet.h
  head/crypto/openssh/readconf.c
  head/crypto/openssh/readconf.h
  head/crypto/openssh/schnorr.c
  head/crypto/openssh/servconf.c
  head/crypto/openssh/serverloop.c
  head/crypto/openssh/session.c
  head/crypto/openssh/sftp-client.c
  head/crypto/openssh/sftp-server.8
  head/crypto/openssh/sftp-server.c
  head/crypto/openssh/ssh-agent.1
  head/crypto/openssh/ssh-agent.c
  head/crypto/openssh/ssh-keygen.c
  head/crypto/openssh/ssh.1
  head/crypto/openssh/ssh.c
  head/crypto/openssh/ssh_config
  head/crypto/openssh/ssh_config.5
  head/crypto/openssh/ssh_namespace.h
  head/crypto/openssh/sshconnect.c
  head/crypto/openssh/sshconnect.h
  head/crypto/openssh/sshconnect2.c
  head/crypto/openssh/sshd.8
  head/crypto/openssh/sshd.c
  head/crypto/openssh/sshd_config
  head/crypto/openssh/sshd_config.5
  head/crypto/openssh/sshlogin.c
  head/crypto/openssh/uuencode.c
  head/crypto/openssh/version.h
  head/secure/libexec/sftp-server/Makefile
  head/secure/libexec/ssh-keysign/Makefile
  head/secure/usr.bin/scp/Makefile
  head/secure/usr.bin/sftp/Makefile
  head/secure/usr.bin/ssh-add/Makefile
  head/secure/usr.bin/ssh-agent/Makefile
  head/secure/usr.bin/ssh-keygen/Makefile
  head/secure/usr.bin/ssh-keyscan/Makefile
  head/secure/usr.bin/ssh/Makefile
  head/secure/usr.sbin/sshd/Makefile

Modified: head/crypto/openssh/ChangeLog
==
--- head/crypto/openssh/ChangeLog   Thu Oct  1 16:25:35 2009
(r197678)
+++ head/crypto/openssh/ChangeLog   Thu Oct  1 17:12:52 2009
(r197679)
@@ -1,3 +1,282 @@
+20090926
+ - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
+ [contrib/suse/openssh.spec] Update for release
+ - (djm) [README] update relnotes URL
+ - (djm) [packet.c] Restore EWOULDBLOCK handling that got lost somewhere
+ - (djm) Release 5.3p1
+
+20090911
+ - (dtucker) [configure.ac] Change the -lresolv check so it works on Mac OS X
+   10.6 (which doesn't have BIND8_COMPAT and thus uses res_9_query).  Patch
+   from jbasney at ncsa uiuc edu.
+
+20090908
+ - (djm) [serverloop.c] Fix test for server-assigned remote forwarding port
+   (-R 0:...); bz#1578, spotted and fix by gavin AT emf.net; ok dtucker@
+
+20090901
+ - (dtucker) [configure.ac] Bug #1639: use AC_PATH_PROG to search the path for
+   krb5-config if it's not in the location specified by --with-kerberos5.
+   Patch from jchadima at redhat.
+
+20090829
+ - (dtucker) [README.platform] Add text about development packages, based on
+   text from Chris Pepper in bug #1631.
+
+20090828
+ - dtucker [auth-sia.c] Roll back the change for bug #1241 as it apparently
+   causes problems in some Tru64 configurations.
+ - (djm) [sshd_config.5] downgrade mention of login.conf to be an example
+   and mentio

svn commit: r197676 - in stable/6/sys: . conf contrib/pf dev/cxgb dev/mxge

2009-10-01 Thread Andrew Gallatin
Author: gallatin
Date: Thu Oct  1 15:51:29 2009
New Revision: 197676
URL: http://svn.freebsd.org/changeset/base/197676

Log:
  MFC: more fixes for mxge watchdog reset handling (194761 197645)
  
  194761: Fix bug where device would loose promisc setting when reset.
  197645: Restore the PCI Express control register after reset

Modified:
  stable/6/sys/   (props changed)
  stable/6/sys/conf/   (props changed)
  stable/6/sys/contrib/pf/   (props changed)
  stable/6/sys/dev/cxgb/   (props changed)
  stable/6/sys/dev/mxge/if_mxge.c
  stable/6/sys/dev/mxge/if_mxge_var.h

Modified: stable/6/sys/dev/mxge/if_mxge.c
==
--- stable/6/sys/dev/mxge/if_mxge.c Thu Oct  1 15:40:08 2009
(r197675)
+++ stable/6/sys/dev/mxge/if_mxge.c Thu Oct  1 15:51:29 2009
(r197676)
@@ -1296,7 +1296,7 @@ mxge_reset(mxge_softc_t *sc, int interru
}
sc->rdma_tags_available = 15;
status = mxge_update_mac_address(sc);
-   mxge_change_promisc(sc, 0);
+   mxge_change_promisc(sc, sc->ifp->if_flags & IFF_PROMISC);
mxge_change_pause(sc, sc->pause);
mxge_set_multicast_list(sc);
return status;
@@ -3420,10 +3420,16 @@ mxge_setup_cfg_space(mxge_softc_t *sc)
if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) {
lnk = pci_read_config(dev, reg + 0x12, 2);
sc->link_width = (lnk >> 4) & 0x3f;
-   
-   pectl = pci_read_config(dev, reg + 0x8, 2);
-   pectl = (pectl & ~0x7000) | (5 << 12);
-   pci_write_config(dev, reg + 0x8, pectl, 2);
+
+   if (sc->pectl == 0) {
+   pectl = pci_read_config(dev, reg + 0x8, 2);
+   pectl = (pectl & ~0x7000) | (5 << 12);
+   pci_write_config(dev, reg + 0x8, pectl, 2);
+   sc->pectl = pectl;
+   } else {
+   /* restore saved pectl after watchdog reset */
+   pci_write_config(dev, reg + 0x8, sc->pectl, 2);
+   }
}
 
/* Enable DMA and Memory space access */
@@ -3534,6 +3540,9 @@ mxge_watchdog_reset(mxge_softc_t *sc)
/* release all TX locks */
for (s = 0; s < num_tx_slices; s++) {
ss = &sc->ss[s];
+#ifdef IFNET_BUF_RING
+   mxge_start_locked(ss);
+#endif
mtx_unlock(&ss->tx.mtx);
}
}
@@ -3796,7 +3805,7 @@ mxge_fetch_tunables(mxge_softc_t *sc)
mxge_ticks = hz / 2;
sc->pause = mxge_flow_control;
if (mxge_rss_hash_type < MXGEFW_RSS_HASH_TYPE_IPV4 
-   || mxge_rss_hash_type > MXGEFW_RSS_HASH_TYPE_SRC_PORT) {
+   || mxge_rss_hash_type > MXGEFW_RSS_HASH_TYPE_MAX) {
mxge_rss_hash_type = MXGEFW_RSS_HASH_TYPE_SRC_PORT;
}
 }

Modified: stable/6/sys/dev/mxge/if_mxge_var.h
==
--- stable/6/sys/dev/mxge/if_mxge_var.h Thu Oct  1 15:40:08 2009
(r197675)
+++ stable/6/sys/dev/mxge/if_mxge_var.h Thu Oct  1 15:51:29 2009
(r197676)
@@ -253,6 +253,7 @@ struct mxge_softc {
struct sysctl_ctx_list slice_sysctl_ctx;
char *mac_addr_string;
uint8_t mac_addr[6];/* eeprom mac address */
+   uint16_t pectl; /* save PCIe CTL state */
char product_code_string[64];
char serial_number_string[64];
char cmd_mtx_name[16];
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r197608 - head/sys/geom/part

2009-10-01 Thread Marcel Moolenaar


On Oct 1, 2009, at 5:06 AM, Dmitry Marakasov wrote:


* Marcel Moolenaar (xcl...@mac.com) wrote:


Seconded. I've seen a report of geom_part_ebr unable to detect
partitions which were actually there. Will inquiry the reporter if
this change solved the problem.


Seems like it hasn't. Here's the first sector from that partition:


I'll see about checking the partition table more rigorously
so that we can eliminate the check for the unused space.

With what tool was this created?


Dunno. I've pointed the person who had that problem to this thread.


It should not matter; I was just curious...

--
Marcel Moolenaar
xcl...@mac.com



___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197675 - in stable/7/sys: . contrib/pf dev/mxge

2009-10-01 Thread Andrew Gallatin
Author: gallatin
Date: Thu Oct  1 15:40:08 2009
New Revision: 197675
URL: http://svn.freebsd.org/changeset/base/197675

Log:
  MFC: more fixes for mxge watchdog reset handling (194761 197645)
  
  194761: Fix bug where device would loose promisc setting when reset.
  197645: Restore the PCI Express control register after reset

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/mxge/if_mxge.c
  stable/7/sys/dev/mxge/if_mxge_var.h

Modified: stable/7/sys/dev/mxge/if_mxge.c
==
--- stable/7/sys/dev/mxge/if_mxge.c Thu Oct  1 15:33:53 2009
(r197674)
+++ stable/7/sys/dev/mxge/if_mxge.c Thu Oct  1 15:40:08 2009
(r197675)
@@ -1296,7 +1296,7 @@ mxge_reset(mxge_softc_t *sc, int interru
}
sc->rdma_tags_available = 15;
status = mxge_update_mac_address(sc);
-   mxge_change_promisc(sc, 0);
+   mxge_change_promisc(sc, sc->ifp->if_flags & IFF_PROMISC);
mxge_change_pause(sc, sc->pause);
mxge_set_multicast_list(sc);
return status;
@@ -3419,10 +3419,16 @@ mxge_setup_cfg_space(mxge_softc_t *sc)
if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) {
lnk = pci_read_config(dev, reg + 0x12, 2);
sc->link_width = (lnk >> 4) & 0x3f;
-   
-   pectl = pci_read_config(dev, reg + 0x8, 2);
-   pectl = (pectl & ~0x7000) | (5 << 12);
-   pci_write_config(dev, reg + 0x8, pectl, 2);
+
+   if (sc->pectl == 0) {
+   pectl = pci_read_config(dev, reg + 0x8, 2);
+   pectl = (pectl & ~0x7000) | (5 << 12);
+   pci_write_config(dev, reg + 0x8, pectl, 2);
+   sc->pectl = pectl;
+   } else {
+   /* restore saved pectl after watchdog reset */
+   pci_write_config(dev, reg + 0x8, sc->pectl, 2);
+   }
}
 
/* Enable DMA and Memory space access */
@@ -3533,6 +3539,9 @@ mxge_watchdog_reset(mxge_softc_t *sc)
/* release all TX locks */
for (s = 0; s < num_tx_slices; s++) {
ss = &sc->ss[s];
+#ifdef IFNET_BUF_RING
+   mxge_start_locked(ss);
+#endif
mtx_unlock(&ss->tx.mtx);
}
}
@@ -3795,7 +3804,7 @@ mxge_fetch_tunables(mxge_softc_t *sc)
mxge_ticks = hz / 2;
sc->pause = mxge_flow_control;
if (mxge_rss_hash_type < MXGEFW_RSS_HASH_TYPE_IPV4 
-   || mxge_rss_hash_type > MXGEFW_RSS_HASH_TYPE_SRC_PORT) {
+   || mxge_rss_hash_type > MXGEFW_RSS_HASH_TYPE_MAX) {
mxge_rss_hash_type = MXGEFW_RSS_HASH_TYPE_SRC_PORT;
}
 }

Modified: stable/7/sys/dev/mxge/if_mxge_var.h
==
--- stable/7/sys/dev/mxge/if_mxge_var.h Thu Oct  1 15:33:53 2009
(r197674)
+++ stable/7/sys/dev/mxge/if_mxge_var.h Thu Oct  1 15:40:08 2009
(r197675)
@@ -254,6 +254,7 @@ struct mxge_softc {
struct sysctl_ctx_list slice_sysctl_ctx;
char *mac_addr_string;
uint8_t mac_addr[6];/* eeprom mac address */
+   uint16_t pectl; /* save PCIe CTL state */
char product_code_string[64];
char serial_number_string[64];
char cmd_mtx_name[16];
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197674 - head/sys/netipsec

2009-10-01 Thread VANHULLEBUS Yvan
Author: vanhu
Date: Thu Oct  1 15:33:53 2009
New Revision: 197674
URL: http://svn.freebsd.org/changeset/base/197674

Log:
  Changed an IPSEC_ASSERT to a simple test, as such invalid packets
  may come from outside without being discarded before.
  
  Submitted by: aurelien.an...@netasq.com
  Reviewed by:  bz (secteam)
  Obtained from:NETASQ
  MFC after:1m

Modified:
  head/sys/netipsec/xform_esp.c

Modified: head/sys/netipsec/xform_esp.c
==
--- head/sys/netipsec/xform_esp.c   Thu Oct  1 15:28:40 2009
(r197673)
+++ head/sys/netipsec/xform_esp.c   Thu Oct  1 15:33:53 2009
(r197674)
@@ -282,9 +282,15 @@ esp_input(struct mbuf *m, struct secasva
 
IPSEC_ASSERT(sav != NULL, ("null SA"));
IPSEC_ASSERT(sav->tdb_encalgxform != NULL, ("null encoding xform"));
-   IPSEC_ASSERT((skip&3) == 0 && (m->m_pkthdr.len&3) == 0,
-   ("misaligned packet, skip %u pkt len %u",
-   skip, m->m_pkthdr.len));
+
+   /* Valid IP Packet length ? */
+   if ( (skip&3) || (m->m_pkthdr.len&3) ){
+   DPRINTF(("%s: misaligned packet, skip %u pkt len %u",
+   __func__, skip, m->m_pkthdr.len));
+   V_espstat.esps_badilen++;
+   m_freem(m);
+   return EINVAL;
+   }
 
/* XXX don't pullup, just copy header */
IP6_EXTHDR_GET(esp, struct newesp *, m, skip, sizeof (struct newesp));
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197671 - in vendor-crypto/openssh/5.3p1: . contrib/aix contrib/caldera contrib/cygwin contrib/redhat contrib/suse openbsd-compat

2009-10-01 Thread Dag-Erling Smorgrav
Author: des
Date: Thu Oct  1 15:22:34 2009
New Revision: 197671
URL: http://svn.freebsd.org/changeset/base/197671

Log:
  Tag OpenSSH 5.3p1

Added:
  vendor-crypto/openssh/5.3p1/
 - copied from r197669, vendor-crypto/openssh/dist/
  vendor-crypto/openssh/5.3p1/roaming.h
 - copied unchanged from r197670, vendor-crypto/openssh/dist/roaming.h
  vendor-crypto/openssh/5.3p1/roaming_common.c
 - copied unchanged from r197670, 
vendor-crypto/openssh/dist/roaming_common.c
  vendor-crypto/openssh/5.3p1/roaming_dummy.c
 - copied unchanged from r197670, vendor-crypto/openssh/dist/roaming_dummy.c
  vendor-crypto/openssh/5.3p1/schnorr.h
 - copied unchanged from r197670, vendor-crypto/openssh/dist/schnorr.h
Replaced:
  vendor-crypto/openssh/5.3p1/ChangeLog
 - copied unchanged from r197670, vendor-crypto/openssh/dist/ChangeLog
  vendor-crypto/openssh/5.3p1/Makefile.in
 - copied unchanged from r197670, vendor-crypto/openssh/dist/Makefile.in
  vendor-crypto/openssh/5.3p1/README
 - copied unchanged from r197670, vendor-crypto/openssh/dist/README
  vendor-crypto/openssh/5.3p1/README.platform
 - copied unchanged from r197670, vendor-crypto/openssh/dist/README.platform
  vendor-crypto/openssh/5.3p1/auth-pam.c
 - copied unchanged from r197670, vendor-crypto/openssh/dist/auth-pam.c
  vendor-crypto/openssh/5.3p1/auth-passwd.c
 - copied unchanged from r197670, vendor-crypto/openssh/dist/auth-passwd.c
  vendor-crypto/openssh/5.3p1/auth-sia.c
 - copied unchanged from r197670, vendor-crypto/openssh/dist/auth-sia.c
  vendor-crypto/openssh/5.3p1/auth1.c
 - copied unchanged from r197670, vendor-crypto/openssh/dist/auth1.c
  vendor-crypto/openssh/5.3p1/auth2-jpake.c
 - copied unchanged from r197670, vendor-crypto/openssh/dist/auth2-jpake.c
  vendor-crypto/openssh/5.3p1/auth2-kbdint.c
 - copied unchanged from r197670, vendor-crypto/openssh/dist/auth2-kbdint.c
  vendor-crypto/openssh/5.3p1/auth2-none.c
 - copied unchanged from r197670, vendor-crypto/openssh/dist/auth2-none.c
  vendor-crypto/openssh/5.3p1/auth2-passwd.c
 - copied unchanged from r197670, vendor-crypto/openssh/dist/auth2-passwd.c
  vendor-crypto/openssh/5.3p1/auth2-pubkey.c
 - copied unchanged from r197670, vendor-crypto/openssh/dist/auth2-pubkey.c
  vendor-crypto/openssh/5.3p1/auth2.c
 - copied unchanged from r197670, vendor-crypto/openssh/dist/auth2.c
  vendor-crypto/openssh/5.3p1/canohost.c
 - copied unchanged from r197670, vendor-crypto/openssh/dist/canohost.c
  vendor-crypto/openssh/5.3p1/canohost.h
 - copied unchanged from r197670, vendor-crypto/openssh/dist/canohost.h
  vendor-crypto/openssh/5.3p1/channels.c
 - copied unchanged from r197670, vendor-crypto/openssh/dist/channels.c
  vendor-crypto/openssh/5.3p1/clientloop.c
 - copied unchanged from r197670, vendor-crypto/openssh/dist/clientloop.c
  vendor-crypto/openssh/5.3p1/config.h.in
 - copied unchanged from r197670, vendor-crypto/openssh/dist/config.h.in
  vendor-crypto/openssh/5.3p1/configure
 - copied unchanged from r197670, vendor-crypto/openssh/dist/configure
  vendor-crypto/openssh/5.3p1/configure.ac
 - copied unchanged from r197670, vendor-crypto/openssh/dist/configure.ac
  vendor-crypto/openssh/5.3p1/contrib/aix/buildbff.sh
 - copied unchanged from r197670, 
vendor-crypto/openssh/dist/contrib/aix/buildbff.sh
  vendor-crypto/openssh/5.3p1/contrib/caldera/openssh.spec
 - copied unchanged from r197670, 
vendor-crypto/openssh/dist/contrib/caldera/openssh.spec
  vendor-crypto/openssh/5.3p1/contrib/cygwin/ssh-host-config
 - copied unchanged from r197670, 
vendor-crypto/openssh/dist/contrib/cygwin/ssh-host-config
  vendor-crypto/openssh/5.3p1/contrib/cygwin/ssh-user-config
 - copied unchanged from r197670, 
vendor-crypto/openssh/dist/contrib/cygwin/ssh-user-config
  vendor-crypto/openssh/5.3p1/contrib/redhat/openssh.spec
 - copied unchanged from r197670, 
vendor-crypto/openssh/dist/contrib/redhat/openssh.spec
  vendor-crypto/openssh/5.3p1/contrib/suse/openssh.spec
 - copied unchanged from r197670, 
vendor-crypto/openssh/dist/contrib/suse/openssh.spec
  vendor-crypto/openssh/5.3p1/defines.h
 - copied unchanged from r197670, vendor-crypto/openssh/dist/defines.h
  vendor-crypto/openssh/5.3p1/gss-genr.c
 - copied unchanged from r197670, vendor-crypto/openssh/dist/gss-genr.c
  vendor-crypto/openssh/5.3p1/includes.h
 - copied unchanged from r197670, vendor-crypto/openssh/dist/includes.h
  vendor-crypto/openssh/5.3p1/jpake.c
 - copied unchanged from r197670, vendor-crypto/openssh/dist/jpake.c
  vendor-crypto/openssh/5.3p1/jpake.h
 - copied unchanged from r197670, vendor-crypto/openssh/dist/jpake.h
  vendor-crypto/openssh/5.3p1/kex.c
 - copied unchanged from r197670, vendor-crypto/openssh/dist/kex.c
  vendor-crypto/openssh/5.3p1/kex.h
 - copied unchanged from r197670, vendor-crypto/openssh/dist/kex.h
  vendor-crypto/openssh/5.3p1/kexdhs.c
 - copied unchanged from r1976

svn commit: r197670 - in vendor-crypto/openssh/dist: . contrib/aix contrib/caldera contrib/cygwin contrib/redhat contrib/suse openbsd-compat

2009-10-01 Thread Dag-Erling Smorgrav
Author: des
Date: Thu Oct  1 15:19:37 2009
New Revision: 197670
URL: http://svn.freebsd.org/changeset/base/197670

Log:
  Vendor import of OpenSSH 5.3p1

Added:
  vendor-crypto/openssh/dist/roaming.h   (contents, props changed)
  vendor-crypto/openssh/dist/roaming_common.c   (contents, props changed)
  vendor-crypto/openssh/dist/roaming_dummy.c   (contents, props changed)
  vendor-crypto/openssh/dist/schnorr.h   (contents, props changed)
Modified:
  vendor-crypto/openssh/dist/ChangeLog
  vendor-crypto/openssh/dist/Makefile.in
  vendor-crypto/openssh/dist/README
  vendor-crypto/openssh/dist/README.platform
  vendor-crypto/openssh/dist/auth-pam.c
  vendor-crypto/openssh/dist/auth-passwd.c
  vendor-crypto/openssh/dist/auth-sia.c
  vendor-crypto/openssh/dist/auth1.c
  vendor-crypto/openssh/dist/auth2-jpake.c
  vendor-crypto/openssh/dist/auth2-kbdint.c
  vendor-crypto/openssh/dist/auth2-none.c
  vendor-crypto/openssh/dist/auth2-passwd.c
  vendor-crypto/openssh/dist/auth2-pubkey.c
  vendor-crypto/openssh/dist/auth2.c
  vendor-crypto/openssh/dist/canohost.c
  vendor-crypto/openssh/dist/canohost.h
  vendor-crypto/openssh/dist/channels.c
  vendor-crypto/openssh/dist/clientloop.c
  vendor-crypto/openssh/dist/config.h.in
  vendor-crypto/openssh/dist/configure   (contents, props changed)
  vendor-crypto/openssh/dist/configure.ac
  vendor-crypto/openssh/dist/contrib/aix/buildbff.sh
  vendor-crypto/openssh/dist/contrib/caldera/openssh.spec
  vendor-crypto/openssh/dist/contrib/cygwin/ssh-host-config
  vendor-crypto/openssh/dist/contrib/cygwin/ssh-user-config
  vendor-crypto/openssh/dist/contrib/redhat/openssh.spec
  vendor-crypto/openssh/dist/contrib/suse/openssh.spec
  vendor-crypto/openssh/dist/defines.h
  vendor-crypto/openssh/dist/gss-genr.c
  vendor-crypto/openssh/dist/includes.h
  vendor-crypto/openssh/dist/jpake.c
  vendor-crypto/openssh/dist/jpake.h
  vendor-crypto/openssh/dist/kex.c
  vendor-crypto/openssh/dist/kex.h
  vendor-crypto/openssh/dist/kexdhs.c
  vendor-crypto/openssh/dist/kexgexs.c
  vendor-crypto/openssh/dist/moduli.0
  vendor-crypto/openssh/dist/monitor.c
  vendor-crypto/openssh/dist/monitor_mm.c
  vendor-crypto/openssh/dist/monitor_wrap.c
  vendor-crypto/openssh/dist/monitor_wrap.h
  vendor-crypto/openssh/dist/openbsd-compat/bsd-cygwin_util.c
  vendor-crypto/openssh/dist/openbsd-compat/bsd-cygwin_util.h
  vendor-crypto/openssh/dist/openbsd-compat/daemon.c
  vendor-crypto/openssh/dist/openbsd-compat/getrrsetbyname.c
  vendor-crypto/openssh/dist/openbsd-compat/openssl-compat.c
  vendor-crypto/openssh/dist/openbsd-compat/openssl-compat.h
  vendor-crypto/openssh/dist/openbsd-compat/port-aix.c
  vendor-crypto/openssh/dist/openbsd-compat/port-aix.h
  vendor-crypto/openssh/dist/packet.c
  vendor-crypto/openssh/dist/packet.h
  vendor-crypto/openssh/dist/readconf.c
  vendor-crypto/openssh/dist/readconf.h
  vendor-crypto/openssh/dist/schnorr.c
  vendor-crypto/openssh/dist/scp.0
  vendor-crypto/openssh/dist/servconf.c
  vendor-crypto/openssh/dist/serverloop.c
  vendor-crypto/openssh/dist/session.c
  vendor-crypto/openssh/dist/sftp-client.c
  vendor-crypto/openssh/dist/sftp-server.0
  vendor-crypto/openssh/dist/sftp-server.8
  vendor-crypto/openssh/dist/sftp-server.c
  vendor-crypto/openssh/dist/sftp.0
  vendor-crypto/openssh/dist/ssh-add.0
  vendor-crypto/openssh/dist/ssh-agent.0
  vendor-crypto/openssh/dist/ssh-agent.1
  vendor-crypto/openssh/dist/ssh-agent.c
  vendor-crypto/openssh/dist/ssh-keygen.0
  vendor-crypto/openssh/dist/ssh-keygen.c
  vendor-crypto/openssh/dist/ssh-keyscan.0
  vendor-crypto/openssh/dist/ssh-keysign.0
  vendor-crypto/openssh/dist/ssh-rand-helper.0
  vendor-crypto/openssh/dist/ssh.0
  vendor-crypto/openssh/dist/ssh.1
  vendor-crypto/openssh/dist/ssh.c
  vendor-crypto/openssh/dist/ssh_config.0
  vendor-crypto/openssh/dist/sshconnect.c
  vendor-crypto/openssh/dist/sshconnect.h
  vendor-crypto/openssh/dist/sshconnect2.c
  vendor-crypto/openssh/dist/sshd.0
  vendor-crypto/openssh/dist/sshd.8
  vendor-crypto/openssh/dist/sshd.c
  vendor-crypto/openssh/dist/sshd_config.0
  vendor-crypto/openssh/dist/sshd_config.5
  vendor-crypto/openssh/dist/sshlogin.c
  vendor-crypto/openssh/dist/uuencode.c
  vendor-crypto/openssh/dist/version.h

Modified: vendor-crypto/openssh/dist/ChangeLog
==
--- vendor-crypto/openssh/dist/ChangeLogThu Oct  1 14:42:55 2009
(r197669)
+++ vendor-crypto/openssh/dist/ChangeLogThu Oct  1 15:19:37 2009
(r197670)
@@ -1,3 +1,282 @@
+20090926
+ - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
+ [contrib/suse/openssh.spec] Update for release
+ - (djm) [README] update relnotes URL
+ - (djm) [packet.c] Restore EWOULDBLOCK handling that got lost somewhere
+ - (djm) Release 5.3p1
+
+20090911
+ - (dtucker) [configure.ac] Change the -lresolv check so it works on Mac OS X
+   10.6 (which doesn't have BIND8_COMPAT and thus uses res_9_query).  Patch
+   fro

svn commit: r197669 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci modules/nfslockd

2009-10-01 Thread Takahashi Yoshihiro
Author: nyan
Date: Thu Oct  1 14:42:55 2009
New Revision: 197669
URL: http://svn.freebsd.org/changeset/base/197669

Log:
  MFC: revision 197535
  
Add '#define NFSCLIENT' into opt_nfs.h if the NFSCLIENT variable is 1
(the default is 1).
  
This makes the nfslockd module works for NFS client.
  
Reviewed by:dfr
  
  Approved by:  re (kib)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/modules/nfslockd/Makefile

Modified: stable/8/sys/modules/nfslockd/Makefile
==
--- stable/8/sys/modules/nfslockd/Makefile  Thu Oct  1 13:16:24 2009
(r197668)
+++ stable/8/sys/modules/nfslockd/Makefile  Thu Oct  1 14:42:55 2009
(r197669)
@@ -14,11 +14,18 @@ SRCS+=  opt_inet6.h opt_nfs.h
 
 .if !defined(KERNBUILDDIR)
 NFS_INET6?=1   # 0/1 - requires INET6 to be configured in kernel
+NFSCLIENT?=1   # 0/1 - requires NFSCLIENT to be configured in kernel
 
 .if ${NFS_INET6} > 0
 opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
 .endif
+
+.if ${NFSCLIENT} > 0
+opt_nfs.h:
+   echo "#define NFSCLIENT 1" > ${.TARGET}
+.endif
+
 .endif
 
 .include 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r197654 - head/sys/dev/if_ndis

2009-10-01 Thread Bruce Evans

On Thu, 1 Oct 2009, [utf-8] Dag-Erling Sm??rgrav wrote:


Coleman Kane  writes:

-   if (sc->ndis_80211 && vap)
+   if ((sc->ndis_80211 != NULL) && (vap != NULL))


sc->ndis_80211 is an int.  NULL is a pointer.


Also, the number of style bugs was doubled on (almost?) every changed line
by adding 2 sets of unnecessary parentheses.

Bruce___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Re: svn commit: r197654 - head/sys/dev/if_ndis

2009-10-01 Thread Dag-Erling Smørgrav
Coleman Kane  writes:
> Thanks, fix committed... I know style(9) says I should have not bothered
> with the commit, but the assume-that-zero-is-false logic seemed
> egregious enough at the time to warrant correcting it.

Depends.  Is ndis_80211 purely a boolean value?  If yes, it should
probably be a bit field; if no, style(9) clearly says that you should
use an explicit comparison.

(a quick perusal of the source says it isn't, so an explicit comparison
is required)

> I just corrected it improperly in my haste. Enjoy being able to
> buildkernel again. I'll be sitting in the corner.

Don't worry, you'll be in good company there :)

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r197643 - in head/sys: kern sys

2009-10-01 Thread Rafal Jaworowski


On 2009-10-01, at 15:41, Stanislav Sedov wrote:


On Thu, 1 Oct 2009 15:21:34 +0200
Attilio Rao  mentioned:


2009/9/30 Robert Watson :

On Wed, 30 Sep 2009, Attilio Rao wrote:

When releasing a read/shared lock we need to use a write memory  
barrier
in order to avoid, on architectures which doesn't have strong  
ordered

writes, CPU instructions reordering.


Hi Attilio (Fabio, et al),

Nice catch!  Are we aware of specific reported problems that can  
be laid at
the feet of this bug, or was this more of a "wait a moment,  
shouldn't there
be a barrier there?".  Could you comment on the scope of this  
problem across

architectures we support?


A possible problem related to that would be MD specific and not on
ia32/amd64 because there the barriers and simple atomics are the  
same.

Given that sun4v suffers of serveral other problems, that MIPS has no
SMP support, you would find it only for arm, ia64 and sparc
eventually. Thus I'm not aware of any problem which can be  
reconducted

to that.



Actually, MIPS is going to grow SMP support really soon, and ARM cpus
do not do reordering until ARMv7 afaik.  So this should not result in
any real problems on ARM too.


Even past generation ARM can do out-of-order execution: see Marvell  
Feroceon cores which are v5 ISA compatible, although their internal  
microarchitecture has extended features like this.


OTOH, I suspect powerpc may be affected.  I'm not sure if any of the  
models

we support perform OOO, though.


PowerPC is inherently OOOE.

Rafal

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r197643 - in head/sys: kern sys

2009-10-01 Thread Stanislav Sedov
On Thu, 1 Oct 2009 15:21:34 +0200
Attilio Rao  mentioned:

> 2009/9/30 Robert Watson :
> > On Wed, 30 Sep 2009, Attilio Rao wrote:
> >
> >>  When releasing a read/shared lock we need to use a write memory barrier
> >>  in order to avoid, on architectures which doesn't have strong ordered
> >>  writes, CPU instructions reordering.
> >
> > Hi Attilio (Fabio, et al),
> >
> > Nice catch!  Are we aware of specific reported problems that can be laid at
> > the feet of this bug, or was this more of a "wait a moment, shouldn't there
> > be a barrier there?".  Could you comment on the scope of this problem across
> > architectures we support?
> 
> A possible problem related to that would be MD specific and not on
> ia32/amd64 because there the barriers and simple atomics are the same.
> Given that sun4v suffers of serveral other problems, that MIPS has no
> SMP support, you would find it only for arm, ia64 and sparc
> eventually. Thus I'm not aware of any problem which can be reconducted
> to that.
> 

Actually, MIPS is going to grow SMP support really soon, and ARM cpus
do not do reordering until ARMv7 afaik.  So this should not result in
any real problems on ARM too.

OTOH, I suspect powerpc may be affected.  I'm not sure if any of the models
we support perform OOO, though.

-- 
Stanislav Sedov
ST4096-RIPE


pgpWX8mnQbNyF.pgp
Description: PGP signature


Re: svn commit: r197643 - in head/sys: kern sys

2009-10-01 Thread Attilio Rao
2009/9/30 Robert Watson :
> On Wed, 30 Sep 2009, Attilio Rao wrote:
>
>>  When releasing a read/shared lock we need to use a write memory barrier
>>  in order to avoid, on architectures which doesn't have strong ordered
>>  writes, CPU instructions reordering.
>
> Hi Attilio (Fabio, et al),
>
> Nice catch!  Are we aware of specific reported problems that can be laid at
> the feet of this bug, or was this more of a "wait a moment, shouldn't there
> be a barrier there?".  Could you comment on the scope of this problem across
> architectures we support?

A possible problem related to that would be MD specific and not on
ia32/amd64 because there the barriers and simple atomics are the same.
Given that sun4v suffers of serveral other problems, that MIPS has no
SMP support, you would find it only for arm, ia64 and sparc
eventually. Thus I'm not aware of any problem which can be reconducted
to that.

Attilio


-- 
Peace can only be achieved by understanding - A. Einstein
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r197654 - head/sys/dev/if_ndis

2009-10-01 Thread Coleman Kane
On Thu, 2009-10-01 at 12:33 +0200, Dag-Erling Smørgrav wrote:
> Coleman Kane  writes:
> > -   if (sc->ndis_80211 && vap)
> > +   if ((sc->ndis_80211 != NULL) && (vap != NULL))
> 
> sc->ndis_80211 is an int.  NULL is a pointer.
> 
> DES

Thanks, fix committed... I know style(9) says I should have not bothered
with the commit, but the assume-that-zero-is-false logic seemed
egregious enough at the time to warrant correcting it.

I just corrected it improperly in my haste. Enjoy being able to
buildkernel again. I'll be sitting in the corner.

-- 
Coleman Kane



signature.asc
Description: This is a digitally signed message part


svn commit: r197667 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci kern rpc/rpcsec_gss

2009-10-01 Thread Jamie Gritton
Author: jamie
Date: Thu Oct  1 13:11:45 2009
New Revision: 197667
URL: http://svn.freebsd.org/changeset/base/197667

Log:
  MFC r197581, r197583, r197584:
  
Set the prison in NFS anon and GSS SVC creds.
  
  Reviewed by:  marcel
  Approved by:  re (kib)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/kern/vfs_export.c
  stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c

Modified: stable/8/sys/kern/vfs_export.c
==
--- stable/8/sys/kern/vfs_export.c  Thu Oct  1 13:03:17 2009
(r197666)
+++ stable/8/sys/kern/vfs_export.c  Thu Oct  1 13:11:45 2009
(r197667)
@@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -122,6 +123,8 @@ vfs_hang_addrlist(struct mount *mp, stru
np->netc_anon->cr_uid = argp->ex_anon.cr_uid;
crsetgroups(np->netc_anon, argp->ex_anon.cr_ngroups,
argp->ex_anon.cr_groups);
+   np->netc_anon->cr_prison = &prison0;
+   prison_hold(np->netc_anon->cr_prison);
np->netc_numsecflavors = argp->ex_numsecflavors;
bcopy(argp->ex_secflavors, np->netc_secflavors,
sizeof(np->netc_secflavors));
@@ -206,6 +209,8 @@ vfs_hang_addrlist(struct mount *mp, stru
np->netc_anon->cr_uid = argp->ex_anon.cr_uid;
crsetgroups(np->netc_anon, argp->ex_anon.cr_ngroups,
np->netc_anon->cr_groups);
+   np->netc_anon->cr_prison = &prison0;
+   prison_hold(np->netc_anon->cr_prison);
np->netc_numsecflavors = argp->ex_numsecflavors;
bcopy(argp->ex_secflavors, np->netc_secflavors,
sizeof(np->netc_secflavors));

Modified: stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
==
--- stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.cThu Oct  1 13:03:17 
2009(r197666)
+++ stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.cThu Oct  1 13:11:45 
2009(r197667)
@@ -449,6 +449,8 @@ rpc_gss_svc_getcred(struct svc_req *req,
cr->cr_uid = cr->cr_ruid = cr->cr_svuid = uc->uid;
cr->cr_rgid = cr->cr_svgid = uc->gid;
crsetgroups(cr, uc->gidlen, uc->gidlist);
+   cr->cr_prison = &prison0;
+   prison_hold(cr->cr_prison);
*crp = crhold(cr);
 
return (TRUE);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197663 - in head/sys: amd64/amd64 i386/i386

2009-10-01 Thread Konstantin Belousov
Author: kib
Date: Thu Oct  1 12:52:48 2009
New Revision: 197663
URL: http://svn.freebsd.org/changeset/base/197663

Log:
  As a workaround, for Intel CPUs, do not use CLFLUSH in
  pmap_invalidate_cache_range() when self-snoop is apparently not reported
  in cpu features. We get a reserved trap when clflushing APIC registers
  window.
  
  XEN in full system virtualization mode removes self-snoop from CPU
  features, making this a problem.
  
  Tested by:csjp
  Reviewed by:  alc
  MFC after:3 days

Modified:
  head/sys/amd64/amd64/initcpu.c
  head/sys/i386/i386/initcpu.c

Modified: head/sys/amd64/amd64/initcpu.c
==
--- head/sys/amd64/amd64/initcpu.c  Thu Oct  1 12:50:26 2009
(r197662)
+++ head/sys/amd64/amd64/initcpu.c  Thu Oct  1 12:52:48 2009
(r197663)
@@ -165,4 +165,10 @@ initializecpu(void)
 */
if ((cpu_feature & CPUID_CLFSH) != 0)
cpu_clflush_line_size = ((cpu_procinfo >> 8) & 0xff) * 8;
+   /*
+* XXXKIB: (temporary) hack to work around traps generated when
+* CLFLUSHing APIC registers window.
+*/
+   if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS))
+   cpu_feature &= ~CPUID_CLFSH;
 }

Modified: head/sys/i386/i386/initcpu.c
==
--- head/sys/i386/i386/initcpu.cThu Oct  1 12:50:26 2009
(r197662)
+++ head/sys/i386/i386/initcpu.cThu Oct  1 12:52:48 2009
(r197663)
@@ -717,6 +717,12 @@ initializecpu(void)
 */
if ((cpu_feature & CPUID_CLFSH) != 0)
cpu_clflush_line_size = ((cpu_procinfo >> 8) & 0xff) * 8;
+   /*
+* XXXKIB: (temporary) hack to work around traps generated when
+* CLFLUSHing APIC registers window.
+*/
+   if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS))
+   cpu_feature &= ~CPUID_CLFSH;
 
 #if defined(PC98) && !defined(CPU_UPGRADE_HW_CACHE)
/*
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197662 - head/sys/kern

2009-10-01 Thread Konstantin Belousov
Author: kib
Date: Thu Oct  1 12:50:26 2009
New Revision: 197662
URL: http://svn.freebsd.org/changeset/base/197662

Log:
  Do not dereference vp->v_mount without holding vnode lock and checking
  that the vnode is not reclaimed.
  
  Noted by: Igor Sysoev 
  MFC after:1 week

Modified:
  head/sys/kern/uipc_syscalls.c

Modified: head/sys/kern/uipc_syscalls.c
==
--- head/sys/kern/uipc_syscalls.c   Thu Oct  1 12:48:35 2009
(r197661)
+++ head/sys/kern/uipc_syscalls.c   Thu Oct  1 12:50:26 2009
(r197662)
@@ -2086,9 +2086,11 @@ retry_space:
/*
 * Get the page from backing store.
 */
-   bsize = vp->v_mount->mnt_stat.f_iosize;
vfslocked = VFS_LOCK_GIANT(vp->v_mount);
-   vn_lock(vp, LK_SHARED | LK_RETRY);
+   error = vn_lock(vp, LK_SHARED);
+   if (error != 0)
+   goto after_read;
+   bsize = vp->v_mount->mnt_stat.f_iosize;
 
/*
 * XXXMAC: Because we don't have fp->f_cred
@@ -2101,6 +2103,7 @@ retry_space:
IO_VMIO | ((MAXBSIZE / bsize) << 
IO_SEQSHIFT),
td->td_ucred, NOCRED, &resid, td);
VOP_UNLOCK(vp, 0);
+   after_read:
VFS_UNLOCK_GIANT(vfslocked);
VM_OBJECT_LOCK(obj);
vm_page_io_finish(pg);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197661 - head/sys/vm

2009-10-01 Thread Konstantin Belousov
Author: kib
Date: Thu Oct  1 12:48:35 2009
New Revision: 197661
URL: http://svn.freebsd.org/changeset/base/197661

Log:
  Move the annotation for vm_map_startup() immediately before the function.
  
  MFC after:3 days

Modified:
  head/sys/vm/vm_map.c

Modified: head/sys/vm/vm_map.c
==
--- head/sys/vm/vm_map.cThu Oct  1 12:46:58 2009(r197660)
+++ head/sys/vm/vm_map.cThu Oct  1 12:48:35 2009(r197661)
@@ -116,22 +116,6 @@ __FBSDID("$FreeBSD$");
  * another, and then marking both regions as copy-on-write.
  */
 
-/*
- * vm_map_startup:
- *
- * Initialize the vm_map module.  Must be called before
- * any other vm_map routines.
- *
- * Map and entry structures are allocated from the general
- * purpose memory pool with some exceptions:
- *
- * - The kernel map and kmem submap are allocated statically.
- * - Kernel map entries are allocated out of a static pool.
- *
- * These restrictions are necessary since malloc() uses the
- * maps and requires map entries.
- */
-
 static struct mtx map_sleep_mtx;
 static uma_zone_t mapentzone;
 static uma_zone_t kmapentzone;
@@ -176,6 +160,22 @@ static void vmspace_zdtor(void *mem, int
start = end;\
}
 
+/*
+ * vm_map_startup:
+ *
+ * Initialize the vm_map module.  Must be called before
+ * any other vm_map routines.
+ *
+ * Map and entry structures are allocated from the general
+ * purpose memory pool with some exceptions:
+ *
+ * - The kernel map and kmem submap are allocated statically.
+ * - Kernel map entries are allocated out of a static pool.
+ *
+ * These restrictions are necessary since malloc() uses the
+ * maps and requires map entries.
+ */
+
 void
 vm_map_startup(void)
 {
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197660 - head/sys/kern

2009-10-01 Thread Konstantin Belousov
Author: kib
Date: Thu Oct  1 12:46:58 2009
New Revision: 197660
URL: http://svn.freebsd.org/changeset/base/197660

Log:
  Fix typo.
  
  MFC after:3 days

Modified:
  head/sys/kern/kern_sig.c

Modified: head/sys/kern/kern_sig.c
==
--- head/sys/kern/kern_sig.cThu Oct  1 11:52:06 2009(r197659)
+++ head/sys/kern/kern_sig.cThu Oct  1 12:46:58 2009(r197660)
@@ -1892,7 +1892,7 @@ sigtd(struct proc *p, int sig, int prop)
 
/*
 * Check if current thread can handle the signal without
-* switching conetxt to another thread.
+* switching context to another thread.
 */
if (curproc == p && !SIGISMEMBER(curthread->td_sigmask, sig))
return (curthread);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r197608 - head/sys/geom/part

2009-10-01 Thread Dmitry Marakasov
* Marcel Moolenaar (xcl...@mac.com) wrote:

> >> Seconded. I've seen a report of geom_part_ebr unable to detect
> >> partitions which were actually there. Will inquiry the reporter if
> >> this change solved the problem.
> >
> > Seems like it hasn't. Here's the first sector from that partition:
> 
> I'll see about checking the partition table more rigorously
> so that we can eliminate the check for the unused space.
> 
> With what tool was this created?

Dunno. I've pointed the person who had that problem to this thread.

-- 
Dmitry Marakasov   .   55B5 0596 FF1E 8D84 5F56  9510 D35A 80DD F9D2 F77D
amd...@amdmi3.ru  ..:  jabber: amd...@jabber.ruhttp://www.amdmi3.ru
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197659 - head/sys/dev/if_ndis

2009-10-01 Thread Coleman Kane
Author: cokane
Date: Thu Oct  1 11:52:06 2009
New Revision: 197659
URL: http://svn.freebsd.org/changeset/base/197659

Log:
  Fix a bad use of NULL instead of zero for int comparison. Sorry for the
  breakage.
  
  Submitted by: bz, des, onemda
  MFC after:3 days

Modified:
  head/sys/dev/if_ndis/if_ndis.c

Modified: head/sys/dev/if_ndis/if_ndis.c
==
--- head/sys/dev/if_ndis/if_ndis.c  Thu Oct  1 10:53:12 2009
(r197658)
+++ head/sys/dev/if_ndis/if_ndis.c  Thu Oct  1 11:52:06 2009
(r197659)
@@ -1534,7 +1534,7 @@ ndis_inputtask(dobj, arg)
if (m == NULL)
break;
KeReleaseSpinLock(&sc->ndis_rxlock, irql);
-   if ((sc->ndis_80211 != NULL) && (vap != NULL))
+   if ((sc->ndis_80211 != 0) && (vap != NULL))
vap->iv_deliver_data(vap, vap->iv_bss, m);
else
(*ifp->if_input)(ifp, m);
@@ -1746,7 +1746,7 @@ ndis_ticktask(d, xsc)
sc->ndis_sts == NDIS_STATUS_MEDIA_CONNECT) {
sc->ndis_link = 1;
NDIS_UNLOCK(sc);
-   if ((sc->ndis_80211 != NULL) && (vap != NULL)) {
+   if ((sc->ndis_80211 != 0) && (vap != NULL)) {
ndis_getstate_80211(sc);
ieee80211_new_state(vap, IEEE80211_S_RUN, -1);
}
@@ -1758,7 +1758,7 @@ ndis_ticktask(d, xsc)
sc->ndis_sts == NDIS_STATUS_MEDIA_DISCONNECT) {
sc->ndis_link = 0;
NDIS_UNLOCK(sc);
-   if ((sc->ndis_80211 != NULL) && (vap != NULL))
+   if ((sc->ndis_80211 != 0) && (vap != NULL))
ieee80211_new_state(vap, IEEE80211_S_SCAN, 0);
NDIS_LOCK(sc);
if_link_state_change(sc->ifp, LINK_STATE_DOWN);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197658 - head/sys/kern

2009-10-01 Thread Andriy Gapon
Author: avg
Date: Thu Oct  1 10:53:12 2009
New Revision: 197658
URL: http://svn.freebsd.org/changeset/base/197658

Log:
  print machine in kernel boot version string
  
  Discussed with:   gavin, kib, jhb
  PR:   kern/126926
  MFC after:2 weeks

Modified:
  head/sys/kern/init_main.c

Modified: head/sys/kern/init_main.c
==
--- head/sys/kern/init_main.c   Thu Oct  1 10:46:22 2009(r197657)
+++ head/sys/kern/init_main.c   Thu Oct  1 10:53:12 2009(r197658)
@@ -288,11 +288,24 @@ print_caddr_t(void *data)
 {
printf("%s", (char *)data);
 }
+
+static void
+print_version(void *data __unused)
+{
+   int len;
+
+   /* Strip a trailing newline from version. */
+   len = strlen(version);
+   while (len > 0 && version[len - 1] == '\n')
+   len--;
+   printf("%.*s %s\n", len, version, machine);
+}
+
 SYSINIT(announce, SI_SUB_COPYRIGHT, SI_ORDER_FIRST, print_caddr_t,
 copyright);
 SYSINIT(trademark, SI_SUB_COPYRIGHT, SI_ORDER_SECOND, print_caddr_t,
 trademark);
-SYSINIT(version, SI_SUB_COPYRIGHT, SI_ORDER_THIRD, print_caddr_t, version);
+SYSINIT(version, SI_SUB_COPYRIGHT, SI_ORDER_THIRD, print_version, NULL);
 
 #ifdef WITNESS
 static char wit_warn[] =
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197657 - head/sys/pc98/conf

2009-10-01 Thread Takahashi Yoshihiro
Author: nyan
Date: Thu Oct  1 10:46:22 2009
New Revision: 197657
URL: http://svn.freebsd.org/changeset/base/197657

Log:
  MFi386: revision 197653
  
Improve 802.11s comment.
  
  MFC after:1 day

Modified:
  head/sys/pc98/conf/GENERIC

Modified: head/sys/pc98/conf/GENERIC
==
--- head/sys/pc98/conf/GENERIC  Thu Oct  1 10:06:09 2009(r197656)
+++ head/sys/pc98/conf/GENERIC  Thu Oct  1 10:46:22 2009(r197657)
@@ -223,7 +223,7 @@ device  xe  # Xircom pccard Ethernet
 #devicewlan# 802.11 support
 #options   IEEE80211_DEBUG # enable debug msgs
 #options   IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's
-#options   IEEE80211_SUPPORT_MESH  # enable 802.11s D3.0 support
+#options   IEEE80211_SUPPORT_MESH  # enable 802.11s draft support
 #devicewlan_wep# 802.11 WEP support
 #devicewlan_ccmp   # 802.11 CCMP support
 #devicewlan_tkip   # 802.11 TKIP support
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r197654 - head/sys/dev/if_ndis

2009-10-01 Thread Dag-Erling Smørgrav
Coleman Kane  writes:
> - if (sc->ndis_80211 && vap)
> + if ((sc->ndis_80211 != NULL) && (vap != NULL))

sc->ndis_80211 is an int.  NULL is a pointer.

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r197654 - head/sys/dev/if_ndis

2009-10-01 Thread Bjoern A. Zeeb

On Thu, 1 Oct 2009, Coleman Kane wrote:


Author: cokane
Date: Thu Oct  1 02:43:51 2009
New Revision: 197654
URL: http://svn.freebsd.org/changeset/base/197654

Log:
 style(9) fixes (always compare pointers to NULL)

 Also, the previous commit to sys/dev/if_ndis/if_ndis.c also included the
 removal of a call to ndis_setstate_80211 that is no longer needed.


The problem just is that sc->ndis_80211 is an integer and this broke
the build.




 Submitted by:  sam
 MFC after: 3 days

Modified:
 head/sys/dev/if_ndis/if_ndis.c

Modified: head/sys/dev/if_ndis/if_ndis.c
==
--- head/sys/dev/if_ndis/if_ndis.c  Thu Oct  1 02:08:42 2009
(r197653)
+++ head/sys/dev/if_ndis/if_ndis.c  Thu Oct  1 02:43:51 2009
(r197654)
@@ -1534,7 +1534,7 @@ ndis_inputtask(dobj, arg)
if (m == NULL)
break;
KeReleaseSpinLock(&sc->ndis_rxlock, irql);
-   if (sc->ndis_80211 && vap)
+   if ((sc->ndis_80211 != NULL) && (vap != NULL))
vap->iv_deliver_data(vap, vap->iv_bss, m);
else
(*ifp->if_input)(ifp, m);
@@ -1746,7 +1746,7 @@ ndis_ticktask(d, xsc)
sc->ndis_sts == NDIS_STATUS_MEDIA_CONNECT) {
sc->ndis_link = 1;
NDIS_UNLOCK(sc);
-   if (sc->ndis_80211 && vap) {
+   if ((sc->ndis_80211 != NULL) && (vap != NULL)) {
ndis_getstate_80211(sc);
ieee80211_new_state(vap, IEEE80211_S_RUN, -1);
}
@@ -1758,7 +1758,7 @@ ndis_ticktask(d, xsc)
sc->ndis_sts == NDIS_STATUS_MEDIA_DISCONNECT) {
sc->ndis_link = 0;
NDIS_UNLOCK(sc);
-   if (sc->ndis_80211 && vap)
+   if ((sc->ndis_80211 != NULL) && (vap != NULL))
ieee80211_new_state(vap, IEEE80211_S_SCAN, 0);
NDIS_LOCK(sc);
if_link_state_change(sc->ifp, LINK_STATE_DOWN);



--
Bjoern A. Zeeb It will not break if you know what you are doing.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197656 - in stable/8/sys: . amd64/conf amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci i386/conf

2009-10-01 Thread Rui Paulo
Author: rpaulo
Date: Thu Oct  1 10:06:09 2009
New Revision: 197656
URL: http://svn.freebsd.org/changeset/base/197656

Log:
  MFC r197653:
Improve 802.11s comment.
  
  Approved by:  re (kib)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/conf/GENERIC
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/i386/conf/GENERIC

Modified: stable/8/sys/amd64/conf/GENERIC
==
--- stable/8/sys/amd64/conf/GENERIC Thu Oct  1 08:16:46 2009
(r197655)
+++ stable/8/sys/amd64/conf/GENERIC Thu Oct  1 10:06:09 2009
(r197656)
@@ -248,7 +248,7 @@ device  xe  # Xircom pccard Ethernet
 device wlan# 802.11 support
 optionsIEEE80211_DEBUG # enable debug msgs
 optionsIEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's
-optionsIEEE80211_SUPPORT_MESH  # enable 802.11s D3.0 support
+optionsIEEE80211_SUPPORT_MESH  # enable 802.11s draft support
 device wlan_wep# 802.11 WEP support
 device wlan_ccmp   # 802.11 CCMP support
 device wlan_tkip   # 802.11 TKIP support

Modified: stable/8/sys/i386/conf/GENERIC
==
--- stable/8/sys/i386/conf/GENERIC  Thu Oct  1 08:16:46 2009
(r197655)
+++ stable/8/sys/i386/conf/GENERIC  Thu Oct  1 10:06:09 2009
(r197656)
@@ -260,7 +260,7 @@ device  xe  # Xircom pccard Ethernet
 device wlan# 802.11 support
 optionsIEEE80211_DEBUG # enable debug msgs
 optionsIEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's
-optionsIEEE80211_SUPPORT_MESH  # enable 802.11s D3.0 support
+optionsIEEE80211_SUPPORT_MESH  # enable 802.11s draft support
 device wlan_wep# 802.11 WEP support
 device wlan_ccmp   # 802.11 CCMP support
 device wlan_tkip   # 802.11 TKIP support
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197655 - svnadmin/conf

2009-10-01 Thread Philip Paeps
Author: philip
Date: Thu Oct  1 08:16:46 2009
New Revision: 197655
URL: http://svn.freebsd.org/changeset/base/197655

Log:
  Take thomas's commit bit into safekeeping per his request.
  
  Approved by:  core

Modified:
  svnadmin/conf/access

Modified: svnadmin/conf/access
==
--- svnadmin/conf/accessThu Oct  1 02:43:51 2009(r197654)
+++ svnadmin/conf/accessThu Oct  1 08:16:46 2009(r197655)
@@ -209,7 +209,6 @@ suz
 syrinx
 takawata
 tanimura
-thomas
 thompsa
 ticso
 trasz
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"