OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.41 / (download) - annotate - [select for diffs], Mon Dec 5 23:18:37 2022 UTC (17 months, 3 weeks ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.40: +2 -2 lines
Diff to previous 1.40 (colored)

zap a pile of dangling tabs

Revision 1.40 / (download) - annotate - [select for diffs], Thu Nov 3 04:52:41 2022 UTC (18 months, 4 weeks ago) by guenther
Branch: MAIN
Changes since 1.39: +6 -3 lines
Diff to previous 1.39 (colored)

Make scdebug_ret() behave like ktrsysret(), showing the off_t value
for lseek() and a single register_t value for all others.

ok miod@

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

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

Revision 1.38 / (download) - annotate - [select for diffs], Thu Dec 9 00:26:10 2021 UTC (2 years, 5 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.37: +11 -18 lines
Diff to previous 1.37 (colored)

We only have one syscall table: inline sysent/SYS_MAXSYSCALL and
SYS_syscall as the nosys() function into the MD syscall entry
routines and the SYSCALL_DEBUG support.  Adjust alpha's syscall
check to match the other archs.  Also, make sysent const to get it
into .rodata.

With that, 'struct emul' is unused: delete it and all its references

ok millert@

Revision 1.37 / (download) - annotate - [select for diffs], Tue Dec 7 22:17:02 2021 UTC (2 years, 5 months ago) by guenther
Branch: MAIN
Changes since 1.36: +6 -4 lines
Diff to previous 1.36 (colored)

Delete the last emulation callbacks: we're Just ELF, so declare
exec_elf_fixup() and coredump_elf() in <sys/exec_elf.h> and call
them and the MD setregs() directly in kern_exec.c and kern_sig.c

Also delete e_name[] (only used by sysctl), e_errno (unused), and
e_syscallnames[] (only used by SYSCALL_DEBUG) and constipate
syscallnames to 'const char *const[]'

ok kettenis@

Revision 1.36 / (download) - annotate - [select for diffs], Tue Apr 2 11:00:22 2019 UTC (5 years, 2 months ago) by deraadt
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, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored)

retguard has now replaced the stack protector on clang architectures,
the kernel does not need a __stack_smash_handler function.
WARNING: You need a fairly new clang, approximately > March 31.
with mortimer

Revision 1.35 / (download) - annotate - [select for diffs], Thu Mar 8 22:04:18 2018 UTC (6 years, 2 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.34: +5 -1 lines
Diff to previous 1.34 (colored)

When we are rebooting, do not fail in uvn_io().  The vnodes are
revoked while syncing disk, so the processes lose their executable
pages.  Instead of killing them with a SIGBUS after page fault,
just sleep.  This should prevent that init dies without pages
followed by a kernel panic.
initial diff from tedu@;  OK deraadt@ tedu@

Revision 1.34 / (download) - annotate - [select for diffs], Mon Feb 19 08:59:52 2018 UTC (6 years, 3 months ago) by mpi
Branch: MAIN
Changes since 1.33: +2 -2 lines
Diff to previous 1.33 (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.33 / (download) - annotate - [select for diffs], Sat Jan 21 05:42:03 2017 UTC (7 years, 4 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.32: +10 -6 lines
Diff to previous 1.32 (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.32 / (download) - annotate - [select for diffs], Sun Dec 18 20:10:39 2016 UTC (7 years, 5 months ago) by patrick
Branch: MAIN
Changes since 1.31: +9 -8 lines
Diff to previous 1.31 (colored)

Include sys/proc.h when compiled with SYSCALL_DEBUG to get access to
struct proc.  Also bump the printf of "code" to %ld and remove a few
casts to long as register_t is always long.

ok kettenis@

Revision 1.31 / (download) - annotate - [select for diffs], Wed Oct 5 02:31:52 2016 UTC (7 years, 7 months ago) by guenther
Branch: MAIN
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (colored)

Display/test/use the process PID, not the thread's TID, in a few places.

ok mpi@ mikeb@

Revision 1.30 / (download) - annotate - [select for diffs], Sat Sep 3 14:46:56 2016 UTC (7 years, 9 months ago) by naddy
Branch: MAIN
Changes since 1.29: +3 -1 lines
Diff to previous 1.29 (colored)

Write the system time back to the RTC every 30 minutes.
This fixes the problem that long-running machines which were not
shut down properly would reboot with a badly offset system time.

hints and ok kettenis@

Revision 1.29 / (download) - annotate - [select for diffs], Sat Dec 5 10:11:53 2015 UTC (8 years, 5 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.28: +1 -2 lines
Diff to previous 1.28 (colored)

remove stale lint annotations

Revision 1.28 / (download) - annotate - [select for diffs], Sat Mar 14 03:38:50 2015 UTC (9 years, 2 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.27: +1 -3 lines
Diff to previous 1.27 (colored)

Remove some includes include-what-you-use claims don't
have any direct symbols used.  Tested for indirect use by compiling
amd64/i386/sparc64 kernels.

ok tedu@ deraadt@

Revision 1.27 / (download) - annotate - [select for diffs], Sun Sep 14 14:17:25 2014 UTC (9 years, 8 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.26: +1 -2 lines
Diff to previous 1.26 (colored)

remove uneeded proc.h includes
ok mpi@ kspillner@

Revision 1.26 / (download) - annotate - [select for diffs], Fri Jul 11 14:36:44 2014 UTC (9 years, 10 months ago) by uebayasi
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.25: +12 -2 lines
Diff to previous 1.25 (colored)

reboot(9): Add MI reboot entry function

Now, for kernel to "reboot" (reboot, halt, or shutdown), MD boot(9) is called
in some places.  This change introduces a new MI function reboot(9) which is
simply a wrapper to call MD boot(9).

OK kettenis@ deraadt@

Revision 1.25 / (download) - annotate - [select for diffs], Tue Jul 8 17:19:25 2014 UTC (9 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.24: +1 -2 lines
Diff to previous 1.24 (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.24 / (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.23: +3 -3 lines
Diff to previous 1.23 (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.23 / (download) - annotate - [select for diffs], Tue Aug 7 05:16:54 2012 UTC (11 years, 9 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.22: +4 -3 lines
Diff to previous 1.22 (colored)

Move the common bits of syscall invocation and return handling into
an MI file, <sys/syscall_mi.h>, correcting inconsistencies and the
handling when copyin() of arguments fails.

Tested on i386, amd64, sparc64, and alpha (thanks naddy@)
Any issues with other platforms will be fixed in tree.

header name from millert@; ok miod@

Revision 1.22 / (download) - annotate - [select for diffs], Mon Jul 9 15:43:36 2012 UTC (11 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.21: +2 -19 lines
Diff to previous 1.21 (colored)

In reboot, no need to sched_peg_curproc() to the primary, because
sched_stop_secondary_cpus() leaves us on the only cpu which is left.
ok kettenis haesbaert guenther

Revision 1.21 / (download) - annotate - [select for diffs], Mon Jul 11 15:40:47 2011 UTC (12 years, 10 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.20: +2 -8 lines
Diff to previous 1.20 (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.20 / (download) - annotate - [select for diffs], Thu Jul 7 18:11:24 2011 UTC (12 years, 10 months ago) by art
Branch: MAIN
Changes since 1.19: +9 -3 lines
Diff to previous 1.19 (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.19 / (download) - annotate - [select for diffs], Sun Jun 26 22:40:00 2011 UTC (12 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.18: +1 -3 lines
Diff to previous 1.18 (colored)

if_downall() cannot be done MI in sys_reboot() because vfs_shutdown()
might need network (ie. nfs).  Move the call to the MD boot() routines.
This cause for boot hangs diagnosed by kettenis.

Revision 1.18 / (download) - annotate - [select for diffs], Wed Jul 28 16:15:25 2010 UTC (13 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.17: +3 -1 lines
Diff to previous 1.17 (colored)

more #ifdef needed for the case of not pegging on a non-MP kernel

Revision 1.17 / (download) - annotate - [select for diffs], Wed Jul 28 15:59:38 2010 UTC (13 years, 10 months ago) by kettenis
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

It's pretty pointless to peg ourselves to the primary CPU if that's the
only one we have.

ok krw@, deraadt@

Revision 1.16 / (download) - annotate - [select for diffs], Tue Apr 6 20:33:28 2010 UTC (14 years, 2 months ago) by kettenis
Branch: MAIN
Changes since 1.15: +4 -23 lines
Diff to previous 1.15 (colored)

Implement functions to take away the secondary CPUs from the scheduler and
give them back again, effectively stopping and starting these CPUs.  Use
the stop function in sys_reboot().

ok marco@, deraadt@

Revision 1.15 / (download) - annotate - [select for diffs], Sat Jan 9 02:44:17 2010 UTC (14 years, 4 months ago) by kettenis
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.14: +24 -1 lines
Diff to previous 1.14 (colored)

Add code to stop scheduling processes on CPUs, effectively halting that CPU.
Use this to do a shutdown with only the boot processor running.  This should
avoid nasty races during shutdown.

help from art@, ok deraadt@, miod@

Revision 1.14 / (download) - annotate - [select for diffs], Sun Nov 29 23:12:30 2009 UTC (14 years, 6 months ago) by kettenis
Branch: MAIN
Changes since 1.13: +1 -18 lines
Diff to previous 1.13 (colored)

Backout previous commit.  There is a possible race which makes it possible
for sys_reboot() to hang forever.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Nov 25 11:01:14 2009 UTC (14 years, 6 months ago) by kettenis
Branch: MAIN
Changes since 1.12: +19 -2 lines
Diff to previous 1.12 (colored)

Add a mechanism to stop the scheduler from scheduling processes on a
particular CPU such that it just sits and spins in the idle loop, effectively
halting that CPU.

ok deraadt@, miod@

Revision 1.12 / (download) - annotate - [select for diffs], Mon Aug 10 11:22:10 2009 UTC (14 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.11: +5 -1 lines
Diff to previous 1.11 (colored)

At sys_reboot time, bring all the interfaces down so that their xxstop
functions are called, which will turn off DMA.  Receiving packets into
your memory after a system reboot is pretty nasty.  This will also mean
that the shutdown hooks can go; this solution is smaller.
ok henning miod dlg kettenis

Revision 1.11 / (download) - annotate - [select for diffs], Fri Apr 3 09:30:15 2009 UTC (15 years, 2 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.10: +17 -1 lines
Diff to previous 1.10 (colored)

Make sure that sys_reboot runs on the primary cpu. Won't hurt when not
needed, but some machines seem to work much better with it.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Nov 28 00:14:29 2005 UTC (18 years, 6 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.9: +4 -13 lines
Diff to previous 1.9 (colored)

ansi/deregister.
'go for it' deraadt@

Revision 1.4.16.4 / (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.4.16.3: +2 -2 lines
Diff to previous 1.4.16.3 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored)

Merge of current from two weeks agointo the SMP branch

Revision 1.9 / (download) - annotate - [select for diffs], Fri Aug 15 20:32:18 2003 UTC (20 years, 9 months ago) by tedu
Branch: MAIN
CVS Tags: SMP_SYNC_B, SMP_SYNC_A, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

change arguments to suser.  suser now takes the process, and a flags
argument.  old cred only calls user suser_ucred.  this will allow future
work to more flexibly implement the idea of a root process.  looks like
something i saw in freebsd, but a little different.
use of suser_ucred vs suser in file system code should be looked at again,
for the moment semantics remain unchanged.
review and input from art@  testing and further review miod@

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

Sync SMP branch to -current

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

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

Revision 1.5.2.1 / (download) - annotate - [select for diffs], Mon May 19 22:31:56 2003 UTC (21 years ago) by tedu
Branch: UBC
Changes since 1.5: +11 -1 lines
Diff to previous 1.5 (colored) next main 1.6 (colored)

sync

Revision 1.4.16.2 / (download) - annotate - [select for diffs], Fri May 16 00:29:43 2003 UTC (21 years ago) by niklas
Branch: SMP
Changes since 1.4.16.1: +10 -0 lines
Diff to previous 1.4.16.1 (colored) to branchpoint 1.4 (colored)

merge the trunk so we will get the genfs and locking fixes

Revision 1.7 / (download) - annotate - [select for diffs], Tue May 13 22:45:11 2003 UTC (21 years ago) by miod
Branch: MAIN
CVS Tags: UBC_SYNC_A
Changes since 1.6: +3 -2 lines
Diff to previous 1.6 (colored)

Add option NO_PROPOLICE, which explicitely disables the use of the propolice
stack protection when building kernels. Intended to be used on installation
media, with tight space constraints - currently, only added where
SMALL_KERNEL was already defined.

Not thoroughly tested, but requested by deraadt.

Revision 1.6 / (download) - annotate - [select for diffs], Tue May 13 06:11:11 2003 UTC (21 years ago) by tedu
Branch: MAIN
Changes since 1.5: +10 -1 lines
Diff to previous 1.5 (colored)

support for propolice in the kernel.
some style input itojun@ tdeval@ toby@
tested, mostly by deraadt, on i386, macppc, vax, sparc64
ok deraadt@ miod@

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

merge in -current

Revision 1.5 / (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_SYNC_B, UBC_BASE, OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Branch point for: UBC
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (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.4 / (download) - annotate - [select for diffs], Mon Aug 26 09:16:01 1996 UTC (27 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: kame_19991208, SMP_BASE, OPENBSD_3_0_BASE, OPENBSD_3_0, OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2, OPENBSD_2_1_BASE, OPENBSD_2_1, OPENBSD_2_0_BASE, OPENBSD_2_0
Branch point for: SMP
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

fix syscall debugging

Revision 1.3 / (download) - annotate - [select for diffs], Thu May 2 13:12:17 1996 UTC (28 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.2: +2 -3 lines
Diff to previous 1.2 (colored)

sync syscalls, no sys/cpu.h

Revision 1.2 / (download) - annotate - [select for diffs], Sun Mar 3 17:19:58 1996 UTC (28 years, 3 months ago) by niklas
Branch: MAIN
Changes since 1.1: +4 -3 lines
Diff to previous 1.1 (colored)

From NetBSD: 960217 merge

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:52:45 1995 UTC (28 years, 7 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:45 1995 UTC (28 years, 7 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.