]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoAdd tests for r193169.
Stefan Farfeleder [Sun, 31 May 2009 17:23:27 +0000 (17:23 +0000)]
Add tests for r193169.

15 years agoUnbreak buildworld.
Marko Zec [Sun, 31 May 2009 15:41:46 +0000 (15:41 +0000)]
Unbreak buildworld.

(not waiting for an approval from mentor (julian) due to emergency)

15 years agoUnlock the pseudofs vnode before calling fill method for pfs_readlink().
Konstantin Belousov [Sun, 31 May 2009 15:01:50 +0000 (15:01 +0000)]
Unlock the pseudofs vnode before calling fill method for pfs_readlink().
The fill code may need to lock another vnode, e.g. procfs file
implementation.

Reviewed by: des
Tested by: pho
MFC after: 2 weeks

15 years agoImplement the bypass routine for VOP_VPTOCNP in nullfs.
Konstantin Belousov [Sun, 31 May 2009 14:58:43 +0000 (14:58 +0000)]
Implement the bypass routine for VOP_VPTOCNP in nullfs.
Among other things, this makes procfs <pid>/file working for executables
started from nullfs mount.

Tested by: pho
PR: 94269, 104938

15 years agoEliminate code duplication in vn_fullpath1() around the cache lookups
Konstantin Belousov [Sun, 31 May 2009 14:57:43 +0000 (14:57 +0000)]
Eliminate code duplication in vn_fullpath1() around the cache lookups
and calls to vn_vptocnp() by moving more of the common code to
vn_vptocnp(). Rename vn_vptocnp() to vn_vptocnp_locked() to signify that
cache is locked around the call.

Do not track buffer position by both the pointer and offset, use only
buflen to record the start of the free space.

Export vn_vptocnp() for external consumers as a wrapper around
vn_vptocnp_locked() that locks the cache and handles hold counts.

Tested by: pho

15 years agoDo not drop vnode interlock in null_checkvp(). null_lock() verifies that
Konstantin Belousov [Sun, 31 May 2009 14:54:20 +0000 (14:54 +0000)]
Do not drop vnode interlock in null_checkvp(). null_lock() verifies that
v_data is not-null before calling NULLVPTOLOWERVP(), and dropping the
interlock allows for reclaim to clean v_data and free the memory.

While there, remove unneeded semicolons and convert the infinite loops
to panics. I have a will to remove null_checkvp() altogether, or leave
it as a trivial stub, but not now.

Reported and tested by: pho

15 years agoLock the real null vnode lock before substitution of vp->v_vnlock.
Konstantin Belousov [Sun, 31 May 2009 14:52:45 +0000 (14:52 +0000)]
Lock the real null vnode lock before substitution of vp->v_vnlock.
This should not really matter for correctness, since vp->v_lock is
not locked before the call, and null_lock() holds the interlock,
but makes the control flow for reclaim more clear.

Tested by: pho

15 years agoAdd a NO_SYNCHRONIZE_CACHE quirk for an AIPTEK2
Daniel Eischen [Sun, 31 May 2009 14:48:51 +0000 (14:48 +0000)]
Add a NO_SYNCHRONIZE_CACHE quirk for an AIPTEK2
part identified as Sunplus Technology Inc.  This
happens to sit in a Rosewill RX81U-ES-25A 2.5" SATA
to USB 2.0 external enclosure.

Reviewed by:    Hans Petter Selasky

15 years agoFix the eval command in combination with set -e. Before this change the shell
Stefan Farfeleder [Sun, 31 May 2009 12:36:14 +0000 (12:36 +0000)]
Fix the eval command in combination with set -e.  Before this change the shell
would always terminate if eval returned with a non-zero exit status regardless
if the status was actually tested.  Unfortunately a new file-scope variable
is needed, the alternative would only be to add a new parameter to all
built-ins.

PR: 134881

15 years agoImplement a variation of the socketpair() syscall which takes a flags
Dmitry Chagin [Sun, 31 May 2009 12:16:31 +0000 (12:16 +0000)]
Implement a variation of the socketpair() syscall which takes a flags
in addition to the type argument.

Approved by: kib (mentor)
MFC after: 1 month

15 years agoSplit native socketpair() syscall onto kern_socketpair() which should
Dmitry Chagin [Sun, 31 May 2009 12:12:38 +0000 (12:12 +0000)]
Split native socketpair() syscall onto kern_socketpair() which should
be used by kernel consumers and socketpair() itself.

Approved by: kib (mentor)
MFC after: 1 month

15 years agoIntroduce an interm userland-kernel API for creating vnets and
Marko Zec [Sun, 31 May 2009 12:10:04 +0000 (12:10 +0000)]
Introduce an interm userland-kernel API for creating vnets and
assigning ifnets from one vnet to another.  Deletion of vnets is not
yet supported.

The interface is implemented as an ioctl extension so that no syscalls
had to be introduced.  This should be acceptable given that the new
interface will be used for a short / interim period only, until the
new jail management framwork gains the capability of managing vnets.
This method for managing vimages / vnets has been in use for the past
7 years without any observable issues.

The userland tool to be used in conjunction with the interim API can be
found in p4: //depot/projects/vimage-commit2/src/usr.sbin/vimage/... and
will most probably never get commited to svn.

While here, bump copyright notices in kern_vimage.c and vimage.h to
cover work done in year 2009.

Approved by: julian (mentor)
Discussed with: bz, rwatson

15 years agoMove new socket flags handling into a separate function as Linux
Dmitry Chagin [Sun, 31 May 2009 12:04:01 +0000 (12:04 +0000)]
Move new socket flags handling into a separate function as Linux
introduced more syscalls which uses these flags.

Approved by: kib (mentor)
MFC after: 1 month

15 years agoRemove empty lines.
Dmitry Chagin [Sun, 31 May 2009 12:00:16 +0000 (12:00 +0000)]
Remove empty lines.

Approved by: kib (mentor)
MFC after: 1 month

15 years agoAllow the bootfs property to be set for raidz pools on FreeBSD.
Doug Rabson [Sun, 31 May 2009 11:59:32 +0000 (11:59 +0000)]
Allow the bootfs property to be set for raidz pools on FreeBSD.

Reviewed by: pjd

15 years agoUnbreak options VIMAGE kernel builds.
Marko Zec [Sun, 31 May 2009 11:57:51 +0000 (11:57 +0000)]
Unbreak options VIMAGE kernel builds.

Approved by: julian (mentor)

15 years agoTeach powerd how to query the PMU AC line state on PowerPC.
Nathan Whitehorn [Sun, 31 May 2009 10:27:24 +0000 (10:27 +0000)]
Teach powerd how to query the PMU AC line state on PowerPC.

15 years agoProvide an analogous sysctl to hw.acpi.acline (dev.pmu.0.acline) to
Nathan Whitehorn [Sun, 31 May 2009 10:02:20 +0000 (10:02 +0000)]
Provide an analogous sysctl to hw.acpi.acline (dev.pmu.0.acline) to
determine whether the computer is plugged in to mains power.

15 years agoUpgrade audit(4) from experimental to production status for FreeBSD 8.0.
Robert Watson [Sun, 31 May 2009 09:03:14 +0000 (09:03 +0000)]
Upgrade audit(4) from experimental to production status for FreeBSD 8.0.
While there remain some incomplete aspects of the implementation (such
as incomplete auditing of some system calls), the implementation has
been burned in for a few years, as well as in GENERIC for a few years.

Obtained from: TrustedBSD Project

15 years agoIntroduce support for cpufreq on PowerPC with the dynamic frequency
Nathan Whitehorn [Sun, 31 May 2009 09:01:23 +0000 (09:01 +0000)]
Introduce support for cpufreq on PowerPC with the dynamic frequency
switching capabilities of the MPC7447A and MPC7448.

15 years agoProvide a new CPU device driver ivar to report the nominal speed of the
Nathan Whitehorn [Sun, 31 May 2009 08:59:15 +0000 (08:59 +0000)]
Provide a new CPU device driver ivar to report the nominal speed of the
CPU, if available. This is meant to solve the issue of cpufreq misreporting
speeds on CPUs that boot in a reduced power mode and have only relative
speed control.

15 years agoFix the MP IPI code to differentiate between bitmapped IPIs and function IPIs.
Adrian Chadd [Sun, 31 May 2009 08:11:39 +0000 (08:11 +0000)]
Fix the MP IPI code to differentiate between bitmapped IPIs and function IPIs.

This attempts to fix the IPI handling code to correctly differentiate
between bitmapped IPIs and function IPIs. The Xen IPIs were on low numbers
which clashed with the bitmapped IPIs.

This commit bumps those IPI numbers up to 240 and above (just like in the i386
code) and fiddles with the ipi_vectors[] logic to call the correct function.

This still isn't "right". Specifically, the IPI code may work fine for TLB
shootdown events but the rendezvous/lazypmap IPIs are thrown by calling ipi_*()
routines which don't set the call_func stuff (function id, addr1, addr2) that
the TLB shootdown events are. So the Xen SMP support is still broken.

PR: 135069

15 years agoRemove some unused code in ipi_selected() .
Adrian Chadd [Sun, 31 May 2009 07:25:24 +0000 (07:25 +0000)]
Remove some unused code in ipi_selected() .

The code path this was copied from (sys/i386/i386/mp_machdep.c:ipi_selected())
handles bitmap'ed IPIs and normal IPIs via separate notification paths. Xen
SMP handles them the same way.

15 years agoUpdate BIND to version 9.6.1rc1. This version has better performance and
Doug Barton [Sun, 31 May 2009 05:44:21 +0000 (05:44 +0000)]
Update BIND to version 9.6.1rc1. This version has better performance and
lots of new features compared to 9.4.x, including:

Full NSEC3 support
Automatic zone re-signing
New update-policy methods tcp-self and 6to4-self
DHCID support.
More detailed statistics counters including those supported in BIND 8.
Faster ACL processing.
Efficient LRU cache-cleaning mechanism.
NSID support.

15 years agoUpdate BIND to version 9.6.1rc1. This version has better performance and
Doug Barton [Sun, 31 May 2009 05:42:58 +0000 (05:42 +0000)]
Update BIND to version 9.6.1rc1. This version has better performance and
lots of new features compared to 9.4.x, including:

Full NSEC3 support
Automatic zone re-signing
New update-policy methods tcp-self and 6to4-self
DHCID support.
More detailed statistics counters including those supported in BIND 8.
Faster ACL processing.
Efficient LRU cache-cleaning mechanism.
NSID support.

15 years agoUse GCC's __SOFTFP__ to test whether we're being compiled
Marcel Moolenaar [Sun, 31 May 2009 02:03:40 +0000 (02:03 +0000)]
Use GCC's __SOFTFP__ to test whether we're being compiled
with softfloat or not. Now -msoft-float can be overridden
more easily.

15 years agoMark the cascaded AT interrupt handler as MP safe to avoid having
Marcel Moolenaar [Sun, 31 May 2009 01:56:06 +0000 (01:56 +0000)]
Mark the cascaded AT interrupt handler as MP safe to avoid having
it grab Giant. The next step would be to make it a filter.

15 years agoVendor import of BIND 9.6.1rc1
Doug Barton [Sun, 31 May 2009 00:11:36 +0000 (00:11 +0000)]
Vendor import of BIND 9.6.1rc1

15 years agoUpdate relative to the BIND 9.6.1rc1 import
Doug Barton [Sun, 31 May 2009 00:03:41 +0000 (00:03 +0000)]
Update relative to the BIND 9.6.1rc1 import

15 years agoRemove the now invalid (and possibly unused) debug.mpsafevfs
Attilio Rao [Sat, 30 May 2009 23:52:23 +0000 (23:52 +0000)]
Remove the now invalid (and possibly unused) debug.mpsafevfs
sysctl/tunable.

Reviewed by: emaste
Sponsored by: Sandvine Incorporated

15 years agoIn preparation for the BIND 9.6.1rc1 import, remove this file.
Doug Barton [Sat, 30 May 2009 23:51:02 +0000 (23:51 +0000)]
In preparation for the BIND 9.6.1rc1 import, remove this file.
We don't use it.

15 years agoIn preparation for the BIND 9.6.1rc1 import, remove this directory.
Doug Barton [Sat, 30 May 2009 23:50:12 +0000 (23:50 +0000)]
In preparation for the BIND 9.6.1rc1 import, remove this directory.
The libbind library is no longer distributed as part of the main
BIND package, and we never built it in any case.

15 years agoIn preparation for the BIND 9.6.1rc1 import, remove these two directories.
Doug Barton [Sat, 30 May 2009 23:48:09 +0000 (23:48 +0000)]
In preparation for the BIND 9.6.1rc1 import, remove these two directories.
We do not install these files so there is little use to keeping them in
the tree, and the drafts directory in particular is the source of a lot
of churn for each new version.

15 years agoCrank the debug level necessary to display the "Label foo is removed"
Doug Barton [Sat, 30 May 2009 22:31:52 +0000 (22:31 +0000)]
Crank the debug level necessary to display the "Label foo is removed"
and "Label for provider ..." messages up from 0 to 1.

15 years agofix xdrmem_control to be safe in an if statement
Kip Macy [Sat, 30 May 2009 22:23:58 +0000 (22:23 +0000)]
fix xdrmem_control to be safe in an if statement
fix zfs to depend on krpc
remove xdr from zfs makefile

Submitted by: dchagin@freebsd.org

15 years agoEliminate a stale comment and the two remaining uses of the "register"
Alan Cox [Sat, 30 May 2009 22:15:55 +0000 (22:15 +0000)]
Eliminate a stale comment and the two remaining uses of the "register"
keyword in this file.

15 years agoAdd a check to v_type == VREG for the recently modified code that
Rick Macklem [Sat, 30 May 2009 22:11:12 +0000 (22:11 +0000)]
Add a check to v_type == VREG for the recently modified code that
does NFSv4 Closes in the experimental client's VOP_INACTIVE().
I also replaced a bunch of ap->a_vp with a local copy of vp,
because I thought that made it more readable.

Approved by: kib (mentor)

15 years agoAdd assertions in two places where a page's valid or dirty bits are changed.
Alan Cox [Sat, 30 May 2009 22:06:58 +0000 (22:06 +0000)]
Add assertions in two places where a page's valid or dirty bits are changed.

15 years agog_part_ebr.c includes opt_geom.h
Marcel Moolenaar [Sat, 30 May 2009 22:04:18 +0000 (22:04 +0000)]
g_part_ebr.c includes opt_geom.h

15 years agoSmall cleanup, add (spurious) quotation marks around the value
Doug Barton [Sat, 30 May 2009 21:51:38 +0000 (21:51 +0000)]
Small cleanup, add (spurious) quotation marks around the value
for name= to make these scripts consistent with the rest.

15 years agoNow that the last of the *.sh scripts are gone from the base,
Doug Barton [Sat, 30 May 2009 21:41:54 +0000 (21:41 +0000)]
Now that the last of the *.sh scripts are gone from the base,
emit a warning if come across one.

15 years agodistribute sysctl decls so global variables can be made static
Sam Leffler [Sat, 30 May 2009 20:11:23 +0000 (20:11 +0000)]
distribute sysctl decls so global variables can be made static

15 years agoo assert TDMA_MAXSLOTS is 2 so noone tries to blindly increase it
Sam Leffler [Sat, 30 May 2009 19:57:31 +0000 (19:57 +0000)]
o assert TDMA_MAXSLOTS is 2 so noone tries to blindly increase it
o add safety belt in vdetach for failed state block allocation
o fix dynamic change to tdma config; ERESTART may not result in
  kicking the state machine so we need to explicitly mark the
  beacon for update

Sponsored by:

15 years agoRemoval of early.sh
Doug Barton [Sat, 30 May 2009 19:39:57 +0000 (19:39 +0000)]
Removal of early.sh

15 years agoAs previously advertised, remove this script prior to the 8.0 branch.
Doug Barton [Sat, 30 May 2009 19:38:51 +0000 (19:38 +0000)]
As previously advertised, remove this script prior to the 8.0 branch.

15 years agoFix NETIF_DEBUG compilation.
Marcel Moolenaar [Sat, 30 May 2009 19:28:38 +0000 (19:28 +0000)]
Fix NETIF_DEBUG compilation.

15 years agowork around snapshot shutdown race reported by Henri Hennebert
Kip Macy [Sat, 30 May 2009 19:26:35 +0000 (19:26 +0000)]
work around snapshot shutdown race reported by Henri Hennebert

15 years agoPrint the returned port number when RPC_DEBUG is defined.
Marcel Moolenaar [Sat, 30 May 2009 19:23:09 +0000 (19:23 +0000)]
Print the returned port number when RPC_DEBUG is defined.
This improves debugging.

15 years agoUnbreak build.
Attilio Rao [Sat, 30 May 2009 18:39:22 +0000 (18:39 +0000)]
Unbreak build.

Pointy hat to: attilio

15 years agomaintain existing style
Sam Leffler [Sat, 30 May 2009 18:23:55 +0000 (18:23 +0000)]
maintain existing style

15 years agoFix return values appropriately.
Attilio Rao [Sat, 30 May 2009 17:56:19 +0000 (17:56 +0000)]
Fix return values appropriately.

Tested by: zec

15 years agoInclude libmd and libcrypto in DPADD
Tim Kientzle [Sat, 30 May 2009 17:26:55 +0000 (17:26 +0000)]
Include libmd and libcrypto in DPADD

15 years agos/rk_npkts/rx_npkts
Attilio Rao [Sat, 30 May 2009 17:25:14 +0000 (17:25 +0000)]
s/rk_npkts/rx_npkts

Reported by: zec

15 years agoEven though I'm not quite sure that the call_func stuff will work properly
Adrian Chadd [Sat, 30 May 2009 15:20:25 +0000 (15:20 +0000)]
Even though I'm not quite sure that the call_func stuff will work properly
in all the places/cases IPI messages will be generated, at least be consistent
with how the call_data pointer is assigned and cleared (ie, all done inside
the spinlock.

Ensure that its NULL before continuing, just to try and identify situations
where things are going horribly wrong.

15 years agoWhen user_frac in the polling subsystem is low it is going to busy the
Attilio Rao [Sat, 30 May 2009 15:14:44 +0000 (15:14 +0000)]
When user_frac in the polling subsystem is low it is going to busy the
CPU for too long period than necessary.  Additively, interfaces are kept
polled (in the tick) even if no more packets are available.
In order to avoid such situations a new generic mechanism can be
implemented in proactive way, keeping track of the time spent on any
packet and fragmenting the time for any tick, stopping the processing
as soon as possible.

In order to implement such mechanism, the polling handler needs to
change, returning the number of packets processed.
While the intended logic is not part of this patch, the polling KPI is
broken by this commit, adding an int return value and the new flag
IFCAP_POLLING_NOCOUNT (which will signal that the return value is
meaningless for the installed handler and checking should be skipped).

Bump __FreeBSD_version in order to signal such situation.

Reviewed by: emaste
Sponsored by: Sandvine Incorporated

15 years agoDon't schedule a CALL_FUNCTION_VECTOR software IPI if the IPI was signaled
Adrian Chadd [Sat, 30 May 2009 14:59:08 +0000 (14:59 +0000)]
Don't schedule a CALL_FUNCTION_VECTOR software IPI if the IPI was signaled
via the bitmap (and thus sent via RESCHEDULE_VECTOR.)

15 years agoBump __FreeBSD_version after addition of VOP_ACCESSX(9).
Edward Tomasz Napierala [Sat, 30 May 2009 14:01:01 +0000 (14:01 +0000)]
Bump __FreeBSD_version after addition of VOP_ACCESSX(9).

15 years agoAdd VOP_ACCESSX, which can be used to query for newly added V*
Edward Tomasz Napierala [Sat, 30 May 2009 13:59:05 +0000 (13:59 +0000)]
Add VOP_ACCESSX, which can be used to query for newly added V*
permissions, such as VWRITE_ACL.  For a filsystems that don't
implement it, there is a default implementation, which works
as a wrapper around VOP_ACCESS.

Reviewed by: rwatson@

15 years agoAdds missing sysctl to manage the vtag_time_wait time. This will
Randall Stewart [Sat, 30 May 2009 11:14:41 +0000 (11:14 +0000)]
Adds missing sysctl to manage the vtag_time_wait time. This will
even allow disabling time-wait all together if you set the value
to 0 (not advisable actually). The default remains the same
i.e. 60 seconds.

15 years agoFix a small memory leak from the nr-sack code - the mapping array
Randall Stewart [Sat, 30 May 2009 10:56:27 +0000 (10:56 +0000)]
Fix a small memory leak from the nr-sack code - the mapping array
was not being freed at term of association. Also get rid of
the MICHAELS_EXP code.

15 years agoMake sctp_uio user to kernel structure match the
Randall Stewart [Sat, 30 May 2009 10:50:40 +0000 (10:50 +0000)]
Make sctp_uio user to kernel structure match the
socket-api draft. Two fields were uint32_t when they
should have been uint16_t.

Reported by Jonathan Leighton at U-del.

15 years agorm, find -delete: fix removing symlinks with uchg/uappnd set.
Jilles Tjoelker [Sat, 30 May 2009 10:42:19 +0000 (10:42 +0000)]
rm, find -delete: fix removing symlinks with uchg/uappnd set.

Formerly, this tried to clear the flags on the symlink's target
instead of the symlink itself.

As before, this only happens for root or for the unlink(1) variant of rm.

PR: bin/111226 (part of)
Submitted by: Martin Kammerhofer
Approved by: ed (mentor)
MFC after: 3 weeks

15 years agoPreserve file flags on symlinks in cp -Rp.
Jilles Tjoelker [Sat, 30 May 2009 10:36:14 +0000 (10:36 +0000)]
Preserve file flags on symlinks in cp -Rp.
This reported ENOSYS before.

PR: bin/111226 (part of)
Submitted by: Martin Kammerhofer
Approved by: ed (mentor)
MFC after: 3 weeks

15 years agoMake ipi_cpu() function as intended.
Adrian Chadd [Sat, 30 May 2009 08:53:13 +0000 (08:53 +0000)]
Make ipi_cpu() function as intended.

IPI's in Xen are implemented through hypervisor event channels.
The MP code creates a pair of IRQs for each base IPI per CPU
(one for IPI function dispatch calls, one for IPI bitmap dispatch calls.)
Using PCPU_GET() was returning the IRQ of the IPI handler for the
current CPU; thus calls to ipi_cpu() were sending itself a message.
Instead, looking up the IPI in the target CPU ipi-to-irq map is needed.

Note: This doesn't fix Xen SMP (far from it!) but it at least
sends IPI's to the right places. Next - sending IPIs..

PR: 135069

15 years agoAttempt to fix build by updating hostid to follow the new world order.
Xin LI [Sat, 30 May 2009 07:33:32 +0000 (07:33 +0000)]
Attempt to fix build by updating hostid to follow the new world order.

15 years agoLink libarchive against -lmd and -lcrypto.
Tim Kientzle [Sat, 30 May 2009 07:08:16 +0000 (07:08 +0000)]
Link libarchive against -lmd and -lcrypto.

Thanks to Ed Schouten for the clue.

15 years agoCorrectly report the IPI IRQs being created; make it clear what vectors they are...
Adrian Chadd [Sat, 30 May 2009 06:37:03 +0000 (06:37 +0000)]
Correctly report the IPI IRQs being created; make it clear what vectors they are for.

15 years agofix typo
Sam Leffler [Sat, 30 May 2009 01:33:05 +0000 (01:33 +0000)]
fix typo

15 years agoRevert the size_t part of the last commit for the moment, this blows up the
Andrew Thompson [Sat, 30 May 2009 00:22:57 +0000 (00:22 +0000)]
Revert the size_t part of the last commit for the moment, this blows up the
USB_ADD_BYTES macro.

15 years agovalidate tx rate(s) in the raw xmit path
Sam Leffler [Fri, 29 May 2009 23:41:31 +0000 (23:41 +0000)]
validate tx rate(s) in the raw xmit path

Tested by: "Paul B. Mahol" <onemda@gmail.com> (rum, bwi)

15 years agoadd ieee80211_isratevalid
Sam Leffler [Fri, 29 May 2009 23:39:16 +0000 (23:39 +0000)]
add ieee80211_isratevalid

15 years agoCode cleanup for nfs4 utilities:
Xin LI [Fri, 29 May 2009 22:19:45 +0000 (22:19 +0000)]
Code cleanup for nfs4 utilities:

 - Mark internal routines as static;
 - Eliminate unused parameters where possible, mark __unused for others;
 - Remove unused variables;
 - Use %jd for int64_t values in printf();
 - Add appropriate %d for printf to match its parameter;
 - Rename a variable to resolve conflict with revoke(2);

Reviewed by: rmacklem
Tested with: make universe (bugs are mine)

15 years agoFix function arguments were previously they matched the typedef by accident.
Andrew Thompson [Fri, 29 May 2009 22:11:22 +0000 (22:11 +0000)]
Fix function arguments were previously they matched the typedef by accident.

15 years agoPlace hostnames and similar information fully under the prison system.
Jamie Gritton [Fri, 29 May 2009 21:27:12 +0000 (21:27 +0000)]
Place hostnames and similar information fully under the prison system.
The system hostname is now stored in prison0, and the global variable
"hostname" has been removed, as has the hostname_mtx mutex.  Jails may
have their own host information, or they may inherit it from the
parent/system.  The proper way to read the hostname is via
getcredhostname(), which will copy either the hostname associated with
the passed cred, or the system hostname if you pass NULL.  The system
hostname can still be accessed directly (and without locking) at
prison0.pr_host, but that should be avoided where possible.

The "similar information" referred to is domainname, hostid, and
hostuuid, which have also become prison parameters and had their
associated global variables removed.

Approved by: bz (mentor)

15 years agoFix some inaccuracies in the extensible parameter addition.
Jamie Gritton [Fri, 29 May 2009 21:17:22 +0000 (21:17 +0000)]
Fix some inaccuracies in the extensible parameter addition.

Approved by: bz (mentor)

15 years ago- Use sig_atomic_t for signal handler variables.
Ulf Lilleengen [Fri, 29 May 2009 20:01:50 +0000 (20:01 +0000)]
- Use sig_atomic_t for signal handler variables.

MFC after: 1 week

15 years agoo Add missed quotation mark.
Maxim Konovalov [Fri, 29 May 2009 19:45:39 +0000 (19:45 +0000)]
o Add missed quotation mark.

15 years ago- Move from mount(2) to nmount(2). This should allow to convert MNT_SNAPSHOT
Pawel Jakub Dawidek [Fri, 29 May 2009 19:18:41 +0000 (19:18 +0000)]
- Move from mount(2) to nmount(2). This should allow to convert MNT_SNAPSHOT
  flag from a mount flag to FS-specific flag.
- Simplify usage. Instead of 'mksnap_ffs /mnt/foo /mnt/foo/snap' allow to
  give only one argument: 'mksnap_ffs /mnt/foo/snap'. Old usage is also
  accepted for now.
- Add an example of how to mount a snapshot.

15 years agoUpdate __FreeBSD_version after addition of mnt_xflag. Add a note
Edward Tomasz Napierala [Fri, 29 May 2009 18:50:27 +0000 (18:50 +0000)]
Update __FreeBSD_version after addition of mnt_xflag.  Add a note
to UPDATING.

15 years agos/usb2_/usb_/ on all typedefs for the USB stack.
Andrew Thompson [Fri, 29 May 2009 18:46:57 +0000 (18:46 +0000)]
s/usb2_/usb_/ on all typedefs for the USB stack.

15 years agoModify vm_hold_load_pages() to allocate pages using VM_ALLOC_NOOBJ rather
Alan Cox [Fri, 29 May 2009 18:35:51 +0000 (18:35 +0000)]
Modify vm_hold_load_pages() to allocate pages using VM_ALLOC_NOOBJ rather
than using the kernel object.  This allows the elimination of page queues
locking from vm_hold_free_pages().

15 years ago- Prevent buffer overflow in IPFilter's load_http function used to load
Stanislav Sedov [Fri, 29 May 2009 16:24:23 +0000 (16:24 +0000)]
- Prevent buffer overflow in IPFilter's load_http function used to load
  ipfilter tables via http by the user-level ippool utility. Previously
  the 1024-byte buffer used to store a http request coudld easily overflow
  if the length of the hostname part of the url passes exceeded 496 bytes. [1]
- Use snprintf to prevent possieble buffer overflows in future. [2]
- Do not try to close the descriptor twice on failure. [2]

Reported by: Maksymilian Arciemowicz <cxib@securityreason.com> [1]
Obtained from: NetBSD CVS [2]
MFC after: 2 weeks

15 years agoFree device strings.
Andrew Thompson [Fri, 29 May 2009 16:15:56 +0000 (16:15 +0000)]
Free device strings.

Spotted by: HPS

15 years agoThere is only one spare MNT_ flag left, and I want to use it for NFSv4 ACLs.
Edward Tomasz Napierala [Fri, 29 May 2009 15:00:04 +0000 (15:00 +0000)]
There is only one spare MNT_ flag left, and I want to use it for NFSv4 ACLs.
Make room for additional filesystem flags now, to avoid breaking ABI later.

Reviewed by: kib@

15 years agoMinor style tweak.
Robert Watson [Fri, 29 May 2009 14:25:51 +0000 (14:25 +0000)]
Minor style tweak.

15 years agoSince sched_pin() and sched_unpin() are already inlined, don't manually
Robert Watson [Fri, 29 May 2009 14:20:10 +0000 (14:20 +0000)]
Since sched_pin() and sched_unpin() are already inlined, don't manually
inline in rmlocks.

15 years agoRemove extra cpu_spinwait() invocations. This should really only be used
John Baldwin [Fri, 29 May 2009 14:03:34 +0000 (14:03 +0000)]
Remove extra cpu_spinwait() invocations.  This should really only be used
in tight spin loops, not in these edge cases where we restart a much
larger loop only a few times.

Reviewed by: attilio

15 years agoTweak a few comments on adaptive spinning.
John Baldwin [Fri, 29 May 2009 13:56:34 +0000 (13:56 +0000)]
Tweak a few comments on adaptive spinning.

15 years agoRevert to 2-clause.
Adrian Chadd [Fri, 29 May 2009 13:48:42 +0000 (13:48 +0000)]
Revert to 2-clause.

15 years agoFix the Xen TOD update when the hypervisor wall clock is nudged.
Adrian Chadd [Fri, 29 May 2009 13:43:21 +0000 (13:43 +0000)]
Fix the Xen TOD update when the hypervisor wall clock is nudged.

The "wall clock" in the current code is actually the hypervisor start time.
The time of day is the "start time" plus the hypervisor "uptime".

Large enough bumps in the dom0 clock lead to a hypervisor "bump" which is
implemented as a bump in the start time, not the uptime. The clock.c routines
were reading in the hypervisor start time and then using this as the TOD.
This meant that any hypervisor time bump would cause the FreeBSD DomU to
set its TOD to the hypervisor start time, rather than the actual TOD.

This fix is a bit hacky and some reshuffling should be done later on
to clarify what is going on. I've left the wall clock code alone.
(The code which updates shadow_tv and shadow_tv_version.)
A new routine adds the uptime to the shadow_tv, which is then used to
update the TOD.

I've included some debugging so it is obvious when the clock is nudged.

PR: 135008

15 years agoMigrate the Xen hypervisor clock reading routines into something
Adrian Chadd [Fri, 29 May 2009 13:36:06 +0000 (13:36 +0000)]
Migrate the Xen hypervisor clock reading routines into something
sharable.

15 years agoMake the rmlock(9) interface a bit more like the rwlock(9) interface:
Robert Watson [Fri, 29 May 2009 10:52:37 +0000 (10:52 +0000)]
Make the rmlock(9) interface a bit more like the rwlock(9) interface:

- Add rm_init_flags() and accept extended options only for that variation.
- Add a flags space specifically for rm_init_flags(), rather than borrowing
  the lock_init() flag space.
- Define flag RM_RECURSE to use instead of LO_RECURSABLE.
- Define flag RM_NOWITNESS to allow an rmlock to be exempt from WITNESS
  checking; this wasn't possible previously as rm_init() always passed
  LO_WITNESS when initializing an rmlock's struct lock.
- Add RM_SYSINIT_FLAGS().
- Rename embedded mutex in rmlocks to make it more obvious what it is.
- Update consumers.
- Update man page.

15 years agoadds new device IDs.
Weongyo Jeong [Fri, 29 May 2009 10:10:23 +0000 (10:10 +0000)]
adds new device IDs.

PR: usb/135009
Submitted by: Bill Squire <billsf at 2600.COM>

15 years agoLet vfs_lookup() return ENOTDIR if the path has a trailing slash and
Dag-Erling Smørgrav [Fri, 29 May 2009 10:02:44 +0000 (10:02 +0000)]
Let vfs_lookup() return ENOTDIR if the path has a trailing slash and
the last component is a symlink to something that isn't a directory.

We introduce a new namei flag, TRAILINGSLASH, which is set by lookup()
if the last component is followed by a slash.  The trailing slash is
then stripped, as before.  If the final component is a symlink,
lookup() will return to namei(), which will expand the symlink and
call lookup() with the new path.  When all symlinks have been
resolved, lookup() checks if the TRAILINGSLASH flag is set, and if it
is, and the vnode it ended up with is not a directory, it returns
ENOTDIR.

PR: kern/21768
Submitted by: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
MFC after: 3 weeks

15 years agoFix misleading comment.
Dag-Erling Smørgrav [Fri, 29 May 2009 09:52:13 +0000 (09:52 +0000)]
Fix misleading comment.

MFC after: 1 week

15 years agoReduce vertical whitespace and other minor style tweaks.
Robert Watson [Fri, 29 May 2009 09:40:57 +0000 (09:40 +0000)]
Reduce vertical whitespace and other minor style tweaks.

Remove unused rm_initialized() macro.

15 years agoThe patch for r193011 was partially rejected when applied, complete it.
Attilio Rao [Fri, 29 May 2009 08:01:48 +0000 (08:01 +0000)]
The patch for r193011 was partially rejected when applied, complete it.

15 years agoDocument how to enable strict RFC 1034 enforcements.
Xin LI [Fri, 29 May 2009 07:55:44 +0000 (07:55 +0000)]
Document how to enable strict RFC 1034 enforcements.

PR: kern/129477

15 years agoAdd an option to enforce strict RFC 1034 compliance.
Xin LI [Fri, 29 May 2009 07:34:54 +0000 (07:34 +0000)]
Add an option to enforce strict RFC 1034 compliance.

PR: kern/129477

15 years agoMake dump -W show the level correctly.
Brian Somers [Fri, 29 May 2009 07:26:44 +0000 (07:26 +0000)]
Make dump -W show the level correctly.

PR: 129110
Submitted by: Mike Voorhis <mvoorhis@cs.wpi.edu>
MFC after: 3 weeks