]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoThe libc acl_valid(3) function validates the contents of a POSIX.1e ACL.
rwatson [Sun, 13 Jul 2008 16:37:51 +0000 (16:37 +0000)]
The libc acl_valid(3) function validates the contents of a POSIX.1e ACL.
This change removes the requirement that an ACL contain no ACL_USER
entries with a uid the same as those of a file, or ACL_GROUP entries
with a gid the same as those of a file.  This requirement is not in the
specification, and not enforced by the kernel's ACL implementation.

Reported by: Iustin Pop <iusty at k1024 dot org>
MFC after: 1 week

15 years agoMore explicitly mention that we support the 2920C with the ahc driver.
remko [Sun, 13 Jul 2008 13:56:21 +0000 (13:56 +0000)]
More explicitly mention that we support the 2920C with the ahc driver.

PR: 125535
Submitted by: Bob Bishop <rb at gid dot co dot uk>
MFC after: 3 days

15 years agoUpdate the ktr_header structure, which changed over time.
remko [Sun, 13 Jul 2008 13:42:52 +0000 (13:42 +0000)]
Update the ktr_header structure, which changed over time.

PR: 125546
Submitted by: Mateusz Guzik <mjguzik at gmail dot com>
MFC after: 3 days

15 years agoMake uart(4) the default serial port driver on i386 and amd64.
ed [Sun, 13 Jul 2008 07:20:14 +0000 (07:20 +0000)]
Make uart(4) the default serial port driver on i386 and amd64.

The uart(4) driver has the advantage of supporting a wider variety of
hardware on a greater amount of platforms. This driver has already been
the standard on platforms such as ia64, powerpc and sparc64.

I've decided not to change anything on pc98. I'd rather let people from
the pc98 team look at this.

Approved by: philip (mentor), marcel

15 years agofix multicast hash register definition
ticso [Sat, 12 Jul 2008 23:40:07 +0000 (23:40 +0000)]
fix multicast hash register definition

15 years agoRefine the changes made in SVN rev 180430. Specifically, instantiate a new
alc [Sat, 12 Jul 2008 21:24:42 +0000 (21:24 +0000)]
Refine the changes made in SVN rev 180430.  Specifically, instantiate a new
page table page only if the 2MB page mapping has been used.  Also, refactor
some assertions.

15 years agoIn nmount(), if we see "update" in the mount options,
rodrigc [Sat, 12 Jul 2008 20:12:40 +0000 (20:12 +0000)]
In nmount(), if we see "update" in the mount options,
set MNT_UPDATE in fsflags, and delete the
"update" option from the global mount options.

MNT_UPDATE is a command, and not a property of a mount
that should persist after the command is executed.

We need to do similar things for MNT_FORCE and MNT_RELOAD.

All mount flags are prefixed by MNT_..... it would
be nice if flags which were commands were named differently
from flags which are persistent properties of a mount.
This was not such a big deal in the pre-nmount() days,
but with nmount() it is more important.

Requested by: yar
MFC after: 2 weeks

15 years agoIn order to apply pmap_demote_pde() to a page directory entry (PDE) from the
alc [Sat, 12 Jul 2008 18:43:57 +0000 (18:43 +0000)]
In order to apply pmap_demote_pde() to a page directory entry (PDE) from the
direct map, the PDE must have PG_M and PG_A preset.

Noticed by: Magesh Dhasayyan

15 years agoStrongly discourage the use of the query-source option, and explain why.
dougb [Sat, 12 Jul 2008 10:00:36 +0000 (10:00 +0000)]
Strongly discourage the use of the query-source option, and explain why.

Give a better example if a user absolutely must use this option, and
suggest they pick something from the ephemeral port range rather than
port 53. This means that the example will not work if it is merely
uncommented, but this will hopefully encourage users to read the comment.

15 years agoMerge from vendor/bind9/dist as of the 9.4.2-P1 import, including
dougb [Sat, 12 Jul 2008 09:38:35 +0000 (09:38 +0000)]
Merge from vendor/bind9/dist as of the 9.4.2-P1 import, including
the patch from ISC for lib/bind9/check.c and deletion of unused
files in lib/bind.

This version will by default randomize the UDP query source port
(and sequence number of course) for every query.

In order to take advantage of this randomization users MUST have an
appropriate firewall configuration to allow UDP queries to be sent and
answers to be received on random ports; and users MUST NOT specify a
port number using the query-source[-v6] options.

The avoid-v[46]-udp-ports options exist for users who wish to eliminate
certain port numbers from being chosen by named for this purpose. See
the ARM Chatper 6 for more information.

Also please note, this issue applies only to UDP query ports. A random
ephemeral port is always chosen for TCP queries.

This issue applies primarily to name servers whose main purpose is to
resolve random queries (sometimes referred to as "caching" servers, or
more properly as "resolving" servers), although even an "authoritative"
name server will make some queries, primarily at startup time.

All users of BIND are strongly encouraged to upgrade to the latest
version, and to utilize the source port randomization feature.

This update addresses issues raised in:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-1447
http://www.kb.cert.org/vuls/id/800113
http://tools.ietf.org/html/draft-ietf-dnsext-forgery-resilience

15 years agoThe vendor area is the proper home for these files now.
dougb [Sat, 12 Jul 2008 08:46:21 +0000 (08:46 +0000)]
The vendor area is the proper home for these files now.

15 years agoA number of significant enhancements to the ciss driver:
scottl [Fri, 11 Jul 2008 21:20:51 +0000 (21:20 +0000)]
A number of significant enhancements to the ciss driver:

1.  The FreeBSD driver was setting an interrupt coalesce delay of 1000us
for reasons that I can only speculate on.  This was hurting everything
from lame sequential I/O "benchmarks" to legitimate filesystem metadata
operations that relied on serialized barrier writes.  One of my
filesystem tests went from 35s to complete down to 6s.

2.  Implemented the Performant transport method.  Without the fix in
(1), I saw almost no difference.  With it, my filesystem tests showed
another 5-10% improvement in speed.  It was hard to measure CPU
utilization in any meaningful way, so it's not clear if there was a
benefit there, though there should have been since the interrupt handler
was reduced from 2 or more PCI reads down to 1.

3.  Implemented MSI-X.  Without any docs on this, I was just taking a
guess, and it appears to only work with the Performant method.  This
could be a programming or understanding mistake on my part.  While this
by itself made almost no difference to performance since the Performant
method already eliminated most of the synchronous reads over the PCI
bus, it did allow the CISS hardware to stop sharing its interrupt with
the USB hardware, which in turn allowed the driver to become decoupled
from the Giant-locked USB driver stack.  This increased performance by
almost 20%.  The MSI-X setup was done with 4 vectors allocated, but only
1 vector used since the performant method was told to only use 1 of 4
queues.  Fiddling with this might make it work with the simpleq method,
not sure.  I did not implement MSI since I have no MSI-specific hardware
in my test lab.

4.  Improved the locking in the driver, trimmed some data structures.
This didn't improve test times in any measurable way, but it does look
like it gave a minor improvement to CPU usage when many
processes/threads were doing I/O in parallel.  Again, this was hard to
accurately test.

15 years agoDon't leak DMA map if not freed.
delphij [Fri, 11 Jul 2008 18:26:12 +0000 (18:26 +0000)]
Don't leak DMA map if not freed.

Submitted by: kevlo

15 years agoDust off old code for support of USB isochronous transfers.
emax [Fri, 11 Jul 2008 17:13:43 +0000 (17:13 +0000)]
Dust off old code for support of USB isochronous transfers.
USB isochronous transfer support is required for Bluetooth SCO.
While i'm here change u_int to uint and update TODO.
This should produce no visible changes unless the device is
broken (or really old).

MFC after: 3 months

15 years ago- Fix a logic error when updating plex configuration.
lulf [Fri, 11 Jul 2008 16:46:29 +0000 (16:46 +0000)]
- Fix a logic error when updating plex configuration.

Approved by: pjd (mentor)

15 years agoPut the _cpuset* symbols in FBSDprivate_1.0 instead of trying to put
brooks [Fri, 11 Jul 2008 15:17:06 +0000 (15:17 +0000)]
Put the _cpuset* symbols in FBSDprivate_1.0 instead of trying to put
nonexistant __cpuset* there.

15 years agoImprove readability and cscope searches a little bit by not using the
obrien [Fri, 11 Jul 2008 14:48:28 +0000 (14:48 +0000)]
Improve readability and cscope searches a little bit by not using the
same variable name in closely related (but not conflicting) contexts.

15 years agoUse the VM_ALLOC_INTERRUPT for the page requests when allocating memory
kib [Fri, 11 Jul 2008 11:27:42 +0000 (11:27 +0000)]
Use the VM_ALLOC_INTERRUPT for the page requests when allocating memory
for the bio for swapout write. It allows the page allocator to drain
free page list deeper. As result, a deadlock where pageout deamon sleeps
waiting for bio to be allocated for swapout is no more reproducable in
practice.

Alan said that M_USE_RESERVE shall be ressurrected and used there, but
until this is implemented, M_NOWAIT does exactly what is needed.

Tested by: pho, kris
Reviewed by: alc
No objections from: phk
MFC after: 2 weeks (RELENG_7 only)

15 years agoMake it atomic for the devfs_populate_loop() to see the setting of
kib [Fri, 11 Jul 2008 11:22:19 +0000 (11:22 +0000)]
Make it atomic for the devfs_populate_loop() to see the setting of
SI_ALIAS flag and initialization of the si_parent when alias is created.
Assert that supplied parent device is not NULL.

Both situations could cause NULL dereference in the
devfs_populate_loop() when creating a symlink for SI_ALIAS'ed device.
Namely, cdp->cdp_c.si_parent may be NULL.

Reported by: mav
MFC after: 2 weeks

15 years agoThe pfctl(8) program is already pretty verbose, so don't print extra
mtm [Fri, 11 Jul 2008 08:11:49 +0000 (08:11 +0000)]
The pfctl(8) program is already pretty verbose, so don't print extra
information in quiet mode.

15 years agoRevert r180431.
obrien [Fri, 11 Jul 2008 01:10:40 +0000 (01:10 +0000)]
Revert r180431.
r180431 broke the AMD64 build (the only arch using kern/link_elf_obj.c)

15 years agoDetect ATA controllers in the Macbook3.
remko [Thu, 10 Jul 2008 21:36:53 +0000 (21:36 +0000)]
Detect ATA controllers in the Macbook3.

PR: 118135
Submitted by: ed
Approved by: imp (mentor, implicit)
MFC after: 1 week

15 years agostyle(9): put parentheses around return values.
brooks [Thu, 10 Jul 2008 19:54:34 +0000 (19:54 +0000)]
style(9): put parentheses around return values.

15 years agoFix -o mntudp after the conversion to default TCP mounts
kris [Thu, 10 Jul 2008 17:53:10 +0000 (17:53 +0000)]
Fix -o mntudp after the conversion to default TCP mounts

Submitted by: danfe
MFC after: 1 week

15 years agoRegen
brooks [Thu, 10 Jul 2008 17:46:58 +0000 (17:46 +0000)]
Regen

15 years agoid_t is a 64-bit integer and thus is passed as two arguments like off_t is.
brooks [Thu, 10 Jul 2008 17:45:57 +0000 (17:45 +0000)]
id_t is a 64-bit integer and thus is passed as two arguments like off_t is.
As a result, those arguments must be recombined before calling the real
syscal implementation.  This change fixes 32-bit compatibility for
cpuset_getid(), cpuset_setid(), cpuset_getaffinity(), and
cpuset_setaffinity().

15 years agoAllow 'elf_file_t' to be used in a wider scope.
obrien [Thu, 10 Jul 2008 16:35:57 +0000 (16:35 +0000)]
Allow 'elf_file_t' to be used in a wider scope.

15 years agoExtend pmap_demote_pde() to include the ability to instantiate a new page
alc [Thu, 10 Jul 2008 16:22:24 +0000 (16:22 +0000)]
Extend pmap_demote_pde() to include the ability to instantiate a new page
table page where none existed before.

15 years agoSlightly rearrange validation of UDP arguments and jail processing in
rwatson [Thu, 10 Jul 2008 16:20:18 +0000 (16:20 +0000)]
Slightly rearrange validation of UDP arguments and jail processing in
udp_output() so that argument validation occurs before jail processing.

Add additional comments explaining what's going on when we process
addresses and binding during udp_output().

MFC after: 3 weeks

15 years agoUse 'CSCOPE_ARCHDIR' to change the default architecture directories to
obrien [Thu, 10 Jul 2008 16:03:24 +0000 (16:03 +0000)]
Use 'CSCOPE_ARCHDIR' to change the default architecture directories to
cscope.  After the addition of sys/modules/dtrace/dtrace, setting
'ARCHDIR' in /etc/src.conf breaks the build.

15 years agoPass the ucred along into in{,6}_pcblookup_local for upcoming
bz [Thu, 10 Jul 2008 13:31:11 +0000 (13:31 +0000)]
Pass the ucred along into in{,6}_pcblookup_local for upcoming
prison checks.

Reviewed by: rwatson

15 years agoadd __unused to succeed at WARNS=6
charnier [Thu, 10 Jul 2008 13:26:46 +0000 (13:26 +0000)]
add __unused to succeed at WARNS=6

15 years agoFor consistency take lport as u_short in in{,6}_pcblookup_local.
bz [Thu, 10 Jul 2008 13:23:22 +0000 (13:23 +0000)]
For consistency take lport as u_short in in{,6}_pcblookup_local.
All callers either pass in an u_short or u_int16_t.

Reviewed by: rwatson

15 years agoBack-out my previous change. See the thread at
danger [Thu, 10 Jul 2008 11:24:41 +0000 (11:24 +0000)]
Back-out my previous change. See the thread at
http://lists.freebsd.org/pipermail/cvs-all/2008-July/263779.html

15 years agoGarbage collect a variable which is assigned a value once but otherwise
cperciva [Thu, 10 Jul 2008 09:50:55 +0000 (09:50 +0000)]
Garbage collect a variable which is assigned a value once but otherwise
is never used.

Found by: LLVM/Clang Static Analyzer

15 years agoApply the MAC label to an outgoing UDP packet when other inpcb properties are
rwatson [Thu, 10 Jul 2008 09:45:28 +0000 (09:45 +0000)]
Apply the MAC label to an outgoing UDP packet when other inpcb properties are
processed, meaning that we avoid the cost of MAC label assignment if we're
going to drop the packet due to mbuf exhaustion, etc.

MFC after: 3 weeks

15 years agothe driver don't support AD-HOC mode currently.
weongyo [Thu, 10 Jul 2008 08:44:02 +0000 (08:44 +0000)]
the driver don't support AD-HOC mode currently.

15 years agoMerge gnu cpio 2.6 -> 2.8 changes. Unfortunately, we have massive
peter [Thu, 10 Jul 2008 02:08:00 +0000 (02:08 +0000)]
Merge gnu cpio 2.6 -> 2.8 changes.  Unfortunately, we have massive
conflicts due to radically different approaches to security and bug fixes.
In some cases I re-started from the vendor version and reimplemented our
patches.  Fortunately, this is not enabled by default in -current.

15 years agoImport heavily trimmed gnu cpio-2.8.
peter [Thu, 10 Jul 2008 00:52:03 +0000 (00:52 +0000)]
Import heavily trimmed gnu cpio-2.8.
(2.9 switched to gpl3 a few weeks later)

15 years agoGet in some basic infrastructure for Bluetooth SCO support.
emax [Thu, 10 Jul 2008 00:15:29 +0000 (00:15 +0000)]
Get in some basic infrastructure for Bluetooth SCO support.

MFC after: 3 months

15 years agoFlatten cvs2svn generated import tree.
peter [Wed, 9 Jul 2008 23:21:55 +0000 (23:21 +0000)]
Flatten cvs2svn generated import tree.

15 years agocvs2svn managed to overlay two different path trees. fix.
peter [Wed, 9 Jul 2008 23:07:03 +0000 (23:07 +0000)]
cvs2svn managed to overlay two different path trees. fix.

15 years agoAdd a new program to the multicast test suite. The mcgrab program
gnn [Wed, 9 Jul 2008 22:33:46 +0000 (22:33 +0000)]
Add a new program to the multicast test suite.  The mcgrab program
is used to grab and hold some number of multicast addresses in order
to test what happens when an interface goes over the number of multicast
addresses it can filter in hardware.

15 years agoBand-aid a problem with 32 bit selector setup.
peter [Wed, 9 Jul 2008 19:44:37 +0000 (19:44 +0000)]
Band-aid a problem with 32 bit selector setup.

Initialize %ds, %es, and %fs during CPU startup.  Otherwise a garbage
value could leak to a 32-bit process if a process migrated to a different
CPU after exec and the new CPU had never exec'd a 32-bit process.

A more complete fix is needed, but this mitigates the most frequent
manifestations.

Obtained from: ups

15 years agoFor consistency with the rest of the function use the locally cached
bz [Wed, 9 Jul 2008 19:03:06 +0000 (19:03 +0000)]
For consistency with the rest of the function use the locally cached
pointer pcbinfo rather than inp->inp_pcbinfo.

MFC after: 3 weeks

15 years agoRather than checking for a NULL so_pcb in raw_attach(), assert that
rwatson [Wed, 9 Jul 2008 18:41:31 +0000 (18:41 +0000)]
Rather than checking for a NULL so_pcb in raw_attach(), assert that
it's non-NULL, as all callers can and should already do the required
checking.  Update comments a bit more to talk about rawcb allocation
for consumers.

Reviewed by: bz
MFC after: 3 weeks

15 years agoAdd sysctl subtree net.raw for generic raw socket infrastructure;
rwatson [Wed, 9 Jul 2008 18:39:55 +0000 (18:39 +0000)]
Add sysctl subtree net.raw for generic raw socket infrastructure;
expose default send and receive socket buffer sizes using sysctls
so that they can be administered centrally.

Reviewed by: bz
MFC after: 3 weeks

15 years agoAdd quirk for the Samsung YP-U3
remko [Wed, 9 Jul 2008 17:00:14 +0000 (17:00 +0000)]
Add quirk for the Samsung YP-U3

PR: 125398
Submitted by: Tino Engel <goaengel at gmx dot net>
Approved by: imp (mentor, implicit)
MFC after: 1 week

15 years agoImprove the EEPROM parsing, based on finding a datasheet that describes
imp [Wed, 9 Jul 2008 16:47:55 +0000 (16:47 +0000)]
Improve the EEPROM parsing, based on finding a datasheet that describes
it in detail.

When setting media, don't error out when a specific media is selected.
# Note: There may be some issues still here since the EtherJet PC Card doesn't
# conform to the datasheet.  Many different kinds of dongles can be plugged in
# and it is unknown how to ask which one it is.

Also, add a /* bad! */ comment to a 1/2 second delay after we set the
DC/DC parameters.  This should be a *sleep of some sort for !cold.
Fortunately it is the only one and is only used when setting media, so
the benefit from removing it is small.  Unfortunately, it likely
serves as an exemplar of good programming techniques, which it isn't.

15 years ago1) Adds the rest of the VIMAGE change macros
rrs [Wed, 9 Jul 2008 16:45:30 +0000 (16:45 +0000)]
1) Adds the rest of the VIMAGE change macros
2) Adds some __UserSpace__ on some of the common defines that
   the user space code needs
3) Fixes a bug when we send up data to a user that failed. We
   need to a) trim off the data chunk headers, if present, and
   b) make sure the frag bit is communicated properly for the
   msgs coming off the stream queues... i.e. we see if some
   of the msg has been taken.

Obtained from: jeli contributed the VIMAGE changes on this pass Thanks Julain!

15 years agoDocument required locking in in6_sleectsrc() in case an inp is
bz [Wed, 9 Jul 2008 16:33:21 +0000 (16:33 +0000)]
Document required locking in in6_sleectsrc() in case an inp is
passed in by adding an assert.

Requested by: rwatson
Reviewed by: rwatson

15 years agoRemove unused support for local and foreign addresses in generic raw
rwatson [Wed, 9 Jul 2008 15:48:16 +0000 (15:48 +0000)]
Remove unused support for local and foreign addresses in generic raw
socket support.  These utility routines are used only for routing and
pfkey sockets, neither of which have a notion of address, so were
required to mock up fake socket addresses to avoid connection
requirements for applications that did not specify their own fake
addresses (most of them).

Quite a bit of the removed code is #ifdef notdef, since raw sockets
don't support bind() or connect() in practice.  Removing this
simplifies the raw socket implementation, and removes two (commented
out) uses of dtom(9).

Fake addresses passed to sendto(2) by applications are ignored for
compatibility reasons, but this is now done in a more consistent way
(and with a comment).  Possibly, EINVAL could be returned here in
the future if it is determined that no applications depend on the
semantic inconsistency of specifying a destination address for a
protocol without address support, but this will require some amount
of careful surveying.

NB: This does not affect netinet, netinet6, or other wire protocol
raw sockets, which provide their own independent infrastructure with
control block address support specific to the protocol.

MFC after: 3 weeks
Reviewed by: bz

15 years agoDriver failed to allocate MMIO resources. Attached patch adds a fallback path.
remko [Wed, 9 Jul 2008 15:10:53 +0000 (15:10 +0000)]
Driver failed to allocate MMIO resources. Attached patch adds a fallback path.
It uses generic IDE facilities if sii-specific allocations failed

PR: 125421
Submitted by: Andrey V. Elsukov <bu7cher at yandex dot ru>
Approved by: imp (mentor, implicit)
MFC after: 1 week

15 years agoAdd new device id for ICH8M, which supports greater than UDMA33 mode
remko [Wed, 9 Jul 2008 15:07:53 +0000 (15:07 +0000)]
Add new device id for ICH8M, which supports greater than UDMA33 mode
when it worked as generic IDE.

PR: 125422
Submitted by: Andrey V. Elsukov <bu7cher at yandex dot ru>
Approved by: imp (mentor, implicit)
MFC after: 1 week

15 years agoAdd support for the ICH9 in non AHCI mode (RAID mode).
remko [Wed, 9 Jul 2008 15:06:41 +0000 (15:06 +0000)]
Add support for the ICH9 in non AHCI mode (RAID mode).

Submitted by: Andrey V. Elsukov <bu7cher at yandex dot ru>
Tested by: Vitalij L. Fadeev <fvl at mail dot ru>
Approved by: imp (mentor, implicit)
MFC after: 1 week

15 years ago- nested functions are a GCC extensions and should not be used
danger [Wed, 9 Jul 2008 14:04:28 +0000 (14:04 +0000)]
- nested functions are a GCC extensions and should not be used

Submitted by: gahr
MFC after: 3 days

15 years agoAllow comment to be placed at the end of a configuration line.
sobomax [Wed, 9 Jul 2008 07:37:54 +0000 (07:37 +0000)]
Allow comment to be placed at the end of a configuration line.

MFC after: 2 weeks

15 years agoLeapsecond at end of december.
phk [Wed, 9 Jul 2008 06:59:14 +0000 (06:59 +0000)]
Leapsecond at end of december.

15 years agoFix lines that are too long in pmap_growkernel() by substituting shorter but
alc [Wed, 9 Jul 2008 06:04:10 +0000 (06:04 +0000)]
Fix lines that are too long in pmap_growkernel() by substituting shorter but
equivalent expressions.

15 years agoAdd driver support for RTL8102E and RTL8102EL which is the second
yongari [Wed, 9 Jul 2008 01:58:18 +0000 (01:58 +0000)]
Add driver support for RTL8102E and RTL8102EL which is the second
generation of RTL810x PCIe fast ethernet controller. Note, Tx/Rx
descriptor format is different from that of first generation of
RTL8101E series. Jumbo frame is not supported for RTL810x
family.

Tested by: NAGATA Shinya ( maya AT negeta DOT com )

15 years agoDisable jumbo frame support for RTL810x fast ethernet controllers.
yongari [Wed, 9 Jul 2008 01:44:06 +0000 (01:44 +0000)]
Disable jumbo frame support for RTL810x fast ethernet controllers.

15 years agoFix a mutex LOR introduced by the conversion of if_ndis from spinlocks to
cokane [Wed, 9 Jul 2008 00:10:55 +0000 (00:10 +0000)]
Fix a mutex LOR introduced by the conversion of if_ndis from spinlocks to
mutexes and replacing the obsolete if_watchdog interface. The ndis_ticktask
function calls into ieee80211_new_state under one condition with NDIS_LOCK
held. The ieee80211_new_state would call into ndis_start in some cases too,
resulting in the occasional case where ndis_start acquires NDIS_LOCK from
inside the NDIS_LOCK held by ndis_ticktask.

Obtained from: Paul B. Mahol <onemda@gmail.com>
MFC after: 1 week

15 years agoImprove the output of kldload(8) to show which module can't be loaded.
edwin [Tue, 8 Jul 2008 23:51:38 +0000 (23:51 +0000)]
Improve the output of kldload(8) to show which module can't be loaded.

Was: kldload: Unsupported file type
Is now: kldload: /boot/modules/test.ko: Unsupported file type

PR: kern/121276
Submitted by: Edwin Groothuis <edwin@mavetju.org>
Approved by: bde (mentor)
MFC after: 1 week

15 years agoEliminate pmap_growkernel()'s dependence on create_pagetables() preallocating
alc [Tue, 8 Jul 2008 22:59:17 +0000 (22:59 +0000)]
Eliminate pmap_growkernel()'s dependence on create_pagetables() preallocating
page directory pages from VM_MIN_KERNEL_ADDRESS through the end of the
kernel's bss.  Specifically, the dependence was in pmap_growkernel()'s one-
time initialization of kernel_vm_end, not in its main body.  (I could not,
however, resist the urge to optimize the main body.)

Reduce the number of preallocated page directory pages to just those needed
to support NKPT page table pages.  (In fact, this allows me to revert a
couple of my earlier changes to create_pagetables().)

15 years agoBack out r180370. It was not discussed with subsystem maintainers.
gonzo [Tue, 8 Jul 2008 20:19:43 +0000 (20:19 +0000)]
Back out r180370. It was not discussed with subsystem maintainers.

15 years agoChange the parameters to in6_selectsrc():
bz [Tue, 8 Jul 2008 18:41:36 +0000 (18:41 +0000)]
Change the parameters to in6_selectsrc():
 - pass in the inp instead of both in6p_moptions and laddr.
 - pass in cred for upcoming prison checks.

Reviewed by: rwatson

15 years ago Queue decapsulated packed instead of performing direct dispatch. Some
gonzo [Tue, 8 Jul 2008 18:21:44 +0000 (18:21 +0000)]
  Queue decapsulated packed instead of performing direct dispatch. Some
execution pathes might hit stack limit under certain circumstances
(e.g. ng_mppc).

PR:                     kern/125314
Reported by:            Illya Klymov <ilia dot klimov at gmail dot com>

15 years ago- Simplify the procedure of retrieving XML-data from the kernel.
lulf [Tue, 8 Jul 2008 17:34:50 +0000 (17:34 +0000)]
- Simplify the procedure of retrieving XML-data from the kernel.
- Fix a number of potential memory leaks in libgeom related to doing realloc
  without freeing old pointer if things go wrong.
- Fix a number of places in libgeom where malloc and calloc return values
  were not checked.
- Check malloc return value and provide sufficient warning messages when XML
  parsing fails.

PR: kern/83464
Submitted by: Dan Lukes <dan - at - obluda.cz>
Approved by: kib (mentor)

15 years agoProvide some initial chicken-scratching annotations of locking for
rwatson [Tue, 8 Jul 2008 17:22:59 +0000 (17:22 +0000)]
Provide some initial chicken-scratching annotations of locking for
struct inpcb.

Prodded by: bz
MFC after: 3 days

15 years agoAdded my birthday to the FreeBSD calendar.
sson [Tue, 8 Jul 2008 15:43:54 +0000 (15:43 +0000)]
Added my birthday to the FreeBSD calendar.

Approved by: jb (mentor)

15 years agoAdded myself to the src committers graph.
sson [Tue, 8 Jul 2008 15:36:44 +0000 (15:36 +0000)]
Added myself to the src committers graph.

Approved by: jb (mentor)

15 years agoUse soreceive_dgram() and sosend_dgram() with UDPv6, as we do with UDPv4.
rwatson [Tue, 8 Jul 2008 10:15:23 +0000 (10:15 +0000)]
Use soreceive_dgram() and sosend_dgram() with UDPv6, as we do with UDPv4.

Tested by: ps
MFC after: 3 months

15 years agoremove a useless example.
weongyo [Tue, 8 Jul 2008 04:15:07 +0000 (04:15 +0000)]
remove a useless example.

Pointed by: imp

15 years agoRev 180333, ``Change create_pagetables() and pmap_init() so that many fewer
alc [Tue, 8 Jul 2008 04:00:22 +0000 (04:00 +0000)]
Rev 180333, ``Change create_pagetables() and pmap_init() so that many fewer
page table pages have to be preallocated ...'', violates an assumption made
by minidumpsys(): kernel_vm_end is the highest virtual address that has ever
been used by the kernel.  Now, however, the kernel code, data, and bss may
reside at addresses beyond kernel_vm_end.  This revision modifies the upper
bound on minidumpsys()'s two page table traversals to account for this
possibility.

15 years agoEnable the -n option of pkg_create(1).
keramida [Tue, 8 Jul 2008 03:21:05 +0000 (03:21 +0000)]
Enable the -n option of pkg_create(1).

The changes to make the option work are already in place, but I missed
the patch hunk that adds it to the getopt() option-handling loop.

Pointy hat: keramida
Approved by: flz
MFC after: 1 week

15 years agoposix_spawn() is supported, set _POSIX_SPAWN to 200212L.
davidxu [Tue, 8 Jul 2008 03:08:32 +0000 (03:08 +0000)]
posix_spawn() is supported, set _POSIX_SPAWN to 200212L.

15 years agoAdd HWPMC_HOOKS to GENERIC kernels, this makes hwpmc.ko work out
delphij [Mon, 7 Jul 2008 22:55:11 +0000 (22:55 +0000)]
Add HWPMC_HOOKS to GENERIC kernels, this makes hwpmc.ko work out
of the box.

15 years agoAdd a `show cpusets' DDB command to print numbered root and
bz [Mon, 7 Jul 2008 21:32:02 +0000 (21:32 +0000)]
Add a `show cpusets' DDB command to print numbered root and
assigned CPU affinity sets.

Reviewed by: brooks

15 years agoMFp4 144659:
bz [Mon, 7 Jul 2008 20:53:49 +0000 (20:53 +0000)]
MFp4 144659:
Plug a memory leak with jail services.

PR: 125257
Submitted by: Mateusz Guzik <mjguzik gmail.com>
MFC after: 6 days

15 years agoMove cpuset_refroot and cpuset_refbase functions up, grouping the
bz [Mon, 7 Jul 2008 20:45:55 +0000 (20:45 +0000)]
Move cpuset_refroot and cpuset_refbase functions up, grouping the
cpuset_ref* functions together. Will make it easier to read and
add code without forward declarations.
No functional changes.

15 years agoAdd inline function ia64_fc_i() to abstract inline assembly.
marcel [Mon, 7 Jul 2008 17:43:56 +0000 (17:43 +0000)]
Add inline function ia64_fc_i() to abstract inline assembly.
Use the new inline function in ia64_invalidate_icache().
While there, add proper synchronization so that we know
the fc.i instructions have taken effect when we return.

15 years agoIn FreeBSD 7.0 and beyond, pmap_growkernel() should pass VM_ALLOC_INTERRUPT
alc [Mon, 7 Jul 2008 17:31:02 +0000 (17:31 +0000)]
In FreeBSD 7.0 and beyond, pmap_growkernel() should pass VM_ALLOC_INTERRUPT
to vm_page_alloc() instead of VM_ALLOC_SYSTEM.

15 years agoIn FreeBSD 7.0 and beyond, pmap_growkernel() should pass VM_ALLOC_INTERRUPT
alc [Mon, 7 Jul 2008 17:25:09 +0000 (17:25 +0000)]
In FreeBSD 7.0 and beyond, pmap_growkernel() should pass VM_ALLOC_INTERRUPT
to vm_page_alloc() instead of VM_ALLOC_SYSTEM.  VM_ALLOC_SYSTEM was the
logical choice before FreeBSD 7.0 because VM_ALLOC_INTERRUPT could not
reclaim a cached page.  Simply put, there was no ordering between
VM_ALLOC_INTERRUPT and VM_ALLOC_SYSTEM as to which "dug deeper" into the
cache and free queues.  Now, there is; VM_ALLOC_INTERRUPT dominates
VM_ALLOC_SYSTEM.

While I'm here, teach pmap_growkernel() to request a prezeroed page.

MFC after: 1 week

15 years agoreorder RSN/WPA2 ie in beacon and probe response frames to comply
sam [Mon, 7 Jul 2008 17:24:55 +0000 (17:24 +0000)]
reorder RSN/WPA2 ie in beacon and probe response frames to comply
with IEEE802.11-2007 spec

Submitted by: Chris Zimmermann

15 years agoWhen making release with NOPORTS, we'll checkout only the
marcel [Mon, 7 Jul 2008 16:23:04 +0000 (16:23 +0000)]
When making release with NOPORTS, we'll checkout only the
mininal set of ports required to make the docs. However,
we also need ports/sysutils/cdrtools in order to make the
ISO images. When a platform doesn't have packages, the
release will fail in that case. Add ports/sysutils/cdrtools
to RELEASEPORTSMODULE for the DOMINIMALDOCPORTS case to
handle the NOPORTS release build.

Note that this change doesn't try to handle the NOPORTS with
NODOC case. For we have NOPORTSATALL set and it seems wrong
to check out a ports module in that case.

15 years agoFix some spelling errors (improper review from my
remko [Mon, 7 Jul 2008 13:08:30 +0000 (13:08 +0000)]
Fix some spelling errors (improper review from my
side).

Submitted by: ed, danger

15 years agoAllow udp_notify() to accept read, as well as write, locks on the passed
rwatson [Mon, 7 Jul 2008 12:27:55 +0000 (12:27 +0000)]
Allow udp_notify() to accept read, as well as write, locks on the passed
inpcb.  When directly invoking udp_notify() from udp_ctlinput(), acquire
only a read lock; we may still see write locks in udp_notify() as the
in_pcbnotifyall() routine is shared with TCP and always uses a write lock
on the inpcb being notified.

MFC after: 1 month

15 years agoAdd #include <inttypes.h> for the strtoimax().
kib [Mon, 7 Jul 2008 12:20:34 +0000 (12:20 +0000)]
Add #include <inttypes.h> for the strtoimax().

Submitted by: Jilles Tjoelker <jilles stack nl>
MFC after: 3 days

15 years agoAdd additional udbinfo and inpcb locking assertions to udp_output(); for
rwatson [Mon, 7 Jul 2008 12:14:10 +0000 (12:14 +0000)]
Add additional udbinfo and inpcb locking assertions to udp_output(); for
some code paths, global or inpcb write locks are required, but for other
code paths, read locks or no locking at all are sufficient for the data
structures.

MFC after: 1 month

15 years agoAdd missing information for geom_mirror metadata.
remko [Mon, 7 Jul 2008 11:44:57 +0000 (11:44 +0000)]
Add missing information for geom_mirror metadata.

PR: 124434
Submitted by: Philip M. Golluci <pgolluci at p6m7g8 dot com>
MFC after: 3 days

Prodded through: bugbusters@

15 years agoFirst step towards parallel transmit in UDP: if neither a specific
rwatson [Mon, 7 Jul 2008 10:56:55 +0000 (10:56 +0000)]
First step towards parallel transmit in UDP: if neither a specific
source or a specific destination address is requested as part of a send
on a UDP socket, read lock the inpcb rather than write lock it.  This
will allow fully parallel transmit down to the IP layer when sending
simultaneously from multiple threads on a connected UDP socket.

Parallel transmit for more complex cases, such as when sendto(2) is
invoked with an address and there's already a local binding, will
follow.

MFC after: 1 month

15 years agoDrop read lock on udbinfo earlier during delivery to the last matching
rwatson [Mon, 7 Jul 2008 10:11:17 +0000 (10:11 +0000)]
Drop read lock on udbinfo earlier during delivery to the last matching
UDP socket for a datagram; the inpcb read lock is sufficient to provide
inpcb stability during udp6_append().

MFC after:      1 month

15 years agoApply learning from RAIEC (Redundant Array of Independeng English Courses)
phk [Mon, 7 Jul 2008 10:04:16 +0000 (10:04 +0000)]
Apply learning from RAIEC (Redundant Array of Independeng English Courses)
kindly provided by four different correspondents since my last commit.

15 years agoThe kqueue_register() function assumes that it is called from the top of
kib [Mon, 7 Jul 2008 09:30:11 +0000 (09:30 +0000)]
The kqueue_register() function assumes that it is called from the top of
the syscall code and acquires various event subsystem locks as needed.
The handling of the NOTE_TRACK for EVFILT_PROC is currently done by
calling the kqueue_register() from filt_proc() filter, causing recursive
entrance of the kqueue code. This results in the LORs and recursive
acquisition of the locks.

Implement the variant of the knote() function designed to only handle
the fork() event. It mostly copies the knote() body, but also handles
the NOTE_TRACK, removing the handling from the filt_proc(), where it
causes problems described above. The function is called from the fork1()
instead of knote().

When encountering NOTE_TRACK knote, it marks the knote as influx
and drops the knlist and kqueue lock. In this context call to
kqueue_register is safe from the problems.

An error from the kqueue_register() is reported to the observer as
NOTE_TRACKERR fflag.

PR: 108201
Reviewed by: jhb, Pramod Srinivasan <pramod juniper net> (previous version)
Discussed with: jmg
Tested by: pho
MFC after: 2 weeks

15 years agoUpdate man page for addition of BIOCSETFNR. Subversion didn't want
dwmalone [Mon, 7 Jul 2008 09:27:02 +0000 (09:27 +0000)]
Update man page for addition of BIOCSETFNR. Subversion didn't want
to commit this at the same time for some reason.

15 years agoDrop read lock on udbinfo earlier during delivery to the last matching
rwatson [Mon, 7 Jul 2008 09:26:52 +0000 (09:26 +0000)]
Drop read lock on udbinfo earlier during delivery to the last matching
UDP socket for a datagram; the inpcb read lock is sufficient to provide
inpcb stability during udp_append().

MFC after: 1 month

15 years agoAdd a new ioctl for changing the read filter (BIOCSETFNR). This is
dwmalone [Mon, 7 Jul 2008 09:25:49 +0000 (09:25 +0000)]
Add a new ioctl for changing the read filter (BIOCSETFNR). This is
just like BIOCSETF but it doesn't drop all the packets buffered on
the discriptor and reset the statistics.

Also, when setting the write filter, don't drop packets waiting to
be read or reset the statistics.

PR: 118486
Submitted by: Matthew Luckie <mluckie@cs.waikato.ac.nz>
MFC after: 1 month

15 years agoThe r178914 I erronously put the setting of the KQ_FLUXWAIT flag before
kib [Mon, 7 Jul 2008 09:15:29 +0000 (09:15 +0000)]
The r178914 I erronously put the setting of the KQ_FLUXWAIT flag before
KQ_FLUX_WAKEUP(). Since the later macro clears the KQ_FLUXWAIT, the
kqueue_scan() thread may be not woken up.

Move the setting of KQ_FLUXWAIT after wakeup to correct the issue.

Reported and tested by: pho
MFC after: 3 days

15 years agocorrect device name errors and wrong informations that currently malo(4)
weongyo [Mon, 7 Jul 2008 02:39:39 +0000 (02:39 +0000)]
correct device name errors and wrong informations that currently malo(4)
don't support ad-hoc mode and there's no a man page like malofw(4).

15 years agoAdd hard sentence breaks.
csjp [Sun, 6 Jul 2008 22:47:10 +0000 (22:47 +0000)]
Add hard sentence breaks.

Pointed out by: rwatson
MFC after: 1 week