]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years ago- Make pstat(8) WARNS=6 safe.
stas [Thu, 11 Jun 2009 17:03:28 +0000 (17:03 +0000)]
- Make pstat(8) WARNS=6 safe.
- While here, eliminate the check for len > 0 in ttymode_sysctl
  as the code is able to handle this case well.

Reviewed by: ed (initial version)

15 years agoIn struct thread, fields td_vnet and td_vnet_lpush may only be accessed
zec [Thu, 11 Jun 2009 17:03:15 +0000 (17:03 +0000)]
In struct thread, fields td_vnet and td_vnet_lpush may only be accessed
via curthread (via appropriate macros), so update the comment indicating
the protection model for those two fields.

15 years agoIntroduce a mechanism for detecting calls from outbound path of the
zec [Thu, 11 Jun 2009 16:50:49 +0000 (16:50 +0000)]
Introduce a mechanism for detecting calls from outbound path of the
network stack when reentering the inbound path from netgraph, and
force queueing of mbufs at the outbound netgraph node.

The mechanism relies on two components.  First, in netgraph nodes
where outbound path of the network stack calls into netgraph, the
current thread has to be appropriately marked using the new
NG_OUTBOUND_THREAD_REF() macro before proceeding to call further
into the netgraph topology, and unmarked using the
NG_OUTBOUND_THREAD_UNREF() macro before returning to the caller.
Second, netgraph nodes which can potentially reenter the network
stack in the inbound path have to mark their inbound hooks using
NG_HOOK_SET_TO_INBOUND() macro.  The netgraph framework will then
detect when there is a danger of a call graph looping back from
outbound to inbound path via netgraph, and defer handing off the
mbufs to the "inbound" node to a worker thread with a clean stack.

In this first pass only the most obvious netgraph nodes have been
updated to ensure no outbound to inbound calls can occur.  Nodes
such as ng_ipfw, ng_gif etc. should be further examined whether a
potential for outbound to inbound call looping exists.

This commit changes the layout of struct thread, but due to
__FreeBSD_version number shortage a version bump has been omitted
at this time, nevertheless kernel and modules have to be rebuilt.

Reviewed by: julian, rwatson, bz
Approved by: julian (mentor)

15 years ago- Remove unnecessary read memory barriers from atomic operations[1].
jkim [Thu, 11 Jun 2009 16:48:59 +0000 (16:48 +0000)]
- Remove unnecessary read memory barriers from atomic operations[1].
- Define a macro to make my intention more clearer.

Submitted by: jhb [1]

15 years agosyslog.conf: pop up from logging only ppp messages at the end of file
avg [Thu, 11 Jun 2009 15:07:02 +0000 (15:07 +0000)]
syslog.conf: pop up from logging only ppp messages at the end of file

This allows to append custom rules at the end of the file without
risk of confusion that can result when one misses default !ppp line
and doesn't add another program specification and thus subsequent
selector(s) would belong to ppp program block.

Requested by: marck
Submitted by: marck
Approved by: jhb (mentor)

15 years agoCorrect printf format type mismatches.
jhb [Thu, 11 Jun 2009 14:37:18 +0000 (14:37 +0000)]
Correct printf format type mismatches.

15 years agoTrim extra ()'s.
jhb [Thu, 11 Jun 2009 14:36:13 +0000 (14:36 +0000)]
Trim extra ()'s.

Submitted by: bde

15 years agoUse the documented machine constraint for SSE registers.
ed [Thu, 11 Jun 2009 13:59:51 +0000 (13:59 +0000)]
Use the documented machine constraint for SSE registers.

The amd64-specific bits of msun use an undocumented constraint, which is
less likely to be supported by other compilers (such as Clang). Change
the code to use a more common machine constraint.

Obtained from: /projects/clangbsd/

15 years agoAll these Ethernet NICs depend on INET, mostly for unconditional
bz [Thu, 11 Jun 2009 12:56:14 +0000 (12:56 +0000)]
All these Ethernet NICs depend on INET, mostly for unconditional
cksum related function calls, sometimes related to offload features
from what I could see.xi
It would be good if the offload functionality would be properly
#ifdefed but the other calls to cksum related functions are a more
general problem also elswhere in the network stack.

15 years agoif_igb.c as well as ixgbe.c uncondtionally depend on INET specific
bz [Thu, 11 Jun 2009 12:44:13 +0000 (12:44 +0000)]
if_igb.c as well as ixgbe.c uncondtionally depend on INET specific
functions, especially but not solely tcp_lro_*.

15 years agoAs sys/kern/uipc_accf.c depends on inet, all three accf_*
bz [Thu, 11 Jun 2009 12:21:41 +0000 (12:21 +0000)]
As sys/kern/uipc_accf.c depends on inet, all three accf_*
implementations do as well for accept_filt_generic_mod_event().
In addition accf_http also needs inet for the sysctl mib path.

15 years agong_ipfw depends on inet and ipfirewall as well.
bz [Thu, 11 Jun 2009 12:17:57 +0000 (12:17 +0000)]
ng_ipfw depends on inet and ipfirewall as well.
ng_nat depends on inet and libalias and
most of libalias depends on inet.
Update dependencies to porperly reflect this.

15 years agoip_dummynet.c depends on INET.
bz [Thu, 11 Jun 2009 12:06:37 +0000 (12:06 +0000)]
ip_dummynet.c depends on INET.
Note: this may be more because of improper #ifdefs these days.

15 years agonetinet/if_ether.c (doing ARP) depends on INET as well.
bz [Thu, 11 Jun 2009 12:01:14 +0000 (12:01 +0000)]
netinet/if_ether.c (doing ARP) depends on INET as well.

15 years agoif_enc(4) is only useful with ipsec and either inet or inet6.
bz [Thu, 11 Jun 2009 11:17:16 +0000 (11:17 +0000)]
if_enc(4) is only useful with ipsec and either inet or inet6.

15 years agostf(4) supports `6to4' IPv6 in IPv4 encapsulation accroding to RFC3056.
bz [Thu, 11 Jun 2009 11:13:35 +0000 (11:13 +0000)]
stf(4) supports `6to4' IPv6 in IPv4 encapsulation accroding to RFC3056.
It thus needs both INET and INET6 to do its duty.

15 years agoif_bridge(4) unfortunately is missing a lot of #ifdef INETs and
bz [Thu, 11 Jun 2009 10:40:43 +0000 (10:40 +0000)]
if_bridge(4) unfortunately is missing a lot of #ifdef INETs and
thus INET is a mandatory dependency at the moment.

15 years agoLower WARNS due to alignment issues on sparc64.
des [Thu, 11 Jun 2009 10:30:30 +0000 (10:30 +0000)]
Lower WARNS due to alignment issues on sparc64.

15 years agocarp(4) allows people to share a set of IP addresses and can only
bz [Thu, 11 Jun 2009 10:26:38 +0000 (10:26 +0000)]
carp(4) allows people to share a set of IP addresses and can only
use IPv4/v6 for inter-node communication (according to my reading).

Properly wrap the carp callouts in INET || INET6 and refelect this
in sys/conf/files as well.  While in theory this should be ok,
it might be a bit optimistic to think that carp could build with
inet6 only[1].

Discussed with: mlaier [1]

15 years agoCorrect my previous commit to pstat(8).
ed [Thu, 11 Jun 2009 09:59:47 +0000 (09:59 +0000)]
Correct my previous commit to pstat(8).

Not only mark the strings inside the array as const, but do the same for
the elements of the array itself.

Submitted by: Christoph Mallon

15 years agoAs discussed in the devsummit, introduce two fields in the
luigi [Thu, 11 Jun 2009 09:55:26 +0000 (09:55 +0000)]
As discussed in the devsummit, introduce two fields in the
struct bio to store classification information, and a hook
for classifier functions that can be called by g_io_request().

This code is from Fabio Checconi as part of his GSOC work.

15 years agocheck against prefetch_enable
kmacy [Thu, 11 Jun 2009 09:51:21 +0000 (09:51 +0000)]
check against prefetch_enable

15 years agoRemove custom KOBJMETHOD(), CHANNEL_DECLARE() and MIXER_DECLARE()
ariff [Thu, 11 Jun 2009 09:06:09 +0000 (09:06 +0000)]
Remove custom KOBJMETHOD(), CHANNEL_DECLARE() and MIXER_DECLARE()
(enabled with SND_DEBUG) that was intended to provoke build failure
due to inconsistencies.

15 years agoMake most of pstat(8) build with WARNS=6.
ed [Thu, 11 Jun 2009 09:02:22 +0000 (09:02 +0000)]
Make most of pstat(8) build with WARNS=6.

There is still an issue with the nlists, which I'm not quite sure how to
solve, so I'm leaving WARNS set to 3 right now.

15 years agoAs of sam's r175206, arp builds cleanly at WARNS level 6, but the Makefile
des [Thu, 11 Jun 2009 07:50:36 +0000 (07:50 +0000)]
As of sam's r175206, arp builds cleanly at WARNS level 6, but the Makefile
was never updated.  Also, clean up the macro that caused the warning in the
first place (no functional changes, just wrapped and reindented).

15 years agoWhen associating to an AP we don't know if HT is negotiated until
sam [Thu, 11 Jun 2009 04:43:42 +0000 (04:43 +0000)]
When associating to an AP we don't know if HT is negotiated until
we receive the AssocResp, so we can only set ni_txparms properly
at that point.  To make this possible make node_setuptxparms public
as ieee80211_node_setuptxparms.

15 years agoCatch up with r193750 (OsdSynch.c locking changes):
jkim [Wed, 10 Jun 2009 22:54:20 +0000 (22:54 +0000)]
Catch up with r193750 (OsdSynch.c locking changes):

- Preallocate some memory for ACPI tasks early enough.  We cannot use
malloc(9) any more because spin mutex may be held here.  The reserved
memory can be tuned via debug.acpi.max_tasks tunable or ACPI_MAX_TASKS
in kernel configuration.  The default is 32 tasks.
- Implement a custom taskqueue_fast to wrap the new memory allocation.
This implementation is not the fastest in the world but we are being
conservative here.

15 years agoAdd euro symbol to pt_PT locale using other encodings
edwin [Wed, 10 Jun 2009 22:09:40 +0000 (22:09 +0000)]
Add euro symbol to pt_PT locale using other encodings

PR: conf/98815
Submitted by: Rui Lopes <rgl@ruilopes.com>
MFC after: 1 week

15 years agoCroatian locale support for hr_HR.ISO8859-2
edwin [Wed, 10 Jun 2009 21:55:38 +0000 (21:55 +0000)]
Croatian locale support for hr_HR.ISO8859-2

Without this patch /usr/share/locale/hr_HR.ISO8859-2/LC_COLLATE
is a link to the ../la_LN.ISO8859-2/LC_COLLATE. It means
that there is no support for Croatian locale.

PR: conf/120113
Submitted by: Simun Mikecin <numisemis@yahoo.com>
MFC after: 1 week

15 years agopflog, pfsync depend on pf and pf depends on inet.
bz [Wed, 10 Jun 2009 21:51:05 +0000 (21:51 +0000)]
pflog, pfsync depend on pf and pf depends on inet.
Actually it could/should be inet|inet6 but the code is not there
and as long as our inet6 depends on inet this is fine.

15 years agoUpdate vnet_net size guard values after r193951.
bz [Wed, 10 Jun 2009 21:48:13 +0000 (21:48 +0000)]
Update vnet_net size guard values after r193951.

15 years agoInvalid (long) date format in pl_PL.ISO8859-2.src
edwin [Wed, 10 Jun 2009 21:45:18 +0000 (21:45 +0000)]
Invalid (long) date format in pl_PL.ISO8859-2.src

    Date format is %a %e %b %X %Y %Z (e.g "sob 19 sty 15:46:50 2008 CET")
    but should be "%a %e %b %Y %X %Z" (e.g. "sob 19 sty 2008 15:46:50 CET").

PR: conf/119804
Submitted by: Bodek <bodek@blurp.org>
MFC after: 1 week

15 years agoUnfortunately fs/nfsserver depends on INET at the moment. It seems to
bz [Wed, 10 Jun 2009 21:31:57 +0000 (21:31 +0000)]
Unfortunately fs/nfsserver depends on INET at the moment. It seems to
be nfs_nfsdport.c and nfs_nfsdcache.c are the problem only but we need
to mark all or we will run into problems at link time.
One is because of calling an INET specific function, the other is
because of VIMAGE putting all tcp* into struct vnet_inet.

Both are general problems throughout the entire stack and not a fault
of the NFS implementation and will need to be addressed in the future.

15 years agoif_gre.c insists on INET:
bz [Wed, 10 Jun 2009 21:18:21 +0000 (21:18 +0000)]
if_gre.c insists on INET:
#error "Huh? if_gre without inet?"
According to my reading we still only support encapsulating datagrams
into IPv4 and not IPv6 so there is no optional | gre inet6 yet.

15 years agoThis commit is analagous to r193952, but for the experimental nfs
rmacklem [Wed, 10 Jun 2009 21:16:39 +0000 (21:16 +0000)]
This commit is analagous to r193952, but for the experimental nfs
subsystem. Add a test for VI_DOOMED just after ncl_upgrade_vnlock() in
ncl_bioread_check_cons(). This is required since it is possible
for the vnode to be vgonel()'d while in ncl_upgrade_vnlock() when
a forced dismount is in progress. Also, move the check for VI_DOOMED
in ncl_vinvalbuf() down to after ncl_upgrade_vnlock() and replace the
out of date comment for it.

Approved by: kib (mentor)

15 years agoipfirewall insists on INET:
bz [Wed, 10 Jun 2009 21:06:07 +0000 (21:06 +0000)]
ipfirewall insists on INET:
#error IPFIREWALL requires INET.
Track it here to not build ipfirewall with no INET in the kernel.

15 years agouse default policy for enabling prefetching unless the TUNABLE is set
kmacy [Wed, 10 Jun 2009 21:05:37 +0000 (21:05 +0000)]
use default policy for enabling prefetching unless the TUNABLE is set

15 years agoAdd a test for VI_DOOMED just after nfs_upgrade_vnlock() in
rmacklem [Wed, 10 Jun 2009 21:03:57 +0000 (21:03 +0000)]
Add a test for VI_DOOMED just after nfs_upgrade_vnlock() in
nfs_bioread_check_cons(). This is required since it is possible
for the vnode to be vgonel()'d while in nfs_upgrade_vnlock() when
a forced dismount is in progress. Also, move the check for VI_DOOMED
in nfs_vinvalbuf() down to after nfs_upgrade_vnlock() and replace the
out of date comment for it.

Submitted by: jhb
Tested by: pho
Approved by: kib (mentor)
MFC after: 1 month

15 years agoAdapt vfs kqfilter to the shared vnode lock used by zfs write vop. Use
kib [Wed, 10 Jun 2009 20:59:32 +0000 (20:59 +0000)]
Adapt vfs kqfilter to the shared vnode lock used by zfs write vop. Use
vnode interlock to protect the knote fields [1]. The locking assumes
that shared vnode lock is held, thus we get exclusive access to knote
either by exclusive vnode lock protection, or by shared vnode lock +
vnode interlock.

Do not use kl_locked() method to assert either lock ownership or the
fact that curthread does not own the lock. For shared locks, ownership
is not recorded, e.g. VOP_ISLOCKED can return LK_SHARED for the shared
lock not owned by curthread, causing false positives in kqueue subsystem
assertions about knlist lock.

Remove kl_locked method from knlist lock vector, and add two separate
assertion methods kl_assert_locked and kl_assert_unlocked, that are
supposed to use proper asserts. Change knlist_init accordingly.

Add convenience function knlist_init_mtx to reduce number of arguments
for typical knlist initialization.

Submitted by: jhb [1]
Noted by: jhb [2]
Reviewed by: jhb
Tested by: rnoland

15 years agoip_divert.c requires both INET and IPFIREWALL to be present:
bz [Wed, 10 Jun 2009 20:57:06 +0000 (20:57 +0000)]
ip_divert.c requires both INET and IPFIREWALL to be present:
#error "IPDIVERT requires INET."
#error "IPDIVERT requires IPFIREWALL"
so properly track those depencies here.

15 years agoIPsec depends on either IPv4 (inet) or IPv6 (inet6) so properly
bz [Wed, 10 Jun 2009 20:44:13 +0000 (20:44 +0000)]
IPsec depends on either IPv4 (inet) or IPv6 (inet6) so properly
track dependencies and automatically disable building ipsec if
neither of the two is in the kernel config.

15 years agoProperly hide IPv4 only variables and functions under #ifdef INET.
bz [Wed, 10 Jun 2009 19:25:46 +0000 (19:25 +0000)]
Properly hide IPv4 only variables and functions under #ifdef INET.

15 years agorc.d/fsck: allow additional options for fsck_y_enable via fsck_y_flags
avg [Wed, 10 Jun 2009 19:03:23 +0000 (19:03 +0000)]
rc.d/fsck: allow additional options for fsck_y_enable via fsck_y_flags

Primary intention is to allow to pass -C option to avoid (re-)checking
clean filesystems when preening fails and fsck -y kicks in.

Submitted by: marck
Reviewed by: current@
Approved by: jhb (mentor)
MFC after: 1 week

15 years agofsck_msdosfs: accept no-op -C option for compatibilty with fsck
avg [Wed, 10 Jun 2009 19:02:54 +0000 (19:02 +0000)]
fsck_msdosfs: accept no-op -C option for compatibilty with fsck

Submitted by: marck
Reviewed by: current@
Approved by: jhb (mentor)
MFC after: 1 week

15 years agoFor the case where another thread was doing a connect and that
rmacklem [Wed, 10 Jun 2009 19:02:09 +0000 (19:02 +0000)]
For the case where another thread was doing a connect and that
connect failed, the thread would be left stuck in msleep()
indefinitely, since it would call msleep() again for the case
where rc_client == NULL. Change the loop criteria and the if just
after the loop, so that this case is handled correctly.

Reviewed by: dfr
Approved by: kib (mentor)

15 years agoChange a few members of tcpcb that store cached copies of ticks to be ints
jhb [Wed, 10 Jun 2009 18:27:15 +0000 (18:27 +0000)]
Change a few members of tcpcb that store cached copies of ticks to be ints
instead of unsigned longs.  This fixes a few overflow edge cases on 64-bit
platforms.  Specifically, if an idle connection receives a packet shortly
before 2^31 clock ticks of uptime (about 25 days with hz=1000) and the keep
alive timer fires after 2^31 clock ticks, the keep alive timer will think
that the connection has been idle for a very long time and will immediately
drop the connection instead of sending a keep alive probe.

Reviewed by: silby, gnn, lstewart
MFC after: 1 week

15 years agoMake the demo/stress tools build again, after my changes to param().
ed [Wed, 10 Jun 2009 18:26:02 +0000 (18:26 +0000)]
Make the demo/stress tools build again, after my changes to param().

15 years agoSmall cleanups to the jail script:
ed [Wed, 10 Jun 2009 18:18:14 +0000 (18:18 +0000)]
Small cleanups to the jail script:

- Remove redundant debugging of consolelog.
- Use `while :', instead of `while [ true ]'. This is done in other
  places as well.

Submitted by: Jille Timmermans <jille quis cx> (not jilles)
Reviewed by: jilles

15 years agoThese are no longer referenced in the tree, so can be safely removed.
imp [Wed, 10 Jun 2009 18:12:15 +0000 (18:12 +0000)]
These are no longer referenced in the tree, so can be safely removed.

Reviewed by: bms@

15 years agoFix an LOR
cokane [Wed, 10 Jun 2009 18:00:10 +0000 (18:00 +0000)]
Fix an LOR

Submitted by: Paul B. Mahol <onemda@gmail.com>
MFC after: 1 week

15 years agoMove from using devclass_find_free_unit(cfi_diskclass, 0) to -1, since
imp [Wed, 10 Jun 2009 17:41:24 +0000 (17:41 +0000)]
Move from using devclass_find_free_unit(cfi_diskclass, 0) to -1, since
they have the same basic behavior.

15 years agoMove from using devclass_find_free_unit(ata_devclass, 0) to -1 for the
imp [Wed, 10 Jun 2009 17:40:18 +0000 (17:40 +0000)]
Move from using devclass_find_free_unit(ata_devclass, 0) to -1 for the
unit number.  Basically they are the same...

15 years agoEliminate devclass_find_free_unit call here, since -1 gives the same
imp [Wed, 10 Jun 2009 17:39:19 +0000 (17:39 +0000)]
Eliminate devclass_find_free_unit call here, since -1 gives the same
net behavior.

15 years agoDo not leak the state->ls_lock after VI_DOOMED check introduced
kib [Wed, 10 Jun 2009 16:17:38 +0000 (16:17 +0000)]
Do not leak the state->ls_lock after VI_DOOMED check introduced
in the r192683.

Reported by: pho
Submitted by: jhb

15 years agoFor cd9660_ioctl, check for recycled vnode after locking it.
kib [Wed, 10 Jun 2009 15:48:34 +0000 (15:48 +0000)]
For cd9660_ioctl, check for recycled vnode after locking it.

Noted by: Jaakko Heinonen <jh saunalahti fi>
MFC after: 2 weeks

15 years agoIn the old-style jail command line, explicitly set parameters from the
jamie [Wed, 10 Jun 2009 15:26:35 +0000 (15:26 +0000)]
In the old-style jail command line, explicitly set parameters from the
security.jail.* sysctls since jail_set(2) doesn't do it implicitly.

Approved by: bz (mentor)

15 years agoSCTP needs either IPv4 or IPv6 as lower layer[1].
bz [Wed, 10 Jun 2009 14:36:59 +0000 (14:36 +0000)]
SCTP needs either IPv4 or IPv6 as lower layer[1].
So properly hide the already #ifdef SCTP code with
#if defined(INET) || defined(INET6) as well to get us
closer to a non-INET/INET6 kernel.

Discussed with: tuexen [1]

15 years agoAdd a missing error statistic, the number of FCS errors on receive.
gnn [Wed, 10 Jun 2009 14:34:56 +0000 (14:34 +0000)]
Add a missing error statistic, the number of FCS errors on receive.

Reviewed by: jhb
MFC after: 1 day

15 years agoFix r193923 by noting that type of a_fp is struct file *, not int.
kib [Wed, 10 Jun 2009 14:24:31 +0000 (14:24 +0000)]
Fix r193923 by noting that type of a_fp is struct file *, not int.
It was assumed that r193923 was trivial change that cannot be done
wrong.

MFC after: 2 weeks

15 years agos/a_fdidx/a_fp/ for VOP_OPEN comments that inline struct vop_open_args
kib [Wed, 10 Jun 2009 14:09:05 +0000 (14:09 +0000)]
s/a_fdidx/a_fp/ for VOP_OPEN comments that inline struct vop_open_args
definition.

Discussed with: bde
MFC after: 2 weeks

15 years agoRemove unused VOP_IOCTL and VOP_KQFILTER implementations for fifofs.
kib [Wed, 10 Jun 2009 14:02:22 +0000 (14:02 +0000)]
Remove unused VOP_IOCTL and VOP_KQFILTER implementations for fifofs.

MFC after: 2 weeks

15 years agoVOP_IOCTL takes unlocked vnode as an argument. Due to this, v_data may
kib [Wed, 10 Jun 2009 13:57:36 +0000 (13:57 +0000)]
VOP_IOCTL takes unlocked vnode as an argument. Due to this, v_data may
be NULL or derefenced memory may become free at arbitrary moment.

Lock the vnode in cd9660, devfs and pseudofs implementation of VOP_IOCTL
to prevent reclaim; check whether the vnode was already reclaimed after
the lock is granted.

Reported by: georg at dts su
Reviewed by: des (pseudofs)
MFC after: 2 weeks

15 years agoPreallocate the four BARs in ALI SATA controllers during the chipinit
jhb [Wed, 10 Jun 2009 13:56:42 +0000 (13:56 +0000)]
Preallocate the four BARs in ALI SATA controllers during the chipinit
routine and save the resources using a chipset-data structure.  Use these
preallocated resources to setup resources for the SATA channels to avoid
asking the PCI bus to allocate the same BAR multiple times.

Tested by: bms
MFC after: 1 week

15 years agoRegenerate
kib [Wed, 10 Jun 2009 13:48:43 +0000 (13:48 +0000)]
Regenerate

15 years agoAdd several syscall compat32 entries for extattr manipulation syscalls,
kib [Wed, 10 Jun 2009 13:48:13 +0000 (13:48 +0000)]
Add several syscall compat32 entries for extattr manipulation syscalls,
that do not require translation of the arguments.

Requested by: kientzle
Reviewed by: jhb (previous wrong version)
MFC after: 1 week

15 years agoip_gif_ttl/GIF_TTL are only used by the inet part in in_gif.c,
bz [Wed, 10 Jun 2009 13:39:51 +0000 (13:39 +0000)]
ip_gif_ttl/GIF_TTL are only used by the inet part in in_gif.c,
so put the initialization under #ifdef INET.

15 years agoGet the gdb/psim emulator functioning again.
grehan [Wed, 10 Jun 2009 12:47:54 +0000 (12:47 +0000)]
Get the gdb/psim emulator functioning again.

aim/machdep.c:
  - the RI status register bit needs to be set when doing the mtmsrd 64-bit
    instruction test
  - psim doesn't implement the dcbz instruction so the run-time cacheline
    test fails. Set the cachline size to 32 to avoid infinite loops in
    future calls to __syncicache()

aim/platform_chrp.c:
  - if after iterating through / and a name property of "cpus" still isn't
    found, just search directly for '/cpus'.
  - psim doesn't put a "reg" property on it's cpu nodes, so assume 0
    since it is uniprocessor-only at this point

powerpc/openpic.c
  - the number of CPUs reported is 1 too many on psim's openpic

Reviewed by: nwhitehorn
MFC after: 1 week (openpic part)

15 years agoadd ca_AD, ca_FR and ca_IT locales
edwin [Wed, 10 Jun 2009 12:20:11 +0000 (12:20 +0000)]
add ca_AD, ca_FR and ca_IT locales

    Catalan language is not only spoken in Spain (ca_ES), but also
    in Andorra, France and Italy. In Andorra it is the official
    language.

    (see http://en.wikipedia.org/wiki/Catalan_language#Geographic_distribution)

Add a bunch of symlinks to between ca_ES and ca_AD, ca_FR and ca_IT.

PR: conf/92541
Submitted by: <rmh@io.debian.net>
MFC after: 1 week

15 years agoAttempt to fix parallel build.
ariff [Wed, 10 Jun 2009 11:33:47 +0000 (11:33 +0000)]
Attempt to fix parallel build.

15 years agoAll consumers of in_cksum.h have been properly #ifdefed already,
bz [Wed, 10 Jun 2009 11:19:34 +0000 (11:19 +0000)]
All consumers of in_cksum.h have been properly #ifdefed already,
so do not include the file either as it would give as an extra
dependency on INET.

15 years agoin ip_dn_ctl(), do not allocate a large structure on the stack,
luigi [Wed, 10 Jun 2009 10:47:31 +0000 (10:47 +0000)]
in ip_dn_ctl(), do not allocate a large structure on the stack,
and use malloc() instead if/when it is necessary.

The problem is less relevant in previous versions because
the variable involved (tmp_pipe) is much smaller there.
Still worth fixing though.

Submitted by: Marta Carbone (GSOC)
MFC after: 3 days

15 years agoRemove the "The option TCPDEBUG requires option INET." requirement.
bz [Wed, 10 Jun 2009 10:39:41 +0000 (10:39 +0000)]
Remove the "The option TCPDEBUG requires option INET." requirement.
In case of !INET we will not have a timestamp on the trace for now
but that might only affect spx debugging as long as INET6 requires
INET.

Reviewed by: rwatson (earlier version)

15 years agosmall simplifications to the code in charge of reaping deleted rules:
luigi [Wed, 10 Jun 2009 10:34:59 +0000 (10:34 +0000)]
small simplifications to the code in charge of reaping deleted rules:
- clear the head pointer immediately before using it, so there is
  no chance of mistakes;
- call reap_rules() unconditionally. The function can handle a NULL
  argument just fine, and the cost of the extra call is hardly
  significant given that we do it rarely and outside the lock.

MFC after: 3 days

15 years agoPrevent integer overflow in direct pipe write code from circumventing
cperciva [Wed, 10 Jun 2009 10:31:11 +0000 (10:31 +0000)]
Prevent integer overflow in direct pipe write code from circumventing
virtual-to-physical page lookups. [09:09]

Add missing permissions check for SIOCSIFINFO_IN6 ioctl. [09:10]

Fix buffer overflow in "autokey" negotiation in ntpd(8). [09:11]

Approved by: so (cperciva)
Approved by: re (not really, but SVN wants this...)
Security: FreeBSD-SA-09:09.pipe
Security: FreeBSD-SA-09:10.ipv6
Security: FreeBSD-SA-09:11.ntpd

15 years agoPut the variable declarations for TCPDEBUG under #ifdef INET as well.
bz [Wed, 10 Jun 2009 09:28:50 +0000 (09:28 +0000)]
Put the variable declarations for TCPDEBUG under #ifdef INET as well.
The implementation already has this right.

Reviewed by: rwatson

15 years agoThe llentry *lle is only used in cases of INET or INET6.
bz [Wed, 10 Jun 2009 09:07:05 +0000 (09:07 +0000)]
The llentry *lle is only used in cases of INET or INET6.
Put the variable declaration under proper #ifdefs.

In case variables are only needed for one of the two AFs
more them into proper scope.

15 years agoMove all sound related scripts to its own 'sound' subdir.
ariff [Wed, 10 Jun 2009 06:49:45 +0000 (06:49 +0000)]
Move all sound related scripts to its own 'sound' subdir.

Suggested by: jmallett

15 years agoOops, fix directory name.
yongari [Wed, 10 Jun 2009 04:18:11 +0000 (04:18 +0000)]
Oops, fix directory name.

15 years agoMove machine dependant AFMT_* definition from sound.h
ariff [Wed, 10 Jun 2009 03:56:24 +0000 (03:56 +0000)]
Move machine dependant AFMT_* definition from sound.h
to global soundcard.h .

15 years agoMarvell 88W8363 driver and associated firmware
sam [Wed, 10 Jun 2009 03:35:40 +0000 (03:35 +0000)]
Marvell 88W8363 driver and associated firmware

15 years agoiwn does not require a license ack
sam [Wed, 10 Jun 2009 03:28:34 +0000 (03:28 +0000)]
iwn does not require a license ack

15 years agoFix typo.
yongari [Wed, 10 Jun 2009 03:26:21 +0000 (03:26 +0000)]
Fix typo.

15 years agoAdd alc(4) man page and hook up ale(4) to the build.
yongari [Wed, 10 Jun 2009 02:19:54 +0000 (02:19 +0000)]
Add alc(4) man page and hook up ale(4) to the build.
Also add Xr to appropriate man pages.

15 years agoAdd alc(4) to the list of supported network interface.
yongari [Wed, 10 Jun 2009 02:10:35 +0000 (02:10 +0000)]
Add alc(4) to the list of supported network interface.

15 years agoAdd alc(4), a driver for Atheros AR8131/AR8132 PCIe ethernet
yongari [Wed, 10 Jun 2009 02:07:58 +0000 (02:07 +0000)]
Add alc(4), a driver for Atheros AR8131/AR8132 PCIe ethernet
controller. These controllers are also known as L1C(AR8131) and
L2C(AR8132) respectively. These controllers resembles the first
generation controller L1 but usage of different descriptor format
and new register mappings over L1 register space requires a new
driver. There are a couple of registers I still don't understand
but the driver seems to have no critical issues for performance and
stability. Currently alc(4) supports the following hardware
features.
  o MSI
  o TCP Segmentation offload
  o Hardware VLAN tag insertion/stripping
  o Tx/Rx interrupt moderation
  o Hardware statistics counters(dev.alc.%d.stats)
  o Jumbo frame
  o WOL
AR8131/AR8132 also supports Tx checksum offloading but I disabled
it due to stability issues. I'm not sure this comes from broken
sample boards or hardware bugs. If you know your controller works
without problems you can still enable it. The controller has a
silicon bug for Rx checksum offloading, so the feature was not
implemented.
I'd like to say big thanks to Atheros. Atheros kindly sent sample
boards to me and answered several questions I had.

HW donated by: Atheros Communications, Inc.

15 years agoAs far as I can tell systems that have less than 4GB are more often hurt
kmacy [Wed, 10 Jun 2009 01:21:32 +0000 (01:21 +0000)]
As far as I can tell systems that have less than 4GB are more often hurt
by prefetched than helped.  On i386 systems and systems with less than 4GB,
prefetch is now disabled by default. I've added a prefetch enable tunable, to
enable prefetching for those systems. The prefetch disable tunable will continue
to unconditionally disable prefetching.

15 years agoController will dma SCB command status for a given command and
yongari [Wed, 10 Jun 2009 01:15:30 +0000 (01:15 +0000)]
Controller will dma SCB command status for a given command and
driver should read updated status back after issuing a SCB command.
To send a command to controller and read updated status back,
driver should synchronize both memory read and write operations
with device. Fix bus_dmamap_sync operation specifier used in
fxp_dma_wait() by adding both memory read and memory write
operations.

15 years agoWe can actually remove devclass_find_driver.
imp [Wed, 10 Jun 2009 01:02:38 +0000 (01:02 +0000)]
We can actually remove devclass_find_driver.

15 years agoThese are no longer public, so remove the man page.
imp [Tue, 9 Jun 2009 23:38:19 +0000 (23:38 +0000)]
These are no longer public, so remove the man page.

15 years agoAs discussed on arch@, restire
imp [Tue, 9 Jun 2009 23:24:04 +0000 (23:24 +0000)]
As discussed on arch@, restire
devclass_{add,delete,find,quiesce}_driver.  They aren't needed or used
and complicate locking newbus.

15 years agoja_JP: AM/PM date format should be localized.
edwin [Tue, 9 Jun 2009 22:33:34 +0000 (22:33 +0000)]
ja_JP: AM/PM date format should be localized.

ja_JP.eucJP and ja_JP.SJIS fixes.

PR: conf/63527
Submitted by: Yukihiro Nakai <nakai@gnome.gr.jp>
MFC after: 1 week

15 years agoFix LC_NUMERIC and LC_MONETARY for de_CH locale
edwin [Tue, 9 Jun 2009 22:22:04 +0000 (22:22 +0000)]
Fix LC_NUMERIC and LC_MONETARY for de_CH locale

With the de_CH (swiss german) locale, numbers should look like this:

    numbers: 1'234.45
    monetary values: Fr. 1'234.45

Previously, the thousands separator was missing for numbers, and
"." for monetary values, and "," was incorrectly used as decimal
point.

PR: conf/75502
Submitted by: Benjamin Lutz <benlutz@datacomm.ch>
MFC after: 1 week

15 years agoFix some overflow errors: a signed allocation and an insufficiant
jamie [Tue, 9 Jun 2009 22:09:29 +0000 (22:09 +0000)]
Fix some overflow errors: a signed allocation and an insufficiant
array size.

Reported by: pho
Tested by: pho
Approved by: bz (mentor)

15 years agoopt in to flowtable on i386/amd64
kmacy [Tue, 9 Jun 2009 21:58:14 +0000 (21:58 +0000)]
opt in to flowtable on i386/amd64

15 years agorevert to opt-in flowtable
kmacy [Tue, 9 Jun 2009 21:55:28 +0000 (21:55 +0000)]
revert to opt-in flowtable

15 years agoAdd opt_inet.h back lost with r190872.
bz [Tue, 9 Jun 2009 21:43:04 +0000 (21:43 +0000)]
Add opt_inet.h back lost with r190872.
This will bring back improved IPv4 SIOCSIFADDR ioctl handling
not re-initializing the interface if avoidable.

15 years agoSync struct ng_ipfw_tag description with sources.
oleg [Tue, 9 Jun 2009 21:35:32 +0000 (21:35 +0000)]
Sync struct ng_ipfw_tag description with sources.

Submitted by: Mikolaj Golub

15 years agoadd explanatory header license
kmacy [Tue, 9 Jun 2009 21:29:16 +0000 (21:29 +0000)]
add explanatory header license

15 years agoClose long existed race with net.inet.ip.fw.one_pass = 0:
oleg [Tue, 9 Jun 2009 21:27:11 +0000 (21:27 +0000)]
Close long existed race with net.inet.ip.fw.one_pass = 0:
If packet leaves ipfw to other kernel subsystem (dummynet, netgraph, etc)
it carries pointer to matching ipfw rule. If this packet then reinjected back
to ipfw, ruleset processing starts from that rule. If rule was deleted
meanwhile, due to existed race condition panic was possible (as well as
other odd effects like parsing rules in 'reap list').

P.S. this commit changes ABI so userland ipfw related binaries should be
recompiled.

MFC after: 1 month
Tested by: Mikolaj Golub

15 years agomake flowtable opt-out
kmacy [Tue, 9 Jun 2009 20:27:30 +0000 (20:27 +0000)]
make flowtable opt-out