Commit Graph

160394 Commits

Author SHA1 Message Date
Juli Mallett
7b62328843 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.
2011-01-04 02:33:48 +00:00
Juli Mallett
5308af6337 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.
2011-01-04 02:11:03 +00:00
Ed Maste
62f390ecd9 Make format string a string literal. (Discovered by clang.)
MFC After: 1 week
2011-01-04 00:39:56 +00:00
Colin Percival
d01b2dad73 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.
2011-01-04 00:16:38 +00:00
Ed Maste
763e8c9623 Handle failure from ftpd_popen in statfilecmd().
Reviewed by:	attilio
MFC after:	1 week
2011-01-04 00:11:09 +00:00
Jung-uk Kim
5568050d57 Clear GPE from a query handler if the task was deferred. 2011-01-04 00:10:29 +00:00
Pawel Jakub Dawidek
4daf3d2552 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
2011-01-04 00:08:39 +00:00
Jung-uk Kim
80b1151e82 Fix parameters for wakeup(9) and tsleep(9).
MFC after:	3 days
2011-01-03 23:37:42 +00:00
Nathan Whitehorn
9cc92083b0 Add support for R_PPC64_UADDR64 relocations. 2011-01-03 23:11:52 +00:00
Warner Losh
e4f64803ab Note compatibility issues with make universe and stable systems. 2011-01-03 23:05:20 +00:00
Warner Losh
92f64fb9e4 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.
2011-01-03 22:48:01 +00:00
Christian S.J. Peron
cefb678553 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
2011-01-03 21:28:12 +00:00
Rick Macklem
90305aa38b 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
2011-01-03 20:37:31 +00:00
Warner Losh
72e8d583cd Update gateworks exclusion list to match latest tree. 2011-01-03 20:32:08 +00:00
Warner Losh
3664e10e59 Bump the media size from approx 600MB to approx 750MB. The great
hob-nailed tennis shoe of progress demands it!

Submitted by:	phk
2011-01-03 19:32:54 +00:00
Warner Losh
1e430919eb Put in the other half of the SRCCONF patch.
Submitted by:	phk
2011-01-03 19:30:47 +00:00
John Baldwin
32341ad63c 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
2011-01-03 18:28:30 +00:00
Jaakko Heinonen
b38dc7ebea 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
2011-01-03 17:17:31 +00:00
John Baldwin
547ffb85d9 Small whitespace nits and add a comment explaining why kthread_exit() can
call kproc_exit() that was lost earlier.
2011-01-03 16:29:00 +00:00
Martin Matuska
df06a59a77 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
2011-01-03 12:57:07 +00:00
Alan Cox
17f6a17bf7 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
2011-01-03 00:41:56 +00:00
Rick Macklem
fa5ecdd3b9 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
2011-01-03 00:40:13 +00:00
Rick Macklem
81f78d997d 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
2011-01-03 00:33:32 +00:00
Josh Paetzel
53c8f97512 Add myself. 2011-01-02 23:38:05 +00:00
Rick Macklem
c9aad40f5f Delete some cruft from the experimental NFS server that was
only used by the OpenBSD port for its pseudo-fs.

MFC after:	2 weeks
2011-01-02 21:34:01 +00:00
Rick Macklem
629fa50e68 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
2011-01-02 19:58:39 +00:00
Gavin Atkinson
467a917104 MFi386 r216012 by kib:
Calling fill_fpregs() for curthread is legitimate, and ELF coredump
does this.

Discussed with:	kib
MFC after:	3 days
2011-01-02 15:06:07 +00:00
Marius Strobl
f8d0071f71 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
2011-01-02 15:01:03 +00:00
Edward Tomasz Napierala
3e73ff1e94 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.
2011-01-02 12:16:57 +00:00
Michael Tuexen
2fad0e55b6 Bugfix: Make sure that the COMM_UP notificatin is delivered first also
on the passive side.

MFC after: 3 days.
2011-01-02 10:27:27 +00:00
Michael Tuexen
0a80a2de2b Fix a typo.
MFC after: 3 months.
2011-01-01 22:22:57 +00:00
Gavin Atkinson
01863a28b5 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.
2011-01-01 20:17:29 +00:00
Rick Macklem
5a12538bd7 Add support for shared vnode locks for the Read operation
in the experimental NFSv4 server.

Reviewed by:	kib
MFC after:	2 weeks
2011-01-01 18:50:49 +00:00
Alan Cox
edf93b25d3 Make a couple refinements to r216799 and r216810. In particular, revise
a comment and move it to its proper place.

Reviewed by:	kib
2011-01-01 17:39:38 +00:00
Rebecca Cran
4c18dec9a9 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
2011-01-01 16:59:05 +00:00
Jilles Tjoelker
be25acf4a5 sh: Test that exit $? replaces the original exit status in an EXIT trap. 2011-01-01 15:25:15 +00:00
Jilles Tjoelker
850460c0f1 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
2011-01-01 13:26:18 +00:00
Juli Mallett
5610751bf1 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.
2011-01-01 00:20:14 +00:00
Bjoern A. Zeeb
5cc703974c 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
2010-12-31 22:49:13 +00:00
Pyun YongHyeon
3c5571b374 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 )
2010-12-31 22:18:41 +00:00
Bjoern A. Zeeb
962be6dfb3 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.
2010-12-31 21:57:54 +00:00
Pyun YongHyeon
f95308351b Remove duplicated "perfect"
Pointed out by:	pluknet
2010-12-31 21:52:51 +00:00
Bjoern A. Zeeb
c744cde428 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
2010-12-31 21:47:11 +00:00
Bjoern A. Zeeb
c9a2711a54 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.
2010-12-31 21:20:32 +00:00
Bjoern A. Zeeb
f0a56b0678 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.
2010-12-31 21:06:52 +00:00
Jilles Tjoelker
09683f46b9 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<.
2010-12-31 18:20:17 +00:00
Bjoern A. Zeeb
55cb182a23 Happy New Year 2011.
Approved by:	core (kib)
2010-12-31 18:07:16 +00:00
Colin Percival
aaaf607148 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
2010-12-31 17:42:25 +00:00
Colin Percival
698cc19d6b 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
2010-12-31 17:41:14 +00:00
Colin Percival
de187b8df2 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
2010-12-31 17:40:30 +00:00