Commit Graph

25 Commits

Author SHA1 Message Date
elad 215bd95ba4 integrate kauth. 2006-05-14 21:15:11 +00:00
christos 45af66f763 Make sure we clear cpi_name; reported by Aymeric Vincent. 2006-04-17 22:05:23 +00:00
cube 209be910b7 Support the generation of coredumps for 32-bits binaries under
COMPAT_NETBSD32.  They haven't worked for 5 years.

Silently agreed by the tech-kern readers.

XXX sparc64 MD glue still lacking.
XXX The FPU registers on i386 are not dumped correctly, according to my
XXX tests.  It shouldn't be much work for someone who has the slightest
XXX idea of how that stuff is supposed to be laid out on i386.
2006-03-12 20:25:25 +00:00
thorpej 5946661246 Sprinkle static. 2005-12-08 03:05:40 +00:00
christos de124326cb Make copy{in,out}_proc work on all processes (including curproc) by
special-casing the curproc case. Use copy{in,out}_proc directly instead
of checking for curproc each time. Discussed with thorpej.
2005-07-06 22:30:42 +00:00
kleink c6cc410a70 Addendum to previous: copyin_proc() must not be used on curproc. 2005-07-06 20:56:49 +00:00
kleink e3c2a9c2f6 Use copyin_proc() to peek for trailing zeroes in sections, as we might be
running in a different context (i.e. a process tracing).
2005-07-06 20:31:33 +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
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
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
skrll f7155e40f6 There's no need to pass a proc value when using UIO_SYSSPACE with
vn_rdwr(9) and uiomove(9).

OK'd by Jason Thorpe
2004-09-17 14:11:20 +00:00
itojun d2f1c029b9 kill sprintf, use snprintf 2004-04-21 18:40:37 +00:00
christos 9970fc6a83 handle siginfo for deferred signals. Allocate a ksiginfo pool, and store
the information there.
TODO:
1. since timer stuff gets called from an interrupt context, we could
   preallocate ksiginfo_t's from the pool, so we don't need a kmem
   pool.
2. probably the sa signal delivery syscall can be changed to take
   a ksiginfo_t so we can use only one pool.
3. maybe when we add realtime signal support, add a resource limit
   on the number of ksiginfo_t's a process can allocate.
2003-09-14 06:59:13 +00:00
christos 1dc335c017 SA_SIGINFO changes. 2003-09-06 22:03:09 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
nathanw 8e02eedcdf Track the LWP ID of a synchronous (trap) signal, and report it in core dumps. 2003-05-20 17:42:51 +00:00
itojun f265a4a4da use strlcpy. [fixed off-by-one in subr_prop.c] 2003-05-16 14:25:02 +00:00
matt 2de77aeda1 Make we keep track of the file sizes in a size_t, not an int. Also break
out the writing of an lwp's registers to a separate function.  XXX Although
not really the correct way to do this, make the thread that caused the
coredump has it's register set written first so GDB is happy.  (this is a
bridge until TRT is done).
2003-05-08 20:26:40 +00:00
atatat 524df47498 Tweak some comments so that they match the other comments more properly. 2003-02-25 05:27:35 +00:00
thorpej e0d8d366df Merge the nathanw_sa branch. 2003-01-18 10:06:22 +00:00
thorpej 0b63bf16b8 Cast off_t to (long long) for printing. 2001-12-10 02:07:37 +00:00
thorpej 06920aef28 Move the code that walks the process's VM map during a coredump
into uvm_coredump_walkmap(), and use callbacks into the coredump
routine to do something with each section.
2001-12-10 01:52:26 +00:00
thorpej 51535d4bf5 Add support for dumping ELF-cormat core files. 2001-12-09 23:05:56 +00:00