Commit Graph

226599 Commits

Author SHA1 Message Date
christos
5a9da49e82 CID 1203189: Null deref. 2014-04-17 15:55:53 +00:00
christos
2a395ebf82 add LRO 2014-04-17 15:45:39 +00:00
christos
c14f88984c CIT 744275: Increase max_retry so we retry once. 2014-04-17 15:35:49 +00:00
christos
f4348d8ad9 CID 140077: Add missing break and FALLTHROUGH 2014-04-17 15:34:05 +00:00
christos
136c8cf0cd CID 141398: Fix incorrect test 2014-04-17 15:33:40 +00:00
skrll
e726eb3c65 Fix count vs ret confusion. ret is only set on error when count == 0 -
make sure this is the case.
2014-04-17 13:48:02 +00:00
tsutsui
5546b37c59 Check the service switch on 425e to select apci serial console.
Taken from OpenBSD/hp300.  See the following comment for details:
>> * Check the service switch. On the 425e, this is a physical
>> * switch, unlike other frodo-based machines, so we can use it
>> * as a serial vs internal video selector, since the PROM can not
>> * be configured for serial console.
2014-04-17 12:35:24 +00:00
matt
ad575cd374 Do softints after restoring interrupts 2014-04-16 22:44:42 +00:00
matt
96ebdccaee Add ctcom 2014-04-16 22:40:24 +00:00
matt
de53240564 Allow l2cc base to gotten from device properties. 2014-04-16 22:40:00 +00:00
pooka
ad5b64f98f Reparent children of a dying lwproc. Fixes wpa_supplicant -B (and
most likely a bunch of other things).
2014-04-16 22:34:02 +00:00
matt
44e315af63 Pendantic structure member initialization. (setting a field to 0 which is 0). 2014-04-16 22:33:07 +00:00
reinoud
dcce87eb7d Teach sscom attachment, also the console, to use the busspace handle of the
main register space.

While here, map in the correct amount of memory or bus_space_map() won't
return an error but will wedge the system.
2014-04-16 21:28:51 +00:00
joerg
e3dae42754 Undef possible macro versions of memcpy and friends for kernel builds
too. libkern sometimes defines them to the builtins.
2014-04-16 20:39:55 +00:00
maxv
cf89d4e5af Some fs's - like kernfs - set their vfs_min_mount_data to zero. Add a check
to prevent an (un)privileged user from requesting a zero-sized allocation
(and thus a panic).
2014-04-16 19:25:28 +00:00
maxv
23f76b6d00 An (un)privileged user can easily make the kernel dereference a NULL
pointer.

The kernel allows 'data' to be NULL; it's the fs's responsibility to
ensure that it isn't NULL (if the fs actually needs data).

ok christos@
2014-04-16 18:55:17 +00:00
tsutsui
267c148161 Put back "-Wa,-march=m68000 -Wa,-mcpu=m68000" for AFLAGS for X68000 models.
See my post in source-changes-d@ for details.
http://mail-index.netbsd.org/source-changes-d/2014/04/15/msg006723.html

Also use "-m68000" for CFLAGS for consistency.
(the previous -m68020-60 was harmless because vers.c has
 only const strings and there is no instruction)
2014-04-16 14:33:43 +00:00
tsutsui
7fad7fe91f Use booted device unit if no unit number is specified on boot command.
Bump version to denote a visible change.
2014-04-16 13:43:02 +00:00
tsutsui
d0f9358c7b Check a status code and return proper errno in sdstrategy().
Suggested by gcc 4.8 -Wunused-but-set-variable warning to use the variable.
2014-04-16 12:01:53 +00:00
tsutsui
718c0089c0 Appease gcc 4.8 -Wunused-but-set-variable warnings. 2014-04-16 11:18:00 +00:00
matt
b0bab4c12e Make to flush the secondary cache when syncing PTEs when the Sheeva L2 cache
is used.
2014-04-16 07:29:52 +00:00
uebayasi
c3b49b4f57 execve_runproc: Isolate vmcmd execution code into a function. 2014-04-16 02:22:38 +00:00
christos
035ceafe9d It is not nice to fake things we don't have; instead check explicitly
that we can get CS.
2014-04-16 02:14:44 +00:00
uebayasi
acaa1e700b execve_runproc: Isolate path / commandname (proc:p_comm) related code into a function. 2014-04-16 01:30:33 +00:00
htodd
c33d0dd3ae Add getaddrinfo.debug to lists. 2014-04-16 00:41:07 +00:00
christos
07009f7010 take constant expressions out of the loop. 2014-04-16 00:34:10 +00:00
christos
b8c0fcebe9 supply a fake cs that has has not have SEL_UPL set, so that our trapframe
sniffer works.
2014-04-16 00:32:33 +00:00
ginsbach
42bc9b7b73 Hook getaddrinfo(1) into the build. Hi riastradh! 2014-04-15 22:09:27 +00:00
reinoud
30e306bd55 Make the PoP detection both EXYNOS4 defined and when running on a generic
kernel, check if we're on a EXYNOS4 architecture to prevent mishaps.
2014-04-15 20:36:07 +00:00
joerg
a997683cbb Add basic Alpha support to libunwind. 2014-04-15 18:40:34 +00:00
maxv
8d404a3e9c There are two times the same branches.
} else if (addr == LUSR_OFF(__signal)) {
 			error = ENOTSUP;
		} else if (addr == LUSR_OFF(__signal)) {
			error = ENOTSUP;
		}

Just delete one of them. Spotted by my code scanner.

ok christos@
2014-04-15 17:53:09 +00:00
maxv
c1cf2f47fb A specially-crafted binary could easily control a kernel array index.
Add some checks to ensure that nothing will be read outside the allocated
area. Rewrite the code so that we don't need to allocate the whole section.

Spotted by several developers, patch from chs@/enami@
2014-04-15 17:29:00 +00:00
uebayasi
532bc286ec execve_runproc: Isolate new stack arg filling code into a function. 2014-04-15 17:06:21 +00:00
uebayasi
e4f9e005a5 execve_runproc: Isolate ps_strings filling code into a function. 2014-04-15 16:44:57 +00:00
uebayasi
0244fbfc39 execve_runproc: Simplify &argc address calc. The set of (argc, argv, ...)
is located just "behind" the initial SP.  SHRINK, then ALLOC, and you get
&argc.
2014-04-15 16:13:04 +00:00
uebayasi
9605f3cc61 exec_loadvm: Isolate stack size calc logic into separate functions. 2014-04-15 15:50:16 +00:00
pooka
db08ffef5a update to new pci_intr_string() 2014-04-15 13:47:06 +00:00
pooka
e9c74271a7 add multi-inclusion protection 2014-04-15 13:41:46 +00:00
hannken
0e9394463c Add __diagused. 2014-04-15 12:37:59 +00:00
macallan
63aa316f6c fix same pasto as in sparc/cpu.c - print frequency in MHz if we say it's in MHz 2014-04-15 12:22:49 +00:00
joerg
7209984597 Add initial unwind support for SPARC/SPARC64. 2014-04-15 11:44:26 +00:00
macallan
d2bb74c027 cpu0 at mainbus0: mid 8: RT620/625 @ 125000 MHz, on-chip FPU
unfortunately that's too good to be true, so print frequency in MHz when we
say it's in MHz
2014-04-15 10:39:44 +00:00
macallan
a825263fc6 print chip revision on attach 2014-04-15 10:24:54 +00:00
joerg
8b6ddbe40e Append to CPPFLAGS.${src}, don't overwrite it. 2014-04-15 10:02:21 +00:00
hannken
2f1e07219a Fix a deadlock where one thread exits, enters fstrans_lwp_dtor()
and wants fstrans_lock.  This thread holds the proc_lock.
Another thread holds fstrans_lock and runs pserialize_perform().
As the first thread holds the proc_lock, timeouts are blocked and
the second thread blocks forever in kpause().

Change fstrans_lwp_dtor() to invalidate, but not free its info
structs.  No need to take fstrans_lock.

Change fstrans_get_lwp_info() to reuse invalidated info before
trying to allocate a new one.
2014-04-15 09:50:45 +00:00
maxv
05b3bfa0ba There's no need for this NULL-check. 2014-04-15 06:14:55 +00:00
buhrow
061d6339a9 Checking in cosmetic changes -- no functional change.
(Suggestions made by Taylor Campbell)
2014-04-15 05:27:54 +00:00
pooka
9426d42dd4 build hypercalls if RUMP_PCI_USER is defined 2014-04-14 23:53:42 +00:00
pooka
d1e65a1e3d fix typo 2014-04-14 22:56:53 +00:00
pooka
5145f215c7 * make it possible for rumpcomp_pci_intr_establish() to know which
device it's establishing the interrupt for
* make it possible to implement bus_dmamem_map() properly
2014-04-14 21:43:00 +00:00