]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoFix a whitespace nit.
lstewart [Thu, 6 Jan 2011 04:05:25 +0000 (04:05 +0000)]
Fix a whitespace nit.

MFC after: 1 week
X-MFC with: r216995

13 years agoAdd an entry to the gpart XML to determine if the geom has pending changes
nwhitehorn [Thu, 6 Jan 2011 03:36:04 +0000 (03:36 +0000)]
Add an entry to the gpart XML to determine if the geom has pending changes
that need to be committed (or undone).

MFC after: 2 weeks

13 years agoRemove leftover for r214093.
davidxu [Thu, 6 Jan 2011 03:30:16 +0000 (03:30 +0000)]
Remove leftover for r214093.

13 years agoRemove support for SKYEYE simulator
imp [Wed, 5 Jan 2011 23:45:07 +0000 (23:45 +0000)]
Remove support for SKYEYE simulator

13 years agosh: Do not call exitshell() from evalcommand() unless evalcommand() forked
jilles [Wed, 5 Jan 2011 23:17:29 +0000 (23:17 +0000)]
sh: Do not call exitshell() from evalcommand() unless evalcommand() forked
itself.

This ensures that certain traps caused by builtins are executed.

13 years agoUpdate firmware to more recent versions.
mjacob [Wed, 5 Jan 2011 23:15:22 +0000 (23:15 +0000)]
Update firmware to more recent versions.

MFC after: 3 months

13 years agoOn i386 and amd64, consistently use the following options whenever we
dim [Wed, 5 Jan 2011 22:24:33 +0000 (22:24 +0000)]
On i386 and amd64, consistently use the following options whenever we
want to avoid using any "advanced" CPU features:

  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float

13 years agoRemove ancient simulation code. Skyeye simulation never really worked
imp [Wed, 5 Jan 2011 22:15:57 +0000 (22:15 +0000)]
Remove ancient simulation code.  Skyeye simulation never really worked
quite right and hasn't been used in ages and is likely broken.  QEMU
with GUMSTIX is a more promising road to FreeBSD/arm in emulation
anyway.

Reviewed by: cognet@

13 years agoRemove an empty .if/.endif pair from sys/boot/ficl/Makefile that I
dim [Wed, 5 Jan 2011 22:12:06 +0000 (22:12 +0000)]
Remove an empty .if/.endif pair from sys/boot/ficl/Makefile that I
forgot to cleanup in the last commit.

13 years agoIn lib/libstand, sys/boot/ficl and sys/boot/zfs, -mno-sse3 should also
dim [Wed, 5 Jan 2011 22:00:37 +0000 (22:00 +0000)]
In lib/libstand, sys/boot/ficl and sys/boot/zfs, -mno-sse3 should also
be used for amd64, not just for i386.

13 years agoRemove superfluous -mno-(mmx|3dnow|sse|sse2|sse3) flags in Makefiles
dim [Wed, 5 Jan 2011 21:46:08 +0000 (21:46 +0000)]
Remove superfluous -mno-(mmx|3dnow|sse|sse2|sse3) flags in Makefiles
under sys/boot/{i386,pc98}, since these are already added via
sys/boot/{i386,pc98}/Makefile.inc.

Submitted by: arundel

13 years agoFix null string handling in ofw_real_nextprop function. Pass the right
andreast [Wed, 5 Jan 2011 21:38:02 +0000 (21:38 +0000)]
Fix null string handling in ofw_real_nextprop function. Pass the right
length to ofw_real_map in case of a null string.
This makes ofwdump(8) work correctly when trying to print all properties
with ofwdump -p.

Approved by: nwhitehorn (mentor)

13 years agoSort -mno-(mmx|3dnow|sse|sse2|sse3) options consistently throughout the
dim [Wed, 5 Jan 2011 21:23:26 +0000 (21:23 +0000)]
Sort -mno-(mmx|3dnow|sse|sse2|sse3) options consistently throughout the
tree.

Submitted by: arundel

13 years agoFix typo: March -> September.
osa [Wed, 5 Jan 2011 21:17:14 +0000 (21:17 +0000)]
Fix typo: March -> September.

13 years agoModify the experimental NFS server so that it calls
rmacklem [Wed, 5 Jan 2011 19:35:35 +0000 (19:35 +0000)]
Modify the experimental NFS server so that it calls
vn_start_write() with a non-NULL vp. That way it will
find the correct mount point mp and use that mp for the
subsequent vn_finished_write() call. Also, it should fail
without crashing if the mount point is being forced dismounted
because vn_start_write() will set the mp NULL via VOP_GETWRITEMOUNT().

Reviewed by: kib
MFC after: 12 days

13 years agoFix the experimental NFS server to use vfs_busyfs() instead
rmacklem [Wed, 5 Jan 2011 18:46:05 +0000 (18:46 +0000)]
Fix the experimental NFS server to use vfs_busyfs() instead
of vfs_getvfs() so that the mount point is busied for the
VFS_FHTOVP() call. This is analagous to r185432 for the
regular NFS server.

Reviewed by: kib
MFC after: 12 days

13 years agoThe camcontrol smppc option to clear a PHY error log is 'clearerrlog',
ken [Wed, 5 Jan 2011 18:27:38 +0000 (18:27 +0000)]
The camcontrol smppc option to clear a PHY error log is 'clearerrlog',
not 'clearerrorlog'.

13 years agoTeach ifconfig(8) the handy shared option shortcut aliases the NetBSD
marius [Wed, 5 Jan 2011 15:28:30 +0000 (15:28 +0000)]
Teach ifconfig(8) the handy shared option shortcut aliases the NetBSD
counterpart also takes, i.e. "fdx" for "full-duplex", "flow" for
"flowcontrol", "hdx" for "half-duplex" as well as "loop" and "loopback"
for "hw-loopback".

MFC after: 1 week

13 years agoFix whitespace.
marius [Wed, 5 Jan 2011 14:51:04 +0000 (14:51 +0000)]
Fix whitespace.

MFC after: 1 week

13 years agoRemove a redundant variable assignment found with the clang static analyzer.
marius [Wed, 5 Jan 2011 14:33:48 +0000 (14:33 +0000)]
Remove a redundant variable assignment found with the clang static analyzer.

MFC after: 1 week

13 years agoAdd a man page for the Object Specific Data (OSD) KPI.
lstewart [Wed, 5 Jan 2011 11:49:23 +0000 (11:49 +0000)]
Add a man page for the Object Specific Data (OSD) KPI.

Although not directly related the FreeBSD Foundation funded "Five New TCP
Congestion Control Algorithms for FreeBSD" project, the understanding and
inspiration required to write this documentation was significantly bolstered
by the Foundation's support.

Reviewed by: pjd
MFC after: 1 week

13 years agoFix page fault that occurred when trying to initialize preloaded kernel module,
trasz [Wed, 5 Jan 2011 09:58:41 +0000 (09:58 +0000)]
Fix page fault that occurred when trying to initialize preloaded kernel module,
the dependency of which was preloaded, but failed to initialize.  Previously,
kernel dereferenced NULL pointer returned by modlist_lookup2(); now, when this
happens, we unload the dependent module.  Since the depended_files list is
sorted in dependency order, this properly propagates, unloading modules that
depend on failed ones.

From the user point of view, this prevents the kernel from panicing when
trying to boot kernel compiled without KDTRACE_HOOKS with dtraceall_load="YES"
in /boot/loader.conf.

Reviewed by: kib

13 years agoGlen Barber is co-mentored by me and jkois, so add another
keramida [Wed, 5 Jan 2011 09:45:20 +0000 (09:45 +0000)]
Glen Barber is co-mentored by me and jkois, so add another
relationship edge to the committer graph to show this.

13 years agoAdd gjb to the doc committer graph, as my current mentee.
keramida [Wed, 5 Jan 2011 09:43:04 +0000 (09:43 +0000)]
Add gjb to the doc committer graph, as my current mentee.

13 years agoFix typo in default config file.
jpaetzel [Tue, 4 Jan 2011 23:00:54 +0000 (23:00 +0000)]
Fix typo in default config file.

Approved by: Warner Losh <imp@FreeBSD.org>
MFC after: 3 days

13 years agoUpdate committers-doc.dot, noving doc committer alumni into the alumni
gavin [Tue, 4 Jan 2011 22:56:18 +0000 (22:56 +0000)]
Update committers-doc.dot, noving doc committer alumni into the alumni
section and recording the date these commit bits were returned.  Also, sort
the remaining entries, and add a node for mheinen, who is already referenced
within the mentor relationships.

Other doc committers are encouraged to add themselves, and any mentor/mentee
relationships.  The current rendered output is available at
http://people.freebsd.org/~gavin/comm-doc.png

13 years agoOn amd64 and i386, tell the compiler to refrain from generating SSE,
dim [Tue, 4 Jan 2011 20:51:28 +0000 (20:51 +0000)]
On amd64 and i386, tell the compiler to refrain from generating SSE,
3DNow, MMX and floating point instructions in rtld-elf.

Otherwise, _rtld_bind() (and whatever it calls) could possibly clobber
function arguments that are passed in SSE/3DNow/MMX/FP registers,
usually floating point values.  This can happen, for example, when clang
generates SSE code for memset() or memcpy() calls.

One symptom of this is sshd dying early on amd64 with "PRNG not seeded",
which is ultimately caused by libcrypto.so.6 calling RAND_add() with a
double parameter.  That parameter is passed via %xmm0, which gets wiped
out by an SSE memset() in _rtld_bind().

Reviewed by: kib, kan

13 years agoRemove '-elf' from build flags for libexec/rtld-elf for amd64 and i386.
dim [Tue, 4 Jan 2011 20:26:41 +0000 (20:26 +0000)]
Remove '-elf' from build flags for libexec/rtld-elf for amd64 and i386.
ELF has been the default format for almost 12 years now.

13 years agoLimit hardware bug workaround to controllers that have 4GB boundary
yongari [Tue, 4 Jan 2011 20:06:26 +0000 (20:06 +0000)]
Limit hardware bug workaround to controllers that have 4GB boundary
bug instead of blindly applying it to all controllers.

Pointed out by: marius
MFC after: 3 days

13 years agoCorrect an 8-year-old typo which reliably leads to typo after typo today:
jmallett [Tue, 4 Jan 2011 19:32:03 +0000 (19:32 +0000)]
Correct an 8-year-old typo which reliably leads to typo after typo today:

The macros here for generating coprocessor 0 accessors are named like:

MIPS_RDRW32_COP0

That macro would produce mips_rd_<register>() and mips_wr_<register>()
inlines to access the specified register by name from C.  The problem is that
the R and the W were swapped in the macros originally; it was meant to be named
RDWR because it generated mips_rd_* and mips_wr_* functions, but was instead
spelled RDRW, which nobody should be expected to get right by anything other
than copy and paste.

It's too many consonants in a row to keep straight anyway, so just prefer e.g.:

MIPS_RW32_COP0

While here, add a missing #undef.

13 years agoOLDCARD is long gone.
bschmidt [Tue, 4 Jan 2011 19:26:11 +0000 (19:26 +0000)]
OLDCARD is long gone.

Discussed with: imp

13 years agoPartially revert change made in r212061. r212061 relied on
yongari [Tue, 4 Jan 2011 19:10:54 +0000 (19:10 +0000)]
Partially revert change made in r212061. r212061 relied on
bus_dma(9)'s capability which honors boundary restrictions of DMA
tag for dynamic buffers. However it seems this does not work well
and it triggered watchodg timeouts on controller that has the
hardware bug. It's not clear whether there is still another
hardware bug not mentioned in errata. This should be revisited
since this change shall make use of bounce buffers which in turn
reduces performance a lot on systems that have more than 4GB
memory.

Reported by: Michael L. Squires (mikes <> siralan dot org)
Tested by: Michael L. Squires (mikes <> siralan dot org)
MFC after: 3 days

13 years agoRemove OCTEON1-32. Since moving to the Cavium SDK, we've lost our support for
jmallett [Tue, 4 Jan 2011 19:09:05 +0000 (19:09 +0000)]
Remove OCTEON1-32.  Since moving to the Cavium SDK, we've lost our support for
running an o32 kernel safely, and would have to add interrupt disabling and
reenabling to a bunch of macros in the Simple Executive sources to support it.

The only reason one would run an o32 kernel on Octeon would be to run o32 world,
which is better worked towards by adding o32 binary compatibility to n64 kernels
along with, eventually, supporting multilib systems so o32 binaries can run
alongside n32 and n64 ones.

Discussed with: imp

13 years agoUse errx() instead of err() in parseint. There is usually no interesting
kib [Tue, 4 Jan 2011 17:27:17 +0000 (17:27 +0000)]
Use errx() instead of err() in parseint. There is usually no interesting
information in errno.

Noted by: Garrett Cooper <yanegomi gmail com>
MFC after: 1 week

13 years agoClarify the previous commit. AcpiFinishGpe() will not clear GPE for us
jkim [Tue, 4 Jan 2011 17:06:03 +0000 (17:06 +0000)]
Clarify the previous commit.  AcpiFinishGpe() will not clear GPE for us
because we set it to edge-trigger.

13 years agoSpell CRITICAL_ASSERT correctly.
cperciva [Tue, 4 Jan 2011 16:29:07 +0000 (16:29 +0000)]
Spell CRITICAL_ASSERT correctly.

Submitted by: jhb
MFC with: r216944

13 years agoInherit the APB and the generic OFW PCI-PCI bridge driver from the generic
marius [Tue, 4 Jan 2011 16:21:14 +0000 (16:21 +0000)]
Inherit the APB and the generic OFW PCI-PCI bridge driver from the generic
PCI-PCI bridge driver in order to safe some code.

13 years agoReserve INTR_MD[1-4] similarly to what BUS_DMA_BUS[1-4] are intended for
marius [Tue, 4 Jan 2011 16:11:32 +0000 (16:11 +0000)]
Reserve INTR_MD[1-4] similarly to what BUS_DMA_BUS[1-4] are intended for
and switch sparc64 to use the first one for bus error filter handlers of
bridge drivers instead of (ab)using INTR_FAST for that so we eventually
can get rid of the latter.

Reviewed by: jhb
MFC after: 1 month

13 years agoAdd hamfisted locking to the Xen/PV pmap code: Only allow one thread to
cperciva [Tue, 4 Jan 2011 15:55:15 +0000 (15:55 +0000)]
Add hamfisted locking to the Xen/PV pmap code: Only allow one thread to
be in {pmap_pinit, pmap_copy, pmap_release} at a time.

This reduces the rate of panics when running 'make index' from ~0.6/hour
to ~0.02/hour (p < 10^-30).

At a later date this locking will be removed, and for this reason, it is
wrapped in #ifdef HAMFISTED_LOCKING; this temporary hack is being put in
place with the intention of shipping somewhat-stable Xen bits in FreeBSD
8.2-RELEASE.

PR: kern/153672
MFC after: 3 days

13 years agoMake "options XENHVM" compile for i386, not just amd64 -- a largely
rwatson [Tue, 4 Jan 2011 14:49:54 +0000 (14:49 +0000)]
Make "options XENHVM" compile for i386, not just amd64 -- a largely
mechanical change.  This opens the door for using PV device drivers
under Xen HVM on i386, as well as more general harmonisation of i386
and amd64 Xen support in FreeBSD.

Reviewed by:    cperciva
MFC after:      3 weeks

13 years agoMake the parsing of the integer arguments for rtprio(1)/idprio(1) stricter.
kib [Tue, 4 Jan 2011 14:13:09 +0000 (14:13 +0000)]
Make the parsing of the integer arguments for rtprio(1)/idprio(1) stricter.
Style.

Based on submission by: Eitan Adler <lists eitanadler com>, keramida
Reviewed by: jhb, keramida
MFC after: 1 week

13 years agokproc_exit() is already marked __dead2 so a NOTREACHED comment here isn't
jhb [Tue, 4 Jan 2011 13:16:28 +0000 (13:16 +0000)]
kproc_exit() is already marked __dead2 so a NOTREACHED comment here isn't
needed for lint.

Submitted by: bde

13 years agoQuiet clang warnings by using string literal format strings.
emaste [Tue, 4 Jan 2011 13:02:52 +0000 (13:02 +0000)]
Quiet clang warnings by using string literal format strings.

13 years agoFinish r210923, 210926. Mark some devices as eternal.
kib [Tue, 4 Jan 2011 10:59:38 +0000 (10:59 +0000)]
Finish r210923, 210926. Mark some devices as eternal.

MFC after: 2 weeks

13 years agoInstead of incrementing freework reference counter in indir_trunc(), do
kib [Tue, 4 Jan 2011 10:25:55 +0000 (10:25 +0000)]
Instead of incrementing freework reference counter in indir_trunc(), do
it at the allocation time for journaled fs and indirect blocks, when
the allocated object is not accessible outside.

Requested and reviewed by: jeff
Tested by: pho

13 years agoBecause sleepqueue may still being used, we should always check wchan with
davidxu [Tue, 4 Jan 2011 05:35:19 +0000 (05:35 +0000)]
Because sleepqueue may still being used, we should always check wchan with
queue locked.

13 years agoQuiet clang warnings by using literal format strings for printf-like
emaste [Tue, 4 Jan 2011 02:52:22 +0000 (02:52 +0000)]
Quiet clang warnings by using literal format strings for printf-like
functions.

13 years agoo) Add MIPS_COP_0_EXC_PC accessors to <machine/cpufunc.h>.
jmallett [Tue, 4 Jan 2011 02:33:48 +0000 (02:33 +0000)]
o) Add MIPS_COP_0_EXC_PC accessors to <machine/cpufunc.h>.
o) Make the octeon_wdog driver work on multi-CPU systems and to also print more
   information on NMI that may aid debugging.  Simplify and clean up internal
   API and structure.

13 years agoo) Unmask Central Interrupt Unit interrupts on APs, too.
jmallett [Tue, 4 Jan 2011 02:11:03 +0000 (02:11 +0000)]
o) Unmask Central Interrupt Unit interrupts on APs, too.
o) There's no good reason to make the low bits of the ebase the core
   number.  While per-CPU exception bases would be nice, for now we just
   need to make ebase the same on all cores.

13 years agoMake format string a string literal. (Discovered by clang.)
emaste [Tue, 4 Jan 2011 00:39:56 +0000 (00:39 +0000)]
Make format string a string literal.  (Discovered by clang.)

MFC After: 1 week

13 years agoAdjust the critical section protecting _xen_flush_queue to cover the
cperciva [Tue, 4 Jan 2011 00:16:38 +0000 (00:16 +0000)]
Adjust the critical section protecting _xen_flush_queue to cover the
entire range where the page mapping request queue needs to be atomically
examined and modified.

Oddly, while this doesn't seem to affect the overall rate of panics
(running 'make index' on EC2 t1.micro instances, there are 0.6 +/- 0.1
panics per hour, both before and after this change), it eliminates
vm_fault from panic backtraces, leaving only backtraces going through
vmspace_fork.

13 years agoHandle failure from ftpd_popen in statfilecmd().
emaste [Tue, 4 Jan 2011 00:11:09 +0000 (00:11 +0000)]
Handle failure from ftpd_popen in statfilecmd().

Reviewed by: attilio
MFC after: 1 week

13 years agoClear GPE from a query handler if the task was deferred.
jkim [Tue, 4 Jan 2011 00:10:29 +0000 (00:10 +0000)]
Clear GPE from a query handler if the task was deferred.

13 years agoWait for commands to complete 10 times longer. This makes my A-DATA 32GB SDHC
pjd [Tue, 4 Jan 2011 00:08:39 +0000 (00:08 +0000)]
Wait for commands to complete 10 times longer. This makes my A-DATA 32GB SDHC
card being detected.

Reviewed by: imp
MFC after: 2 weeks

13 years agoFix parameters for wakeup(9) and tsleep(9).
jkim [Mon, 3 Jan 2011 23:37:42 +0000 (23:37 +0000)]
Fix parameters for wakeup(9) and tsleep(9).

MFC after: 3 days

13 years agoAdd support for R_PPC64_UADDR64 relocations.
nwhitehorn [Mon, 3 Jan 2011 23:11:52 +0000 (23:11 +0000)]
Add support for R_PPC64_UADDR64 relocations.

13 years agoNote compatibility issues with make universe and stable systems.
imp [Mon, 3 Jan 2011 23:05:20 +0000 (23:05 +0000)]
Note compatibility issues with make universe and stable systems.

13 years agoWhen TARGET_ARCH_${kernel} gets set, it is using the host's config,
imp [Mon, 3 Jan 2011 22:48:01 +0000 (22:48 +0000)]
When TARGET_ARCH_${kernel} gets set, it is using the host's config,
not the one we build as part of make world.  This means that make
universe will fail if building on a too-old current or any stable
system prior to a few days ago in weird ways (parse errors from
shell).  This copes with these old systems in two ways:

(1) Works around the WARNING: issue by filtering all warnings that
    sneak onto stdout.

(2) if TARGET_ARCH_${kernel} winds up being empty, then we error out
    immediately with a semi-useful error message.  This usually comes from
    config not groking -m.

Ideally, we'd use a buildworld's config here, but that's tricky, so
I'll leave that detail to others to fix (it has to be done post make
world for the arch rather than at the top level makefile).  This
should make 'make universe' usable from recent 8-stable systems
(recent == last few months or so) for building -current.  They have
-m, but spewed warnings out stdout.  Older systems will now at least
get a firm error early rather than a confusing error late.

13 years agoexpand checkuser() to support the propagation of error codes back to
csjp [Mon, 3 Jan 2011 21:28:12 +0000 (21:28 +0000)]
expand checkuser() to support the propagation of error codes back to
the caller.  Currently, checkuser() does not differentiate between the
failure to open the file and the absence of a user in the file.  Check
to see if there was an error opening the file.  If there are any errors,
terminate the connection.  Currently, the only exception to this rule
is ENOENT, since there is nothing that says the /etc/ftpuser
and /etc/ftpchroot has to exist.

MFC after: 3 weeks

13 years agoFix the nlm so that it no longer depends on the regular
rmacklem [Mon, 3 Jan 2011 20:37:31 +0000 (20:37 +0000)]
Fix the nlm so that it no longer depends on the regular
nfs client and, as such, can be loaded for the experimental
nfs client without the regular client.

Reviewed by: jhb
MFC after: 2 weeks

13 years agoUpdate gateworks exclusion list to match latest tree.
imp [Mon, 3 Jan 2011 20:32:08 +0000 (20:32 +0000)]
Update gateworks exclusion list to match latest tree.

13 years agoBump the media size from approx 600MB to approx 750MB. The great
imp [Mon, 3 Jan 2011 19:32:54 +0000 (19:32 +0000)]
Bump the media size from approx 600MB to approx 750MB.  The great
hob-nailed tennis shoe of progress demands it!

Submitted by: phk

13 years agoPut in the other half of the SRCCONF patch.
imp [Mon, 3 Jan 2011 19:30:47 +0000 (19:30 +0000)]
Put in the other half of the SRCCONF patch.

Submitted by: phk

13 years agoAdd a 'locked' variant of the foo_start() routine and call it directly
jhb [Mon, 3 Jan 2011 18:28:30 +0000 (18:28 +0000)]
Add a 'locked' variant of the foo_start() routine and call it directly
from interrupt handlers and watchdog routines instead of queueing a task
to call foo_start().

Reviewed by: yongari
MFC after: 1 month

13 years agoIncrease carried_error if we skip a file due to an error. This ensures
jh [Mon, 3 Jan 2011 17:17:31 +0000 (17:17 +0000)]
Increase carried_error if we skip a file due to an error. This ensures
that setfacl(1) exits with proper exit status on failure.

PR: bin/149780
Submitted by: Ævar Arnfjörð Bjarmason (original version)
Reviewed by: trasz
MFC after: 3 weeks

13 years agoSmall whitespace nits and add a comment explaining why kthread_exit() can
jhb [Mon, 3 Jan 2011 16:29:00 +0000 (16:29 +0000)]
Small whitespace nits and add a comment explaining why kthread_exit() can
call kproc_exit() that was lost earlier.

13 years agoMFp4 r186485, r186859:
mm [Mon, 3 Jan 2011 12:57:07 +0000 (12:57 +0000)]
MFp4 r186485, r186859:

Fix a race by defining two tasks in the zio structure
as we can still be returning from issue task when interrupt task is used.

Tested by: pjd
Approved by: pjd, delphij (mentor)
MFC after: 3 days

13 years agoRelease the page lock early in vm_pageout_clean(). There is no reason to
alc [Mon, 3 Jan 2011 00:41:56 +0000 (00:41 +0000)]
Release the page lock early in vm_pageout_clean().  There is no reason to
hold this lock until the end of the function.

With the aforementioned change to vm_pageout_clean(), page locks don't need
to support recursive (MTX_RECURSE) or duplicate (MTX_DUPOK) acquisitions.

Reviewed by: kib

13 years agoFix the experimental NFS server so that it doesn't leak
rmacklem [Mon, 3 Jan 2011 00:40:13 +0000 (00:40 +0000)]
Fix the experimental NFS server so that it doesn't leak
a reference count on the directory when creating device
special files.

MFC after: 2 weeks

13 years agoModify the experimental NFSv4 server so that the lookup
rmacklem [Mon, 3 Jan 2011 00:33:32 +0000 (00:33 +0000)]
Modify the experimental NFSv4 server so that the lookup
ops return a locked vnode. This ensures that the associated mount
point will always be valid for the code that follows the operation.
Also add a couple of additional checks
for non-error to the other functions that create file objects.

MFC after: 2 weeks

13 years agoAdd myself.
jpaetzel [Sun, 2 Jan 2011 23:38:05 +0000 (23:38 +0000)]
Add myself.

13 years agoDelete some cruft from the experimental NFS server that was
rmacklem [Sun, 2 Jan 2011 21:34:01 +0000 (21:34 +0000)]
Delete some cruft from the experimental NFS server that was
only used by the OpenBSD port for its pseudo-fs.

MFC after: 2 weeks

13 years agoAdd checks for VI_DOOMED and vn_lock() failures to the
rmacklem [Sun, 2 Jan 2011 19:58:39 +0000 (19:58 +0000)]
Add checks for VI_DOOMED and vn_lock() failures to the
experimental NFS server, to handle the case where an
exported file system is forced dismounted while an RPC
is in progress. Further commits will fix the cases where
a mount point is used when the associated vnode isn't locked.

Reviewed by: kib
MFC after: 2 weeks

13 years agoMFi386 r216012 by kib:
gavin [Sun, 2 Jan 2011 15:06:07 +0000 (15:06 +0000)]
MFi386 r216012 by kib:

Calling fill_fpregs() for curthread is legitimate, and ELF coredump
does this.

Discussed with: kib
MFC after: 3 days

13 years agoExtend the section in which interrupts are disabled in the TLB demap
marius [Sun, 2 Jan 2011 15:01:03 +0000 (15:01 +0000)]
Extend the section in which interrupts are disabled in the TLB demap
functions, otherwise if we get preempted after checking whether a certain
pmap is active on the current CPU but before disabling interrupts we might
operate on an outdated state as the pmap might have been deactivated in
the meantime. As the same issue may arises when the TLB demap function is
interrupted by a TLB demap IPI, just entering a critical section before
the check isn't sufficient so we have to fully disable interrupts instead.

MFC after: 3 days

13 years agoFinishing touches to fork1() - ANSIfy missed function definition, style(9)
trasz [Sun, 2 Jan 2011 12:16:57 +0000 (12:16 +0000)]
Finishing touches to fork1() - ANSIfy missed function definition, style(9)
fixes, removal of few comments that didn't really make sense and addition
of fork_findpid() locking requirements.

13 years agoBugfix: Make sure that the COMM_UP notificatin is delivered first also
tuexen [Sun, 2 Jan 2011 10:27:27 +0000 (10:27 +0000)]
Bugfix: Make sure that the COMM_UP notificatin is delivered first also
        on the passive side.

MFC after: 3 days.

13 years agoFix a typo.
tuexen [Sat, 1 Jan 2011 22:22:57 +0000 (22:22 +0000)]
Fix a typo.

MFC after: 3 months.

13 years agoAdd nodes for current and past committers that are already referenced in
gavin [Sat, 1 Jan 2011 20:17:29 +0000 (20:17 +0000)]
Add nodes for current and past committers that are already referenced in
relationships, so they are rendered as more than just a username.
Add a couple of relationships between committers who already have existing
nodes to help with the rendered output.

13 years agoAdd support for shared vnode locks for the Read operation
rmacklem [Sat, 1 Jan 2011 18:50:49 +0000 (18:50 +0000)]
Add support for shared vnode locks for the Read operation
in the experimental NFSv4 server.

Reviewed by: kib
MFC after: 2 weeks

13 years agoMake a couple refinements to r216799 and r216810. In particular, revise
alc [Sat, 1 Jan 2011 17:39:38 +0000 (17:39 +0000)]
Make a couple refinements to r216799 and r216810.  In particular, revise
a comment and move it to its proper place.

Reviewed by: kib

13 years agoThere can be more than 0x20000000 swap meta blocks allocated if a swap-backed
brucec [Sat, 1 Jan 2011 16:59:05 +0000 (16:59 +0000)]
There can be more than 0x20000000 swap meta blocks allocated if a swap-backed
md(4) device is used. Don't panic when deallocating such a device if swap
has been used.

PR: kern/133170
Discussed with: kib
MFC after: 3 days

13 years agosh: Test that exit $? replaces the original exit status in an EXIT trap.
jilles [Sat, 1 Jan 2011 15:25:15 +0000 (15:25 +0000)]
sh: Test that exit $? replaces the original exit status in an EXIT trap.

13 years agosh: Check readonly status for assignments on regular builtins.
jilles [Sat, 1 Jan 2011 13:26:18 +0000 (13:26 +0000)]
sh: Check readonly status for assignments on regular builtins.

An error message is written, the builtin is not executed, nonzero exit
status is returned but the shell does not abort.

This was already checked for special builtins and external commands, with
the same consequences except that the shell aborts for special builtins.

Obtained from: NetBSD

13 years agoo) When trying to determine whether the pcpu pointer is a managed address, check
jmallett [Sat, 1 Jan 2011 00:20:14 +0000 (00:20 +0000)]
o) When trying to determine whether the pcpu pointer is a managed address, check
   not just that it is greater than the minimal kernel virtual address, but also
   that it is less than the maximal kernel virtual address.  On n64 kernels, the
   pcpup comes out of a direct-mapped address that, with an unsigned compare, is
   rather greater than the minimal kernel virtual address.
o) Turn the panic if interrupts are disabled in cpu_idle into a KASSERT since on
   other architectures it's behind INVARIANTS anyway.
o) Add a check that not all interrupts are masked, too.
o) Add cpu_idleclock() and cpu_activeclock() use to cpu_idle as is done on other
   architectures.

13 years agoMfp4 CH177924:
bz [Fri, 31 Dec 2010 22:49:13 +0000 (22:49 +0000)]
Mfp4 CH177924:

Add and export constants of array sizes of jail parameters as compiled into
the kernel.
This is the least intrusive way to allow kvm to read the (sparse) arrays
independent of the options the kernel was compiled with.

Reviewed by: jhb (originally)
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Sponsored by: CK Software GmbH

13 years agoFix endianness bug introduced in r205091.
yongari [Fri, 31 Dec 2010 22:18:41 +0000 (22:18 +0000)]
Fix endianness bug introduced in r205091.
After controller updates control word in a RX LE, driver converts
it to host byte order. The checksum value in the control word is
stored in big endian form by controller. r205091 didn't account for
the host byte order conversion such that the checksum value was
incorrectly interpreted on big endian architectures which in turn
made all TCP/UDP frames dropped. Make RX checksum offload work
on any architectures by swapping the checksum value.

Reported by: Sreekanth M. ( kanthms <> netlogicmicro dot com )
Tested by: Sreekanth M. ( kanthms <> netlogicmicro dot com )

13 years agoUse NULL rather than 0 to invalidate a pointer.
bz [Fri, 31 Dec 2010 21:57:54 +0000 (21:57 +0000)]
Use NULL rather than 0 to invalidate a pointer.

Rather than duplicating the LLE_FREE_LOCKED() macro code in LLE_FREE(),
call it directly (like we do for the RT_* macros).

Sponsored by: ISPsystem [1]
Reviewed by: julian [1]
MFC After: 1 week

[1] Early 2010.

13 years agoRemove duplicated "perfect"
yongari [Fri, 31 Dec 2010 21:52:51 +0000 (21:52 +0000)]
Remove duplicated "perfect"

Pointed out by: pluknet

13 years agoTry to catch a possible divide-by-zero as early as possible if "mtu" is 0
bz [Fri, 31 Dec 2010 21:47:11 +0000 (21:47 +0000)]
Try to catch a possible divide-by-zero as early as possible if "mtu" is 0
(also test for negative MTUs if checking it anyway).
An MTU of 0 is arguably a bug elsewhere, but this at least gives us some
more debugging hints.

Sponsored by: ISPsystem (Early 2010)
MFC after: 1 week

13 years agoPrint the vnet pointer under DDB when iterating over flowtables of each
bz [Fri, 31 Dec 2010 21:20:32 +0000 (21:20 +0000)]
Print the vnet pointer under DDB when iterating over flowtables of each
virtual network stack instance.

Sponsored by: ISPsystem [1]
Reviewed by: julian [1]
MFC after: 1 week

[1] Early 2010.

13 years agoMove the increment operation under the lock and split the condition
bz [Fri, 31 Dec 2010 21:06:52 +0000 (21:06 +0000)]
Move the increment operation under the lock and split the condition
variable into two so that we can see on which one we are waiting.
This might also more properly propagate the update of the
flowclean_cycles flag and avoid "hangs" people were seeing.

Suggested by: rwatson [1]
Sponsored by: ISPsystem [1]
Reviewed by: julian [1]
Updated by: Mikolaj Golub (to.my.trociny gmail.com)
Tested by: Mikolaj Golub (to.my.trociny gmail.com)
MFC After: 1 week

[1] Early 2010, initial version.

13 years agosh: Check if dup2 for redirection from/to a file succeeds.
jilles [Fri, 31 Dec 2010 18:20:17 +0000 (18:20 +0000)]
sh: Check if dup2 for redirection from/to a file succeeds.

A failure (e.g. caused by ulimit -n being set very low) is a redirection
error.

Example:
  ulimit -n 9; exec 9<.

13 years agoHappy New Year 2011.
bz [Fri, 31 Dec 2010 18:07:16 +0000 (18:07 +0000)]
Happy New Year 2011.

Approved by: core (kib)

13 years agoMake i386_set_ldt work on i386/XEN, step 5/5.
cperciva [Fri, 31 Dec 2010 17:42:25 +0000 (17:42 +0000)]
Make i386_set_ldt work on i386/XEN, step 5/5.

When cleaning up a thread, reset its LDT to the default LDT.

Note: Casting the LDT pointer to an int and storing it in pc_currentldt is
wildly bogus, but is harmless since pc_currentldt is a write-only variable.

MFC after: 3 days

13 years agoMake i386_set_ldt work on i386/XEN, step 4/5.
cperciva [Fri, 31 Dec 2010 17:41:14 +0000 (17:41 +0000)]
Make i386_set_ldt work on i386/XEN, step 4/5.

Use xen_update_descriptor to update the LDT rather than bcopy.  Under Xen,
pages used for holding LDTs must be read-only, so we can't make the change
ourselves.

Ths obvious alternative of "remap the page read-write, make the change, then
map it read-only again" doesn't work since Xen won't allow an LDT page to be
remapped as R/W.  An arguably better solution is used by NetBSD: They don't
modify LDTs in-place at all, but instead copy the entire LDT, modify the new
version, then atomically swap.

MFC after: 3 days

13 years agoMake i386_set_ldt work on i386/XEN, step 3/5.
cperciva [Fri, 31 Dec 2010 17:40:30 +0000 (17:40 +0000)]
Make i386_set_ldt work on i386/XEN, step 3/5.

Synchronize reality with comment: The user_ldt_alloc function is supposed to
return with dt_lock held.  Due to broken locking in i386/xen/pmap.c, we drop
dt_lock during the call to pmap_map_readonly and then pick it up again; this
can be removed once the Xen pmap locking is fixed.

MFC after: 3 days

13 years agoMake i386_set_ldt work on i386/XEN, step 2/5.
cperciva [Fri, 31 Dec 2010 17:39:58 +0000 (17:39 +0000)]
Make i386_set_ldt work on i386/XEN, step 2/5.

Don't map physical to machine page numbers in pte_load_store, since it uses
PT_SET_VA (which takes a physical page number and converts it to a machine
page number).

MFC after: 3 days

13 years agoMake i386_set_ldt work on i386/XEN, step 1/5.
cperciva [Fri, 31 Dec 2010 17:39:31 +0000 (17:39 +0000)]
Make i386_set_ldt work on i386/XEN, step 1/5.

Lock the vm page queue mutex around calls to pte_store.  As with many other
uses of the vm page queue mutex in i386/xen/pmap.c, this is bogus and needs
to be replaced at some future date by a spin lock dedicated to protecting
the queue of pending xen page mapping hypervisor calls.  (But for now, bogus
locking is better than a panic.)

MFC after: 3 days

13 years agoMove alumni committers from the active section.
gavin [Fri, 31 Dec 2010 13:07:21 +0000 (13:07 +0000)]
Move alumni committers from the active section.