]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoAllow libufs(3) functions to operate on a regular file. This makes it possible to
Juli Mallett [Thu, 11 Jun 2009 18:04:57 +0000 (18:04 +0000)]
Allow libufs(3) functions to operate on a regular file.  This makes it possible to
use almost anything that uses libufs(3) against a file as an unprivileged user, e.g.
tunefs(8) and dumpfs(8) against a makefs(8)-created image.

Prodded by: kensmith

15 years agoko_KR: AM/PM date format should be localized.
Jung-uk Kim [Thu, 11 Jun 2009 17:42:02 +0000 (17:42 +0000)]
ko_KR: AM/PM date format should be localized.

Inspired by: r193869

15 years agoKOBJMETHOD: use better construct in the checking version of the macro
Andriy Gapon [Thu, 11 Jun 2009 17:21:14 +0000 (17:21 +0000)]
KOBJMETHOD: use better construct in the checking version of the macro

Big thanks to Christoph Mallon for the idea/code!
This construct has benefit of sticking much stricter to C standard and thus
keeping more compilers happy as Clang doesn't like the current construct
because it doesn't treat FUNC != NULL as a compile-time constant.

The checking version is still under 'notyet'.

Pointed out by: ed
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
Clang help by: rdivacky
Reviewed by: imp
Approved by: jhb

15 years agostrict kobj signatures: fix adb_hb_controller_poll impl in powermac
Andriy Gapon [Thu, 11 Jun 2009 17:16:04 +0000 (17:16 +0000)]
strict kobj signatures: fix adb_hb_controller_poll impl in powermac

the method return u_int, not void

Reviewed by: imp, current@
Approved by: jhb (mentor)

15 years agostrict kobj signatures: fix iicbus_write impl in dev/pcf
Andriy Gapon [Thu, 11 Jun 2009 17:15:44 +0000 (17:15 +0000)]
strict kobj signatures: fix iicbus_write impl in dev/pcf

input buf is const

Reviewed by: imp, current@
Approved by: jhb (mentor)

15 years agostrict kobj signatures: some ofw_setprop fixes
Andriy Gapon [Thu, 11 Jun 2009 17:15:20 +0000 (17:15 +0000)]
strict kobj signatures: some ofw_setprop fixes

propname parameter is const

Reviewed by: imp, current@
Approved by: jhb (mentor)

15 years agostrict kobj signatures: fix assortment of miibus_writereg impls
Andriy Gapon [Thu, 11 Jun 2009 17:14:54 +0000 (17:14 +0000)]
strict kobj signatures: fix assortment of miibus_writereg impls

return type should be int, not void

Reviewed by: imp, current@
Approved by: jhb (mentor)

15 years agostrict kobj sigs: fix assortment of device_detach and device_shutdown impls
Andriy Gapon [Thu, 11 Jun 2009 17:14:28 +0000 (17:14 +0000)]
strict kobj sigs: fix assortment of device_detach and device_shutdown impls

with common issue of having void return type instead of int

Reviewed by: imp, current@
Approved by: jhb (mentor)

15 years agomake implicit pad visible
Sam Leffler [Thu, 11 Jun 2009 17:10:21 +0000 (17:10 +0000)]
make implicit pad visible

15 years agouse negotiated short gi to calculate the tx rate; using the htcaps
Sam Leffler [Thu, 11 Jun 2009 17:09:39 +0000 (17:09 +0000)]
use negotiated short gi to calculate the tx rate; using the htcaps
does not take into account local state (e.g. manual disable of sgi)

15 years agostrict kobj signatures: fix assortment of bus_read_ivar impls
Andriy Gapon [Thu, 11 Jun 2009 17:06:58 +0000 (17:06 +0000)]
strict kobj signatures: fix assortment of bus_read_ivar impls

Reviewed by: imp, current@
Approved by: jhb (mentor)

15 years agoStop asserting on exclusive locks in fsync since it can now support
Paul Saab [Thu, 11 Jun 2009 17:06:45 +0000 (17:06 +0000)]
Stop asserting on exclusive locks in fsync since it can now support
shared vnode locking on ZFS.

Reviewed by: jhb

15 years agostrict kobj signatures: fix legacy i386 pcib_write_config impl
Andriy Gapon [Thu, 11 Jun 2009 17:06:31 +0000 (17:06 +0000)]
strict kobj signatures: fix legacy i386 pcib_write_config impl

Reviewed by: imp, current@
Approved by: jhb (mentor)

15 years agostrict kobj signatures: fixes in agp driver
Andriy Gapon [Thu, 11 Jun 2009 17:06:07 +0000 (17:06 +0000)]
strict kobj signatures: fixes in agp driver

offset parameter has vm_offset_t type in calling code and in kobj method

Reviewed by: imp, rnoland, lulf, current@
Approved by: jhb (mentor)

15 years agostrict kobj signatures: linker_if fixes
Andriy Gapon [Thu, 11 Jun 2009 17:05:45 +0000 (17:05 +0000)]
strict kobj signatures: linker_if fixes

in symtab_get method symtab parameter is made constant as this reflects
actual intention and usage of the method

Reviewed by: imp, current@
Approved by: jhb (mentor)

15 years agostrict kobj signatures: number of fixes for arm architecture
Andriy Gapon [Thu, 11 Jun 2009 17:05:13 +0000 (17:05 +0000)]
strict kobj signatures: number of fixes for arm architecture

no functional changes should result

Reviewed by: imp, current@
Approved by: jhb (mentor)

15 years ago- Make pstat(8) WARNS=6 safe.
Stanislav Sedov [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
Marko 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
Marko 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].
Jung-uk Kim [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
Andriy Gapon [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.
John Baldwin [Thu, 11 Jun 2009 14:37:18 +0000 (14:37 +0000)]
Correct printf format type mismatches.

15 years agoTrim extra ()'s.
John Baldwin [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 Schouten [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
Bjoern A. Zeeb [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
Bjoern A. Zeeb [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_*
Bjoern A. Zeeb [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.
Bjoern A. Zeeb [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.
Bjoern A. Zeeb [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.
Bjoern A. Zeeb [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.
Bjoern A. Zeeb [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.
Bjoern A. Zeeb [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
Bjoern A. Zeeb [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.
Dag-Erling Smørgrav [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
Bjoern A. Zeeb [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 Schouten [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 Rizzo [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
Kip Macy [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 Abdullah [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 Schouten [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
Dag-Erling Smørgrav [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 Leffler [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):
Jung-uk Kim [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 Groothuis [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 Groothuis [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.
Bjoern A. Zeeb [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.
Bjoern A. Zeeb [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 Groothuis [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
Bjoern A. Zeeb [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:
Bjoern A. Zeeb [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
Rick Macklem [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:
Bjoern A. Zeeb [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
Kip Macy [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
Rick Macklem [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
Konstantin Belousov [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:
Bjoern A. Zeeb [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
Bjoern A. Zeeb [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.
Bjoern A. Zeeb [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
Andriy Gapon [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
Andriy Gapon [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
Rick Macklem [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
John Baldwin [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 Schouten [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 Schouten [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.
Warner Losh [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
Coleman Kane [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
Warner Losh [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
Warner Losh [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
Warner Losh [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
Konstantin Belousov [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.
Konstantin Belousov [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 Gritton [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].
Bjoern A. Zeeb [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.
George V. Neville-Neil [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.
Konstantin Belousov [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
Konstantin Belousov [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.
Konstantin Belousov [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
Konstantin Belousov [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
John Baldwin [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
Konstantin Belousov [Wed, 10 Jun 2009 13:48:43 +0000 (13:48 +0000)]
Regenerate

15 years agoAdd several syscall compat32 entries for extattr manipulation syscalls,
Konstantin Belousov [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,
Bjoern A. Zeeb [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.
Peter 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 Groothuis [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 Abdullah [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,
Bjoern A. Zeeb [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 Rizzo [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.
Bjoern A. Zeeb [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 Rizzo [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
Colin Percival [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.
Bjoern A. Zeeb [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.
Bjoern A. Zeeb [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 Abdullah [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.
Pyun YongHyeon [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 Abdullah [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 Leffler [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 Leffler [Wed, 10 Jun 2009 03:28:34 +0000 (03:28 +0000)]
iwn does not require a license ack

15 years agoFix typo.
Pyun YongHyeon [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.
Pyun YongHyeon [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.
Pyun YongHyeon [Wed, 10 Jun 2009 02:10:35 +0000 (02:10 +0000)]
Add alc(4) to the list of supported network interface.