The NetBSD Project

CVS log for src/sys/kern/kern_ktrace.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / kern

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.173 / (download) - annotate - [select for diffs], Mon Sep 3 16:29:35 2018 UTC (14 months, 1 week ago) by riastradh
Branch: MAIN
CVS Tags: phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, netbsd-9-base, netbsd-9, isaki-audio2-base, isaki-audio2, HEAD
Changes since 1.172: +4 -4 lines
Diff to previous 1.172 (colored)

Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int.  The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER!  Some subsystems have

	#define min(a, b)	((a) < (b) ? (a) : (b))
	#define max(a, b)	((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX.  Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate.  But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all.  (Who knows, maybe in some cases integer
truncation is actually intended!)

Revision 1.172 / (download) - annotate - [select for diffs], Mon Aug 28 04:57:11 2017 UTC (2 years, 2 months ago) by dholland
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, phil-wifi-base, pgoyette-compat-base, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: phil-wifi, pgoyette-compat
Changes since 1.171: +30 -31 lines
Diff to previous 1.171 (colored)

If we go to allocate and find someone else has at the same time, don't
trigger a refcount leak of the other guy's object. From mjg@freebsd.

While here also remove a bogus use of lbolt on the same path.

Revision 1.171 / (download) - annotate - [select for diffs], Fri Jul 28 15:16:39 2017 UTC (2 years, 3 months ago) by riastradh
Branch: MAIN
CVS Tags: nick-nhusb-base-20170825
Changes since 1.170: +3 -3 lines
Diff to previous 1.170 (colored)

Clamp the length we use, not the length we don't.

Avoids uninitialized memory disclosure to userland.

From Ilja Van Sprundel.

Revision 1.170 / (download) - annotate - [select for diffs], Thu Jun 1 02:45:13 2017 UTC (2 years, 5 months ago) by chs
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base
Branch point for: netbsd-8
Changes since 1.169: +3 -7 lines
Diff to previous 1.169 (colored)

remove checks for failure after memory allocation calls that cannot fail:

  kmem_alloc() with KM_SLEEP
  kmem_zalloc() with KM_SLEEP
  percpu_alloc()
  pserialize_create()
  psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.

Revision 1.169 / (download) - annotate - [select for diffs], Tue Sep 13 07:39:45 2016 UTC (3 years, 2 months ago) by martin
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Changes since 1.168: +8 -9 lines
Diff to previous 1.168 (colored)

Allow emulations to override the creation of ktrace records for posting
signals. In compat_netbsd32 use this to write the 32bit version of
the records, so a 32bit userland kdump is happy.

Revision 1.168 / (download) - annotate - [select for diffs], Tue Sep 13 07:01:08 2016 UTC (3 years, 2 months ago) by martin
Branch: MAIN
Changes since 1.167: +3 -3 lines
Diff to previous 1.167 (colored)

Make the ktrace record written by do_sys_sendmsg/do_sys_recvmsg overridable
by the caller. Use this in compat_netbsd32 to log the 32bit version, so
the 32bit userland kdump is happy.

Revision 1.167 / (download) - annotate - [select for diffs], Thu Jul 7 06:55:43 2016 UTC (3 years, 4 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, nick-nhusb-base-20160907
Changes since 1.166: +9 -9 lines
Diff to previous 1.166 (colored)

KNF. Remove extra spaces. No functional change.

Revision 1.166 / (download) - annotate - [select for diffs], Fri Nov 21 09:40:10 2014 UTC (4 years, 11 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.165: +5 -4 lines
Diff to previous 1.165 (colored)

Replace callout_stop with callout_halt

In order to call callout_destroy for a callout safely, we have to ensure
the function of the callout is not running and pending. To do so, we should
use callout_halt, not callout_stop.

In this case, we need to pass an interlock to callout_halt to wait for
the callout complete.

Reviewed by riastradh@.

Revision 1.165 / (download) - annotate - [select for diffs], Sun Sep 21 17:17:15 2014 UTC (5 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.164: +3 -3 lines
Diff to previous 1.164 (colored)

remove casts to the same type.

Revision 1.164 / (download) - annotate - [select for diffs], Mon Dec 9 16:45:23 2013 UTC (5 years, 11 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.163: +2 -91 lines
Diff to previous 1.163 (colored)

Put vfs bits of ktrace into kern_ktrace_vfs.c per convention.

Revision 1.163 / (download) - annotate - [select for diffs], Mon Sep 16 09:25:56 2013 UTC (6 years, 2 months ago) by martin
Branch: MAIN
Changes since 1.162: +3 -3 lines
Diff to previous 1.162 (colored)

Fix inverted ktrop() return value - oops!
Noted by Nicolas Joly.

Revision 1.162 / (download) - annotate - [select for diffs], Sat Sep 14 20:20:09 2013 UTC (6 years, 2 months ago) by martin
Branch: MAIN
Changes since 1.161: +3 -5 lines
Diff to previous 1.161 (colored)

ktrop() seems to be expected [by it's callers] to return a "bool like"
value, not an errno - make it so.
Remove another unused variable.

Revision 1.161 / (download) - annotate - [select for diffs], Sun Feb 19 21:06:51 2012 UTC (7 years, 8 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base10, agc-symver-base, agc-symver
Branch point for: tls-maxphys, rmind-smpnet
Changes since 1.160: +2 -41 lines
Diff to previous 1.160 (colored)

Remove COMPAT_SA / KERN_SA.  Welcome to 6.99.3!
Approved by core@.

Revision 1.160 / (download) - annotate - [select for diffs], Fri Dec 30 20:33:04 2011 UTC (7 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-base2
Branch point for: netbsd-6-1, netbsd-6-0, netbsd-6
Changes since 1.159: +12 -15 lines
Diff to previous 1.159 (colored)

Avoid panic on DIAGNOSTIC kernels with ktrace -p <not-existing-process>
The old logic was:

	error = ktrace_common(, fp);
	if (fp)
		if (error)
			fd_abort(, fp, );
		else
			fd_abort(, NULL, );

The 'if (fp)' portion really means if the op is not KTROP_CLEAR,
since the logic above always sets up fp otherwise, so change the
code to test this directly.

ktrace_common() can return an error both on the kernel thread
creation failure, which means that we should be calling fd_abort()
with fp, since nobody used the file yet and we should clear it now.
But it can also return an error because later, after the thread
creation if the process or process group was not found. In this
second case, we should be calling fd_abort with NULL, since the fp
is now used by the thread and it is going to clean it later. So
instead of checking the error from ktrace_common() to decide if we
are going to call fd_abort() with a NULL fp or not, let krace_common()
decide for us.  So the new logic becomes:

	error = ktrace_common(, &fp);
	if (op != KTROP_CLEAR)
		fd_abort(, fp, );

Since I am here, fix a freed memory access, by setting ktd to FALSE.

Revision 1.159 / (download) - annotate - [select for diffs], Wed Nov 30 10:27:46 2011 UTC (7 years, 11 months ago) by mbalmer
Branch: MAIN
CVS Tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base
Branch point for: jmcneill-usbmp
Changes since 1.158: +4 -4 lines
Diff to previous 1.158 (colored)

Only return values when there was no error.

Revision 1.158 / (download) - annotate - [select for diffs], Thu Sep 1 18:24:19 2011 UTC (8 years, 2 months ago) by matt
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache
Changes since 1.157: +3 -3 lines
Diff to previous 1.157 (colored)

Always make sure that kte_entry is aligned appropriately so register_t can
be stored there.  (not really a problem right now since time_t is now 64bit
bit and it just works but it's better to be explicit).

Revision 1.157 / (download) - annotate - [select for diffs], Wed Jun 1 21:25:00 2011 UTC (8 years, 5 months ago) by alnsn
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base
Changes since 1.156: +21 -2 lines
Diff to previous 1.156 (colored)

kern/42030 - tracking of file descriptors by ktrace/kdump

Revision 1.156 / (download) - annotate - [select for diffs], Wed Apr 27 00:00:46 2011 UTC (8 years, 6 months ago) by joerg
Branch: MAIN
CVS Tags: cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.155: +2 -35 lines
Diff to previous 1.155 (colored)

Remove Mach specific trace points.

Revision 1.155 / (download) - annotate - [select for diffs], Fri Nov 19 06:44:42 2010 UTC (8 years, 11 months ago) by dholland
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: jruoho-x86intr
Changes since 1.154: +11 -3 lines
Diff to previous 1.154 (colored)

Introduce struct pathbuf. This is an abstraction to hold a pathname
and the metadata required to interpret it. Callers of namei must now
create a pathbuf and pass it to NDINIT (instead of a string and a
uio_seg), then destroy the pathbuf after the namei session is
complete.

Update all namei call sites accordingly. Add a pathbuf(9) man page and
update namei(9).

The pathbuf interface also now appears in a couple of related
additional places that were passing string/uio_seg pairs that were
later fed into NDINIT. Update other call sites accordingly.

Revision 1.154 / (download) - annotate - [select for diffs], Mon Oct 18 00:09:13 2010 UTC (9 years, 1 month ago) by chs
Branch: MAIN
CVS Tags: uebayasi-xip-base4, uebayasi-xip-base3
Changes since 1.153: +4 -26 lines
Diff to previous 1.153 (colored)

when using ktrace format version 0 or 1, don't adjust the changed fields
in ktealloc(), since we do the same adjustment later in ktrwrite().
also, remove an unused variable in ktr_csw().

Revision 1.153 / (download) - annotate - [select for diffs], Thu Jul 1 02:38:30 2010 UTC (9 years, 4 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base2
Changes since 1.152: +4 -4 lines
Diff to previous 1.152 (colored)

Remove pfind() and pgfind(), fix locking in various broken uses of these.
Rename real routines to proc_find() and pgrp_find(), remove PFIND_* flags
and have consistent behaviour.  Provide proc_find_raw() for special cases.
Fix memory leak in sysctl_proc_corename().

COMPAT_LINUX: rework ptrace() locking, minimise differences between
different versions per-arch.

Note: while this change adds some formal cosmetics for COMPAT_DARWIN and
COMPAT_IRIX - locking there is utterly broken (for ages).

Fixes PR/43176.

Revision 1.152 / (download) - annotate - [select for diffs], Thu Jun 24 13:03:11 2010 UTC (9 years, 4 months ago) by hannken
Branch: MAIN
Changes since 1.151: +3 -3 lines
Diff to previous 1.151 (colored)

Clean up vnode lock operations pass 2:

VOP_UNLOCK(vp, flags) -> VOP_UNLOCK(vp): Remove the unneeded flags argument.

Welcome to 5.99.32.

Discussed on tech-kern.

Revision 1.151 / (download) - annotate - [select for diffs], Wed Mar 3 00:47:30 2010 UTC (9 years, 8 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base1
Branch point for: rmind-uvmplock
Changes since 1.150: +3 -3 lines
Diff to previous 1.150 (colored)

remove redundant checks of PK_MARKER.

Revision 1.150 / (download) - annotate - [select for diffs], Fri Oct 2 21:47:35 2009 UTC (10 years, 1 month ago) by elad
Branch: MAIN
CVS Tags: uebayasi-xip-base, matt-premerge-20091211, jym-xensuspend-nbase
Branch point for: uebayasi-xip
Changes since 1.149: +40 -2 lines
Diff to previous 1.149 (colored)

Move ktrace's subsystem security policy to the subsystem itself, and keep
just the suser-related logic in the suser secmodel.

Revision 1.149 / (download) - annotate - [select for diffs], Wed Aug 5 19:53:42 2009 UTC (10 years, 3 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7
Changes since 1.148: +4 -3 lines
Diff to previous 1.148 (colored)

Fix ktrace of data from iovec based system calls.
Fixes PR/41819

Revision 1.148 / (download) - annotate - [select for diffs], Sun Jan 11 02:45:52 2009 UTC (10 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base, mjf-devfs2-base, jymxensuspend-base, jym-xensuspend-base, jym-xensuspend
Changes since 1.147: +67 -44 lines
Diff to previous 1.147 (colored)

merge christos-time_t

Revision 1.147 / (download) - annotate - [select for diffs], Wed Oct 15 06:51:20 2008 UTC (11 years, 1 month ago) by wrstuden
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, christos-time_t-nbase, christos-time_t-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5, matt-nb5-mips64
Changes since 1.146: +41 -2 lines
Diff to previous 1.146 (colored)

Merge wrstuden-revivesa into HEAD.

Revision 1.146 / (download) - annotate - [select for diffs], Tue Jun 3 05:53:09 2008 UTC (11 years, 5 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl
Branch point for: haad-dm
Changes since 1.145: +5 -2 lines
Diff to previous 1.145 (colored)

Before freeing a ktr_desc, destroy its condition variables.

Revision 1.145 / (download) - annotate - [select for diffs], Tue May 27 17:48:27 2008 UTC (11 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.144: +8 -9 lines
Diff to previous 1.144 (colored)

Use pool_cache.

Revision 1.144 / (download) - annotate - [select for diffs], Tue Apr 29 15:55:24 2008 UTC (11 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Changes since 1.143: +3 -3 lines
Diff to previous 1.143 (colored)

Ignore processes with PK_MARKER set.

Revision 1.143 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:03 2008 UTC (11 years, 6 months ago) by martin
Branch: MAIN
Changes since 1.142: +2 -9 lines
Diff to previous 1.142 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.142 / (download) - annotate - [select for diffs], Thu Apr 24 18:39:24 2008 UTC (11 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.141: +7 -7 lines
Diff to previous 1.141 (colored)

Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.

Revision 1.141 / (download) - annotate - [select for diffs], Thu Apr 24 15:35:29 2008 UTC (11 years, 6 months ago) by ad
Branch: MAIN
Changes since 1.140: +7 -7 lines
Diff to previous 1.140 (colored)

Network protocol interrupts can now block on locks, so merge the globals
proclist_mutex and proclist_lock into a single adaptive mutex (proc_lock).
Implications:

- Inspecting process state requires thread context, so signals can no longer
  be sent from a hardware interrupt handler. Signal activity must be
  deferred to a soft interrupt or kthread.

- As the proc state locking is simplified, it's now safe to take exit()
  and wait() out from under kernel_lock.

- The system spends less time at IPL_SCHED, and there is less lock activity.

Revision 1.140 / (download) - annotate - [select for diffs], Fri Mar 21 21:55:00 2008 UTC (11 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, ad-socklock-base1
Branch point for: yamt-pf42, christos-time_t
Changes since 1.139: +41 -54 lines
Diff to previous 1.139 (colored)

Catch up with descriptor handling changes. See kern_descrip.c revision
1.173 for details.

Revision 1.139 / (download) - annotate - [select for diffs], Sun Feb 24 18:30:07 2008 UTC (11 years, 8 months ago) by dsl
Branch: MAIN
CVS Tags: matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, hpcarm-cleanup-base
Changes since 1.138: +4 -2 lines
Diff to previous 1.138 (colored)

Set p->p_trace_enabled in fork and whenever the controlling falgs change
instead of doing it in syscall_intern().
Note that syscall_intern() must still be called when the flags change
since many ports use a different copy of the syscall entry code when
tracing is enabled.

Revision 1.138 / (download) - annotate - [select for diffs], Wed Feb 6 22:12:41 2008 UTC (11 years, 9 months ago) by dsl
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.137: +7 -17 lines
Diff to previous 1.137 (colored)

Remove the 'args' parameter to 'trace_exit()' it is no longer used.
Instead of passing the (un)real system call code and syscall table pointer,
just pass the number of arguments - which is what ktrace really wants.
Ride forthcoming 4.99.53

Revision 1.137 / (download) - annotate - [select for diffs], Sat Feb 2 21:04:41 2008 UTC (11 years, 9 months ago) by elad
Branch: MAIN
Changes since 1.136: +5 -4 lines
Diff to previous 1.136 (colored)

Add, document, and use KAUTH_REQ_PROCESS_KTRACE_PERSISTENT.

Revision 1.136 / (download) - annotate - [select for diffs], Sat Feb 2 20:42:18 2008 UTC (11 years, 9 months ago) by elad
Branch: MAIN
Changes since 1.135: +7 -7 lines
Diff to previous 1.135 (colored)

KTRFAC_ROOT -> KTRFAC_PERSISTENT, and update comments.

Discussed with christos@ and yamt@.

Revision 1.135 / (download) - annotate - [select for diffs], Wed Jan 23 17:56:53 2008 UTC (11 years, 9 months ago) by elad
Branch: MAIN
CVS Tags: bouyer-xeni386-nbase
Changes since 1.134: +3 -3 lines
Diff to previous 1.134 (colored)

Forgot to commit these two as well. Spotted by hannken@.

Adapt to "CAN" removal.

Revision 1.134 / (download) - annotate - [select for diffs], Sat Jan 5 19:08:50 2008 UTC (11 years, 10 months ago) by dsl
Branch: MAIN
CVS Tags: matt-armv6-base, bouyer-xeni386-base
Changes since 1.133: +6 -6 lines
Diff to previous 1.133 (colored)

Use FILE_LOCK() and FILE_UNLOCK()

Revision 1.133 / (download) - annotate - [select for diffs], Wed Jan 2 11:48:50 2008 UTC (11 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.132: +4 -9 lines
Diff to previous 1.132 (colored)

Merge vmlocking2 to head.

Revision 1.132 / (download) - annotate - [select for diffs], Sat Dec 22 11:38:54 2007 UTC (11 years, 10 months ago) by dsl
Branch: MAIN
CVS Tags: vmlocking2-base3
Changes since 1.131: +3 -3 lines
Diff to previous 1.131 (colored)

Add a few buckets of 'const' and 'static' to the system call trace code.
sys_trace() still needs to be able to update the syscall args.

Revision 1.131 / (download) - annotate - [select for diffs], Thu Dec 20 23:03:08 2007 UTC (11 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.130: +11 -11 lines
Diff to previous 1.130 (colored)

Convert all the system call entry points from:
    int foo(struct lwp *l, void *v, register_t *retval)
to:
    int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code to not write into 'uap' and (in some cases) to actually
pass a correctly formatted 'uap' structure with the right name to the
next routine.
A few 'compat' routines that just call standard ones have been deleted.
All the 'compat' code compiles (along with the kernels required to test
build it).
98% done by automated scripts.

Revision 1.130 / (download) - annotate - [select for diffs], Sat Dec 8 19:29:48 2007 UTC (11 years, 11 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Changes since 1.129: +3 -4 lines
Diff to previous 1.129 (colored)

Remove cn_lwp from struct componentname.  curlwp should be used
from on.  The NDINIT() macro no longer takes the lwp parameter and
associates the credentials of the calling thread with the namei
structure.

Revision 1.129 / (download) - annotate - [select for diffs], Tue Dec 4 09:08:58 2007 UTC (11 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: vmlocking2-base2, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base
Changes since 1.128: +4 -8 lines
Diff to previous 1.128 (colored)

ktd_callout: ktrace_lock can be acquired now.

Revision 1.128 / (download) - annotate - [select for diffs], Mon Oct 8 15:13:12 2007 UTC (12 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking2-base1, vmlocking-nbase, vmlocking-base, jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: vmlocking2, mjf-devfs
Changes since 1.127: +3 -3 lines
Diff to previous 1.127 (colored)

Fix merge error.

Revision 1.127 / (download) - annotate - [select for diffs], Mon Oct 8 15:12:07 2007 UTC (12 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.126: +7 -7 lines
Diff to previous 1.126 (colored)

Merge file descriptor locking, cwdi locking and cross-call changes
from the vmlocking branch.

Revision 1.126 / (download) - annotate - [select for diffs], Mon Aug 27 13:33:45 2007 UTC (12 years, 2 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-x86pmap-base2, yamt-x86pmap-base, nick-csl-alignment-base5
Branch point for: yamt-x86pmap, matt-armv6
Changes since 1.125: +4 -7 lines
Diff to previous 1.125 (colored)

Fix inverted test in ktrpoint(), NAMI traces weren't being generated.
Also inline the 'ktrace_on' part of the test.

Revision 1.125 / (download) - annotate - [select for diffs], Wed Aug 15 12:07:33 2007 UTC (12 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.124: +250 -107 lines
Diff to previous 1.124 (colored)

Changes to make ktrace LKM friendly and reduce ifdef KTRACE. Proposed
on tech-kern.

Revision 1.124 / (download) - annotate - [select for diffs], Mon Jul 9 21:10:52 2007 UTC (12 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: nick-csl-alignment, jmcneill-pm
Changes since 1.123: +11 -10 lines
Diff to previous 1.123 (colored)

Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements

Revision 1.123 / (download) - annotate - [select for diffs], Fri Jun 1 20:24:21 2007 UTC (12 years, 5 months ago) by dsl
Branch: MAIN
Changes since 1.122: +23 -2 lines
Diff to previous 1.122 (colored)

Add a ktrkuser() function that can be used to generate a KTR_USER trace
entry from kernel-resident data.
Mainly so I can (ab)use the KTR_USER entry for extra info.

Revision 1.122 / (download) - annotate - [select for diffs], Thu Apr 26 16:27:32 2007 UTC (12 years, 6 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-idlelwp-base8
Changes since 1.121: +18 -7 lines
Diff to previous 1.121 (colored)

Move the ktrace (and systrace) in namei() inside the retry loop for
emulation lookups.
If doing a lookup relative to the emulation root, prepend the emulation root
to the traced filename.
While here pass the filename length through to the ktrace code since namei()
knows the length and ktr_namei() would have to call strlen().
Note: that if namei() is being called during execve processing, the emulation
root name isn't available and "/emul/???" is used.  Also namei() has to use
strlen() to get the lenght on the emulatoon root - even though it is a
compile-time constant string.

Revision 1.121 / (download) - annotate - [select for diffs], Thu Mar 29 17:37:13 2007 UTC (12 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: thorpej-atomic-base, thorpej-atomic
Changes since 1.120: +24 -14 lines
Diff to previous 1.120 (colored)

- cv_wakeup, cv_broadcast -> cv_signal where appropriate
- Update some comments.

Revision 1.120 / (download) - annotate - [select for diffs], Mon Mar 12 18:18:33 2007 UTC (12 years, 8 months ago) by ad
Branch: MAIN
Branch point for: reinoud-bufcleanup, mjf-ufs-trans
Changes since 1.119: +3 -3 lines
Diff to previous 1.119 (colored)

Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.

Revision 1.119 / (download) - annotate - [select for diffs], Fri Mar 9 14:11:24 2007 UTC (12 years, 8 months ago) by ad
Branch: MAIN
Branch point for: vmlocking
Changes since 1.118: +16 -16 lines
Diff to previous 1.118 (colored)

- Make the proclist_lock a mutex. The write:read ratio is unfavourable,
  and mutexes are cheaper use than RW locks.
- LOCK_ASSERT -> KASSERT in some places.
- Hold proclist_lock/kernel_lock longer in a couple of places.

Revision 1.118 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:03 2007 UTC (12 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.117: +9 -9 lines
Diff to previous 1.117 (colored)

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.117 / (download) - annotate - [select for diffs], Mon Feb 26 09:20:53 2007 UTC (12 years, 8 months ago) by yamt
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.116: +3 -3 lines
Diff to previous 1.116 (colored)

implement priority inheritance.

Revision 1.116 / (download) - annotate - [select for diffs], Thu Feb 22 06:34:43 2007 UTC (12 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.115: +3 -3 lines
Diff to previous 1.115 (colored)

TRUE -> true, FALSE -> false

Revision 1.115 / (download) - annotate - [select for diffs], Sat Feb 17 22:31:42 2007 UTC (12 years, 9 months ago) by pavel
Branch: MAIN
Changes since 1.114: +3 -3 lines
Diff to previous 1.114 (colored)

Change the process/lwp flags seen by userland via sysctl back to the
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.

Restores source compatibility with pre-newlock2 tools like ps or top.

Reviewed by Andrew Doran.

Revision 1.114 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:30 2007 UTC (12 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Branch point for: yamt-idlelwp
Changes since 1.113: +317 -270 lines
Diff to previous 1.113 (colored)

Merge newlock2 to head.

Revision 1.113 / (download) - annotate - [select for diffs], Thu Jan 4 17:38:26 2007 UTC (12 years, 10 months ago) by elad
Branch: MAIN
CVS Tags: newlock2-nbase, newlock2-base
Changes since 1.112: +4 -3 lines
Diff to previous 1.112 (colored)

Consistent usage of KAUTH_GENERIC_ISSUSER.

Revision 1.112 / (download) - annotate - [select for diffs], Tue Nov 28 17:27:10 2006 UTC (12 years, 11 months ago) by elad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, wrstuden-fixsa-base-1, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, matt-nb4-arm-base, matt-nb4-arm
Branch point for: wrstuden-fixsa, netbsd-4
Changes since 1.111: +4 -12 lines
Diff to previous 1.111 (colored)

Move ktrace, ptrace, systrace, and procfs to use kauth(9).

First, remove process_checkioperm() calls from MD code. Similar checks
using kauth(9) routines (on the process scope, using appropriate action)
are done in the callers.

Add secmodel back-end to handle each subsystem.

Revision 1.111 / (download) - annotate - [select for diffs], Wed Nov 1 10:17:58 2006 UTC (13 years ago) by yamt
Branch: MAIN
Changes since 1.110: +5 -5 lines
Diff to previous 1.110 (colored)

remove some __unused from function parameters.

Revision 1.110 / (download) - annotate - [select for diffs], Sun Oct 22 18:19:49 2006 UTC (13 years ago) by christos
Branch: MAIN
Changes since 1.109: +11 -10 lines
Diff to previous 1.109 (colored)

make ktruser enforce the maximum buffer length, and return an error.

Revision 1.109 / (download) - annotate - [select for diffs], Tue Oct 17 18:21:29 2006 UTC (13 years, 1 month ago) by dogcow
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.108: +2 -4 lines
Diff to previous 1.108 (colored)

now that we have -Wno-unused-parameter, back out all the tremendously ugly
code to gratuitously access said parameters.

Revision 1.108 / (download) - annotate - [select for diffs], Fri Oct 13 16:53:36 2006 UTC (13 years, 1 month ago) by dogcow
Branch: MAIN
Changes since 1.107: +4 -2 lines
Diff to previous 1.107 (colored)

More -Wunused fallout. sprinkle __unused when possible; otherwise, use the
	do { if (&x) {} } while (/* CONSTCOND */ 0);
construct as suggested by uwe in <20061012224845.GA9449@snark.ptc.spbu.ru>.

Revision 1.107 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:15 2006 UTC (13 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.106: +5 -5 lines
Diff to previous 1.106 (colored)

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.106 / (download) - annotate - [select for diffs], Sat Sep 23 22:01:04 2006 UTC (13 years, 1 month ago) by manu
Branch: MAIN
Changes since 1.105: +30 -2 lines
Diff to previous 1.105 (colored)

Add a -t+S flag to ktrace for tracing activity related to sysctl. MIB
names will be displayed, with data readen and written as well.

Revision 1.105 / (download) - annotate - [select for diffs], Sun Jul 23 22:06:11 2006 UTC (13 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, rpaulo-netinet-merge-pcb-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.104: +27 -28 lines
Diff to previous 1.104 (colored)

Use the LWP cached credentials where sane.

Revision 1.104 / (download) - annotate - [select for diffs], Wed Jun 7 22:33:39 2006 UTC (13 years, 5 months ago) by kardel
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base
Changes since 1.103: +8 -12 lines
Diff to previous 1.103 (colored)

merge FreeBSD timecounters from branch simonb-timecounters
- struct timeval time is gone
  time.tv_sec -> time_second
- struct timeval mono_time is gone
  mono_time.tv_sec -> time_uptime
- access to time via
	{get,}{micro,nano,bin}time()
	get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
  Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
  NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html

Revision 1.103 / (download) - annotate - [select for diffs], Sun May 14 21:15:11 2006 UTC (13 years, 6 months ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5, simonb-timecounters-base
Branch point for: chap-midi
Changes since 1.102: +13 -12 lines
Diff to previous 1.102 (colored)

integrate kauth.

Revision 1.102 / (download) - annotate - [select for diffs], Sat Apr 15 04:56:14 2006 UTC (13 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: elad-kernelauth-base
Changes since 1.101: +3 -6 lines
Diff to previous 1.101 (colored)

Coverity CID 846: Simplify code.

Revision 1.101 / (download) - annotate - [select for diffs], Wed Mar 1 12:38:21 2006 UTC (13 years, 8 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, peter-altq, elad-kernelauth
Changes since 1.100: +3 -4 lines
Diff to previous 1.100 (colored)

merge yamt-uio_vmspace branch.

- use vmspace rather than proc or lwp where appropriate.
  the latter is more natural to specify an address space.
  (and less likely to be abused for random purposes.)
- fix a swdmover race.

Revision 1.100 / (download) - annotate - [select for diffs], Sat Dec 24 19:12:23 2005 UTC (13 years, 10 months ago) by perry
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5
Branch point for: yamt-uio_vmspace, simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.99: +3 -3 lines
Diff to previous 1.99 (colored)

Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.

Revision 1.99 / (download) - annotate - [select for diffs], Tue Dec 13 13:12:18 2005 UTC (13 years, 11 months ago) by reinoud
Branch: MAIN
Changes since 1.98: +3 -3 lines
Diff to previous 1.98 (colored)

Fix of panic that was introduced since ktrace-lwp branch was merged. The
shortcut to the process of the passed lwp paniced the kernel since lwp
could/can be passwd as NULL in VOP_WRITE().

This was happening when ktracing to NFS. The function ktrwrite() set the
uio_lwp to NULL and then calls VOP_WRITE() with this argument. nfs_write()
then accessed lwp *l->l_proc wich paniced.

Thanks to David Laight for his help on tracking it down.

Revision 1.98 / (download) - annotate - [select for diffs], Sun Dec 11 12:24:29 2005 UTC (13 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.97: +144 -57 lines
Diff to previous 1.97 (colored)

merge ktrace-lwp.

Revision 1.97 / (download) - annotate - [select for diffs], Sun May 29 22:24:15 2005 UTC (14 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Branch point for: yamt-lazymbuf
Changes since 1.96: +7 -7 lines
Diff to previous 1.96 (colored)

- add const.
- remove unnecessary casts.
- add __UNCONST casts and mark them with XXXUNCONST as necessary.

Revision 1.96 / (download) - annotate - [select for diffs], Wed Feb 9 16:15:16 2005 UTC (14 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, yamt-km-base2, netbsd-3-base, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-1-RELEASE, kent-audio2-base
Branch point for: netbsd-3-0, netbsd-3
Changes since 1.95: +14 -12 lines
Diff to previous 1.95 (colored)

Don't de-reference a NULL ktd on error. Fix from enami, thanks.

Revision 1.95 / (download) - annotate - [select for diffs], Tue Oct 26 06:58:05 2004 UTC (15 years ago) by skrll
Branch: MAIN
CVS Tags: yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Changes since 1.94: +3 -3 lines
Diff to previous 1.94 (colored)

Fix bug in siginfo handling introduced in revision 1.93

Revision 1.94 / (download) - annotate - [select for diffs], Fri Oct 1 16:30:53 2004 UTC (15 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.93: +4 -4 lines
Diff to previous 1.93 (colored)

introduce a function, proclist_foreach_call, to iterate all procs on
a proclist and call the specified function for each of them.
primarily to fix a procfs locking problem, but i think that it's useful for
others as well.

while i'm here, introduce PROCLIST_FOREACH macro, which is similar to
LIST_FOREACH but skips marker entries which are used by proclist_foreach_call.

Revision 1.93 / (download) - annotate - [select for diffs], Wed Sep 22 22:15:03 2004 UTC (15 years, 1 month ago) by enami
Branch: MAIN
Changes since 1.92: +660 -249 lines
Diff to previous 1.92 (colored)

Create kernel thread and let it to issue the write request.  We can't
do this from trace target process since we can't sleep at certain
trace point (otherwise system may hang).  Address PR#23155.

Revision 1.92 / (download) - annotate - [select for diffs], Sat Sep 4 07:09:35 2004 UTC (15 years, 2 months ago) by skrll
Branch: MAIN
Changes since 1.91: +3 -3 lines
Diff to previous 1.91 (colored)

Use "NULL" instead of "(struct foo *)0".

Revision 1.91 / (download) - annotate - [select for diffs], Thu Jun 24 15:06:35 2004 UTC (15 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.90: +5 -3 lines
Diff to previous 1.90 (colored)

Explain why the comment is a lie.

Revision 1.90 / (download) - annotate - [select for diffs], Wed Jun 23 23:05:48 2004 UTC (15 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.89: +52 -30 lines
Diff to previous 1.89 (colored)

Fix a panic induced by forcing ktrace to inject an emul record on
a ktraced file descriptor that has already been invalidated. Change
all ktrace functions to propagate the error from ktrwrite() and
check for it. Thanks to Pavel Cahyna for finding this and giving
a perfect bug report.

[should be pulled up for 2.0]

Revision 1.89 / (download) - annotate - [select for diffs], Fri Apr 30 07:51:59 2004 UTC (15 years, 6 months ago) by enami
Branch: MAIN
Changes since 1.88: +29 -97 lines
Diff to previous 1.88 (colored)

ANSI'fy the rest of functions.

Revision 1.88 / (download) - annotate - [select for diffs], Wed Feb 25 21:40:40 2004 UTC (15 years, 8 months ago) by enami
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.87: +31 -29 lines
Diff to previous 1.87 (colored)

Whitespace nits.

Revision 1.87 / (download) - annotate - [select for diffs], Wed Feb 25 21:34:18 2004 UTC (15 years, 8 months ago) by enami
Branch: MAIN
Changes since 1.86: +4 -2 lines
Diff to previous 1.86 (colored)

Make ktrwrite() and ktrinitheader() private again.  ktrsyscall32() no longer
exists.

Revision 1.86 / (download) - annotate - [select for diffs], Fri Jan 16 05:03:02 2004 UTC (15 years, 10 months ago) by mrg
Branch: MAIN
Changes since 1.85: +6 -2 lines
Diff to previous 1.85 (colored)

clean up a little:
- delete ktrsyscall32()
- add a check #ifdef _LP64 to do the conversion if P_32 is set to the
standard ktrsyscall()
- add a couple of similar _LP64/P_32 checks to the systrace code.

this should get systrace working for 32 bit apps as well as complete
ktrace support for "trace_enter/trace_exit" using platforms such as amd64.

XXX: systrace isn't supported on sparc64 currently... (it doesn't use
trace_enter/trace_exit, or have it's own calls to systrace_xxx()...)

Revision 1.85 / (download) - annotate - [select for diffs], Thu Jan 15 14:29:20 2004 UTC (15 years, 10 months ago) by mrg
Branch: MAIN
Changes since 1.84: +2 -4 lines
Diff to previous 1.84 (colored)

export ktrinitheader() and ktrwrite() for ktrsyscall32(), which is used
to write 32 bit syscall arguments in a 64 bit format.

Revision 1.84 / (download) - annotate - [select for diffs], Sun Dec 14 22:56:45 2003 UTC (15 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.83: +11 -5 lines
Diff to previous 1.83 (colored)

Defer writing of KTR_EMUL entry until first trace done by target process.
Stops ktrops sleeping with the pid table locked.

Revision 1.83 / (download) - annotate - [select for diffs], Mon Nov 24 16:51:33 2003 UTC (15 years, 11 months ago) by manu
Branch: MAIN
Changes since 1.82: +31 -2 lines
Diff to previous 1.82 (colored)

Enable tracing of out of line data sent with Mach message

Revision 1.82 / (download) - annotate - [select for diffs], Wed Nov 12 21:07:38 2003 UTC (16 years ago) by dsl
Branch: MAIN
Changes since 1.81: +9 -6 lines
Diff to previous 1.81 (colored)

- Count number of zombies and stopped children and requeue them at the top
  of the sibling list so that find_stopped_child can be optimised to avoid
  traversing the entire sibling list - helps when a process has a lot of
  children.
- Modify locking in pfind() and pgfind() to that the caller can rely on the
  result being valid, allow caller to request that zombies be findable.
- Rename pfind() to p_find() to ensure we break binary compatibility.
- Remove svr4_pfind since p_find willnow do the job.
- Modify some of the SMP locking of the proc lists - signals are still stuffed.

Welcome to 1.6ZF

Revision 1.81 / (download) - annotate - [select for diffs], Sun Nov 2 12:01:40 2003 UTC (16 years ago) by jdolecek
Branch: MAIN
Changes since 1.80: +5 -7 lines
Diff to previous 1.80 (colored)

use LIST_FOREACH() where appropriate

Revision 1.80 / (download) - annotate - [select for diffs], Wed Oct 8 00:28:42 2003 UTC (16 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.79: +4 -4 lines
Diff to previous 1.79 (colored)

* Shuffle some data structures so, and add a flags word to ksiginfo_t.
  Right now the only flag is used to indicate if a ksiginfo_t is a
  result of a trap.  Add a predicate macro to test for this flag.
* Add initialization macros for ksiginfo_t's.
* Add accssor macro for ksi_trap.  Expands to 0 if the ksiginfo_t was
  not the result of a trap.  This matches the sigcontext trapcode semantics.
* In kpsendsig(), use KSI_TRAP_P() to select the lwp that gets the signal.
  Inspired by Matthias Drochner's fix to kpsendsig(), but correctly handles
  the case of non-trap-generated signals that have a > 0 si_code.

This patch fixes a signal delivery problem with threaded programs noted by
Matthias Drochner on tech-kern.

As discussed on tech-kern.  Reviewed and OK's by Christos.

Revision 1.79 / (download) - annotate - [select for diffs], Thu Sep 25 21:59:18 2003 UTC (16 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.78: +4 -4 lines
Diff to previous 1.78 (colored)

constify sendsig/trapsignal

Revision 1.78 / (download) - annotate - [select for diffs], Fri Sep 19 22:51:05 2003 UTC (16 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.77: +21 -12 lines
Diff to previous 1.77 (colored)

support for siginfo_t in ktrace

Revision 1.77 / (download) - annotate - [select for diffs], Thu Aug 7 16:31:45 2003 UTC (16 years, 3 months ago) by agc
Branch: MAIN
Changes since 1.76: +3 -7 lines
Diff to previous 1.76 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.

Revision 1.76 / (download) - annotate - [select for diffs], Mon Aug 4 18:53:06 2003 UTC (16 years, 3 months ago) by drochner
Branch: MAIN
Changes since 1.75: +3 -3 lines
Diff to previous 1.75 (colored)

sy_narg isn't very useful where an argument can span two register_t slots
(as off_t on 32-bit platforms)
see PR kern/22297 by myself

Revision 1.75 / (download) - annotate - [select for diffs], Wed Jul 16 22:42:47 2003 UTC (16 years, 4 months ago) by dsl
Branch: MAIN
Changes since 1.74: +17 -3 lines
Diff to previous 1.74 (colored)

Add ktrace of env and args during exec.

Revision 1.74 / (download) - annotate - [select for diffs], Sun Jun 29 22:31:21 2003 UTC (16 years, 4 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.73: +83 -105 lines
Diff to previous 1.73 (colored)

Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.73 / (download) - annotate - [select for diffs], Sun Jun 29 09:59:59 2003 UTC (16 years, 4 months ago) by martin
Branch: MAIN
Changes since 1.72: +3 -3 lines
Diff to previous 1.72 (colored)

Intermediate cast to intptr_t when storing a lwp id in a caddr_t variable
for archs where those have different size.

Revision 1.72 / (download) - annotate - [select for diffs], Sat Jun 28 14:21:54 2003 UTC (16 years, 4 months ago) by darrenr
Branch: MAIN
Changes since 1.71: +105 -83 lines
Diff to previous 1.71 (colored)

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

Revision 1.71 / (download) - annotate - [select for diffs], Thu May 15 12:56:16 2003 UTC (16 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.70: +5 -4 lines
Diff to previous 1.70 (colored)

ktrace rval[1] - in order to get both fd numbers for pipe()

Revision 1.70 / (download) - annotate - [select for diffs], Fri May 2 12:43:01 2003 UTC (16 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.69: +12 -5 lines
Diff to previous 1.69 (colored)

fix locking.

Revision 1.69 / (download) - annotate - [select for diffs], Thu Apr 3 18:54:16 2003 UTC (16 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.68: +3 -3 lines
Diff to previous 1.68 (colored)

Don't require a file if CLEAR is set [did not work before because we
could have the descend flag too]

Revision 1.68 / (download) - annotate - [select for diffs], Sun Feb 23 14:37:34 2003 UTC (16 years, 8 months ago) by pk
Branch: MAIN
Changes since 1.67: +4 -2 lines
Diff to previous 1.67 (colored)

Make updating a file's reference and use count MP-safe.

Revision 1.67 / (download) - annotate - [select for diffs], Sat Jan 18 10:06:27 2003 UTC (16 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.66: +18 -12 lines
Diff to previous 1.66 (colored)

Merge the nathanw_sa branch.

Revision 1.66 / (download) - annotate - [select for diffs], Sat Dec 21 16:23:57 2002 UTC (16 years, 10 months ago) by manu
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, fvdl_fs64_base
Changes since 1.65: +8 -4 lines
Diff to previous 1.65 (colored)

Pass the system call table to trace_enter() and ktrsys() so that it is
possible to use alternate system call tables. This is usefull for
displaying correctly the arguments in Mach binaries traces.

If NULL is given, then the regular systam call table for the process is used.

Revision 1.65 / (download) - annotate - [select for diffs], Fri Dec 20 05:06:25 2002 UTC (16 years, 11 months ago) by gmcgarry
Branch: MAIN
Changes since 1.64: +3 -3 lines
Diff to previous 1.64 (colored)

yield() -> preempt().

Revision 1.64 / (download) - annotate - [select for diffs], Tue Dec 17 18:42:54 2002 UTC (16 years, 11 months ago) by manu
Branch: MAIN
CVS Tags: gmcgarry_ucred_base, gmcgarry_ctxsw_base, gmcgarry_ctxsw
Branch point for: gmcgarry_ucred
Changes since 1.63: +4 -14 lines
Diff to previous 1.63 (colored)

Added support for exchange of Mach messages between processes.

This does not buy us new functionnality for now, because we still have to
discover how mach_init (which acts as a name server, enabling processes to
discover each other's ports) is able to receive messages from other processes
(this is a bootstrap problem, and the bootstrap port might be the place to
search).

While we are there:
- removed a lot of debug which is now available using ktrace.
- reworked message handling to avoid mutliple copyin/copyout of the
same data. ktrace of Mach message now uses the in-kernel copy of the
message instead of copying it from userland.
- packed mach trap handlers arguments into a structure to avoid modifying
everything next time we have to add an argument.

Revision 1.63 / (download) - annotate - [select for diffs], Thu Dec 12 17:40:40 2002 UTC (16 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.62: +3 -5 lines
Diff to previous 1.62 (colored)

always compile in mach ktrace support; it is to small to bother.

Revision 1.62 / (download) - annotate - [select for diffs], Mon Dec 9 21:29:21 2002 UTC (16 years, 11 months ago) by manu
Branch: MAIN
Changes since 1.61: +109 -23 lines
Diff to previous 1.61 (colored)

Added support for dumping mach messages in ktrace/kdump. While we are
there, KNFify a few functions.

Revision 1.61 / (download) - annotate - [select for diffs], Fri Nov 15 20:06:04 2002 UTC (17 years ago) by manu
Branch: MAIN
Changes since 1.60: +5 -4 lines
Diff to previous 1.60 (colored)

Add a realcode argument to trace_enter and ktrsyscall. realcode is the
original system call number, which can be negative for a Mach trap.
We cannot just replace code by realcode, because ktrsyscall uses it as
an index in the system call table, thus crashing the kernel when the
value is negative.

Revision 1.60 / (download) - annotate - [select for diffs], Sun Nov 10 03:30:34 2002 UTC (17 years ago) by thorpej
Branch: MAIN
Changes since 1.59: +3 -3 lines
Diff to previous 1.59 (colored)

Fix signed/unsigned comparison warnings.

Revision 1.59 / (download) - annotate - [select for diffs], Wed Oct 23 09:14:18 2002 UTC (17 years ago) by jdolecek
Branch: MAIN
CVS Tags: kqueue-aftermerge
Changes since 1.58: +7 -2 lines
Diff to previous 1.58 (colored)

merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe

Revision 1.58 / (download) - annotate - [select for diffs], Fri Jun 28 01:59:36 2002 UTC (17 years, 4 months ago) by itojun
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-base, gehenna-devsw-base
Changes since 1.57: +4 -3 lines
Diff to previous 1.57 (colored)

disallow ktrace on P_SUGID.  from openbsd

Revision 1.57 / (download) - annotate - [select for diffs], Tue Jun 18 08:01:30 2002 UTC (17 years, 5 months ago) by fvdl
Branch: MAIN
Changes since 1.56: +7 -4 lines
Diff to previous 1.56 (colored)

Repair damage done in systrace commit. Since argsize is nog longer
passed, assume it's sy_narg * sizeof (register_t). The code
made this assumption implicitly anyway. Fixes compat_*32 tracing.

Revision 1.56 / (download) - annotate - [select for diffs], Mon Jun 17 16:22:50 2002 UTC (17 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.55: +4 -3 lines
Diff to previous 1.55 (colored)

Niels Provos systrace work, ported to NetBSD by kittenz and reworked...

Revision 1.55 / (download) - annotate - [select for diffs], Mon Nov 12 15:25:10 2001 UTC (18 years ago) by lukem
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, newlock-base, newlock, netbsd-1-6-base, ifpoll-base, eeh-devprop-base, eeh-devprop
Branch point for: netbsd-1-6, gehenna-devsw
Changes since 1.54: +4 -1 lines
Diff to previous 1.54 (colored)

add RCSIDs

Revision 1.54 / (download) - annotate - [select for diffs], Thu Jun 14 20:32:47 2001 UTC (18 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, thorpej-devvp, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-mips-cache, kqueue
Changes since 1.53: +6 -4 lines
Diff to previous 1.53 (colored)

Fix a partial construction problem that can cause race conditions
between creation of a file descriptor and close(2) when using kernel
assisted threads.  What we do is stick descriptors in the table, but
mark them as "larval".  This causes essentially everything to treat
it as a non-existent descriptor, except for fdalloc(), which sees a
filled slot so that it won't (incorrectly) allocate it again.  When
a descriptor is fully constructed, the code that has constructed it
marks it as "mature" (which actually clears the "larval" flag), and
things continue to work as normal.

While here, gather all the code that gets a descriptor from the table
into a fd_getfile() function, and call it, rather than having the
same (sometimes incorrect) code copied all over the place.

Revision 1.53 / (download) - annotate - [select for diffs], Fri Jan 5 22:25:26 2001 UTC (18 years, 10 months ago) by jdolecek
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: nathanw_sa
Changes since 1.52: +4 -1 lines
Diff to previous 1.52 (colored)

utrace(2): limit size of user data to KTR_USER_MAXLEN (currently 2048); return EINVAL if 'len' is bigger

Revision 1.52 / (download) - annotate - [select for diffs], Fri Jan 5 21:42:09 2001 UTC (18 years, 10 months ago) by jdolecek
Branch: MAIN
Changes since 1.51: +3 -3 lines
Diff to previous 1.51 (colored)

utrace(2): rename 'id' parameter to 'label'

Revision 1.51 / (download) - annotate - [select for diffs], Thu Dec 28 11:10:15 2000 UTC (18 years, 10 months ago) by jdolecek
Branch: MAIN
Changes since 1.50: +65 -3 lines
Diff to previous 1.50 (colored)

add utrace(2) - this syscall allows to add user ktrace entries
idea from FreeBSD, but added argument (const char *id) so that it's possible
to differentiate between entries from different sources

Revision 1.50 / (download) - annotate - [select for diffs], Tue Dec 19 22:08:36 2000 UTC (18 years, 11 months ago) by scw
Branch: MAIN
Changes since 1.49: +3 -3 lines
Diff to previous 1.49 (colored)

Change struct emul's "char e_name[8]" field to "const char *e_name"
to allow for emulation names >= 8 characters.

Revision 1.49 / (download) - annotate - [select for diffs], Mon Dec 11 19:53:06 2000 UTC (18 years, 11 months ago) by martin
Branch: MAIN
Changes since 1.48: +3 -1 lines
Diff to previous 1.48 (colored)

Make this compilable again on ports without __HAVE_SYSCALL_INTERN.

Revision 1.48 / (download) - annotate - [select for diffs], Mon Dec 11 16:39:01 2000 UTC (18 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.47: +2 -1 lines
Diff to previous 1.47 (colored)

Call e_syscall_intern every time ktrace flags are modified.

Revision 1.47 / (download) - annotate - [select for diffs], Tue Aug 1 04:57:30 2000 UTC (19 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.46: +30 -76 lines
Diff to previous 1.46 (colored)

ANSI'ify.

Revision 1.46 / (download) - annotate - [select for diffs], Wed May 31 05:02:32 2000 UTC (19 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2
Branch point for: netbsd-1-5
Changes since 1.45: +4 -2 lines
Diff to previous 1.45 (colored)

Track which process a CPU is running/has last run on by adding a
p_cpu member to struct proc.  Use this in certain places when
accessing scheduler state, etc.  For the single-processor case,
just initialize p_cpu in fork1() to avoid having to set it in the
low-level context switch code on platforms which will never have
multiprocessing.

While I'm here, comment a few places where there are known issues
for the SMP implementation.

Revision 1.45 / (download) - annotate - [select for diffs], Mon May 29 22:29:01 2000 UTC (19 years, 5 months ago) by sommerfeld
Branch: MAIN
Changes since 1.44: +3 -2 lines
Diff to previous 1.44 (colored)

Add null-pointer tests in ktrsamefile

Revision 1.44 / (download) - annotate - [select for diffs], Mon May 29 22:04:11 2000 UTC (19 years, 5 months ago) by sommerfeld
Branch: MAIN
Changes since 1.43: +20 -4 lines
Diff to previous 1.43 (colored)

Fix clearing of ktrace points:
 - need deep compare of open files, not a shallow pointer compare.
 - reorder fdrelease()/FILE_UNUSE() invocations so fdrelease doesn't
block waiting for something which can't happen until after it returns.

Revision 1.43 / (download) - annotate - [select for diffs], Sun May 28 15:27:51 2000 UTC (19 years, 5 months ago) by sommerfeld
Branch: MAIN
Changes since 1.42: +5 -4 lines
Diff to previous 1.42 (colored)

Deal with NULL file pointer for KTROP_CLEAR

Revision 1.42 / (download) - annotate - [select for diffs], Sat May 27 00:40:45 2000 UTC (19 years, 5 months ago) by sommerfeld
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.41: +137 -173 lines
Diff to previous 1.41 (colored)

Reduce use of curproc in several places:

 - Change ktrace interface to pass in the current process, rather than
p->p_tracep, since the various ktr* function need curproc anyway.

 - Add curproc as a parameter to mi_switch() since all callers had it
handy anyway.

 - Add a second proc argument for inferior() since callers all had
curproc handy.

Also, miscellaneous cleanups in ktrace:

 - ktrace now always uses file-based, rather than vnode-based I/O
(simplifies, increases type safety); eliminate KTRFLAG_FD & KTRFAC_FD.
Do non-blocking I/O, and yield a finite number of times when receiving
EWOULDBLOCK before giving up.

 - move code duplicated between sys_fktrace and sys_ktrace into ktrace_common.

 - simplify interface to ktrwrite()

Revision 1.41 / (download) - annotate - [select for diffs], Fri May 26 21:20:30 2000 UTC (19 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.40: +2 -2 lines
Diff to previous 1.40 (colored)

First sweep at scheduler state cleanup.  Collect MI scheduler
state into global and per-CPU scheduler state:

	- Global state: sched_qs (run queues), sched_whichqs (bitmap
	  of non-empty run queues), sched_slpque (sleep queues).
	  NOTE: These may collectively move into a struct schedstate
	  at some point in the future.

	- Per-CPU state, struct schedstate_percpu: spc_runtime
	  (time process on this CPU started running), spc_flags
	  (replaces struct proc's p_schedflags), and
	  spc_curpriority (usrpri of processes on this CPU).

	- Every platform must now supply a struct cpu_info and
	  a curcpu() macro.  Simplify existing cpu_info declarations
	  where appropriate.

	- All references to per-CPU scheduler state now made through
	  curcpu().  NOTE: this will likely be adjusted in the future
	  after further changes to struct proc are made.

Tested on i386 and Alpha.  Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.

Revision 1.40 / (download) - annotate - [select for diffs], Mon May 8 20:01:05 2000 UTC (19 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.39: +3 -3 lines
Diff to previous 1.39 (colored)

ktrgenio(): __predict_false() ktrwrite() failing.
ktrwrite(): __predict_true() no error occuring.

Revision 1.39 / (download) - annotate - [select for diffs], Wed Apr 19 19:14:17 2000 UTC (19 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.38: +101 -84 lines
Diff to previous 1.38 (colored)

- Allocate the ktrace operation header on the stack rather than using
  MALLOC()/FREE().
- In ktrgenio():
	- Don't allocate the entire size of the I/O for the temporary
	  buffer used to write the data to the trace file.  Instead,
	  do it in page-sized chunks.
	- As in uiomove(), preempt the process if we are hogging the CPU.
	- If writing to the trace file errors, abort rather than continuing
	  to loop through the buffer.

From Artur Grabowski <art@stacken.kth.se>, with some additional cleanup
by me.

Revision 1.38 / (download) - annotate - [select for diffs], Sun Jul 25 13:59:08 1999 UTC (20 years, 3 months ago) by darrenr
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-newbase, chs-ubc2-base
Branch point for: thorpej_scsipi
Changes since 1.37: +7 -4 lines
Diff to previous 1.37 (colored)

don't log an error for ktrace if it's EPIPE - an error that should be
expected with fktrace/ktruss (i.e the error is `noise').

Revision 1.37 / (download) - annotate - [select for diffs], Sun Jul 25 06:30:34 1999 UTC (20 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.36: +4 -4 lines
Diff to previous 1.36 (colored)

Turn the proclist lock into a read/write spinlock.  Update proclist locking
calls to reflect this.  Also, block statclock rather than softclock during
in the proclist locking functions, to address a problem reported on
current-users by Sean Doran.

Revision 1.36 / (download) - annotate - [select for diffs], Thu Jul 22 21:08:31 1999 UTC (20 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.35: +7 -1 lines
Diff to previous 1.35 (colored)

Add a read/write lock to the proclists and PID hash table.  Use the
write lock when doing PID allocation, and during the process exit path.
Use a read lock every where else, including within schedcpu() (interrupt
context).  Note that holding the write lock implies blocking schedcpu()
from running (blocks softclock).

PID allocation is now MP-safe.

Note this actually fixes a bug on single processor systems that was probably
extremely difficult to tickle; it was possible that schedcpu() would run
off a bad pointer if the right clock interrupt happened to come in the
middle of a LIST_INSERT_HEAD() or LIST_REMOVE() to/from allproc.

Revision 1.35 / (download) - annotate - [select for diffs], Wed May 5 20:01:08 1999 UTC (20 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.34: +4 -1 lines
Diff to previous 1.34 (colored)

Add "use counting" to file entries.  When closing a file, and it's reference
count is 0, wait for use count to drain before finishing the close.

This is necessary in order for multiple processes to safely share file
descriptor tables.

Revision 1.34 / (download) - annotate - [select for diffs], Sun Apr 11 18:44:00 1999 UTC (20 years, 7 months ago) by kleink
Branch: MAIN
Changes since 1.33: +3 -1 lines
Diff to previous 1.33 (colored)

* Add a comment to ktrgetheader() mentioning that ktr_len and ktr_buf are
being left uninitialized intentionally; addresses PR kern/6987.
* In ktrsysret(), initialize the unused ktr_eosys to avoid writing random junk.

Revision 1.33 / (download) - annotate - [select for diffs], Fri Sep 11 12:50:10 1998 UTC (21 years, 2 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, kenh-if-detach-base, kenh-if-detach, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame, chs-ubc-base, chs-ubc
Branch point for: netbsd-1-4, chs-ubc2
Changes since 1.32: +4 -3 lines
Diff to previous 1.32 (colored)

Substantial signal handling changes:
* Increase the size of sigset_t to accomodate 128 signals -- adding new
  versions of sys_setprocmask(), sys_sigaction(), sys_sigpending() and
  sys_sigsuspend() to handle the changed arguments.
* Abstract the guts of sys_sigaltstack(), sys_setprocmask(), sys_sigaction(),
  sys_sigpending() and sys_sigsuspend() into separate functions, and call them
  from all the emulations rather than hard-coding everything.  (Avoids uses
  the stackgap crap for these system calls.)
* Add a new flag (p_checksig) to indicate that a process may have signals
  pending and userret() needs to do the full (slow) check.
* Eliminate SAS_ALTSTACK; it's exactly the inverse of SS_DISABLE.
* Correct emulation bugs with restoring SS_ONSTACK.
* Make the signal mask in the sigcontext always use the emulated mask format.
* Store signals internally in sigaction structures, rather than maintaining a
  bunch of little sigsets for each SA_* bit.
* Keep track of where we put the signal trampoline, rather than figuring it out
  in *_sendsig().
* Issue a warning when a non-emulated sigaction bit is observed.
* Add missing emulated signals, and a native SIGPWR (currently not used).
* Implement the `not reset when caught' semantics for relevant signals.

Note: Only code touched by the i386 port has been modified.  Other ports and
emulations need to be updated.

Revision 1.32 / (download) - annotate - [select for diffs], Tue Aug 4 04:03:12 1998 UTC (21 years, 3 months ago) by perry
Branch: MAIN
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored)

Abolition of bcopy, ovbcopy, bcmp, and bzero, phase one.
  bcopy(x, y, z) ->  memcpy(y, x, z)
ovbcopy(x, y, z) -> memmove(y, x, z)
   bcmp(x, y, z) ->  memcmp(x, y, z)
  bzero(x, y)    ->  memset(x, 0, y)

Revision 1.31 / (download) - annotate - [select for diffs], Fri Jul 31 22:50:49 1998 UTC (21 years, 3 months ago) by perry
Branch: MAIN
Changes since 1.30: +7 -7 lines
Diff to previous 1.30 (colored)

fix sizeofs so they comply with the KNF style guide. yes, it is pedantic.

Revision 1.30 / (download) - annotate - [select for diffs], Tue Jun 30 05:33:12 1998 UTC (21 years, 4 months ago) by thorpej
Branch: MAIN
CVS Tags: eeh-paddr_t-base
Branch point for: eeh-paddr_t
Changes since 1.29: +3 -2 lines
Diff to previous 1.29 (colored)

Add two additional arguments to the fileops read and write calls, a
pointer to the offset to use, and a flags word.  Define a flag that
specifies whether or not to update the offset passed by reference.

Revision 1.29 / (download) - annotate - [select for diffs], Thu Jun 25 21:17:16 1998 UTC (21 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.28: +3 -1 lines
Diff to previous 1.28 (colored)

defopt KTRACE

Revision 1.28 / (download) - annotate - [select for diffs], Sat May 2 18:33:20 1998 UTC (21 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.27: +204 -70 lines
Diff to previous 1.27 (colored)

New fktrace syscall from Darren Reed [with fixes from me]

Revision 1.27 / (download) - annotate - [select for diffs], Tue Apr 28 22:27:22 1998 UTC (21 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.26: +4 -10 lines
Diff to previous 1.26 (colored)

Fix KTROP_CLEARFILE so it does the same thing as KTROP_CLEAR (i.e. vrele()
rather than vn_close()).  Fixes PR 5357.

Revision 1.26 / (download) - annotate - [select for diffs], Sun Mar 29 05:19:43 1998 UTC (21 years, 7 months ago) by mrg
Branch: MAIN
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored)

remove register from decl.

Revision 1.25 / (download) - annotate - [select for diffs], Sun Mar 1 02:22:28 1998 UTC (21 years, 8 months ago) by fvdl
Branch: MAIN
Changes since 1.24: +6 -6 lines
Diff to previous 1.24 (colored)

Merge with Lite2 + local changes

Revision 1.24 / (download) - annotate - [select for diffs], Sun Oct 19 02:00:28 1997 UTC (22 years, 1 month ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH001, netbsd-1-3-BETA
Branch point for: netbsd-1-3
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

Add const where appropriate.

Revision 1.23 / (download) - annotate - [select for diffs], Fri Feb 9 18:59:36 1996 UTC (23 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal, thorpej-setroot, netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2, mrg-vm-swap, marc-pcmcia-bp, marc-pcmcia-base, marc-pcmcia, is-newarp-before-merge, is-newarp-base, is-newarp, bouyer-scsipi
Changes since 1.22: +1 -3 lines
Diff to previous 1.22 (colored)

More proto fixes

Revision 1.22 / (download) - annotate - [select for diffs], Sun Feb 4 02:15:39 1996 UTC (23 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.21: +15 -3 lines
Diff to previous 1.21 (colored)

First pass at prototyping

Revision 1.21 / (download) - annotate - [select for diffs], Sun Oct 22 00:35:06 1995 UTC (24 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.20: +8 -1 lines
Diff to previous 1.20 (colored)

Make the ktrace code emit a record that indicates the current emulation
every time there is an attach or detach event.

Revision 1.20 / (download) - annotate - [select for diffs], Sat Oct 7 06:28:16 1995 UTC (24 years, 1 month ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored)

Prefix names of system call implementation functions with `sys_'.

Revision 1.19 / (download) - annotate - [select for diffs], Tue Sep 19 21:45:00 1995 UTC (24 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.18: +6 -5 lines
Diff to previous 1.18 (colored)

Make system calls conform to a standard prototype and bring those
prototypes into scope.

Revision 1.18 / (download) - annotate - [select for diffs], Wed Jul 19 15:19:13 1995 UTC (24 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.17: +19 -1 lines
Diff to previous 1.17 (colored)

Add KTR_EMUL to indicate a switch between syscall emulations.
Currently this record is emitted only on exec. Maybe it should
be emitted on ktrace() attach too.

Revision 1.17 / (download) - annotate - [select for diffs], Sun Mar 26 07:48:47 1995 UTC (24 years, 7 months ago) by cgd
Branch: MAIN
Changes since 1.16: +13 -6 lines
Diff to previous 1.16 (colored)

don't default return types to ints; specify them.
ktrsyscall takes (vp, code, argsize, args), and stores argsize rather
than nargs.

Revision 1.16 / (download) - annotate - [select for diffs], Thu Mar 9 08:55:47 1995 UTC (24 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.15: +8 -3 lines
Diff to previous 1.15 (colored)

Update types.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Dec 14 19:07:08 1994 UTC (24 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

Remove extra arg to vn_open().

Revision 1.14 / (download) - annotate - [select for diffs], Mon Nov 14 06:01:18 1994 UTC (25 years ago) by christos
Branch: MAIN
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

added extra argument in vn_open and VOP_OPEN to allow cloning devices

Revision 1.13 / (download) - annotate - [select for diffs], Thu Oct 20 04:22:49 1994 UTC (25 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.12: +24 -20 lines
Diff to previous 1.12 (colored)

update for new syscall args description mechanism

Revision 1.12 / (download) - annotate - [select for diffs], Tue Aug 30 03:05:37 1994 UTC (25 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.11: +9 -13 lines
Diff to previous 1.11 (colored)

Convert process, file, and namei lists and hash tables to use queue.h.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Jun 29 06:32:29 1994 UTC (25 years, 4 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Changes since 1.10: +3 -2 lines
Diff to previous 1.10 (colored)

New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.10 / (download) - annotate - [select for diffs], Wed Jun 8 11:28:37 1994 UTC (25 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.9: +1 -7 lines
Diff to previous 1.9 (colored)

Update to 4.4-Lite fs code.

Revision 1.9 / (download) - annotate - [select for diffs], Wed May 18 05:12:37 1994 UTC (25 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.8: +70 -29 lines
Diff to previous 1.8 (colored)

mostly-machine-indepedent switch, and changes to match.  also, hack init_main

Revision 1.8 / (download) - annotate - [select for diffs], Thu May 5 05:38:13 1994 UTC (25 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)

lots of changes: prototype migration, move lots of variables, definitions,
and structure elements around.  kill some unnecessary type and macro
definitions.  standardize clock handling.  More changes than you'd want.

Revision 1.7 / (download) - annotate - [select for diffs], Sat Dec 18 04:20:37 1993 UTC (25 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.6: +10 -10 lines
Diff to previous 1.6 (colored)

Canonicalize all #includes.

Revision 1.6 / (download) - annotate - [select for diffs], Wed Sep 15 22:30:35 1993 UTC (26 years, 2 months ago) by cgd
Branch: MAIN
CVS Tags: magnum-base
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

make allproc be volatile, and cast things accordingly.
suggested by torek, because CSRG had problems with reordering
of assignments to allproc leading to strange panics from kernels
compiled with gcc2...

Revision 1.5 / (download) - annotate - [select for diffs], Tue Jul 13 22:13:22 1993 UTC (26 years, 4 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-0-9-patch-001, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9
Branch point for: magnum
Changes since 1.4: +10 -7 lines
Diff to previous 1.4 (colored)

break args structs out, into syscallname_args structs, so gcc2 doesn't
whine so much.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Jun 27 06:01:37 1993 UTC (26 years, 4 months ago) by andrew
Branch: MAIN
Changes since 1.3: +19 -1 lines
Diff to previous 1.3 (colored)

ANSIfications - removed all implicit function return types and argument
definitions.  Ensured that all files include "systm.h" to gain access to
general prototypes.  Casts where necessary.

Revision 1.3 / (download) - annotate - [select for diffs], Thu May 20 02:54:26 1993 UTC (26 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.2: +2 -1 lines
Diff to previous 1.2 (colored)

add $Id$ strings, and clean up file headers where necessary

Revision 1.2 / (download) - annotate - [select for diffs], Fri Mar 26 22:16:30 1993 UTC (26 years, 7 months ago) by glass
Branch: MAIN
CVS Tags: netbsd-alpha-1, netbsd-0-8
Changes since 1.1: +0 -4 lines
Diff to previous 1.1 (colored)

removed unnecessary #ifdefing, fixed conf/files appropriately

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (26 years, 8 months ago) by cgd
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>