Commit Graph

186190 Commits

Author SHA1 Message Date
pooka
72e7011c7a Init ukfs__part_{na,none} statically instead of at runtime to avoid
init-order lossage from p2k/rump_smbfs, as noted by Tron.
2009-12-11 16:47:33 +00:00
pooka
abcee849c9 This is linked against rumpnet_sockin, so it should not be linked
against rumpnet_netinet anymore.
2009-12-11 16:46:27 +00:00
pooka
eede817dfd Include component.c instead of dummy.c so that domain constructors
get properly called.
2009-12-11 16:34:50 +00:00
uebayasi
afecdcdcbc Use $GENCMD to generate misc.[ch]. Carefully quote strings. 2009-12-11 16:10:56 +00:00
uebayasi
bab9f7218a GENCMD: quote the string to eval in case it has spaces. 2009-12-11 16:09:03 +00:00
uebayasi
d7fe4afc2b Set $rundir before calling sets.subr as other scripts do. 2009-12-11 15:25:05 +00:00
he
66597865fb Move the test for evbppc out of sets.subr and into bsd.own.mk, to
decide whether to make kernel modules: set MKKMOD to no for evbppc.
Use this in etc/Makefile to decide whether to do the "modules"
obsolete sets.  Move the ./var/db/obsolete/modules entry from the
"mi" to the "module.mi" file set.

Fixes the build for evbppc.

Discussed with uebayasi@
2009-12-11 15:22:33 +00:00
tsutsui
73bba0e6a2 Refactoring MD segment related definitions on m68k ports:
- move macro SEGSHIFT, NBSG, and SEGOFFSET from <machine/param.h>
  to <machine/pmap.h> where they should belong
- don't use m68k_round_seg() and m68k_trunc_seg() in sun2 pmap sources
  and instead define and use sun2_round_seg() and sun2_trunc_seg()
  since they are quite pmap implementation dependent
2009-12-11 13:56:15 +00:00
tsutsui
ce06f8d54c Refactoring MD segment related definitions on m68k ports:
- move macro SEGSHIFT, NBSG, and SEGOFFSET from <machine/param.h>
  to <machine/pmap.h> where they should belong
- don't use m68k_round_seg() and m68k_trunc_seg() in sun3 pmap sources
  and instead define and use sun3_round_seg() and sun3_trunc_seg()
  since they are quite pmap implementation dependent
2009-12-11 13:52:57 +00:00
uebayasi
096187792a list_set_lists() - Share code of handling *.ad.* set lists. 2009-12-11 13:30:11 +00:00
uebayasi
e140e09a48 Indent. 2009-12-11 13:10:47 +00:00
uebayasi
e06370d53f Refactor list_set_lists using more functions. 2009-12-11 13:10:06 +00:00
uebayasi
0e9d695764 Replace many "if [ -f $x ]; then echo $x; fi" instances with function. 2009-12-11 12:57:39 +00:00
he
9d7093b6b4 Prefix mkvars.mk with ${rundir}/, so that the scripts from this
dir using sets.subr can be run from another directory, as is done
e.g. during "make release" via the mksums script.

OK'ed by uebayasi@
2009-12-11 12:07:58 +00:00
uebayasi
f22a6fb255 Put intermediate lists on the top of ${DESTDIR} (${DESTDIR}/SETS.*) and leave
them.  Teach list generators to ignore them.  Always generate metalog
missing/extra lists too, but don't check it (for now).  I'll change "flist"
to be generated only when set lists have changed.

No functional changes.
2009-12-11 11:48:41 +00:00
njoly
c3217052b6 In netbsd32_from_{ifreq,oifreq}(), use the compat structure size for
memcpy.

From mrg.
2009-12-11 11:14:34 +00:00
tsutsui
0b5468d9dc Don't refer garbage in stack.
- An argument of struct timeval *tv passed by todr_gettime(9) is used
  for a return value and it doesn't contain valid data. Don't read it.
- Instead, use getmicrotime(9) to get a "reasonable" (i.e. current) time
  to see expected year value (which is not kept by this device).
- If current time is not valid, assume this is the first todr_gettime(9)
  call from inittodr(9) and use file system time for the "reasonable" year.

Fixes silent hangup after mountroot() on sun2.

XXX: MI todr(9) functions seem to get mangled around year ~22000.
2009-12-11 11:07:04 +00:00
tteras
119e5ecd44 From Paul Wernau: vmbuf.h was defined twice in the headers. Remove the
redundant entry so new install tool does not complain about overwriting
just installed file.
2009-12-11 09:04:04 +00:00
uebayasi
31dfbef56f ${GENCMD}:
Prefix tmp directories as /tmp/_gencmd.XXXXXX to give users a clue when it's
left accidentally.
2009-12-11 08:52:37 +00:00
uebayasi
b79e178285 Rewrite file generation rules using ${GENCMD}. No functional changes intended. 2009-12-11 08:39:42 +00:00
uebayasi
bf4c37b84c ${GENCMD} is used to generate only one output from file generation commands
which potentially have multiple output files, which confuses make(1).

This wrapper copies all involved files into /tmp, execute the command, and
copy the wanted file back to ${.OBJDIR}.  If this is expensive, consider to
rewrite the generation command to output files individually.

XXX bsd.own.mk is too bloated.
2009-12-11 08:37:34 +00:00
matt
0a8b38422e Add PRIx{P,V}{ADDR,SIZE}, PRIu{P,V}SIZE, and PRIxREGISTER{,32,64} for all
(except where they will be added via merge).  These should be used to print
{p,v}{addr,size}_t and register*_t as appropriate.
2009-12-11 05:52:03 +00:00
dsl
eff3e2124a Avoid leaking a mutex_obj when pipe_create() fails for the read pipe.
Remove the unused argument from pipeclose().
2009-12-10 20:55:17 +00:00
jld
9bd6e2661a Slight change to the wording of the parity map info: the parity is
"marked clean" after however much inactivity; it is *actually* clean
as soon as the component disks all do their thing (on the order of ms,
usually), just the same as before.

The bikeshed is now less of a taupe and more of an ecru.
2009-12-10 20:20:59 +00:00
plunky
75847ce3f8 accept uppercase hex digits when parsing a provided key 2009-12-10 18:57:31 +00:00
uebayasi
76ff00f330 Thinko; missing/extra are generated differently for metalog/destdir comparison
methods.  Fix mistakenly merged generation functions.
2009-12-10 17:18:33 +00:00
njoly
5e38c900e9 Add SIOCGIFMTU support. 2009-12-10 17:07:26 +00:00
njoly
ed22c0665f Do not give native requests to netbsd32_ioctl(), use the compat
netbsd32 equivalent instead.
2009-12-10 16:55:17 +00:00
uebayasi
36a7418873 Style. Better variable names. 2009-12-10 16:40:21 +00:00
uebayasi
9efd91e8af Share more code. Call functions in one place. 2009-12-10 16:22:06 +00:00
uebayasi
62eb5f0ca2 Refactor; move generate_* function calls in single place. 2009-12-10 16:12:00 +00:00
uebayasi
fe0b0f3007 Use more functions. But still no functional changes. 2009-12-10 16:09:13 +00:00
uebayasi
c5999c8ae5 Use shell function because I like it. No functional changes. 2009-12-10 16:01:06 +00:00
uebayasi
e08ad0e79f Move make variable extraction & conversion logic from here-documented make
-f- command to an isolated makefile.  The list of non-_MKVARS.* variables
are concentrated there.

No functional changes.
2009-12-10 15:51:24 +00:00
njoly
4f273f66ed Kill debug printf. 2009-12-10 15:47:23 +00:00
njoly
86051746c6 Make netbsd32_from_{ifreq,oifreq}() copy the whole structure, not only
the interface name. Finally fix my own PR/39424.

ok by christos.
2009-12-10 14:58:28 +00:00
matt
6a9e4e8eeb Change u_long to vaddr_t/vsize_t in exec code where appropriate (mostly
involves setregs and vmcmds).  Should result in no code differences.
2009-12-10 14:13:48 +00:00
matt
a3e1558eec Move saemul_netbsd32 to netbsd32_sa.c and allow the KERN_SA bits to be omitted. 2009-12-10 14:10:35 +00:00
uch
612627584e u-area is no longer zero-cleared. reset here 2009-12-10 13:35:32 +00:00
uebayasi
5b7db8face Style. 2009-12-10 13:29:14 +00:00
uebayasi
403121b1db Move the list of non-_MKVARS.* make variables from .for code to MKEXTRAVARS.
List one variable in one line for readability.  No functional changes.
2009-12-10 13:25:19 +00:00
uebayasi
563445b23a Put MKMANZ back and unbreak its installation. 2009-12-10 13:19:21 +00:00
drochner
a1a04dd1be If a struct sigevent with SIGEV_SIGNAL is passed to timer_create(2),
check the signal number to be in the allowed range. An invalid
signal number could crash the kernel by overflowing the sigset_t
array.
More checks would be good, and SIGEV_THREAD shouldn't be dropped
silently, but this fixes at least the local DOS vulnerability.
2009-12-10 12:39:12 +00:00
nakayama
fb022d0910 iommu_dvmamap_load:
Split a segment if its size is larger than dm_maxsegsz.

iommu_dvmamap_load_raw:
Don't coalesce segments if total size is larger than dm_maxsegsz.

This should fix port-sparc64/35299.
2009-12-10 12:29:44 +00:00
drochner
fe1db36da9 fix some security critical bugs:
-an invalid signal number passed to mq_notify(2) could crash the kernel
 on delivery -- add a boundary check
-mq_receive(2) from an empty queue crashed the kernel by NULL dereference
 in timeout calculation -- handle the NULL case
-likewise for mq_send(2) to a full queue
-a user could set mq_maxmsg (the maximal number of messages in a queue)
 to a huge value on mq_open(O_CREAT) and later use up all kernel
 memory by mq_send(2) -- add a sysctl'able limit which defaults
 to 16*mq_def_maxmsg

(mq_notify(2) should get some more checks, and SIGEV_* values other
than SIGEV_SIGNAL should be handled somehow, but this doesn't look
security critical)
2009-12-10 12:22:48 +00:00
skrll
af4728306c Rename L_ADDR to L_PCB 2009-12-10 07:57:02 +00:00
uebayasi
69c8fc601b sh -> ${HOST_SH} 2009-12-10 05:57:23 +00:00
uebayasi
7638dd5a18 Add print_mkvars make target for debug. 2009-12-10 05:15:28 +00:00
rmind
e9f7af26e6 Rename L_ADDR to L_PCB and amend some comments accordingly. 2009-12-10 05:10:00 +00:00
uebayasi
779d1d735d MKZFS is properly set in bsd.own.mk now; remove it from MKEXTRAVARS. 2009-12-10 05:02:48 +00:00