OpenBSD CVS

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


[BACK] Up to [local] / src / sys / kern

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.114 / (download) - annotate - [select for diffs], Fri Dec 15 15:12:08 2023 UTC (5 months, 3 weeks ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.113: +19 -1 lines
Diff to previous 1.113 (colored)

provide the pieces for ktrace/kdump to observe pinsyscall violations.
(not used yet, because the pinsyscall changes are still being worked on)
ok kettenis

Revision 1.113 / (download) - annotate - [select for diffs], Tue Dec 12 15:30:55 2023 UTC (5 months, 4 weeks ago) by deraadt
Branch: MAIN
Changes since 1.112: +2 -2 lines
Diff to previous 1.112 (colored)

remove support for syscall(2) -- the "indirection system call" because
it is a dangerous alternative entry point for all system calls, and thus
incompatible with the precision system call entry point scheme we are
heading towards.  This has been a 3-year mission:
First perl needed a code-generated wrapper to fake syscall(2) as a giant
switch table, then all the ports were cleaned with relatively minor fixes,
except for "go".  "go" required two fixes -- 1) a framework issue with
old library versions, and 2) like perl, a fake syscall(2) wrapper to
handle ioctl(2) and sysctl(2) because "syscall(SYS_ioctl" occurs all over
the place in the "go" ecosystem because the "go developers" are plan9-loving
unix-hating folk who tried to build an ecosystem without allowing "ioctl".
ok kettenis, jsing, afresh1, sthen

Revision 1.112 / (download) - annotate - [select for diffs], Thu May 11 09:51:33 2023 UTC (13 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.111: +2 -2 lines
Diff to previous 1.111 (colored)

mi_syscall() can add the KTRC_CODE_SYSCALL flag to the syscall code.
In ktrsyscall() mask the code, otherwise kdump(1) does not show the
correct mib of SYS_sysctl when called by syscall(2).
OK guenther@

Revision 1.111 / (download) - annotate - [select for diffs], Thu Feb 16 08:50:57 2023 UTC (15 months, 3 weeks ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.110: +5 -2 lines
Diff to previous 1.110 (colored)

Like other ktrace functions make ktruser() callable without kernel lock
by takeing the lock around ktrwrite2().
OK miod@ cheloha@

Revision 1.110 / (download) - annotate - [select for diffs], Thu Feb 9 08:00:31 2023 UTC (16 months ago) by guenther
Branch: MAIN
Changes since 1.109: +3 -2 lines
Diff to previous 1.109 (colored)

Delay setting the timestamp in the ktrace header until we've grabbed
the vnode, to eliminate misordering of ktrace records.

problem noted by jrick@
ok deraadt@

Revision 1.109 / (download) - annotate - [select for diffs], Mon Dec 5 23:18:37 2022 UTC (18 months ago) by deraadt
Branch: MAIN
Changes since 1.108: +4 -4 lines
Diff to previous 1.108 (colored)

zap a pile of dangling tabs

Revision 1.108 / (download) - annotate - [select for diffs], Sun Aug 14 01:58:27 2022 UTC (21 months, 4 weeks ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.107: +1 -3 lines
Diff to previous 1.107 (colored)

remove unneeded includes in sys/kern
ok mpi@ miod@

Revision 1.107 / (download) - annotate - [select for diffs], Wed Jul 20 05:56:36 2022 UTC (22 months, 3 weeks ago) by deraadt
Branch: MAIN
Changes since 1.106: +1 -5 lines
Diff to previous 1.106 (colored)

the _pad_ system calls from 2021/12/23 can go away
ok guenther

Revision 1.106 / (download) - annotate - [select for diffs], Tue Feb 22 17:14:14 2022 UTC (2 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.105: +2 -2 lines
Diff to previous 1.105 (colored)

Start using new _MAXCOMLEN (a proper string expanded to 24 bytes
including the NUL), in all internal interafaces, and expose this
in ktrace, core, or proc.h visibility.
ok millert

Revision 1.105 / (download) - annotate - [select for diffs], Thu Dec 23 18:50:32 2021 UTC (2 years, 5 months ago) by guenther
Branch: MAIN
Changes since 1.104: +5 -1 lines
Diff to previous 1.104 (colored)

Roll the syscalls that have an off_t argument to remove the explicit padding.
Switch libc and ld.so to the generic stubs for these calls.
WARNING: reboot to updated kernel before installing libc or ld.so!

Time for a story...

When gcc (back in 1.x days) first implemented long long, it didn't (always)
pass 64bit arguments in 'aligned' registers/stack slots, with the result that
argument offsets didn't match structure offsets.  This affected the nine system
calls that pass off_t arguments:
   ftruncate lseek mmap mquery pread preadv pwrite pwritev truncate

To avoid having to do custom ASM wrappers for those, BSD put an explicit pad
argument in so that the off_t argument would always start on a even slot and
thus be naturally aligned.  Thus those odd wrappers in lib/libc/sys/ that use
__syscall() and pass an extra '0' argument.

The ABIs for different CPUs eventually settled how things should be passed on
each and gcc 2.x followed them.  The only arch now where it helps is landisk,
which needs to skip the last argument register if it would be the first half of
a 64bit argument.  So: add new syscalls without the pad argument and on landisk
do that skipping directly in the syscall handler in the kernel.  Keep compat
support for the existing syscalls long enough for the transition.

ok deraadt@

Revision 1.104 / (download) - annotate - [select for diffs], Sun Sep 13 09:48:39 2020 UTC (3 years, 8 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.103: +3 -1 lines
Diff to previous 1.103 (colored)

Grep the KERNEL_LOCK in ktrpsig() before calling ktrwrite(). Another
little step towards moving signal delivery outside of KERNEL_LOCK.
OK mpi@

Revision 1.103 / (download) - annotate - [select for diffs], Fri Apr 3 03:20:12 2020 UTC (4 years, 2 months ago) by visa
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.102: +4 -1 lines
Diff to previous 1.102 (colored)

Take an explicit write reference when associating a thread with a ktrace
vnode. This lets other parts of the kernel see the vnode as active for
writing. In particular, now quotaon_vnode() properly sets up quotas for
ktrace vnodes. This fixes a crash that could happen if quotas were
turned on while a process was ktraced.

ktrace vnodes are opened for writing and an initial write reference
is provided for them by vn_open(9). However, this reference is removed,
too early, when sys_ktrace() calls vn_close(9).

Crash reported and fix tested by Bryan Stenson

OK mpi@

Revision 1.102 / (download) - annotate - [select for diffs], Mon Mar 23 15:45:39 2020 UTC (4 years, 2 months ago) by visa
Branch: MAIN
Changes since 1.101: +7 -5 lines
Diff to previous 1.101 (colored)

Check the outcome of ktrstart() and skip tracing if the trace file
header could not be written.

OK anton@ mpi@

Revision 1.101 / (download) - annotate - [select for diffs], Sat Mar 21 08:58:50 2020 UTC (4 years, 2 months ago) by mpi
Branch: MAIN
Changes since 1.100: +16 -9 lines
Diff to previous 1.100 (colored)

Stop tracing if vget(9) fails.

Make sure to release the last reference of the vnode after all
other traced processes have given up on it.

CID 1453020 Unchecked return value.

Inputs from guenther@, ok visa@

Revision 1.100 / (download) - annotate - [select for diffs], Sun Oct 6 16:24:14 2019 UTC (4 years, 8 months ago) by beck
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.99: +2 -2 lines
Diff to previous 1.99 (colored)

Fix vn_open to require an op of 0, and 0 or KERNELPATH only as flags.

sweep tree to correct NDIINT op and flags ahead of time. document
the requirement. This allows KERNELPATH to be used to bypass
unveil for crash dumps with nosuidcoredump=2 or 3

ok visa@ deraadt@ florian@

Revision 1.99 / (download) - annotate - [select for diffs], Sun Aug 5 14:23:57 2018 UTC (5 years, 10 months ago) by beck
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.98: +2 -1 lines
Diff to previous 1.98 (colored)

Decouple unveil from the pledge flags, by adding dedicated unveil flags
to the namei args. This fixes a bug where chmod would be allowed when
with only READ. This also allows some further cleanup of some awkward
things like PLEDGE_STAT that will follow
Lots of assistence from semarie@ - thanks!
ok semarie@

Revision 1.98 / (download) - annotate - [select for diffs], Wed Jun 20 10:48:55 2018 UTC (5 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.97: +13 -5 lines
Diff to previous 1.97 (colored)

Grab and/or assert for the KERNEL_LOCK() in in ktrace & pledge.

This is required to run network syscall mostly without the KERNEL_LOCK().

ok visa@, kettenis@ as part of a larger diff.

Revision 1.97 / (download) - annotate - [select for diffs], Sun May 27 06:02:14 2018 UTC (6 years ago) by visa
Branch: MAIN
Changes since 1.96: +2 -2 lines
Diff to previous 1.96 (colored)

Drop unnecessary `p' parameter from vget(9).

OK mpi@

Revision 1.96 / (download) - annotate - [select for diffs], Sat Apr 28 03:13:04 2018 UTC (6 years, 1 month ago) by visa
Branch: MAIN
Changes since 1.95: +2 -2 lines
Diff to previous 1.95 (colored)

Clean up the parameters of VOP_LOCK() and VOP_UNLOCK(). It is always
curproc that does the locking or unlocking, so the proc parameter
is pointless and can be dropped.

OK mpi@, deraadt@

Revision 1.95 / (download) - annotate - [select for diffs], Mon Feb 19 08:59:52 2018 UTC (6 years, 3 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.94: +2 -2 lines
Diff to previous 1.94 (colored)

Remove almost unused `flags' argument of suser().

The account flag `ASU' will no longer be set but that makes suser()
mpsafe since it no longer mess with a per-process field.

No objection from millert@, ok tedu@, bluhm@

Revision 1.94 / (download) - annotate - [select for diffs], Sat Dec 30 23:08:29 2017 UTC (6 years, 5 months ago) by guenther
Branch: MAIN
Changes since 1.93: +2 -2 lines
Diff to previous 1.93 (colored)

Don't pull in <sys/file.h> just to get fcntl.h

ok deraadt@ krw@

Revision 1.92.4.1 / (download) - annotate - [select for diffs], Fri Dec 1 17:22:42 2017 UTC (6 years, 6 months ago) by bluhm
Branch: OPENBSD_6_2
Changes since 1.92: +2 -26 lines
Diff to previous 1.92 (colored) next main 1.93 (colored)

Delete fktrace(2).  The consequences of it were not thought through
sufficiently and at least one horrific security hole was the result.

from guenther@; ok deraadt@ beck@
OpenBSD 6.2 errata 002

Revision 1.93 / (download) - annotate - [select for diffs], Tue Nov 28 06:03:41 2017 UTC (6 years, 6 months ago) by guenther
Branch: MAIN
Changes since 1.92: +1 -31 lines
Diff to previous 1.92 (colored)

Delete fktrace(2).  The consequences of it were not thought through
sufficiently and at least one horrific security hole was the result.

ok deraadt@ beck@

Revision 1.92 / (download) - annotate - [select for diffs], Sat Aug 12 00:03:10 2017 UTC (6 years, 10 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE
Branch point for: OPENBSD_6_2
Changes since 1.91: +80 -28 lines
Diff to previous 1.91 (colored)

add a fktrace syscall that takes a file descriptor instead of a name.
libc and man page parts to come.
ok guenther

Revision 1.91 / (download) - annotate - [select for diffs], Tue Feb 14 10:31:15 2017 UTC (7 years, 3 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.90: +3 -5 lines
Diff to previous 1.90 (colored)

Convert most of the manual checks for CPU hogging to sched_pause().

The distinction between preempt() and yield() stays as it is usueful
to know if a thread decided to yield by itself or if the kernel told
him to go away.

ok tedu@, guenther@

Revision 1.90 / (download) - annotate - [select for diffs], Sat Jan 21 05:42:03 2017 UTC (7 years, 4 months ago) by guenther
Branch: MAIN
Changes since 1.89: +5 -4 lines
Diff to previous 1.89 (colored)

p_comm is the process's command and isn't per thread, so move it from
struct proc to struct process.

ok deraadt@ kettenis@

Revision 1.89 / (download) - annotate - [select for diffs], Mon Nov 7 00:26:32 2016 UTC (7 years, 7 months ago) by guenther
Branch: MAIN
Changes since 1.88: +2 -2 lines
Diff to previous 1.88 (colored)

Split PID from TID, giving processes a PID unrelated to the TID of their
initial thread

ok jsing@ kettenis@

Revision 1.88 / (download) - annotate - [select for diffs], Sat Mar 19 12:04:15 2016 UTC (8 years, 2 months ago) by natano
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.87: +2 -2 lines
Diff to previous 1.87 (colored)

Remove the unused flags argument from VOP_UNLOCK().

torture tested on amd64, i386 and macppc
ok beck mpi stefan
"the change looks right" deraadt

Revision 1.87 / (download) - annotate - [select for diffs], Sun Mar 6 20:25:27 2016 UTC (8 years, 3 months ago) by guenther
Branch: MAIN
Changes since 1.86: +3 -34 lines
Diff to previous 1.86 (colored)

No more compat emulations, so remove ktrace EMUL records and the baggage
for generating and parsing them.

ok mpi@ naddy@ millert@ deraadt@

Revision 1.86 / (download) - annotate - [select for diffs], Sun Dec 6 17:50:21 2015 UTC (8 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.85: +2 -2 lines
Diff to previous 1.85 (colored)

Change kernel internal pledge variables to 64bit (to prepare for more
extensions).  This change is exposed in ktrace.out files
ok semarie

Revision 1.85 / (download) - annotate - [select for diffs], Sat Dec 5 10:11:53 2015 UTC (8 years, 6 months ago) by tedu
Branch: MAIN
Changes since 1.84: +1 -2 lines
Diff to previous 1.84 (colored)

remove stale lint annotations

Revision 1.84 / (download) - annotate - [select for diffs], Wed Nov 11 02:57:48 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.83: +3 -3 lines
Diff to previous 1.83 (colored)

ktrace vnodes do not need to be opened with FREAD, as they are
only written to.  (Will keep an eye out for NFS surprises)
ok guenther

Revision 1.83 / (download) - annotate - [select for diffs], Mon Nov 2 16:31:55 2015 UTC (8 years, 7 months ago) by semarie
Branch: MAIN
Changes since 1.82: +2 -2 lines
Diff to previous 1.82 (colored)

move the pledgenote annotation from `struct proc' to `struct nameidata'

pledgenote is used for annotate the policy for a namei context. So make it
tracking the nameidata.

It is expected for the caller to explicitly define the policy. It is a kernel
bug to not do so.

ok deraadt@

Revision 1.82 / (download) - annotate - [select for diffs], Wed Oct 28 11:16:23 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.81: +2 -2 lines
Diff to previous 1.81 (colored)

Though sys_ktrace is not yet pledge allowed, prepare by setting
p_pledgenote as required.
XXX open question to guenther regarding FREAD to vnopen() / vnclose()

Revision 1.81 / (download) - annotate - [select for diffs], Sun Oct 25 20:39:54 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.80: +19 -2 lines
Diff to previous 1.80 (colored)

Fold "malloc" into "stdio" and -- recognizing that no program so far has
used less than "stdio" -- include all the "self" operations.  Instead of
different defines, use regular PLEDGE_* in the "p_pledgenote" variable
(which indicates the operation subtype a system call is performing).  Many
checks before easier to understand.  p_pledgenote can often be passed
directly to ktrace, so that kdump says:
 15565 test     CALL  pledge(0xa9a3f804c51,0)
 15565 test     STRU  pledge request="stdio"
 15565 test     RET   pledge 0
 15565 test     CALL  open(0xa9a3f804c57,0x2<O_RDWR>)
 15565 test     NAMI  "/tmp/testfile"
 15565 test     PLDG  open, "wpath", errno 1 Operation not permitted
with help from semarie, ok guenther

Revision 1.80 / (download) - annotate - [select for diffs], Fri Oct 9 01:10:27 2015 UTC (8 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.79: +2 -2 lines
Diff to previous 1.79 (colored)

Rename tame() to pledge().  This fairly interface has evolved to be more
strict than anticipated.  It allows a programmer to pledge/promise/covenant
that their program will operate within an easily defined subset of the
Unix environment, or it pays the price.

Revision 1.79 / (download) - annotate - [select for diffs], Fri Oct 2 05:07:41 2015 UTC (8 years, 8 months ago) by guenther
Branch: MAIN
Changes since 1.78: +37 -1 lines
Diff to previous 1.78 (colored)

Add ktracing of argv and envp to execve(2), with envp not traced by default

ok tedu@ deraadt@

Revision 1.78 / (download) - annotate - [select for diffs], Sun Sep 13 17:08:03 2015 UTC (8 years, 8 months ago) by guenther
Branch: MAIN
Changes since 1.77: +2 -2 lines
Diff to previous 1.77 (colored)

Rename __sysctl syscall to just sysctl, as the userland wrapper is no longer
necessary

ok deraadt@ jsing@

Revision 1.77 / (download) - annotate - [select for diffs], Mon Sep 7 15:38:45 2015 UTC (8 years, 9 months ago) by guenther
Branch: MAIN
Changes since 1.76: +1 -16 lines
Diff to previous 1.76 (colored)

Delete ktracing of context switches: it's unused, and not particularly useful,
and doing VOP_WRITE() from inside tsleep/msleep makes the locking too
complicated, making it harder to move forward on MP changes.

ok deraadt@ kettenis@

Revision 1.76 / (download) - annotate - [select for diffs], Sat Aug 22 20:18:49 2015 UTC (8 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.75: +14 -13 lines
Diff to previous 1.75 (colored)

Move to tame(int flags, char *paths[]) API/ABI.

The pathlist is a whitelist of dirs and files; anything else returns ENOENT.
Recommendation is to use a narrowly defined list.  Also add TAME_FATTR, which
permits explicit change operations against "struct stat" fields.  Some
other TAME_ flags are refined slightly.

Not cranking libc now, since nothing commited in base uses this and the
timing is uncomfortable for others.  Discussed with many; thanks for a
few bug fixes from semarie, doug, guenther.
ok guenther

Revision 1.75 / (download) - annotate - [select for diffs], Sat Aug 1 20:12:34 2015 UTC (8 years, 10 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.74: +12 -16 lines
Diff to previous 1.74 (colored)

Fix free() of uninitialized variable introduced in previous commit.
Eliminate the goto that I tripped on.

problem noted by Mark Latimer (mark.latimer (at) gmail.com)
ok miod@ millert@

Revision 1.74 / (download) - annotate - [select for diffs], Sun Jul 19 04:45:25 2015 UTC (8 years, 10 months ago) by guenther
Branch: MAIN
Changes since 1.73: +85 -70 lines
Diff to previous 1.73 (colored)

Make KTR_SYSRET records variables variables sized, leaving out the
retval on error, including a long long retval on successful lseek(),
and including a register_t retval for other successes.  This fixes
lseek reporting on ILP32 archs.

While here, reworking internal kern_ktrace.c bits to be able to pass
two buffers to ktrwriteraw(), so we can avoid mallocing a buffer
in some cases and so that KTR_GENIO logs are split at PAGE_SIZE,
not PAGE_SIZE-sizeof(struct ktrgenio)

ok miod@

Revision 1.73 / (download) - annotate - [select for diffs], Mon Dec 29 05:29:27 2014 UTC (9 years, 5 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.72: +3 -1 lines
Diff to previous 1.72 (colored)

Explicitely include <uvm/uvm_extern.h> in order to build on variable page size
architectures.

Revision 1.72 / (download) - annotate - [select for diffs], Tue Dec 16 18:30:04 2014 UTC (9 years, 5 months ago) by tedu
Branch: MAIN
Changes since 1.71: +2 -1 lines
Diff to previous 1.71 (colored)

primary change: move uvm_vnode out of vnode, keeping only a pointer.
objective: vnode.h doesn't include uvm_extern.h anymore.
followup changes: include uvm_extern.h or lock.h where necessary.
ok and help from deraadt

Revision 1.71 / (download) - annotate - [select for diffs], Wed Dec 10 02:44:47 2014 UTC (9 years, 6 months ago) by tedu
Branch: MAIN
Changes since 1.70: +3 -3 lines
Diff to previous 1.70 (colored)

convert bcopy to memcpy. ok millert

Revision 1.70 / (download) - annotate - [select for diffs], Sun Oct 26 20:34:37 2014 UTC (9 years, 7 months ago) by guenther
Branch: MAIN
Changes since 1.69: +1 -4 lines
Diff to previous 1.69 (colored)

Now that threads hold their own reference to their ucreds, sys_ktrace()
doesn't need to hold an extra reference during the call

ok deraadt@ millert@

Revision 1.69 / (download) - annotate - [select for diffs], Sun Jul 13 15:46:21 2014 UTC (9 years, 11 months ago) by uebayasi
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.68: +2 -4 lines
Diff to previous 1.68 (colored)

KERNEL_ASSERT_LOCKED(9): Assertion for kernel lock (Rev. 3)

This adds a new assertion macro, KERNEL_ASSERT_LOCKED(), to assert that
kernel_lock is held.  In the long process of removing kernel_lock, there will
be a lot (hundreds or thousands) of use of this; virtually almost all functions
in !MP-safe subsystems should have this assertion.  Thus this assertion should
have a short, good name.

Not only that "KERNEL_ASSERT_LOCKED" is consistent with other KERNEL_* and
SCHED_ASSERT_LOCKED() macros.

Input from dlg@ guenther@ kettenis@.

OK dlg@ guenther@

Revision 1.68 / (download) - annotate - [select for diffs], Sun Jul 13 15:00:40 2014 UTC (9 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.67: +8 -7 lines
Diff to previous 1.67 (colored)

pass the size to free in some of the obvious cases

Revision 1.67 / (download) - annotate - [select for diffs], Sat Jul 12 18:43:32 2014 UTC (9 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.66: +5 -5 lines
Diff to previous 1.66 (colored)

add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.

Revision 1.66 / (download) - annotate - [select for diffs], Tue Jul 8 17:19:25 2014 UTC (9 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.65: +1 -3 lines
Diff to previous 1.65 (colored)

decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.h
don't need to be married.
ok guenther miod beck jsing kettenis

Revision 1.65 / (download) - annotate - [select for diffs], Sun Mar 30 21:54:48 2014 UTC (10 years, 2 months ago) by guenther
Branch: MAIN
Changes since 1.64: +8 -8 lines
Diff to previous 1.64 (colored)

Eliminates struct pcred by moving the real and saved ugids into
struct ucred; struct process then directly links to the ucred

Based on a discussion at c2k10 or so before noting that FreeBSD and
NetBSD did this too.

ok matthew@

Revision 1.64 / (download) - annotate - [select for diffs], Wed Mar 26 05:23:42 2014 UTC (10 years, 2 months ago) by guenther
Branch: MAIN
Changes since 1.63: +34 -34 lines
Diff to previous 1.63 (colored)

Move p_emul and p_sigcode from proc to process.
Tweak the handling of ktrace EMUL when changing ktracing: only
generate one per process (not one per thread) and pass the correct
proc pointer down to the VFS layer.  Permit generating of NAMI and
CSW records inside ktrace(2) itself.

ok deraadt@ millert@

Revision 1.63 / (download) - annotate - [select for diffs], Tue Jan 21 01:48:44 2014 UTC (10 years, 4 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.62: +5 -5 lines
Diff to previous 1.62 (colored)

bzero -> memset

Revision 1.62 / (download) - annotate - [select for diffs], Mon Jan 20 21:19:28 2014 UTC (10 years, 4 months ago) by guenther
Branch: MAIN
Changes since 1.61: +9 -9 lines
Diff to previous 1.61 (colored)

Threads can't be zombies, only processes, so change zombproc to zombprocess,
make it a list of processes, and change P_NOZOMBIE and P_STOPPED from thread
flags to process flags.  Add allprocess list for the code that just wants
to see processes.

ok tedu@

Revision 1.61 / (download) - annotate - [select for diffs], Sat Sep 14 02:28:01 2013 UTC (10 years, 8 months ago) by guenther
Branch: MAIN
Changes since 1.60: +15 -14 lines
Diff to previous 1.60 (colored)

Correct the handling of I/O of >=2^32 bytes and the ktracing there of
by using size_t/ssize_t instead of int/u_int to handle I/O lengths in
uiomove(), vn_fsizechk(), and ktrgenio().  Eliminate the always-zero
'error' argument to ktrgenio() at the same time.

Revision 1.60 / (download) - annotate - [select for diffs], Sat Jun 1 16:27:37 2013 UTC (11 years ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.59: +1 -17 lines
Diff to previous 1.59 (colored)

always implement stub utrace syscall, but keep the body #ifdef KTRACE
ok guenther matthew

Revision 1.59 / (download) - annotate - [select for diffs], Sat Jun 1 09:49:50 2013 UTC (11 years ago) by miod
Branch: MAIN
Changes since 1.58: +59 -4 lines
Diff to previous 1.58 (colored)

Add utrace(2), a system call allowing for userland to send its own ktrace
records. From FreeBSD via otto@, with tweaks suggested by guenther@.
Commite on behalf of otto@ who is not around, to ride the libc minor bump.
Causes a librthread minor bump as well (new syscall).

Revision 1.58 / (download) - annotate - [select for diffs], Tue Apr 10 20:39:37 2012 UTC (12 years, 2 months ago) by mikeb
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.57: +57 -36 lines
Diff to previous 1.57 (colored)

Add a start record to the ktrace and use a special magic string "KTR"
to identify ktrace files.  kdump(1) will now refuse to operate on
trace data without the start record and as a bonus will print only
PID, unless an -H flag is specified to print PID/TID pairs.  Initial
diff, input from and ok deraadt, guenther.

Revision 1.57 / (download) - annotate - [select for diffs], Mon Mar 19 09:05:39 2012 UTC (12 years, 2 months ago) by guenther
Branch: MAIN
Changes since 1.56: +4 -1 lines
Diff to previous 1.56 (colored)

Add tracing and dumping of "pointer to struct" syscall arguments for
structs timespec, timeval, sigaction, and rlimit.

ok otto@ jsing@

Revision 1.56 / (download) - annotate - [select for diffs], Wed Dec 14 07:32:16 2011 UTC (12 years, 6 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.55: +123 -85 lines
Diff to previous 1.55 (colored)

Handle rthreads consistently in ktrace by moving the flags and vnode into
struct process; KTRFAC_ACTIVE becomes P_INKTR.  Also, save the credentials
used to open the file in sys_ktrace() and use them for all writes to the
vnode.

much feedback and ok jsing@

Revision 1.55 / (download) - annotate - [select for diffs], Mon Nov 21 03:01:20 2011 UTC (12 years, 6 months ago) by djm
Branch: MAIN
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored)

fix small (one stack word) kmem->user leak - the syscall code does
not zero retval when returning an error, so don't copy it back to a
ktracer in this case.

dropped by R00T-DUDE in his "Unusual and Hilarious Vulnerabilities" talk
at Ruxcon 2011; ok guenther@ miod@

Revision 1.54 / (download) - annotate - [select for diffs], Mon Jul 11 15:40:47 2011 UTC (12 years, 11 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.53: +1 -6 lines
Diff to previous 1.53 (colored)

Revert art@'s moving around of the KERNEL_LOCK()/KERNEL_UNLOCK() calls,
as it causes hangs in some ports, including libsigsegv's configure script

confirmed by krw@, landry@

Revision 1.53 / (download) - annotate - [select for diffs], Fri Jul 8 19:28:36 2011 UTC (12 years, 11 months ago) by otto
Branch: MAIN
Changes since 1.52: +25 -1 lines
Diff to previous 1.52 (colored)

Support sending struct info to kdump. So far for struct stat and
struct sockaddress; mostly from freebsd. ok deraadt@ tedu@ nicm@

Revision 1.52 / (download) - annotate - [select for diffs], Thu Jul 7 18:11:24 2011 UTC (12 years, 11 months ago) by art
Branch: MAIN
Changes since 1.51: +6 -1 lines
Diff to previous 1.51 (colored)

There is a bunch of places in the kernel entry points where we don't
hold the kernel lock, but still need call one function that needs it.

Instead of grabbing the lock all over the place, move the locks into
the affected functions: trapsignal, scdebug*, ktrsyscall, ktrsysret,
systrace_redirect and ADDUPROF. In the cases we already hold the biglock
we'll just recurse.

kettenis@, beck@ ok

Revision 1.51 / (download) - annotate - [select for diffs], Thu Jun 2 16:29:20 2011 UTC (13 years ago) by deraadt
Branch: MAIN
Changes since 1.50: +2 -2 lines
Diff to previous 1.50 (colored)

We will ignore retval2; it is not an issue

Revision 1.50 / (download) - annotate - [select for diffs], Sat Apr 2 17:04:35 2011 UTC (13 years, 2 months ago) by guenther
Branch: MAIN
Changes since 1.49: +2 -2 lines
Diff to previous 1.49 (colored)

Move P_SUGID and P_SUGIDEXEC from struct proc to struct process, so
that you can't evade the checks by doing the dirty work in an rthread

ok blambert@, deraadt@

Revision 1.49 / (download) - annotate - [select for diffs], Mon Jul 26 01:56:27 2010 UTC (13 years, 10 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.48: +25 -18 lines
Diff to previous 1.48 (colored)

Correct the links between threads, processes, pgrps, and sessions,
so that the process-level stuff is to/from struct process and not
struct proc.  This fixes a bunch of problem cases in rthreads.
Based on earlier work by blambert and myself, but mostly written
at c2k10.

Tested by many: deraadt, sthen, krw, ray, and in snapshots

Revision 1.48 / (download) - annotate - [select for diffs], Sat Oct 31 12:00:08 2009 UTC (14 years, 7 months ago) by fgsch
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored)

Use suser when possible. Suggested by miod@.
miod@ deraadt@ ok.

Revision 1.47 / (download) - annotate - [select for diffs], Thu Jul 9 22:29:56 2009 UTC (14 years, 11 months ago) by thib
Branch: MAIN
Changes since 1.46: +1 -1 lines
Diff to previous 1.46 (colored)

Remove the VREF() macro and replaces all instances with a call to verf(),
which is exactly what the macro does.

Macro's that are nothing more then:
#define FUNCTION(arg) function(arg)
are almost always pointless and should go away.

OK blambert@
Agreed by many.

Revision 1.46 / (download) - annotate - [select for diffs], Sat Nov 1 21:35:35 2008 UTC (15 years, 7 months ago) by pedro
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.45: +8 -6 lines
Diff to previous 1.45 (colored)

Grab a reference to the trace vnode of the process when traversing the
global process list and calling ktrsettracevnode() in ktrwrite(), so
that we don't sleep in vrele(). Discussed with deraadt@, okay beck@,
tedu@ and thib@.

Revision 1.45 / (download) - annotate - [select for diffs], Fri Oct 31 17:17:02 2008 UTC (15 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.44: +21 -28 lines
Diff to previous 1.44 (colored)

accidental commit ... backout

Revision 1.44 / (download) - annotate - [select for diffs], Fri Oct 31 17:15:30 2008 UTC (15 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.43: +29 -22 lines
Diff to previous 1.43 (colored)

kern_sysctl.c

Revision 1.43 / (download) - annotate - [select for diffs], Thu May 22 17:04:59 2008 UTC (16 years ago) by thib
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored)

Use LIST_FOREACH() instead of handrolling.

From: Pierre Riteau pierre.riteau_att_gmail.com
OK miod@

Revision 1.42 / (download) - annotate - [select for diffs], Wed May 16 17:27:30 2007 UTC (17 years ago) by art
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.41: +1 -5 lines
Diff to previous 1.41 (colored)

The world of __HAVEs and __HAVE_NOTs is reducing. All architectures
have cpu_info now, so kill the option.

eyeballed by jsg@ and grange@

Revision 1.41 / (download) - annotate - [select for diffs], Tue Nov 14 09:16:55 2006 UTC (17 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.40: +8 -4 lines
Diff to previous 1.40 (colored)

properly check for native emulation binaries, so that the correct sysctl
mib numbers are appended to the syscall record; broken by niklas in 1.39

Revision 1.40 / (download) - annotate - [select for diffs], Wed May 17 02:11:25 2006 UTC (18 years ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.39: +4 -4 lines
Diff to previous 1.39 (colored)

change ktr_len to size_t.  put ktr_type after comm for better alignment
ok deraadt

Revision 1.39 / (download) - annotate - [select for diffs], Mon Feb 27 00:34:33 2006 UTC (18 years, 3 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.38: +4 -3 lines
Diff to previous 1.38 (colored)

When checking syscall numbers, qualify the test with the emulation as well.
fixes potential panics on emulated binaries. ok deraadt@

Revision 1.38 / (download) - annotate - [select for diffs], Mon Nov 28 00:14:28 2005 UTC (18 years, 6 months ago) by jsg
Branch: MAIN
Changes since 1.37: +18 -56 lines
Diff to previous 1.37 (colored)

ansi/deregister.
'go for it' deraadt@

Revision 1.37 / (download) - annotate - [select for diffs], Tue Nov 15 23:05:37 2005 UTC (18 years, 6 months ago) by pedro
Branch: MAIN
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored)

Save process context in ktrwrite(), as it may be needed for locking
purposes by the file system specific write routine. Fixes PR 4612.
Okay deraadt@.

Revision 1.36 / (download) - annotate - [select for diffs], Sat Sep 10 21:05:27 2005 UTC (18 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.35: +11 -6 lines
Diff to previous 1.35 (colored)

do not trust user input for sysctl.  constrain arguments passed to ktrace
to CTL_MAXNAME; ok espie uwe

Revision 1.35 / (download) - annotate - [select for diffs], Thu Jun 2 17:32:02 2005 UTC (19 years ago) by mickey
Branch: MAIN
Changes since 1.34: +7 -1 lines
Diff to previous 1.34 (colored)

for sysctl syscall pass the mib[] back to kdump to parse;
always print () on syscalls w/ void args even (deraadt version)

Revision 1.34 / (download) - annotate - [select for diffs], Sun Dec 26 21:22:13 2004 UTC (19 years, 5 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.33: +6 -6 lines
Diff to previous 1.33 (colored)

Use list and queue macros where applicable to make the code easier to read;
no change in compiler assembly output.

Revision 1.33 / (download) - annotate - [select for diffs], Sun Jun 13 21:49:26 2004 UTC (20 years ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.32: +2 -1 lines
Diff to previous 1.32 (colored)

debranch SMP, have fun

Revision 1.11.6.12 / (download) - annotate - [select for diffs], Thu Jun 10 11:40:33 2004 UTC (20 years ago) by niklas
Branch: SMP
Changes since 1.11.6.11: +2 -2 lines
Diff to previous 1.11.6.11 (colored) to branchpoint 1.11 (colored) next main 1.12 (colored)

sync with head, make i386 __HAVE_CPUINFO

Revision 1.32 / (download) - annotate - [select for diffs], Wed Jun 9 20:18:28 2004 UTC (20 years ago) by art
Branch: MAIN
CVS Tags: SMP_SYNC_B, SMP_SYNC_A
Changes since 1.31: +5 -1 lines
Diff to previous 1.31 (colored)

Merge in a piece of the SMP branch into HEAD.

Introduce the cpu_info structure, p_cpu field in struct proc and global
scheduling context and various changed code to deal with this. At the
moment no architecture uses this stuff yet, but it will allow us slow and
controlled migration to the new APIs.

All new code is ifdef:ed out.

ok deraadt@ niklas@

Revision 1.11.6.11 / (download) - annotate - [select for diffs], Tue Jun 8 20:15:48 2004 UTC (20 years ago) by drahn
Branch: SMP
Changes since 1.11.6.10: +2 -1 lines
Diff to previous 1.11.6.10 (colored) to branchpoint 1.11 (colored)

Include sched.h in kern_ktrace and kern_subr since they use those
defines in the MULTIPROCESSOR cases.

Revision 1.11.6.10 / (download) - annotate - [select for diffs], Sat Jun 5 17:19:55 2004 UTC (20 years ago) by niklas
Branch: SMP
Changes since 1.11.6.9: +5 -1 lines
Diff to previous 1.11.6.9 (colored) to branchpoint 1.11 (colored)

Make a few scheduling globals per-cpu, mostly NetBSD code

Revision 1.11.6.9 / (download) - annotate - [select for diffs], Thu Feb 19 10:56:37 2004 UTC (20 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.11.6.8: +2 -2 lines
Diff to previous 1.11.6.8 (colored) to branchpoint 1.11 (colored)

Merge of current from two weeks agointo the SMP branch

Revision 1.31 / (download) - annotate - [select for diffs], Mon Sep 1 18:06:03 2003 UTC (20 years, 9 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

match syscallargs comments with reality
from Patrick Latifi <patrick.l@hermes.usherb.ca>
ok jason@ tedu@

Revision 1.11.6.8 / (download) - annotate - [select for diffs], Sat Jun 7 11:03:40 2003 UTC (21 years ago) by ho
Branch: SMP
Changes since 1.11.6.7: +2 -6 lines
Diff to previous 1.11.6.7 (colored) to branchpoint 1.11 (colored)

Sync SMP branch to -current

Revision 1.30 / (download) - annotate - [select for diffs], Mon Jun 2 23:28:05 2003 UTC (21 years ago) by millert
Branch: MAIN
Changes since 1.29: +2 -6 lines
Diff to previous 1.29 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.11.6.7 / (download) - annotate - [select for diffs], Fri Mar 28 00:41:26 2003 UTC (21 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.11.6.6: +3 -2 lines
Diff to previous 1.11.6.6 (colored) to branchpoint 1.11 (colored)

Sync the SMP branch with 3.3

Revision 1.25.2.2 / (download) - annotate - [select for diffs], Tue Oct 29 00:36:44 2002 UTC (21 years, 7 months ago) by art
Branch: UBC
Changes since 1.25.2.1: +3 -2 lines
Diff to previous 1.25.2.1 (colored) to branchpoint 1.25 (colored) next main 1.26 (colored)

sync to -current

Revision 1.27.2.1 / (download) - annotate - [select for diffs], Fri Jun 28 15:10:26 2002 UTC (21 years, 11 months ago) by jason
Branch: OPENBSD_3_1
Changes since 1.27: +3 -2 lines
Diff to previous 1.27 (colored) next main 1.28 (colored)

pull in patch from current:
Fix (deraadt):
do not permit ktrace on P_SUGID; millert ok

Revision 1.24.2.1 / (download) - annotate - [select for diffs], Thu Jun 27 08:21:32 2002 UTC (21 years, 11 months ago) by miod
Branch: OPENBSD_3_0
Changes since 1.24: +5 -2 lines
Diff to previous 1.24 (colored) next main 1.25 (colored)

Errata #026:
Do not permit ktrace on P_SUGID

Revision 1.29 / (download) - annotate - [select for diffs], Thu Jun 27 02:15:52 2002 UTC (21 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: UBC_SYNC_B, UBC_SYNC_A, OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.28: +3 -2 lines
Diff to previous 1.28 (colored)

do not permit ktrace on P_SUGID; millert ok

Revision 1.25.2.1 / (download) - annotate - [select for diffs], Tue Jun 11 03:29:40 2002 UTC (22 years ago) by art
Branch: UBC
Changes since 1.25: +12 -10 lines
Diff to previous 1.25 (colored)

Sync UBC branch to -current

Revision 1.28 / (download) - annotate - [select for diffs], Thu Jun 6 15:41:46 2002 UTC (22 years ago) by mpech
Branch: MAIN
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored)

Fix *documentation*: one arg of the ktrace(2) is pid_t not int, found while
have fun w/ pid_t cleanups.

millert@ ok

Revision 1.11.6.6 / (download) - annotate - [select for diffs], Thu Mar 28 11:43:04 2002 UTC (22 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.11.6.5: +6 -6 lines
Diff to previous 1.11.6.5 (colored) to branchpoint 1.11 (colored)

Merge in -current from about a week ago

Revision 1.27 / (download) - annotate - [select for diffs], Thu Mar 14 01:27:04 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE
Branch point for: OPENBSD_3_1
Changes since 1.26: +7 -7 lines
Diff to previous 1.26 (colored)

First round of __P removal in sys

Revision 1.11.6.5 / (download) - annotate - [select for diffs], Wed Mar 6 02:13:23 2002 UTC (22 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.11.6.4: +4 -2 lines
Diff to previous 1.11.6.4 (colored) to branchpoint 1.11 (colored)

Merge in trunk

Revision 1.26 / (download) - annotate - [select for diffs], Fri Feb 22 19:19:28 2002 UTC (22 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.25: +5 -3 lines
Diff to previous 1.25 (colored)

include a siginfo_t with ktrace PSIG information, so that kdump can print
fault addresses and other information. (a small bug exists: in some signal
delivery cases, two PSIG records may be inserted, because postsig() is
unaware a PSIG record has already been placed.  but this small bug can
stay since the siginfo_t information helps us find and fix other bugs)

Revision 1.11.6.4 / (download) - annotate - [select for diffs], Tue Nov 13 23:04:23 2001 UTC (22 years, 7 months ago) by niklas
Branch: SMP
Changes since 1.11.6.3: +2 -2 lines
Diff to previous 1.11.6.3 (colored) to branchpoint 1.11 (colored)

merge in -current

Revision 1.25 / (download) - annotate - [select for diffs], Tue Nov 6 19:53:20 2001 UTC (22 years, 7 months ago) by miod
Branch: MAIN
CVS Tags: UBC_BASE
Branch point for: UBC
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.
(Look ma, I might have broken the tree)

Revision 1.11.6.3 / (download) - annotate - [select for diffs], Wed Jul 4 10:48:21 2001 UTC (22 years, 11 months ago) by niklas
Branch: SMP
Changes since 1.11.6.2: +7 -7 lines
Diff to previous 1.11.6.2 (colored) to branchpoint 1.11 (colored)

Merge in -current from two days ago in the SMP branch.
As usual with merges, they do not indicate progress, so do not hold
your breath for working SMP, and do not mail me and ask about the
state of it.  It has not changed.  There is work ongoing, but very, very
slowly.  The commit is done in parts as to not lock up the tree in too
big chunks at a time.

Revision 1.24 / (download) - annotate - [select for diffs], Tue Jun 26 06:27:38 2001 UTC (22 years, 11 months ago) by aaron
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE
Branch point for: OPENBSD_3_0
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

Appease gcc by not using void pointers in arithmetic operations; art@ ok

Revision 1.23 / (download) - annotate - [select for diffs], Fri Jun 22 14:14:08 2001 UTC (22 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.22: +6 -6 lines
Diff to previous 1.22 (colored)

KNF

Revision 1.11.6.2 / (download) - annotate - [select for diffs], Mon May 14 22:32:40 2001 UTC (23 years, 1 month ago) by niklas
Branch: SMP
Changes since 1.11.6.1: +146 -126 lines
Diff to previous 1.11.6.1 (colored) to branchpoint 1.11 (colored)

merge in approximately 2.9 into SMP branch

Revision 1.22 / (download) - annotate - [select for diffs], Fri Nov 10 18:15:46 2000 UTC (23 years, 7 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.21: +28 -35 lines
Diff to previous 1.21 (colored)

Change the ktrace interface functions from taking the trace vnode to taking the
traced proc. The vnode is in the proc and all functions need the proc.

Revision 1.21 / (download) - annotate - [select for diffs], Wed Sep 27 16:13:46 2000 UTC (23 years, 8 months ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8
Changes since 1.20: +5 -5 lines
Diff to previous 1.20 (colored)

replace MALLOC/FREE w/ malloc/free for non-constant-sized memory allocations; art@ ok

Revision 1.20 / (download) - annotate - [select for diffs], Sat Apr 29 17:46:28 2000 UTC (24 years, 1 month ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

ktrace(2) should not follow symbolic links; from FreeBSD

Revision 1.19 / (download) - annotate - [select for diffs], Fri Apr 21 07:39:15 2000 UTC (24 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.18: +10 -10 lines
Diff to previous 1.18 (colored)

do not declare and use a local variable which conflicts with a global
variable which is used by a macro when VM is used instead of UVM.  very
cute, Art -- 10 points for artistic expression.

Revision 1.18 / (download) - annotate - [select for diffs], Thu Apr 20 10:03:42 2000 UTC (24 years, 1 month ago) by art
Branch: MAIN
Changes since 1.17: +28 -18 lines
Diff to previous 1.17 (colored)

Add a function "ktrsettracevnode", that changes the ktrace vnode for a process
in a correct way. Use it in all places where the vnode was changed.
(most of the earlier code was incorrect and had races).

Revision 1.17 / (download) - annotate - [select for diffs], Wed Apr 19 10:56:41 2000 UTC (24 years, 1 month ago) by art
Branch: MAIN
Changes since 1.16: +25 -11 lines
Diff to previous 1.16 (colored)

Unbreak genio (how could I commit that garbage?).

Let ktrwrite return an error if the write failed so that we won't loop in
genio writing to a full disk (or whatever other error happened).

Revision 1.16 / (download) - annotate - [select for diffs], Wed Apr 19 10:13:22 2000 UTC (24 years, 1 month ago) by art
Branch: MAIN
Changes since 1.15: +7 -1 lines
Diff to previous 1.15 (colored)

When logging genio, check if we need to yield in the same way as in uiomove.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Apr 19 08:35:37 2000 UTC (24 years, 1 month ago) by art
Branch: MAIN
Changes since 1.14: +42 -52 lines
Diff to previous 1.14 (colored)

Don't abuse malloc to allocate small fixed-size structs that we can keep on the stack.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Apr 18 16:22:16 2000 UTC (24 years, 1 month ago) by art
Branch: MAIN
Changes since 1.13: +22 -15 lines
Diff to previous 1.13 (colored)

If the user does a huge I/O split the genio logging into smaller chunks
to avoid allocating a huge buffer which could lead to kmem starvation.

Revision 1.13 / (download) - annotate - [select for diffs], Thu Apr 6 13:25:26 2000 UTC (24 years, 2 months ago) by art
Branch: MAIN
Changes since 1.12: +25 -25 lines
Diff to previous 1.12 (colored)

Random cleanup.

Revision 1.11.6.1 / (download) - annotate - [select for diffs], Fri Mar 24 09:09:24 2000 UTC (24 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

Sync with -current

Revision 1.12 / (download) - annotate - [select for diffs], Fri Mar 3 11:31:42 2000 UTC (24 years, 3 months ago) by art
Branch: MAIN
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

Use LIST_ macros instead of internal field names to walk the allproc list.

Revision 1.11 / (download) - annotate - [select for diffs], Thu Feb 11 20:34:04 1999 UTC (25 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: kame_19991208, SMP_BASE, OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5
Branch point for: SMP
Changes since 1.10: +2 -1 lines
Diff to previous 1.10 (colored)

do not copyout uninitialized memory; arnej@math.ntnu.no

Revision 1.10 / (download) - annotate - [select for diffs], Tue Jun 2 14:50:47 1998 UTC (26 years ago) by csapuntz
Branch: MAIN
CVS Tags: OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.9: +2 -3 lines
Diff to previous 1.9 (colored)



Integrated fix from NetBSD kern/5357.

Revision 1.9 / (download) - annotate - [select for diffs], Tue Feb 3 19:06:23 1998 UTC (26 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

bad types; wileyc@sekiya.twics.co.jp

Revision 1.8 / (download) - annotate - [select for diffs], Fri Nov 14 23:40:55 1997 UTC (26 years, 7 months ago) by csapuntz
Branch: MAIN
Changes since 1.7: +3 -4 lines
Diff to previous 1.7 (colored)

Fixed up a VOP_UNLOCK call so that it uses the correction proc *

Revision 1.7 / (download) - annotate - [select for diffs], Tue Nov 11 13:50:13 1997 UTC (26 years, 7 months ago) by niklas
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

uninitialized variable

Revision 1.6 / (download) - annotate - [select for diffs], Thu Nov 6 05:58:16 1997 UTC (26 years, 7 months ago) by csapuntz
Branch: MAIN
Changes since 1.5: +6 -4 lines
Diff to previous 1.5 (colored)

Updates for VFS Lite 2 + soft update.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Oct 6 20:19:53 1997 UTC (26 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.4: +3 -5 lines
Diff to previous 1.4 (colored)

back out vfs lite2 till after 2.2

Revision 1.4 / (download) - annotate - [select for diffs], Mon Oct 6 15:12:18 1997 UTC (26 years, 8 months ago) by csapuntz
Branch: MAIN
Changes since 1.3: +6 -4 lines
Diff to previous 1.3 (colored)

VFS Lite2 Changes

Revision 1.3 / (download) - annotate - [select for diffs], Sun Mar 3 17:19:46 1996 UTC (28 years, 3 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1, OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.2: +14 -3 lines
Diff to previous 1.2 (colored)

From NetBSD: 960217 merge

Revision 1.2 / (download) - annotate - [select for diffs], Thu Dec 14 04:10:21 1995 UTC (28 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +8 -1 lines
Diff to previous 1.1 (colored)

from netbsd; emulation records

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:52:44 1995 UTC (28 years, 8 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:52:44 1995 UTC (28 years, 8 months ago) by deraadt
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.