OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.80 / (download) - annotate - [select for diffs], Sun Aug 14 01:58:28 2022 UTC (21 months, 4 weeks ago) by jsg
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, OPENBSD_7_2_BASE, OPENBSD_7_2, HEAD
Changes since 1.79: +1 -2 lines
Diff to previous 1.79 (colored)

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

Revision 1.79 / (download) - annotate - [select for diffs], Tue Dec 21 06:12:49 2021 UTC (2 years, 5 months ago) by anton
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.78: +4 -2 lines
Diff to previous 1.78 (colored)

Let malloc return an error as opposed of panicking when sysctl
kern.shminfo.shmseg is set to something ridiculously large.

ok kettenis@ millert@

Reported-by: syzbot+9f1b201cdbc97b19c7f5@syzkaller.appspotmail.com

Revision 1.78 / (download) - annotate - [select for diffs], Thu Nov 19 04:08:46 2020 UTC (3 years, 6 months ago) by gnezdo
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.77: +44 -65 lines
Diff to previous 1.77 (colored)

Convert sysctl_sysvsem to sysctl_int_bounded

Performed a minor refactoring and removed a few trailing whitespaces.

ok anton@

Revision 1.77 / (download) - annotate - [select for diffs], Wed Jun 24 22:03:42 2020 UTC (3 years, 11 months ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.76: +5 -5 lines
Diff to previous 1.76 (colored)

kernel: use gettime(9)/getuptime(9) in lieu of time_second(9)/time_uptime(9)

time_second(9) and time_uptime(9) are widely used in the kernel to
quickly get the system UTC or system uptime as a time_t.  However,
time_t is 64-bit everywhere, so it is not generally safe to use them
on 32-bit platforms: you have a split-read problem if your hardware
cannot perform atomic 64-bit reads.

This patch replaces time_second(9) with gettime(9), a safer successor
interface, throughout the kernel.  Similarly, time_uptime(9) is replaced
with getuptime(9).

There is a performance cost on 32-bit platforms in exchange for
eliminating the split-read problem: instead of two register reads you
now have a lockless read loop to pull the values from the timehands.
This is really not *too* bad in the grand scheme of things, but
compared to what we were doing before it is several times slower.

There is no performance cost on 64-bit (__LP64__) platforms.

With input from visa@, dlg@, and tedu@.

Several bugs squashed by visa@.

ok kettenis@

Revision 1.76 / (download) - annotate - [select for diffs], Wed Mar 4 08:04:48 2020 UTC (4 years, 3 months ago) by anton
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.75: +14 -3 lines
Diff to previous 1.75 (colored)

Grab a reference for the shared memory segment before calling uvm_map()
as the same function could end up putting the thread to sleep. Allowing
another thread to free the shared memory segment, which in turns causes
a use-after-free.

With help from and ok millert@ visa@

Reported-by: syzbot+0fc1766671a9461de8a5@syzkaller.appspotmail.com

Revision 1.75 / (download) - annotate - [select for diffs], Tue Nov 5 08:18:47 2019 UTC (4 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.74: +4 -4 lines
Diff to previous 1.74 (colored)

Kill uvm_deallocate(9) and use uvm_unmap() directly.

ok kettenis@, semarie@, deraadt@

Revision 1.74 / (download) - annotate - [select for diffs], Mon Nov 4 00:48:22 2019 UTC (4 years, 7 months ago) by guenther
Branch: MAIN
Changes since 1.73: +2 -2 lines
Diff to previous 1.73 (colored)

Fix previous commit: missed a ds_copyin() moved in rev 1.72

Revision 1.73 / (download) - annotate - [select for diffs], Sun Nov 3 20:16:01 2019 UTC (4 years, 7 months ago) by guenther
Branch: MAIN
Changes since 1.72: +8 -15 lines
Diff to previous 1.72 (colored)

Merge sys_shmctl() and shmctl1() again, as we no longer have a need for
the copyin/copyout compat shims.

ok deraadt@ millert@ anton@

Revision 1.72 / (download) - annotate - [select for diffs], Mon Oct 28 19:57:50 2019 UTC (4 years, 7 months ago) by anton
Branch: MAIN
Changes since 1.71: +7 -4 lines
Diff to previous 1.71 (colored)

Copy in the user-supplied buffer in shmctl(2) before looking up the
shared memory segment. Otherwise, if copyin ends up sleeping it allows
another thread to remove the same segment leading to a use-after-free.

Feedback from kettenis@ and ok guenther@

Reported-by: syzbot+0de42c2e600a6dd3091d@syzkaller.appspotmail.com

Revision 1.71 / (download) - annotate - [select for diffs], Fri Jan 25 00:19:26 2019 UTC (5 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.70: +2 -2 lines
Diff to previous 1.70 (colored)

I am retiring my old email address;  replace it with my OpenBSD one.

Revision 1.70 / (download) - annotate - [select for diffs], Wed Dec 12 14:15:35 2018 UTC (5 years, 6 months ago) by mpi
Branch: MAIN
Changes since 1.69: +6 -3 lines
Diff to previous 1.69 (colored)

free(9) sizes for sysv shm.

ok bluhm@, visa@

Revision 1.69 / (download) - annotate - [select for diffs], Thu Sep 15 02:00:16 2016 UTC (7 years, 8 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.68: +4 -4 lines
Diff to previous 1.68 (colored)

all pools have their ipl set via pool_setipl, so fold it into pool_init.

the ioff argument to pool_init() is unused and has been for many
years, so this replaces it with an ipl argument. because the ipl
will be set on init we no longer need pool_setipl.

most of these changes have been done with coccinelle using the spatch
below. cocci sucks at formatting code though, so i fixed that by hand.

the manpage and subr_pool.c bits i did myself.

ok tedu@ jmatthew@

@ipl@
expression pp;
expression ipl;
expression s, a, o, f, m, p;
@@
-pool_init(pp, s, a, o, f, m, p);
-pool_setipl(pp, ipl);
+pool_init(pp, s, a, ipl, f, m, p);

Revision 1.68 / (download) - annotate - [select for diffs], Tue Aug 30 07:40:35 2016 UTC (7 years, 9 months ago) by dlg
Branch: MAIN
Changes since 1.67: +2 -1 lines
Diff to previous 1.67 (colored)

pool_setipl

ok natano@

Revision 1.67 / (download) - annotate - [select for diffs], Wed Oct 7 14:49:04 2015 UTC (8 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.66: +2 -2 lines
Diff to previous 1.66 (colored)

easy free sizes; ok mpi

Revision 1.66 / (download) - annotate - [select for diffs], Sat Mar 14 03:38:50 2015 UTC (9 years, 3 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.65: +1 -2 lines
Diff to previous 1.65 (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.65 / (download) - annotate - [select for diffs], Thu Jan 15 20:36:17 2015 UTC (9 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.64: +4 -5 lines
Diff to previous 1.64 (colored)

The flags variable in shmat was not actually used.  We need UVM_FLAG_*
flags, not mmap-style flags for UVM_MAPFLAG().  Remove the nonsensical
MAP_ANON|MAP_SHARED value and convert MAP_FIXED to UVM_FLAG_FIXED.
OK guenther@

Revision 1.64 / (download) - annotate - [select for diffs], Fri Dec 19 05:59:21 2014 UTC (9 years, 5 months ago) by tedu
Branch: MAIN
Changes since 1.63: +2 -3 lines
Diff to previous 1.63 (colored)

start retiring the nointr allocator. specify PR_WAITOK as a flag as a
marker for which pools are not interrupt safe. ok dlg

Revision 1.63 / (download) - annotate - [select for diffs], Wed Dec 17 06:58:11 2014 UTC (9 years, 5 months ago) by guenther
Branch: MAIN
Changes since 1.62: +2 -2 lines
Diff to previous 1.62 (colored)

Prefer MADV_* over POSIX_MADV_* in kernel for consistency: the latter
doesn't have all the values and therefore can't be used everywhere.

ok deraadt@ kettenis@

Revision 1.62 / (download) - annotate - [select for diffs], Mon Dec 15 02:24:23 2014 UTC (9 years, 5 months ago) by guenther
Branch: MAIN
Changes since 1.61: +2 -2 lines
Diff to previous 1.61 (colored)

Use MAP_INHERIT_* for the 'inh' argument to the UMV_MAPFLAG() macro,
eliminating the must-be-kept-in-sync UVM_INH_* macros

ok deraadt@ tedu@

Revision 1.61 / (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.60: +4 -4 lines
Diff to previous 1.60 (colored)

convert bcopy to memcpy. ok millert

Revision 1.60 / (download) - annotate - [select for diffs], Tue Dec 9 07:05:06 2014 UTC (9 years, 6 months ago) by doug
Branch: MAIN
Changes since 1.59: +3 -3 lines
Diff to previous 1.59 (colored)

More malloc() -> mallocarray() in the kernel.

ok deraadt@ tedu@

Revision 1.59 / (download) - annotate - [select for diffs], Sun Nov 16 12:31:00 2014 UTC (9 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.58: +4 -4 lines
Diff to previous 1.58 (colored)

Replace a plethora of historical protection options with just
PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h.
PROT_MASK is introduced as the one true way of extracting those bits.
Remove UVM_ADV_* wrapper, using the standard names.
ok doug guenther kettenis

Revision 1.58 / (download) - annotate - [select for diffs], Sun Jul 13 15:29:04 2014 UTC (9 years, 11 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.57: +3 -3 lines
Diff to previous 1.57 (colored)

use mallocarray where arguments are multipled. ok deraadt

Revision 1.57 / (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.56: +4 -4 lines
Diff to previous 1.56 (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.56 / (download) - annotate - [select for diffs], Tue Mar 18 06:59:00 2014 UTC (10 years, 2 months ago) by guenther
Branch: MAIN
Changes since 1.55: +3 -3 lines
Diff to previous 1.55 (colored)

In prep for killing ps_mainproc, use pr->ps_pid instead of
pr->ps_mainproc->p_pid to get the PID.

ok matthew@

Revision 1.55 / (download) - annotate - [select for diffs], Fri Mar 9 13:01:28 2012 UTC (12 years, 3 months ago) by ariane
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, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.54: +3 -5 lines
Diff to previous 1.54 (colored)

New vmmap implementation.

no oks (it is really a pain to review properly)
extensively tested, I'm confident it'll be stable
'now is the time' from several icb inhabitants

Diff provides:
- ability to specify different allocators for different regions/maps
- a simpler implementation of the current allocator
- currently in compatibility mode: it will generate similar addresses
  as the old allocator

Revision 1.54 / (download) - annotate - [select for diffs], Thu Oct 27 07:56:28 2011 UTC (12 years, 7 months ago) by robert
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.53: +3 -8 lines
Diff to previous 1.53 (colored)

Allow segments to be used even after they were marked for deletion with
the IPC_RMID flag.
This is permitted as an extension beyond the standards and this is similar
to what other operating systems like linux do.

Because compat_linux(8) was emulating this already, remove that code
since now this is the default.

input from oga@, guenther@, jmc@, deraadt@
ok deraadt@

Revision 1.53 / (download) - annotate - [select for diffs], Mon Jun 6 17:10:23 2011 UTC (13 years ago) by ariane
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.52: +4 -1 lines
Diff to previous 1.52 (colored)

Backout vmmap in order to repair virtual address selection algorithms
outside the tree.

Revision 1.52 / (download) - annotate - [select for diffs], Tue May 24 15:27:36 2011 UTC (13 years ago) by ariane
Branch: MAIN
Changes since 1.51: +1 -4 lines
Diff to previous 1.51 (colored)

Reimplement uvm/uvm_map.

vmmap is designed to perform address space randomized allocations,
without letting fragmentation of the address space go through the roof.

Some highlights:
- kernel address space randomization
- proper implementation of guardpages
- roughly 10% system time reduction during kernel build

Tested by alot of people on tech@ and developers.
Theo's machines are still happy.

Revision 1.51 / (download) - annotate - [select for diffs], Sat Jul 3 03:04:55 2010 UTC (13 years, 11 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.50: +3 -2 lines
Diff to previous 1.50 (colored)

explicitly specify flags to malloc and pool_get instead of relying on 0.
This is more clear, and as thib pointed out, the default in softraid was
wrong.  ok thib.

Revision 1.50 / (download) - annotate - [select for diffs], Tue Jun 2 12:11:16 2009 UTC (15 years ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.49: +3 -3 lines
Diff to previous 1.49 (colored)

msgctl(), shmctl(), semctl() all have operations that are supposed
to return pids, not thread ids, so record the former when performing
operations.

ok blambert

Revision 1.49 / (download) - annotate - [select for diffs], Sat Sep 15 10:10:37 2007 UTC (16 years, 9 months ago) by martin
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
Changes since 1.48: +7 -7 lines
Diff to previous 1.48 (colored)

replace ctob and btoc with ptoa and atop respectively

help and ok miod@ thib@

Revision 1.48 / (download) - annotate - [select for diffs], Fri Sep 7 15:00:20 2007 UTC (16 years, 9 months ago) by art
Branch: MAIN
Changes since 1.47: +6 -11 lines
Diff to previous 1.47 (colored)

Use M_ZERO in a few more places to shave bytes from the kernel.

eyeballed and ok dlg@

Revision 1.47 / (download) - annotate - [select for diffs], Tue May 29 10:44:28 2007 UTC (17 years ago) by sturm
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.46: +11 -13 lines
Diff to previous 1.46 (colored)

adapt from netbsd:
fold sys_shmat1() back into sys_shmat(), instead add flag for shmget(2)
to specify that later shmat(2) for the shared memory segment should succeed
even if the segment would be marked removed; use this to implement the
Linux-compatible semantics of shmat(2)

this fixes current opera with shm

ok millert

Revision 1.46 / (download) - annotate - [select for diffs], Thu Jul 15 11:24:46 2004 UTC (19 years, 11 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.45: +1 -16 lines
Diff to previous 1.45 (colored)

Rename structs oipc_perm, omsqid_ds, osemid_ds, oshmid_ds to ipc_perm23,
etc to avoid confusion and for consistency with the *35 ones.
Remove *n2o functions that don't belong outside of compat.

Revision 1.45 / (download) - annotate - [select for diffs], Wed Jul 14 23:40:27 2004 UTC (19 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.44: +18 -11 lines
Diff to previous 1.44 (colored)

Move the guts of the {sem,msg,shm}ctl system calls into a new function
which also takes two function pointers for copyin/copyout.  For the
real syscalls these are just the normal copyin/copyout functions.
For the compat routines, these are funtions that convert between
the new and old foo_ds structs automagically.  OK deraadt@

Revision 1.44 / (download) - annotate - [select for diffs], Mon Jun 21 23:50:36 2004 UTC (19 years, 11 months ago) by tholo
Branch: MAIN
Changes since 1.43: +5 -5 lines
Diff to previous 1.43 (colored)

First step towards more sane time handling in the kernel -- this changes
things such that code that only need a second-resolution uptime or wall
time, and used to get that from time.tv_secs or mono_time.tv_secs now get
this from separate time_t globals time_second and time_uptime.

ok art@ niklas@ nordin@

Revision 1.14.2.11 / (download) - annotate - [select for diffs], Sat Jun 5 23:13:02 2004 UTC (20 years ago) by niklas
Branch: SMP
Changes since 1.14.2.10: +9 -4 lines
Diff to previous 1.14.2.10 (colored) to branchpoint 1.14 (colored) next main 1.15 (colored)

Merge with the trunk

Revision 1.43 / (download) - annotate - [select for diffs], Mon May 3 17:38:48 2004 UTC (20 years, 1 month ago) by millert
Branch: MAIN
CVS Tags: SMP_SYNC_B, SMP_SYNC_A
Changes since 1.42: +4 -3 lines
Diff to previous 1.42 (colored)

POSIX says the length parameter for semop(2) and shmget(2) should be size_t.
Create new syscalls with the correct parameters and add compat versions
for the old ones under COMPAT_35.

Revision 1.41.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 21:41:40 2004 UTC (20 years, 1 month ago) by brad
Branch: OPENBSD_3_5
Changes since 1.41: +4 -2 lines
Diff to previous 1.41 (colored) next main 1.42 (colored)

MFC:
Fix by tedu@

not a pasto.

ok deraadt@ millert@

Revision 1.42 / (download) - annotate - [select for diffs], Fri Apr 16 17:55:13 2004 UTC (20 years, 1 month ago) by tedu
Branch: MAIN
Changes since 1.41: +4 -2 lines
Diff to previous 1.41 (colored)

not a pasto.  ok millert@

Revision 1.14.2.10 / (download) - annotate - [select for diffs], Thu Feb 19 10:56:38 2004 UTC (20 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.14.2.9: +19 -12 lines
Diff to previous 1.14.2.9 (colored) to branchpoint 1.14 (colored)

Merge of current from two weeks agointo the SMP branch

Revision 1.33.2.1 / (download) - annotate - [select for diffs], Thu Feb 5 23:05:38 2004 UTC (20 years, 4 months ago) by brad
Branch: OPENBSD_3_3
Changes since 1.33: +4 -2 lines
Diff to previous 1.33 (colored) next main 1.34 (colored)

MFC:
Fix by millert@

Correct a reference counting bug in shmat(2); adapted from FreeBSD.

ok millert@

Revision 1.38.2.1 / (download) - annotate - [select for diffs], Thu Feb 5 23:04:40 2004 UTC (20 years, 4 months ago) by brad
Branch: OPENBSD_3_4
Changes since 1.38: +4 -2 lines
Diff to previous 1.38 (colored) next main 1.39 (colored)

MFC:
Fix by millert@

Correct a reference counting bug in shmat(2); adapted from FreeBSD.

ok millert@

Revision 1.41 / (download) - annotate - [select for diffs], Thu Feb 5 21:13:58 2004 UTC (20 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE
Branch point for: OPENBSD_3_5
Changes since 1.40: +4 -2 lines
Diff to previous 1.40 (colored)

Correct a reference counting bug in shmat(2); adapted from FreeBSD.
OK deraadt@ tedu@ dhartmei@

Revision 1.40 / (download) - annotate - [select for diffs], Mon Dec 22 00:35:57 2003 UTC (20 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.39: +1 -3 lines
Diff to previous 1.39 (colored)

Remove duplicated code (pasto)

Revision 1.39 / (download) - annotate - [select for diffs], Sun Oct 12 23:44:39 2003 UTC (20 years, 8 months ago) by millert
Branch: MAIN
Changes since 1.38: +8 -2 lines
Diff to previous 1.38 (colored)

Linux shmat allows lookup of segments that are marked as removed so
our Linux compat should too.  From marius aamodt eriksen

Revision 1.38 / (download) - annotate - [select for diffs], Thu Aug 21 05:20:07 2003 UTC (20 years, 9 months ago) by kevlo
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE
Branch point for: OPENBSD_3_4
Changes since 1.37: +1 -2 lines
Diff to previous 1.37 (colored)

sys/types.h is not really needed with sys/param.h; ok mickey@

Revision 1.37 / (download) - annotate - [select for diffs], Tue Jun 17 21:56:25 2003 UTC (20 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.36: +12 -8 lines
Diff to previous 1.36 (colored)

Sync with share/misc/license.template and add missing DARPA credit
where applicable.

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

Sync SMP branch to -current

Revision 1.36 / (download) - annotate - [select for diffs], Tue Jun 3 01:52:41 2003 UTC (21 years ago) by millert
Branch: MAIN
Changes since 1.35: +11 -22 lines
Diff to previous 1.35 (colored)

Use an ISC-tyle license for all my code; it is simpler and more permissive.

Revision 1.23.2.3 / (download) - annotate - [select for diffs], Mon May 19 22:31:57 2003 UTC (21 years ago) by tedu
Branch: UBC
Changes since 1.23.2.2: +296 -187 lines
Diff to previous 1.23.2.2 (colored) to branchpoint 1.23 (colored) next main 1.24 (colored)

sync

Revision 1.14.2.8 / (download) - annotate - [select for diffs], Tue May 13 19:21:28 2003 UTC (21 years, 1 month ago) by ho
Branch: SMP
Changes since 1.14.2.7: +3 -4 lines
Diff to previous 1.14.2.7 (colored) to branchpoint 1.14 (colored)

Sync the SMP branch to -current. This includes moving to ELF.

Revision 1.35 / (download) - annotate - [select for diffs], Mon May 12 00:48:52 2003 UTC (21 years, 1 month ago) by jason
Branch: MAIN
CVS Tags: UBC_SYNC_A
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

Nuke a whole bunch of commons; ok tedu (still more to come *sigh*)

Revision 1.34 / (download) - annotate - [select for diffs], Mon Apr 14 04:53:50 2003 UTC (21 years, 2 months ago) by art
Branch: MAIN
Changes since 1.33: +2 -3 lines
Diff to previous 1.33 (colored)

There are two related changes.

The first one is an mquery(2) syscall. It's for asking the VM system
about where to map things. It will be used by ld.so, read the man page
for details.

The second change is related and is a centralization of uvm_map hint
that all callers of uvm_map calculated. This will allow us to adjust
this hint on architectures that have segments for non-exec mappings.

deraadt@ drahn@ ok.

Revision 1.14.2.7 / (download) - annotate - [select for diffs], Fri Mar 28 00:41:27 2003 UTC (21 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.14.2.6: +297 -190 lines
Diff to previous 1.14.2.6 (colored) to branchpoint 1.14 (colored)

Sync the SMP branch with 3.3

Revision 1.33 / (download) - annotate - [select for diffs], Tue Jan 7 00:34:41 2003 UTC (21 years, 5 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE
Branch point for: OPENBSD_3_3
Changes since 1.32: +3 -3 lines
Diff to previous 1.32 (colored)

xerxes [/home/src/local/millert/sudo/sudo-1.6.7] % vi /usr/src/local/TiVo/Linux/Don't allow s{e,h}mmni to be set > 0xffff via sysctl since that could
cause id collisions (the macros in <sys/ipc.h> limit the index to 0xffff).
Prompted by a conversation with weingart@

Revision 1.32 / (download) - annotate - [select for diffs], Mon Jan 6 20:11:28 2003 UTC (21 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.31: +8 -8 lines
Diff to previous 1.31 (colored)

Add a "findremoved" arg to shm_find_segment_by_shmid() similar to
NetBSD and allow shmctl() to operate on shm segments that have been
marked for removal like other OSes do.

Revision 1.31 / (download) - annotate - [select for diffs], Tue Dec 17 23:32:31 2002 UTC (21 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.30: +27 -1 lines
Diff to previous 1.30 (colored)

Add my copyright notice.

Revision 1.30 / (download) - annotate - [select for diffs], Tue Dec 17 23:11:31 2002 UTC (21 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.29: +263 -178 lines
Diff to previous 1.29 (colored)

Make SysV-style shared memory and semaphore limits sysctl'able.
Instead of allocating a static amount of memory for the data
structures via valloc() in allocsys(), allocate things dynamically
using pool(9) when possible and malloc(9) when not.  The various
members of struct seminfo and struct shminfo are in kern.seminfo
and kern.shminfo respectively (not all members of kern.seminfo are
changable).

The data structures used still leave something to be desired but
things are not made worse in that respect by this commit.

Revision 1.29 / (download) - annotate - [select for diffs], Wed Nov 6 00:17:28 2002 UTC (21 years, 7 months ago) by art
Branch: MAIN
Changes since 1.28: +4 -6 lines
Diff to previous 1.28 (colored)

Eliminate the use of KERN_SUCCESS outside of uvm/

Also uvm_map returns KERN_* codes that are directly mapped to
errnos, so we can return them instead of doing some attempt to
translation.

drahn@ "I see no problem" pval@ "makes sense"

Revision 1.28 / (download) - annotate - [select for diffs], Tue Oct 29 18:30:21 2002 UTC (21 years, 7 months ago) by art
Branch: MAIN
Changes since 1.27: +3 -5 lines
Diff to previous 1.27 (colored)

Since memory deallocation can't fail, remove the error return from
uvm_unmap, uvm_deallocate and a few other functions.
Simplifies some code and reduces diff to the UBC branch.

Revision 1.23.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.23.2.1: +2 -2 lines
Diff to previous 1.23.2.1 (colored) to branchpoint 1.23 (colored)

sync to -current

Revision 1.27 / (download) - annotate - [select for diffs], Tue Jul 16 23:06:05 2002 UTC (21 years, 11 months ago) by art
Branch: MAIN
CVS Tags: UBC_SYNC_B, OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

minor formatting.

Revision 1.26 / (download) - annotate - [select for diffs], Fri Jul 12 01:42:54 2002 UTC (21 years, 11 months ago) by art
Branch: MAIN
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored)

Fix vm -> uvm in a comment.

Revision 1.23.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.23: +9 -9 lines
Diff to previous 1.23 (colored)

Sync UBC branch to -current

Revision 1.14.2.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.14.2.5: +8 -8 lines
Diff to previous 1.14.2.5 (colored) to branchpoint 1.14 (colored)

Merge in -current from about a week ago

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

First round of __P removal in sys

Revision 1.14.2.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.14.2.4: +8 -5 lines
Diff to previous 1.14.2.4 (colored) to branchpoint 1.14 (colored)

Merge in trunk

Revision 1.24 / (download) - annotate - [select for diffs], Wed Dec 19 08:58:06 2001 UTC (22 years, 5 months ago) by art
Branch: MAIN
Changes since 1.23: +9 -6 lines
Diff to previous 1.23 (colored)

UBC was a disaster. It worked very good when it worked, but on some
machines or some configurations or in some phase of the moon (we actually
don't know when or why) files disappeared. Since we've not been able to
track down the problem in two weeks intense debugging and we need -current
to be stable, back out everything to a state it had before UBC.

We apologise for the inconvenience.

Revision 1.14.2.4 / (download) - annotate - [select for diffs], Wed Dec 5 01:02:39 2001 UTC (22 years, 6 months ago) by niklas
Branch: SMP
Changes since 1.14.2.3: +5 -8 lines
Diff to previous 1.14.2.3 (colored) to branchpoint 1.14 (colored)

Merge in -current

Revision 1.23 / (download) - annotate - [select for diffs], Wed Nov 28 13:47:39 2001 UTC (22 years, 6 months ago) by art
Branch: MAIN
CVS Tags: UBC_BASE
Branch point for: UBC
Changes since 1.22: +6 -9 lines
Diff to previous 1.22 (colored)

Sync in more uvm changes from NetBSD.
This time we're getting rid of KERN_* and VM_PAGER_* error codes and
use errnos instead.

Revision 1.14.2.3 / (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.14.2.2: +2 -3 lines
Diff to previous 1.14.2.2 (colored) to branchpoint 1.14 (colored)

merge in -current

Revision 1.22 / (download) - annotate - [select for diffs], Wed Nov 7 01:18:01 2001 UTC (22 years, 7 months ago) by art
Branch: MAIN
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

Add an alignment argument to uvm_map that specifies an alignment hint
for the virtual address.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Nov 6 19:53:20 2001 UTC (22 years, 7 months ago) by miod
Branch: MAIN
Changes since 1.20: +1 -2 lines
Diff to previous 1.20 (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.14.2.2 / (download) - annotate - [select for diffs], Wed Oct 31 03:26:29 2001 UTC (22 years, 7 months ago) by nate
Branch: SMP
Changes since 1.14.2.1: +4 -1 lines
Diff to previous 1.14.2.1 (colored) to branchpoint 1.14 (colored)

Sync the SMP branch to something just after 3.0

Revision 1.20 / (download) - annotate - [select for diffs], Sun Aug 12 22:50:12 2001 UTC (22 years, 10 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.19: +4 -1 lines
Diff to previous 1.19 (colored)

Don't allocate globals in include files, use extern declarations.
Move the actual variables into their respective .c files.
As a bonus, remove semmap which is not used.

Revision 1.14.2.1 / (download) - annotate - [select for diffs], Wed Jul 4 10:48:40 2001 UTC (22 years, 11 months ago) by niklas
Branch: SMP
Changes since 1.14: +24 -150 lines
Diff to previous 1.14 (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.19 / (download) - annotate - [select for diffs], Wed Jun 27 04:49:47 2001 UTC (22 years, 11 months ago) by art
Branch: MAIN
Changes since 1.18: +2 -65 lines
Diff to previous 1.18 (colored)

remove old vm

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

KNF

Revision 1.17 / (download) - annotate - [select for diffs], Wed May 16 17:14:36 2001 UTC (23 years, 1 month ago) by millert
Branch: MAIN
Changes since 1.16: +13 -75 lines
Diff to previous 1.16 (colored)

Create COMPAT_25 and move ogetfsstat, ostatfs and ostatfs into it.
Create COMPAT_23 and move __osemctl, omsgctl, oshmctl there.

Revision 1.16 / (download) - annotate - [select for diffs], Sat May 5 21:26:44 2001 UTC (23 years, 1 month ago) by art
Branch: MAIN
Changes since 1.15: +3 -2 lines
Diff to previous 1.15 (colored)

Remove the (vaddr_t) casts inside the round_page and trunc_page macros.
We might want to use them on types that are bigger than vaddr_t.

Fix all callers that pass pointers without casts.

Revision 1.15 / (download) - annotate - [select for diffs], Sat May 5 20:57:00 2001 UTC (23 years, 1 month ago) by art
Branch: MAIN
Changes since 1.14: +5 -5 lines
Diff to previous 1.14 (colored)

Get rid of CLSIZE and all related stuff.
CLSIZE -> 1
CLBYTES -> PAGE_SIZE
OLOFSET -> PAGE_MASK
etc.
At the same time some archs needed some cleaning in vmparam.h so that
goes in at the same time.

Revision 1.14 / (download) - annotate - [select for diffs], Thu Nov 25 13:41:30 1999 UTC (24 years, 6 months ago) by art
Branch: MAIN
CVS Tags: kame_19991208, SMP_BASE, OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7
Branch point for: SMP
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

Use PAGE_SIZE instead of NBPG.

Revision 1.13 / (download) - annotate - [select for diffs], Thu Jul 8 05:05:23 1999 UTC (24 years, 11 months ago) by weingart
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.12: +1 -6 lines
Diff to previous 1.12 (colored)

Non UVM vaddr_t/paddr_t fixup

Revision 1.12 / (download) - annotate - [select for diffs], Wed Jun 23 09:44:28 1999 UTC (24 years, 11 months ago) by art
Branch: MAIN
Changes since 1.11: +201 -133 lines
Diff to previous 1.11 (colored)

Improved sysv shared memory. Works with UVM.
Original work done in FreeBSD, but this code was ported from NetBSD by
Chuck Cranor.

Revision 1.11 / (download) - annotate - [select for diffs], Mon Feb 22 00:43:55 1999 UTC (25 years, 3 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5
Changes since 1.10: +1 -2 lines
Diff to previous 1.10 (colored)

We don't need a second prototype for shmexit

Revision 1.10 / (download) - annotate - [select for diffs], Sun Feb 7 22:09:07 1999 UTC (25 years, 4 months ago) by art
Branch: MAIN
Changes since 1.9: +1 -2 lines
Diff to previous 1.9 (colored)

don't include vm_map.h twice

Revision 1.9 / (download) - annotate - [select for diffs], Sun Jun 14 18:57:09 1998 UTC (26 years ago) by matthieu
Branch: MAIN
CVS Tags: OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

fix compat shmctl/IPC_STAT

Revision 1.8 / (download) - annotate - [select for diffs], Thu Jun 11 18:32:17 1998 UTC (26 years ago) by deraadt
Branch: MAIN
Changes since 1.7: +78 -1 lines
Diff to previous 1.7 (colored)

change ipc.h to use uid_t and friends, and then build compat system calls for the old ushort based ipc.h

Revision 1.7 / (download) - annotate - [select for diffs], Mon May 11 06:13:48 1998 UTC (26 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored)

const a few more calls

Revision 1.6 / (download) - annotate - [select for diffs], Fri Feb 21 08:52:23 1997 UTC (27 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2, OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.5: +8 -1 lines
Diff to previous 1.5 (colored)

shmdt before shmdt (in child) fix

Revision 1.5 / (download) - annotate - [select for diffs], Mon Sep 2 05:25:06 1996 UTC (27 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.4: +3 -1 lines
Diff to previous 1.4 (colored)

shmdt when no mapping is ok, found by christos

Revision 1.4 / (download) - annotate - [select for diffs], Sun Apr 21 22:27:26 1996 UTC (28 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

partial sync with netbsd 960418, more to come

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

From NetBSD: 960217 merge

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

from netbsd; shmfork does not need to know about vfork

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