Commit Graph

4211 Commits

Author SHA1 Message Date
elad 9cafbe15bc Use the defined VERIEXEC_DIRECT instead of the (incorrect) 0 magic number. 2005-06-10 23:32:16 +00:00
matt e1245a3c46 Rework the coredump code to have no explicit knownledge of how coredump
i/o is done.  Instead, pass an opaque cookie which is then passed to a
new routine, coredump_write, which does the actual i/o.  This allows the
method of doing i/o to change without affecting any future MD code.
Also, make netbsd32_core.c [re]use core_netbsd.c (in a similar manner that
core_elf64.c uses core_elf32.c) and eliminate that code duplication.
cpu_coredump{,32} is now called twice, first with a NULL iocookie to fill
the core structure and a second to actually write md parts of the coredump.
All i/o is nolonger random access and is suitable for shipping over a stream.
2005-06-10 05:10:12 +00:00
atatat 420d91208b Properly fix the constipated lossage wrt -Wcast-qual and the sysctl
code.  I know it's not the prettiest code, but it seems to work rather
well in spite of itself.
2005-06-09 02:19:59 +00:00
scw 50d7457a5f Thou shalt not allocate PAGE_SIZE automatic variables on the kernel stack. 2005-06-08 07:25:12 +00:00
jdc e0dc2d1568 Revert previous ('_ncpus' is now 'ncpus' again).
MI variable names have precedence.
2005-06-06 19:56:46 +00:00
yamt 11bfc2d8e1 introduce a macro to initialize uvm_object and use it. 2005-06-06 12:09:19 +00:00
martin 71d020f371 Since we decided "const struct mbuf *" would not do the right thing (tm),
remove ~all const from mbuf pointers.
2005-06-06 06:06:50 +00:00
martin 36c7f61f8f Constify the source arg of m_copydata 2005-06-06 04:50:28 +00:00
thorpej b1a8db7e02 Use ANSI function decls. 2005-06-05 23:47:48 +00:00
thorpej 30fe14b30e Re-arrange slighty, eliminate prototypes that are unnecessary when using
ANSI function decls with "static".
2005-06-05 23:10:25 +00:00
jdc a406dfbd14 Rename 'ncpus' to '_ncpus', otherwise we shadow sparc/sparc64's 'ncpus'
when MULTIPROCESSOR is defined.
2005-06-05 21:22:20 +00:00
thorpej daf3614dbb Remove this version of genassym; nothing uses it. 2005-06-05 18:26:19 +00:00
jdc f13fcfe512 Rename 'ncpus' to '_ncpus', otherwise we shadow sparc/sparc64's 'ncpus'
when MULTIPROCESSOR is defined.
2005-06-05 09:04:49 +00:00
uwe fb2315c16b Constify argument to ttyldisc_lookup and ttyldisc_remove. 2005-06-04 22:45:11 +00:00
he 1d07c48176 An Elf32_Addr can't be cast to caddr_t without first being cast to intptr_t
without causing a warning (turned into error).  Fixes build problem for amd64.
2005-06-03 13:30:10 +00:00
matt 25a0e29a75 When writing coredumps, don't write zero uninstantiated demand-zero pages.
Also, with ELF core dumps, trim trailing zeroes from sections.  These two
changes can shrink coredumps by over 50% in size.
2005-06-02 17:01:43 +00:00
explorer 48c9742722 restore NetBSD RCS tag in __KERNEL_RCSID() macro 2005-06-02 15:48:11 +00:00
tron a40b37b948 Change first argument of m_copydata() back to "struct mbuf *" because
m_copydata() might eventually modify the "mbuf" structure to support
lazy mbuf mapping as pointed out by YAMAMOTO Takashi on "tech-net".
2005-06-02 15:19:28 +00:00
tron c4f68c0d95 Add missing RCS id. Problem pointed out by Jukka Salmi. 2005-06-02 12:58:16 +00:00
tron f0abca45e5 Fix bad botch invented in last change. 2005-06-02 12:42:10 +00:00
tron c54394a240 Change the first argument of m_copydata() to "const struct mbuf *" (which
doesn't require any implementation changes). This will allow us to get
rid off a lot of nasty type casts.
2005-06-02 10:34:59 +00:00
blymn 92bd9a35e9 Fix function variable names shadowing global declarations. 2005-06-01 13:12:49 +00:00
drochner 49d230fa91 need a "const" 2005-06-01 12:27:15 +00:00
chs 3f15e64c3c rename "kbucket" to "kmembuckets", for greater clarity.
don't forget to update vmstat this time.
2005-05-30 23:04:53 +00:00
christos 05e9e5eae6 rename delay. 2005-05-30 22:15:38 +00:00
thorpej 749453ad62 This copy of genassym.sh is now obsolete. PR toolchain/30350 2005-05-30 15:56:47 +00:00
martin 0621296675 Close additional file descriptors if we set MSG_CTRUNC in a SCM_RIGHTS
message. From der Mouse in PR kern/30370.
2005-05-30 11:21:11 +00:00
christos f63d439f2a finish bucket -> kbucket change 2005-05-30 04:15:17 +00:00
christos efb6943313 - add const.
- remove unnecessary casts.
- add __UNCONST casts and mark them with XXXUNCONST as necessary.
2005-05-29 22:24:14 +00:00
christos 6639138da1 Now we can fix the volatile cast-aways.
Rename some shadowed variables while here.
2005-05-29 21:16:14 +00:00
christos b636cdfe8a Regen 2005-05-29 21:11:30 +00:00
christos 44285e060d Argument for swapctl cannot be const, since it gets loaded with swap
statistics.
2005-05-29 21:07:49 +00:00
elad 686a5b23f6 Make veriexec_fp_cmp() a bit more useful by allowing it to compare two
fingerprints based on a common algorithm without requiring an actual
entry in the tables.
2005-05-29 16:07:10 +00:00
elad 65b04a0bf1 Use PAGE_SIZE chunks, not VERIEXEC_BUFSIZE - it's very important that the
size is not arbitrary and is exactly the size of a page.
2005-05-28 16:37:20 +00:00
elad dbc8605f39 - Add VERIEXEC_OPINIT() and veriexec_add_fp_ops(), simplifying the addition
of fingerprinting algorithms to the ops vector.

- Cleanup in veriexec_add_fp_name().

- Remove veriexec_default_ops and use the above API for adding the default
  methods in veriexec_init_fp_ops().
2005-05-28 15:49:36 +00:00
elad a2c658e922 Add indication for number of fingerprinted files on each device.
When a table is created for a new device, a new variable is created
under the kern.veriexec.count node named "dev_<id>". For example,
dev_0, dev_3, etc.
2005-05-22 22:34:01 +00:00
christos 7cdea212c0 No 0x in front of %p... 2005-05-22 15:54:45 +00:00
wrstuden 6336cd3696 The file being closed is (fdp->fd_lastfile - i), not i. So compare
(fdp->fd_lastfile - i) against fd_knlistsize. Otherwise we can
call knote_fdclose() on a file descriptor that doesn't have a knote.

This issue explains random panics I have had on process exit over the
past few years.
2005-05-20 16:13:00 +00:00
elad 5888b16eef Some changes in veriexec.
New features:

  - Add a veriexec_report() routine to make most reporting consistent and
    remove some common code.
  - Add 'strict' mode that controls how veriexec behaves.
  - Add sysctl knobs:
     o kern.veriexec.verbose controls verbosity levels. Value: 0, 1.
     o kern.veriexec.strict controls strict level. Values: 0, 1, 2. See
       documentation in sysctl(3) for details.
     o kern.veriexec.algorithms returns a string with a space separated
       list of supported hashing algorithms in veriexec.
  - Updated documentation in man pages for sysctl(3) and sysctl(8).

Bug fixes:

  - veriexec_removechk(): Code cleanup + handle FINGERPRINT_NOTEVAL
    correctly.
  - exec_script(): Don't pass 0 as flag when executing a script; use the
    defined VERIEXEC_INDIRECT - which is 1. Makes indirect execution
    enforcement work.
  - Fix some printing formats and types..
2005-05-19 20:16:19 +00:00
cube 9a1ab71f5f Add P_CLDSIGIGN, P_NOCLDSTOP and P_NOCLDWAIT to the list of flags we want
to inherit from the parent process.
2005-05-17 19:22:19 +00:00
christos 362a4a0bd5 Yes, it was a cool trick >20 years ago to use "0123456789abcdef"[a] to
implement, xtoa(), but I think defining the samestring 50 times is a bit
too much. Defined HEXDIGITS and hexdigits in subr_prf.c and use it...
2005-05-17 04:14:57 +00:00
christos 6919a4b65c don't unlock twice. 2005-05-09 23:40:20 +00:00
christos 3b37af53b0 lock all uses of uidhash. provide macros to lock and unlock. based on more
discussions with yamt.
2005-05-09 11:10:07 +00:00
christos 0c55badfae Protect chgsbsize() with splsoftnet(). As discussed with yamt. 2005-05-09 03:27:21 +00:00
christos 8dc75b1c08 Panic strings should not end with \n. 2005-05-08 18:44:39 +00:00
christos 761bd09636 PR/30154: YAMAMOTO Takashi: tcp_close locking botch
chgsbsize() as mentioned in the PR can be called from an interrupt context
via tcp_close(). Avoid calling uid_find() in chgsbsize().
- Instead of storing so_uid in struct socketvar, store *so_uidinfo
- Add a simple lock to struct uidinfo.
2005-05-07 17:42:09 +00:00
martin e8c879147d In m_pulldown avoid a prepend to the next mbuf in the chain if the result
would still not have all data we want continous.
Fixes PR kern/30098.
2005-05-06 09:40:40 +00:00
manu 89647c7ca6 First work on COMPAT_LINUX/amd64
Process startup and dynamiclinking work, but processes hang due to
Linux arch_prctl(2) not being really supported yet.
2005-05-03 16:26:27 +00:00
blymn 9c99b5674f Don't adjust the size of the hash table on file removes, it breaks things. 2005-04-26 10:45:41 +00:00
lukem 3fd1802e62 Move the MI printing of `copyright' to the MD cpu_startup() code
where the printing of `version' is already performed.
This has the benefit of allowing the copyright to be available
via dmesg(8) on platforms which need the `msgbuf' to be setup
in cpu_startup() before printed output is remembered.
2005-04-25 15:02:02 +00:00