The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.131.10.3 / (download) - annotate - [select for diffs], Mon Mar 11 18:04:54 2024 UTC (5 weeks, 1 day ago) by martin
Branch: netbsd-8
Changes since 1.131.10.2: +6 -6 lines
Diff to previous 1.131.10.2 (colored) to branchpoint 1.131 (colored) next main 1.132 (colored)

Pull up following revision(s) (requested by riastradh in ticket #1945):

	sys/kern/sysv_shm.c: revision 1.142 (patch)

Avoid overflow when computing kern.ipc.shmmax. Keep shmmax (bytes) and
shmall (pages) values aligned and use arithmetic everywhere instead
of shifts.

Should fix PR 57979

Revision 1.135.2.5 / (download) - annotate - [select for diffs], Mon Mar 11 18:01:48 2024 UTC (5 weeks, 1 day ago) by martin
Branch: netbsd-9
Changes since 1.135.2.4: +6 -6 lines
Diff to previous 1.135.2.4 (colored) to branchpoint 1.135 (colored) next main 1.136 (colored)

Pull up following revision(s) (requested by riastradh in ticket #1814):

	sys/kern/sysv_shm.c: revision 1.142

Avoid overflow when computing kern.ipc.shmmax. Keep shmmax (bytes) and
shmall (pages) values aligned and use arithmetic everywhere instead
of shifts.

Should fix PR 57979

Revision 1.141.26.1 / (download) - annotate - [select for diffs], Mon Mar 11 18:00:06 2024 UTC (5 weeks, 1 day ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RELEASE, netbsd-10-0-RC6
Changes since 1.141: +6 -6 lines
Diff to previous 1.141 (colored) next main 1.142 (colored)

Pull up following revision(s) (requested by riastradh in ticket #626):

	sys/kern/sysv_shm.c: revision 1.142

Avoid overflow when computing kern.ipc.shmmax. Keep shmmax (bytes) and
shmall (pages) values aligned and use arithmetic everywhere instead
of shifts.

Should fix PR 57979

Revision 1.142 / (download) - annotate - [select for diffs], Sat Mar 2 08:59:47 2024 UTC (6 weeks, 3 days ago) by mlelstv
Branch: MAIN
CVS Tags: HEAD
Changes since 1.141: +6 -6 lines
Diff to previous 1.141 (colored)

Avoid overflow when computing kern.ipc.shmmax. Keep shmmax (bytes) and
shmall (pages) values aligned and use arithmetic everywhere instead
of shifts.
Should fix PR 57979

Revision 1.131.18.2 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:04 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.131.18.1: +24 -18 lines
Diff to previous 1.131.18.1 (colored) to branchpoint 1.131 (colored) next main 1.132 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.125.10.2 / (download) - annotate - [select for diffs], Tue Jan 21 19:23:37 2020 UTC (4 years, 2 months ago) by martin
Branch: netbsd-7-1
Changes since 1.125.10.1: +22 -2 lines
Diff to previous 1.125.10.1 (colored) to branchpoint 1.125 (colored) next main 1.126 (colored)

Pull up the following, requested by christos in ticket #1720:

	sys/compat/common/kern_sig_43.c				1.36
	sys/compat/linux/arch/amd64/linux_machdep.c		1.59
	sys/compat/linux/common/linux_fcntl.h			1.18
	sys/compat/linux/common/linux_file64.c			1.62
	sys/compat/linux/common/linux_ipc.c			1.57
	sys/compat/linux/common/linux_misc.c			1.243
	sys/compat/linux/common/linux_signal.c			1.81
	sys/compat/linux/common/linux_socket.c			1.149 (patch)
	sys/compat/linux/common/linux_socket.h			1.24
	sys/compat/linux/common/linux_statfs.h			1.7
	sys/compat/linux/common/linux_termios.c			1.38
	sys/compat/linux/common/linux_termios.h			1.22
	sys/compat/linux32/common/linux32_dirent.c		1.20
	sys/compat/linux32/common/linux32_ioctl.c		1.14
	sys/compat/linux32/common/linux32_misc.c		1.27
	sys/compat/linux32/common/linux32_signal.c		1.20
	sys/compat/linux32/common/linux32_sysinfo.c		1.8
	sys/compat/linux32/common/linux32_termios.c		1.15
	sys/compat/linux32/common/linux32_utsname.c		1.10
	sys/compat/netbsd32/netbsd32_compat_20.c		1.39
	sys/compat/netbsd32/netbsd32_compat_43.c		1.59
	sys/compat/netbsd32/netbsd32_compat_50.c		1.44
	sys/compat/ossaudio/ossaudio.c				1.75
	sys/kern/sysv_shm.c					1.138
	sys/miscfs/procfs/procfs_linux.c			1.75 (patch)
	sys/sys/shm.h						1.54 (patch)

Fix various info leaks, out of bound access, usage of uninitialized
values and direct access to userland variables from kernel space
and memory leaks in system calls implemented for the compatibility
subsystems.

Revision 1.125.2.2 / (download) - annotate - [select for diffs], Tue Jan 21 19:19:17 2020 UTC (4 years, 2 months ago) by martin
Branch: netbsd-7
Changes since 1.125.2.1: +22 -2 lines
Diff to previous 1.125.2.1 (colored) to branchpoint 1.125 (colored) next main 1.126 (colored)

Pull up the following, requested by christos in ticket #1720:

	sys/compat/common/kern_sig_43.c				1.36
	sys/compat/linux/arch/amd64/linux_machdep.c		1.59
	sys/compat/linux/common/linux_fcntl.h			1.18
	sys/compat/linux/common/linux_file64.c			1.62
	sys/compat/linux/common/linux_ipc.c			1.57
	sys/compat/linux/common/linux_misc.c			1.243
	sys/compat/linux/common/linux_signal.c			1.81
	sys/compat/linux/common/linux_socket.c			1.149 (patch)
	sys/compat/linux/common/linux_socket.h			1.24
	sys/compat/linux/common/linux_statfs.h			1.7
	sys/compat/linux/common/linux_termios.c			1.38
	sys/compat/linux/common/linux_termios.h			1.22
	sys/compat/linux32/common/linux32_dirent.c		1.20
	sys/compat/linux32/common/linux32_ioctl.c		1.14
	sys/compat/linux32/common/linux32_misc.c		1.27
	sys/compat/linux32/common/linux32_signal.c		1.20
	sys/compat/linux32/common/linux32_sysinfo.c		1.8
	sys/compat/linux32/common/linux32_termios.c		1.15
	sys/compat/linux32/common/linux32_utsname.c		1.10
	sys/compat/netbsd32/netbsd32_compat_20.c		1.39
	sys/compat/netbsd32/netbsd32_compat_43.c		1.59
	sys/compat/netbsd32/netbsd32_compat_50.c		1.44
	sys/compat/ossaudio/ossaudio.c				1.75
	sys/kern/sysv_shm.c					1.138
	sys/miscfs/procfs/procfs_linux.c			1.75 (patch)
	sys/sys/shm.h						1.54 (patch)

Fix various info leaks, out of bound access, usage of uninitialized
values and direct access to userland variables from kernel space
and memory leaks in system calls implemented for the compatibility
subsystems.

Revision 1.131.10.2 / (download) - annotate - [select for diffs], Tue Jan 21 18:12:54 2020 UTC (4 years, 2 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE
Changes since 1.131.10.1: +22 -2 lines
Diff to previous 1.131.10.1 (colored) to branchpoint 1.131 (colored)

Pull up the following, requested by christos in ticket #1487:

	sys/compat/common/kern_sig_43.c				1.36
	sys/compat/linux/arch/amd64/linux_machdep.c		1.59
	sys/compat/linux/common/linux_fcntl.h			1.18
	sys/compat/linux/common/linux_file64.c			1.62
	sys/compat/linux/common/linux_ipc.c			1.57
	sys/compat/linux/common/linux_misc.c			1.243
	sys/compat/linux/common/linux_signal.c			1.81
	sys/compat/linux/common/linux_socket.c			1.149
	sys/compat/linux/common/linux_socket.h			1.24
	sys/compat/linux/common/linux_statfs.h			1.7
	sys/compat/linux/common/linux_termios.c			1.38
	sys/compat/linux/common/linux_termios.h			1.22
	sys/compat/linux32/common/linux32_dirent.c		1.20
	sys/compat/linux32/common/linux32_ioctl.c		1.14
	sys/compat/linux32/common/linux32_misc.c		1.27
	sys/compat/linux32/common/linux32_signal.c		1.20
	sys/compat/linux32/common/linux32_sysinfo.c		1.8
	sys/compat/linux32/common/linux32_termios.c		1.15
	sys/compat/linux32/common/linux32_utsname.c		1.10
	sys/compat/netbsd32/netbsd32_compat_20.c		1.39
	sys/compat/netbsd32/netbsd32_compat_43.c		1.59
	sys/compat/netbsd32/netbsd32_compat_50.c		1.44
	sys/compat/ossaudio/ossaudio.c				1.75
	sys/kern/sysv_shm.c					1.138
	sys/miscfs/procfs/procfs_linux.c			1.75 (patch)
	sys/sys/shm.h						1.54

Fix various info leaks, out of bound access, usage of uninitialized
values and direct access to userland variables from kernel space
and memory leaks in system calls implemented for the compatibility
subsystems.

Revision 1.135.2.4 / (download) - annotate - [select for diffs], Thu Oct 10 17:23:45 2019 UTC (4 years, 6 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Changes since 1.135.2.3: +4 -34 lines
Diff to previous 1.135.2.3 (colored) to branchpoint 1.135 (colored)

Pull up following revision(s) (requested by chs in ticket #294):

	sys/kern/sysv_shm.c: revision 1.140,1.141

revert rev 1.139 (fixing a race between shmat() and shmdt())
that approach turned out to be too complicated.

 -

simpler fix for the race between shmat() and shmdt():
change shmat() to hold shm_lock until it is completely done.

Revision 1.141 / (download) - annotate - [select for diffs], Wed Oct 9 17:47:13 2019 UTC (4 years, 6 months ago) by chs
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, thorpej-altq-separation-base, thorpej-altq-separation, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, netbsd-10-base, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, bouyer-sunxi-drm-base, bouyer-sunxi-drm, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Branch point for: netbsd-10
Changes since 1.140: +1 -16 lines
Diff to previous 1.140 (colored)

simpler fix for the race between shmat() and shmdt():
change shmat() to hold shm_lock until it is completely done.

Revision 1.140 / (download) - annotate - [select for diffs], Wed Oct 9 17:44:45 2019 UTC (4 years, 6 months ago) by chs
Branch: MAIN
Changes since 1.139: +3 -18 lines
Diff to previous 1.139 (colored)

revert rev 1.139 (fixing a race between shmat() and shmdt())
that approach turned out to be too complicated.

Revision 1.135.2.3 / (download) - annotate - [select for diffs], Thu Oct 3 17:20:33 2019 UTC (4 years, 6 months ago) by martin
Branch: netbsd-9
Changes since 1.135.2.2: +18 -3 lines
Diff to previous 1.135.2.2 (colored) to branchpoint 1.135 (colored)

Pull up following revision(s) (requested by chs in ticket #275):

	sys/kern/sysv_shm.c: revision 1.139

in shmdt(), wait until shmat() completes before detaching.

Revision 1.139 / (download) - annotate - [select for diffs], Tue Oct 1 16:36:58 2019 UTC (4 years, 6 months ago) by chs
Branch: MAIN
Changes since 1.138: +18 -3 lines
Diff to previous 1.138 (colored)

in shmdt(), wait until shmat() completes before detaching.

Reported-by: syzbot+8f470a1bf36b47ae0040@syzkaller.appspotmail.com
Reported-by: syzbot+45810b4c41ed65d9148d@syzkaller.appspotmail.com

Revision 1.135.2.2 / (download) - annotate - [select for diffs], Fri Sep 13 06:25:26 2019 UTC (4 years, 7 months ago) by martin
Branch: netbsd-9
Changes since 1.135.2.1: +22 -2 lines
Diff to previous 1.135.2.1 (colored) to branchpoint 1.135 (colored)

Pull up following revision(s) (requested by maxv in ticket #194):

	sys/compat/linux/common/linux_socket.c: revision 1.146
	sys/compat/linux/common/linux_socket.c: revision 1.147
	sys/compat/linux/common/linux_socket.c: revision 1.148
	sys/compat/linux/common/linux_socket.c: revision 1.149
	sys/compat/linux/arch/amd64/linux_machdep.c: revision 1.59
	sys/compat/linux32/common/linux32_sysinfo.c: revision 1.8
	sys/kern/sysv_shm.c: revision 1.138
	sys/compat/linux/common/linux_file64.c: revision 1.61
	sys/compat/linux/common/linux_file64.c: revision 1.62
	sys/compat/netbsd32/netbsd32_compat_43.c: revision 1.58
	sys/compat/linux32/common/linux32_dirent.c: revision 1.20
	sys/compat/linux32/common/linux32_utsname.c: revision 1.10
	sys/compat/linux/common/linux_termios.h: revision 1.22
	sys/compat/linux32/common/linux32_termios.c: revision 1.15
	sys/compat/linux32/common/linux32_misc.c: revision 1.27
	sys/compat/linux32/common/linux32_ioctl.c: revision 1.14
	sys/compat/linux/common/linux_statfs.h: revision 1.7
	sys/compat/linux/common/linux_ipc.c: revision 1.57
	sys/compat/linux/common/linux_fcntl.h: revision 1.18
	sys/compat/linux/common/linux_socket.h: revision 1.24
	sys/sys/shm.h: revision 1.54
	sys/compat/ossaudio/ossaudio.c: revision 1.75
	sys/compat/linux32/common/linux32_signal.c: revision 1.20
	sys/miscfs/procfs/procfs_linux.c: revision 1.75
	sys/compat/linux/common/linux_signal.c: revision 1.81
	sys/compat/linux/common/linux_termios.c: revision 1.38
	sys/compat/linux/common/linux_misc.c: revision 1.241
	sys/compat/linux/common/linux_misc.c: revision 1.242
	sys/compat/linux/common/linux_misc.c: revision 1.243
	sys/compat/linux/common/linux_misc.c: revision 1.244

Fix info leaks.

Fix stupid bugs in linux_sys_shmctl(): the index could be out of bound
(page fault) and there was no proper locking.
Maybe we should just remove LINUX_SHM_STAT, like compat_linux32.

Remove printf.

When dealing with an unknown value, set -1, to prevent (harmless)
uninitialized accesses later.

Add a default case, don't call sys_ioctl() with an uninitialized 'com'
argument.

Fix error handling, returns an errno, not -1.

Put the printf under DEBUG_LINUX.


Hum, don't forget the 'pid' argument, otherwise we're not gonna go very
far.

Don't read data from userland directly. This simply does not work on any
recent x86 CPU (thanks to SMAP) and all architectures that forbid direct
access to userland from the kernel. But I guess no one noticed because no
one ever uses compat_linux, right?

Hum, don't pass an mbuf to realloc(). Inspired from copyin32_msg_control().

Fix memory leak.

I don't see the point in having this useless printf, but add a '\n' to it,
so that it at least displays useless stuff correctly.

Hum, remove incorrect assignment. Userland could have passed a smaller
namelen, and the uninitialized bytes from sb_data were being used later in
the network stack.

Revision 1.135.2.1 / (download) - annotate - [select for diffs], Tue Sep 10 16:14:53 2019 UTC (4 years, 7 months ago) by martin
Branch: netbsd-9
Changes since 1.135: +10 -5 lines
Diff to previous 1.135 (colored)

Pull up following revision(s) (requested by maxv in ticket #191):

	sys/kern/sysv_shm.c: revision 1.136

Acquire shmseg uobj reference while we hold shm_lock.

Otherwise nothing prevents it from being detached under our feet when
we drop shm_lock.

Revision 1.138 / (download) - annotate - [select for diffs], Fri Aug 23 10:22:14 2019 UTC (4 years, 7 months ago) by maxv
Branch: MAIN
Changes since 1.137: +22 -2 lines
Diff to previous 1.137 (colored)

Fix stupid bugs in linux_sys_shmctl(): the index could be out of bound
(page fault) and there was no proper locking.

Maybe we should just remove LINUX_SHM_STAT, like compat_linux32.

Revision 1.137 / (download) - annotate - [select for diffs], Wed Aug 7 00:38:02 2019 UTC (4 years, 8 months ago) by pgoyette
Branch: MAIN
Changes since 1.136: +3 -7 lines
Diff to previous 1.136 (colored)

Many years ago someone created a new __link_set_sysctl_funcs to hold
the list of routines that need to be called for setting up sysctl
variables.  This worked great for all code included in the kernel
itself, but didn't deal with modules that want to create their own
sysctl data.  So, we ended up with a lot of #ifdef _MODULE blocks
so modules could explicitly call their setup functions when loaded
as non-built-in modules.

So today, we complete the task that was started so many years ago.

When modules are loaded, after we've called xxx_modcmd(INIT...) we
check if the module contains its own __link_set_sysctl_funcs, and
if so we call the functions listed.  We add a struct sysctllog member
to the struct module so we can call sysctl_teardown() when the module
gets unloaded.  (The sequence of events ensures that the sysctl stuff
doesn't get created until the rest of the module's init code does any
required memory allocation.)

So, no more need to explicitly call the sysctl setup routines when
built as a loadable module.

Revision 1.136 / (download) - annotate - [select for diffs], Tue Aug 6 15:48:06 2019 UTC (4 years, 8 months ago) by riastradh
Branch: MAIN
Changes since 1.135: +10 -5 lines
Diff to previous 1.135 (colored)

Acquire shmseg uobj reference while we hold shm_lock.

Otherwise nothing prevents it from being detached under our feet when
we drop shm_lock.

Reported-by: syzbot+a76c618a6808a0fda475@syzkaller.appspotmail.com

Revision 1.131.18.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:03 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.131: +38 -61 lines
Diff to previous 1.131 (colored)

Sync with HEAD

Revision 1.135 / (download) - annotate - [select for diffs], Mon Jun 10 00:35:47 2019 UTC (4 years, 10 months ago) by chs
Branch: MAIN
CVS Tags: phil-wifi-20190609, netbsd-9-base
Branch point for: netbsd-9
Changes since 1.134: +21 -56 lines
Diff to previous 1.134 (colored)

shmctl(SHM_LOCK) does not need to mess with mappings of the shm segment,
uvm_obj_wirepages() is sufficient.  this fixes the problem reported in
https://syzkaller.appspot.com/bug?id=71f9271d761f5b6ed517a18030dc04f0135e6179

Revision 1.134 / (download) - annotate - [select for diffs], Wed Apr 10 10:03:50 2019 UTC (5 years ago) by pgoyette
Branch: MAIN
CVS Tags: isaki-audio2-base, isaki-audio2
Changes since 1.133: +8 -5 lines
Diff to previous 1.133 (colored)

Replace some "panic()" calls with simple "printf() ; return error"

There's no good reason for these build-time parameters to be allowed to
panic the kernel when it is easy to simply disable the module code and
fail gracefully.

While we're at it, similarly replace panic() when malloc fails to also
fail gracefully.

Revision 1.125.6.1 / (download) - annotate - [select for diffs], Sat Feb 23 07:05:40 2019 UTC (5 years, 1 month ago) by martin
Branch: netbsd-7-0
Changes since 1.125: +12 -3 lines
Diff to previous 1.125 (colored) next main 1.126 (colored)

Pull up following revision(s) (requested by mrg in ticket #1679):
	sys/compat/sys/ipc.h: revision 1.6
	sys/compat/sys/ipc.h: revision 1.7
	sys/compat/sys/shm.h: revision 1.8
	sys/kern/sysv_shm.c: revision 1.133
	sys/compat/sys/sem.h: revision 1.7
	sys/compat/linux/common/linux_ipc.c: revision 1.56
	sys/compat/netbsd32/netbsd32_conv.h: revision 1.38
	sys/kern/sysv_sem.c: revision 1.96
	sys/compat/netbsd32/netbsd32_compat_14.c: revision 1.28
	sys/compat/netbsd32/netbsd32_compat_14.c: revision 1.29
	sys/compat/linux32/common/linux32_ipccall.c: revision 1.12
	sys/kern/sysv_msg.c: revision 1.73
	sys/compat/sys/msg.h: revision 1.6

for sysv ipc stat operations, explicitly copy the exported parts
instead of the whole ds structure.
besides triggering a recently added assert in netbsd32, this stops
exposing kernel addresses.

copy the mode clamping to 0777 from sem to shm and msg.

while here, make sure that the compat callers to sysv_ipc clear
the contents of the compat structure before setting the result
members to ensure padding bytes are cleared.

don't set/copy _sem_base, _msg_first, _msg_last or _shm_internal.
even if used, which seems very dodgy, they leak KVAs as well.
possibly this may affect linux binaries, in particular, the
comments around _shm_internal ("XXX Oh well.") may mean apps
rely upon these but hopefully not -- the comments date back to
rev 1.1 in 1995.

the _key, _seq and _msg_cbytes members are exported as before as
i found multiple consumers of these (no less than ipcs(1), and
they appear to be useful for debugging and more.

XXX: the naming of compat functions have too many styles.  there
     are at least 3 different ones changed here.

fix naming errors in previous.  (this file is no longer compiled, but
this fix makes the pull up more obvious, before deleting this file.)

include libkern.h or strings.h.  should fix i386 build issues.

Revision 1.125.10.1 / (download) - annotate - [select for diffs], Sat Feb 23 07:04:12 2019 UTC (5 years, 1 month ago) by martin
Branch: netbsd-7-1
Changes since 1.125: +12 -3 lines
Diff to previous 1.125 (colored)

Pull up following revision(s) (requested by mrg in ticket #1679):
	sys/compat/sys/ipc.h: revision 1.6
	sys/compat/sys/ipc.h: revision 1.7
	sys/compat/sys/shm.h: revision 1.8
	sys/kern/sysv_shm.c: revision 1.133
	sys/compat/sys/sem.h: revision 1.7
	sys/compat/linux/common/linux_ipc.c: revision 1.56
	sys/compat/netbsd32/netbsd32_conv.h: revision 1.38
	sys/kern/sysv_sem.c: revision 1.96
	sys/compat/netbsd32/netbsd32_compat_14.c: revision 1.28
	sys/compat/netbsd32/netbsd32_compat_14.c: revision 1.29
	sys/compat/linux32/common/linux32_ipccall.c: revision 1.12
	sys/kern/sysv_msg.c: revision 1.73
	sys/compat/sys/msg.h: revision 1.6

for sysv ipc stat operations, explicitly copy the exported parts
instead of the whole ds structure.
besides triggering a recently added assert in netbsd32, this stops
exposing kernel addresses.

copy the mode clamping to 0777 from sem to shm and msg.

while here, make sure that the compat callers to sysv_ipc clear
the contents of the compat structure before setting the result
members to ensure padding bytes are cleared.

don't set/copy _sem_base, _msg_first, _msg_last or _shm_internal.
even if used, which seems very dodgy, they leak KVAs as well.
possibly this may affect linux binaries, in particular, the
comments around _shm_internal ("XXX Oh well.") may mean apps
rely upon these but hopefully not -- the comments date back to
rev 1.1 in 1995.

the _key, _seq and _msg_cbytes members are exported as before as
i found multiple consumers of these (no less than ipcs(1), and
they appear to be useful for debugging and more.

XXX: the naming of compat functions have too many styles.  there
     are at least 3 different ones changed here.

fix naming errors in previous.  (this file is no longer compiled, but
this fix makes the pull up more obvious, before deleting this file.)

include libkern.h or strings.h.  should fix i386 build issues.

Revision 1.125.2.1 / (download) - annotate - [select for diffs], Sat Feb 23 07:02:20 2019 UTC (5 years, 1 month ago) by martin
Branch: netbsd-7
Changes since 1.125: +12 -3 lines
Diff to previous 1.125 (colored)

Pull up following revision(s) (requested by mrg in ticket #1679):
	sys/compat/sys/ipc.h: revision 1.6
	sys/compat/sys/ipc.h: revision 1.7
	sys/compat/sys/shm.h: revision 1.8
	sys/kern/sysv_shm.c: revision 1.133
	sys/compat/sys/sem.h: revision 1.7
	sys/compat/linux/common/linux_ipc.c: revision 1.56
	sys/compat/netbsd32/netbsd32_conv.h: revision 1.38
	sys/kern/sysv_sem.c: revision 1.96
	sys/compat/netbsd32/netbsd32_compat_14.c: revision 1.28
	sys/compat/netbsd32/netbsd32_compat_14.c: revision 1.29
	sys/compat/linux32/common/linux32_ipccall.c: revision 1.12
	sys/kern/sysv_msg.c: revision 1.73
	sys/compat/sys/msg.h: revision 1.6

for sysv ipc stat operations, explicitly copy the exported parts
instead of the whole ds structure.
besides triggering a recently added assert in netbsd32, this stops
exposing kernel addresses.

copy the mode clamping to 0777 from sem to shm and msg.

while here, make sure that the compat callers to sysv_ipc clear
the contents of the compat structure before setting the result
members to ensure padding bytes are cleared.

don't set/copy _sem_base, _msg_first, _msg_last or _shm_internal.
even if used, which seems very dodgy, they leak KVAs as well.
possibly this may affect linux binaries, in particular, the
comments around _shm_internal ("XXX Oh well.") may mean apps
rely upon these but hopefully not -- the comments date back to
rev 1.1 in 1995.

the _key, _seq and _msg_cbytes members are exported as before as
i found multiple consumers of these (no less than ipcs(1), and
they appear to be useful for debugging and more.

XXX: the naming of compat functions have too many styles.  there
     are at least 3 different ones changed here.

fix naming errors in previous.  (this file is no longer compiled, but
this fix makes the pull up more obvious, before deleting this file.)

include libkern.h or strings.h.  should fix i386 build issues.

Revision 1.131.10.1 / (download) - annotate - [select for diffs], Sat Feb 23 06:58:14 2019 UTC (5 years, 1 month ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.131: +12 -3 lines
Diff to previous 1.131 (colored)

Pull up following revision(s) (requested by mrg in ticket #1195):
	sys/compat/sys/ipc.h: revision 1.6
	sys/compat/sys/ipc.h: revision 1.7
	sys/compat/sys/shm.h: revision 1.8
	sys/kern/sysv_shm.c: revision 1.133
	sys/compat/sys/sem.h: revision 1.7
	sys/compat/linux/common/linux_ipc.c: revision 1.56
	sys/compat/netbsd32/netbsd32_conv.h: revision 1.38
	sys/kern/sysv_sem.c: revision 1.96
	sys/compat/netbsd32/netbsd32_compat_14.c: revision 1.28
	sys/compat/netbsd32/netbsd32_compat_14.c: revision 1.29
	sys/compat/linux32/common/linux32_ipccall.c: revision 1.12
	sys/kern/sysv_msg.c: revision 1.73
	sys/compat/sys/msg.h: revision 1.6

for sysv ipc stat operations, explicitly copy the exported parts
instead of the whole ds structure.
besides triggering a recently added assert in netbsd32, this stops
exposing kernel addresses.

copy the mode clamping to 0777 from sem to shm and msg.

while here, make sure that the compat callers to sysv_ipc clear
the contents of the compat structure before setting the result
members to ensure padding bytes are cleared.

don't set/copy _sem_base, _msg_first, _msg_last or _shm_internal.
even if used, which seems very dodgy, they leak KVAs as well.
possibly this may affect linux binaries, in particular, the
comments around _shm_internal ("XXX Oh well.") may mean apps
rely upon these but hopefully not -- the comments date back to
rev 1.1 in 1995.

the _key, _seq and _msg_cbytes members are exported as before as
i found multiple consumers of these (no less than ipcs(1), and
they appear to be useful for debugging and more.

XXX: the naming of compat functions have too many styles.  there
     are at least 3 different ones changed here.

fix naming errors in previous.  (this file is no longer compiled, but
this fix makes the pull up more obvious, before deleting this file.)

include libkern.h or strings.h.  should fix i386 build issues.

Revision 1.133 / (download) - annotate - [select for diffs], Thu Feb 21 03:37:19 2019 UTC (5 years, 1 month ago) by mrg
Branch: MAIN
Changes since 1.132: +12 -3 lines
Diff to previous 1.132 (colored)

for sysv ipc stat operations, explicitly copy the exported parts
instead of the whole ds structure.

besides triggering a recently added assert in netbsd32, this stops
exposing kernel addresses.

copy the mode clamping to 0777 from sem to shm and msg.


while here, make sure that the compat callers to sysv_ipc clear
the contents of the compat structure before setting the result
members to ensure padding bytes are cleared.

don't set/copy _sem_base, _msg_first, _msg_last or _shm_internal.
even if used, which seems very dodgy, they leak KVAs as well.
possibly this may affect linux binaries, in particular, the
comments around _shm_internal ("XXX Oh well.") may mean apps
rely upon these but hopefully not -- the comments date back to
rev 1.1 in 1995.

the _key, _seq and _msg_cbytes members are exported as before as
i found multiple consumers of these (no less than ipcs(1), and
they appear to be useful for debugging and more.


XXX: the naming of compat functions have too many styles.  there
     are at least 3 different ones changed here.

Revision 1.131.16.1 / (download) - annotate - [select for diffs], Thu Sep 6 06:56:42 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.131: +3 -3 lines
Diff to previous 1.131 (colored) next main 1.132 (colored)

Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

Revision 1.132 / (download) - annotate - [select for diffs], Mon Sep 3 16:29:35 2018 UTC (5 years, 7 months ago) by riastradh
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906
Changes since 1.131: +3 -3 lines
Diff to previous 1.131 (colored)

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

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

HOWEVER!  Some subsystems have

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

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

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

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

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

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

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

Revision 1.123.2.2 / (download) - annotate - [select for diffs], Sun Dec 3 11:38:45 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.123.2.1: +57 -4 lines
Diff to previous 1.123.2.1 (colored) to branchpoint 1.123 (colored) next main 1.124 (colored)

update from HEAD

Revision 1.125.4.2 / (download) - annotate - [select for diffs], Sun Dec 27 12:10:05 2015 UTC (8 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.125.4.1: +19 -5 lines
Diff to previous 1.125.4.1 (colored) to branchpoint 1.125 (colored) next main 1.126 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.131 / (download) - annotate - [select for diffs], Thu Nov 26 13:15:34 2015 UTC (8 years, 4 months ago) by martin
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-base, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, netbsd-8-base, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: phil-wifi, pgoyette-compat, netbsd-8
Changes since 1.130: +4 -3 lines
Diff to previous 1.130 (colored)

We never exec(2) with a kernel vmspace, so do not test for that, but instead
KASSERT() that we don't.
When calculating the load address for the interpreter (e.g. ld.elf_so),
we need to take into account wether the exec'd process will run with
topdown memory or bottom up. We can not use the current vmspace's flags
to test for that, as this happens too early. Luckily the execpack already
knows what the new state will be later, so instead of testing the current
vmspace, pass the info as additional argument to struct emul
e_vm_default_addr.
Fix all such functions and adopt all callers.

Revision 1.130 / (download) - annotate - [select for diffs], Fri Nov 6 02:26:42 2015 UTC (8 years, 5 months ago) by pgoyette
Branch: MAIN
Changes since 1.129: +9 -4 lines
Diff to previous 1.129 (colored)

In sysv_sem.c, defer establishment of exithook so we can initialize the
module code from module_init() rather than waiting until after calling
exec_init().  Use a RUN_ONCE routine at entry to each sys_sem* syscall
to establish the exithook, and no longer KASSERT that the hook has
been set before removing it.  (A manually loaded module can be unloaded
before any syscalls have been invoked.)

Remove the conditional calls to the various xxx_init() routines from
init_main.c - we now rely on module_init() to handle initialization.

Let each sub-component's xxx_init() routine handle its own sysctl
sub-tree initialization;  this removes another set of #ifdef ugliness.

Tested both built-in and loadable versions and verified that atf
test kernel/t_sysv passes.

Revision 1.129 / (download) - annotate - [select for diffs], Thu Nov 5 00:10:47 2015 UTC (8 years, 5 months ago) by pgoyette
Branch: MAIN
Changes since 1.128: +10 -2 lines
Diff to previous 1.128 (colored)

Now that SYSVSHM is modularized, reattach the linkages from uvm so that
we can correctly clean up on process exit or fork.

Without this, firefox attaches to a shared memory segment but doesn't
detach before exit.  Thus once firefox causes an autoload for sysv_ipc
it cannot be unloaded since the segment still retains references.

Revision 1.125.4.1 / (download) - annotate - [select for diffs], Sat Jun 6 14:40:22 2015 UTC (8 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.125: +42 -3 lines
Diff to previous 1.125 (colored)

Sync with HEAD

Revision 1.128 / (download) - annotate - [select for diffs], Wed May 13 01:16:15 2015 UTC (8 years, 11 months ago) by pgoyette
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921, nick-nhusb-base-20150606
Changes since 1.127: +35 -2 lines
Diff to previous 1.127 (colored)

More prep:  add a xxxfini() routine to each subcomponent so we can
clean up after ourselves.  Mostly, this checks to make sure that
there are no active itmes, and then deallocates wired kernel virtual
memory.  For SYSVSEM, we also disestablish the exithook() so we
won't try to call it after destroying its memory pool!

Revision 1.127 / (download) - annotate - [select for diffs], Wed May 13 01:00:16 2015 UTC (8 years, 11 months ago) by pgoyette
Branch: MAIN
Changes since 1.126: +6 -2 lines
Diff to previous 1.126 (colored)

More preparation for modularizing the SYSVxxx options.  Here we
change the kern.ipc.sysvxxx sysctls into dynamic values, so each
sub-component of SYSVxxx can declare its own availability.

Revision 1.126 / (download) - annotate - [select for diffs], Tue May 12 05:19:20 2015 UTC (8 years, 11 months ago) by pgoyette
Branch: MAIN
Changes since 1.125: +5 -3 lines
Diff to previous 1.125 (colored)

In preparation for modularization of the SYSV* options, restore the
use of opt_sysv.h to get the -DSYSVxxx definitions.

Revision 1.123.2.1 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:29 2014 UTC (9 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.123: +5 -8 lines
Diff to previous 1.123 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.124.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:55:58 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.124: +5 -3 lines
Diff to previous 1.124 (colored) next main 1.125 (colored)

Rebase.

Revision 1.125 / (download) - annotate - [select for diffs], Tue May 27 21:00:46 2014 UTC (9 years, 10 months ago) by njoly
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, nick-nhusb-base-20150406, nick-nhusb-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE
Branch point for: nick-nhusb, netbsd-7-1, netbsd-7-0, netbsd-7
Changes since 1.124: +5 -3 lines
Diff to previous 1.124 (colored)

In shmrealloc(), add missing condvar initialisations for segments
copied from previous location.

Revision 1.122.2.2 / (download) - annotate - [select for diffs], Thu May 22 11:41:03 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.122.2.1: +2 -7 lines
Diff to previous 1.122.2.1 (colored) to branchpoint 1.122 (colored) next main 1.123 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.123.4.1 / (download) - annotate - [select for diffs], Sun May 18 17:46:08 2014 UTC (9 years, 11 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.123: +2 -7 lines
Diff to previous 1.123 (colored) next main 1.124 (colored)

sync with head

Revision 1.124 / (download) - annotate - [select for diffs], Tue Feb 25 18:30:11 2014 UTC (10 years, 1 month ago) by pooka
Branch: MAIN
CVS Tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.123: +2 -7 lines
Diff to previous 1.123 (colored)

Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.

Revision 1.122.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:30 2012 UTC (12 years ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.122: +8 -4 lines
Diff to previous 1.122 (colored)

sync with head

Revision 1.122.6.1 / (download) - annotate - [select for diffs], Thu Apr 5 21:33:40 2012 UTC (12 years ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.122: +8 -4 lines
Diff to previous 1.122 (colored) next main 1.123 (colored)

sync to latest -current.

Revision 1.123 / (download) - annotate - [select for diffs], Tue Mar 13 18:40:54 2012 UTC (12 years, 1 month ago) by elad
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base10, agc-symver-base, agc-symver
Branch point for: tls-maxphys, rmind-smpnet
Changes since 1.122: +8 -4 lines
Diff to previous 1.122 (colored)

Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls with
something meaningful. All relevant documentation has been updated or
written.

Most of these changes were brought up in the following messages:

    http://mail-index.netbsd.org/tech-kern/2012/01/18/msg012490.html
    http://mail-index.netbsd.org/tech-kern/2012/01/19/msg012502.html
    http://mail-index.netbsd.org/tech-kern/2012/02/17/msg012728.html

Thanks to christos, manu, njoly, and jmmv for input.

Huge thanks to pgoyette for spinning these changes through some build
cycles and ATF.

Revision 1.122 / (download) - annotate - [select for diffs], Sat Aug 27 09:11:52 2011 UTC (12 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.121: +4 -4 lines
Diff to previous 1.121 (colored)

Add an optional pglist argument to uvm_obj_wirepages, to be
filled with the list of pages that were wired.

Revision 1.121 / (download) - annotate - [select for diffs], Sat Jul 30 06:19:02 2011 UTC (12 years, 8 months ago) by uebayasi
Branch: MAIN
Changes since 1.120: +5 -4 lines
Diff to previous 1.120 (colored)

Correct sizes to pass uvm_km_free(9) in error paths.

Revision 1.119.2.1 / (download) - annotate - [select for diffs], Thu Jun 23 14:20:20 2011 UTC (12 years, 9 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.119: +8 -6 lines
Diff to previous 1.119 (colored) next main 1.120 (colored)

Catchup with rmind-uvmplock merge.

Revision 1.120 / (download) - annotate - [select for diffs], Sun Jun 12 03:35:56 2011 UTC (12 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.119: +8 -6 lines
Diff to previous 1.119 (colored)

Welcome to 5.99.53!  Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
  New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
  the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
  Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
  kernel-lock on some ports).  Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.

Revision 1.118.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:09:38 2011 UTC (12 years, 10 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.118: +22 -22 lines
Diff to previous 1.118 (colored) next main 1.119 (colored)

Sync with HEAD.

Revision 1.117.4.3 / (download) - annotate - [select for diffs], Tue May 31 03:05:03 2011 UTC (12 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.117.4.2: +20 -20 lines
Diff to previous 1.117.4.2 (colored) to branchpoint 1.117 (colored) next main 1.118 (colored)

sync with head

Revision 1.119 / (download) - annotate - [select for diffs], Fri May 13 22:22:55 2011 UTC (12 years, 11 months ago) by rmind
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.118: +22 -22 lines
Diff to previous 1.118 (colored)

- Replace shmmap_entry_pool with kmem(9), as pool is not worth.
- Sprinkle __cacheline_aligned and __read_mostly.

Revision 1.117.4.2 / (download) - annotate - [select for diffs], Sat Mar 5 20:55:24 2011 UTC (13 years, 1 month ago) by rmind
Branch: rmind-uvmplock
Changes since 1.117.4.1: +3 -3 lines
Diff to previous 1.117.4.1 (colored) to branchpoint 1.117 (colored)

sync with head

Revision 1.117.2.1 / (download) - annotate - [select for diffs], Tue Aug 17 06:47:32 2010 UTC (13 years, 8 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.117: +3 -3 lines
Diff to previous 1.117 (colored) next main 1.118 (colored)

Sync with HEAD.

Revision 1.106.4.4 / (download) - annotate - [select for diffs], Wed Aug 11 22:54:43 2010 UTC (13 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.106.4.3: +3 -3 lines
Diff to previous 1.106.4.3 (colored) to branchpoint 1.106 (colored) next main 1.107 (colored)

sync with head.

Revision 1.118 / (download) - annotate - [select for diffs], Tue Jul 27 14:25:23 2010 UTC (13 years, 8 months ago) by jakllsch
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: jruoho-x86intr
Changes since 1.117: +3 -3 lines
Diff to previous 1.117 (colored)

Use 'z' printf format modifier to print size_t in debug code.

Revision 1.117.4.1 / (download) - annotate - [select for diffs], Fri Apr 23 21:18:00 2010 UTC (13 years, 11 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.117: +8 -6 lines
Diff to previous 1.117 (colored)

Use consistent naming - uvm_obj_*().

Revision 1.106.4.3 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:19 2010 UTC (14 years, 1 month ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.106.4.2: +29 -42 lines
Diff to previous 1.106.4.2 (colored) to branchpoint 1.106 (colored)

sync with head

Revision 1.117 / (download) - annotate - [select for diffs], Mon Oct 5 23:47:04 2009 UTC (14 years, 6 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base1, uebayasi-xip-base, matt-premerge-20091211, jym-xensuspend-nbase
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.116: +29 -42 lines
Diff to previous 1.116 (colored)

shmexit: simplify a lot by avoiding unnecessary memory allocations, since
it is a last reference, just re-lock and check mapping list again.  Often
there wont be re-locks at all, moreover, shm_lock is not contended at all.

Revision 1.115.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:21:57 2009 UTC (14 years, 11 months ago) by jym
Branch: jym-xensuspend
Changes since 1.115: +7 -3 lines
Diff to previous 1.115 (colored) next main 1.116 (colored)

Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

Revision 1.106.4.2 / (download) - annotate - [select for diffs], Mon May 4 08:13:48 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.106.4.1: +68 -31 lines
Diff to previous 1.106.4.1 (colored) to branchpoint 1.106 (colored)

sync with head.

Revision 1.112.2.2 / (download) - annotate - [select for diffs], Tue Apr 28 07:37:01 2009 UTC (14 years, 11 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.112.2.1: +7 -3 lines
Diff to previous 1.112.2.1 (colored) to branchpoint 1.112 (colored) next main 1.113 (colored)

Sync with HEAD.

Revision 1.116 / (download) - annotate - [select for diffs], Fri Mar 6 20:31:54 2009 UTC (15 years, 1 month ago) by joerg
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jymxensuspend-base, jym-xensuspend-base
Changes since 1.115: +7 -3 lines
Diff to previous 1.115 (colored)

Remove SHMMAXPGS from all kernel configs. Dynamically compute the
initial limit as 1/4 of the physical memory. Ensure the limit is at
least 1024 pages, the old default on most platforms.

Revision 1.112.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:19:40 2009 UTC (15 years, 3 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.112: +14 -8 lines
Diff to previous 1.112 (colored)

Sync with HEAD.

Revision 1.105.6.3 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:20 2009 UTC (15 years, 3 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.105.6.2: +41 -11 lines
Diff to previous 1.105.6.2 (colored) to branchpoint 1.105 (colored) next main 1.106 (colored)

Sync with HEAD.

Revision 1.113.2.1 / (download) - annotate - [select for diffs], Wed Jan 14 17:54:21 2009 UTC (15 years, 3 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b
Changes since 1.113: +3 -3 lines
Diff to previous 1.113 (colored) next main 1.114 (colored)

Pull up following revision(s) (requested by rmind in ticket #248):
	sys/kern/sysv_shm.c: revision 1.114
sys_shmat: initialise shmid of shmmap entry earlier.  Now error path,
i.e. shm_delete_mapping, wont use random value.

Revision 1.115 / (download) - annotate - [select for diffs], Sun Jan 11 02:45:53 2009 UTC (15 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: nick-hppapmap-base2, mjf-devfs2-base
Branch point for: jym-xensuspend
Changes since 1.114: +4 -3 lines
Diff to previous 1.114 (colored)

merge christos-time_t

Revision 1.105.8.3 / (download) - annotate - [select for diffs], Sat Dec 27 23:14:24 2008 UTC (15 years, 3 months ago) by christos
Branch: christos-time_t
Changes since 1.105.8.2: +3 -3 lines
Diff to previous 1.105.8.2 (colored) to branchpoint 1.105 (colored) next main 1.106 (colored)

merge with head.

Revision 1.114 / (download) - annotate - [select for diffs], Mon Dec 22 13:49:17 2008 UTC (15 years, 3 months ago) by rmind
Branch: MAIN
CVS Tags: christos-time_t-nbase, christos-time_t-base
Changes since 1.113: +3 -3 lines
Diff to previous 1.113 (colored)

sys_shmat: initialise shmid of shmmap entry earlier.  Now error path,
i.e. shm_delete_mapping, wont use random value.

Revision 1.110.4.2 / (download) - annotate - [select for diffs], Sat Dec 13 01:15:09 2008 UTC (15 years, 4 months ago) by haad
Branch: haad-dm
Changes since 1.110.4.1: +11 -6 lines
Diff to previous 1.110.4.1 (colored) to branchpoint 1.110 (colored) next main 1.111 (colored)

Update haad-dm branch to haad-dm-base2.

Revision 1.105.8.2 / (download) - annotate - [select for diffs], Sat Nov 1 21:22:27 2008 UTC (15 years, 5 months ago) by christos
Branch: christos-time_t
Changes since 1.105.8.1: +64 -37 lines
Diff to previous 1.105.8.1 (colored) to branchpoint 1.105 (colored)

Sync with head.

Revision 1.113 / (download) - annotate - [select for diffs], Mon Oct 27 15:40:56 2008 UTC (15 years, 5 months ago) by erh
Branch: MAIN
CVS Tags: netbsd-5-base, haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: netbsd-5
Changes since 1.112: +11 -6 lines
Diff to previous 1.112 (colored)

Change the order of error checks in shmget so EEXIST is returned before
 EINVAL or EACCESS so callers have a more reliable way to tell if a
 shared memory segment already exists.

Revision 1.110.4.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:17:29 2008 UTC (15 years, 6 months ago) by haad
Branch: haad-dm
Changes since 1.110: +37 -13 lines
Diff to previous 1.110 (colored)

Sync with HEAD.

Revision 1.107.2.4 / (download) - annotate - [select for diffs], Fri Oct 10 22:34:14 2008 UTC (15 years, 6 months ago) by skrll
Branch: wrstuden-revivesa
Changes since 1.107.2.3: +37 -13 lines
Diff to previous 1.107.2.3 (colored) next main 1.108 (colored)

Sync with HEAD.

Revision 1.112 / (download) - annotate - [select for diffs], Tue Oct 7 09:35:03 2008 UTC (15 years, 6 months ago) by rmind
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, matt-mips64-base2, haad-dm-base1
Branch point for: nick-hppapmap
Changes since 1.111: +31 -7 lines
Diff to previous 1.111 (colored)

- Allow changing of kern.ipc.shmmax, just to avoid confusion.
- Change type of kern.ipc.shmmax to CTLTYPE_QUAD.

Revision 1.105.6.2 / (download) - annotate - [select for diffs], Sun Sep 28 10:40:54 2008 UTC (15 years, 6 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.105.6.1: +6 -6 lines
Diff to previous 1.105.6.1 (colored) to branchpoint 1.105 (colored)

Sync with HEAD.

Revision 1.111 / (download) - annotate - [select for diffs], Fri Sep 19 11:21:33 2008 UTC (15 years, 7 months ago) by rmind
Branch: MAIN
Changes since 1.110: +8 -8 lines
Diff to previous 1.110 (colored)

Fix the aligning of memory blocks again, finally...
Tested by <martin> on his sparc64 box.

Revision 1.107.2.3 / (download) - annotate - [select for diffs], Mon Jun 23 04:31:52 2008 UTC (15 years, 9 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.107.2.2: +20 -16 lines
Diff to previous 1.107.2.2 (colored)

Sync w/ -current. 34 merge conflicts to follow.

Revision 1.106.2.2 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:40 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.106.2.1: +18 -15 lines
Diff to previous 1.106.2.1 (colored) to branchpoint 1.106 (colored) next main 1.107 (colored)

sync with head

Revision 1.105.6.1 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:13 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.105: +22 -24 lines
Diff to previous 1.105 (colored)

Sync with HEAD.

Revision 1.110 / (download) - annotate - [select for diffs], Sat May 31 13:11:14 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl
Branch point for: haad-dm
Changes since 1.109: +14 -7 lines
Diff to previous 1.109 (colored)

shmrealloc: destroy condition variables before freeing them.

Revision 1.109 / (download) - annotate - [select for diffs], Thu May 29 21:38:18 2008 UTC (15 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.108: +6 -10 lines
Diff to previous 1.108 (colored)

sys_shmget: use the correct size variable for uobj_wirepages().
Adjust shm_memlock() for consistency too.

Fixes PR/38782, reported by Adam Hoka.

Revision 1.106.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:10 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-pf42
Changes since 1.106: +4 -10 lines
Diff to previous 1.106 (colored)

sync with head.

Revision 1.106.4.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:27 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.106: +4 -10 lines
Diff to previous 1.106 (colored)

sync with head.

Revision 1.107.2.2 / (download) - annotate - [select for diffs], Wed May 14 01:35:14 2008 UTC (15 years, 11 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.107.2.1: +2 -3 lines
Diff to previous 1.107.2.1 (colored)

Per discussion with ad, remove most of the #include <sys/sa.h> lines
as they were including sa.h just for the type(s) needed for syscallargs.h.

Instead, create a new file, sys/satypes.h, which contains just the
types needed for syscallargs.h. Yes, there's only one now, but that
may change and it's probably more likely to change if it'd be difficult
to handle. :-)

Per discussion with matt at n dot o, add an include of satypes.h to
sigtypes.h. Upcall handlers are kinda signal handlers, and signalling
is the header file that's already included for syscallargs.h that
closest matches SA.

This shaves about 3000 lines off of the diff of the branch relative
to the base. That also represents about 18% of the total before this
checkin.

I think this reduction is very good thing.

Revision 1.108 / (download) - annotate - [select for diffs], Sun May 11 18:48:00 2008 UTC (15 years, 11 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Changes since 1.107: +4 -3 lines
Diff to previous 1.107 (colored)

sys_shmget: fix an object leak in case of error.

Revision 1.107.2.1 / (download) - annotate - [select for diffs], Sat May 10 23:49:05 2008 UTC (15 years, 11 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.107: +3 -2 lines
Diff to previous 1.107 (colored)

Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.

Revision 1.107 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:05 2008 UTC (15 years, 11 months ago) by martin
Branch: MAIN
Branch point for: wrstuden-revivesa
Changes since 1.106: +2 -9 lines
Diff to previous 1.106 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.106 / (download) - annotate - [select for diffs], Sat Apr 12 20:49:22 2008 UTC (16 years ago) by rmind
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base
Branch point for: yamt-pf42, yamt-nfs-mp
Changes since 1.105: +4 -3 lines
Diff to previous 1.105 (colored)

Fix shared memory code that it could handle > 4GB addresses correctly.
PR/38109, patch (a little bit modified) from Chris Brand.

Revision 1.105.8.1 / (download) - annotate - [select for diffs], Sat Mar 29 20:47:01 2008 UTC (16 years ago) by christos
Branch: christos-time_t
Changes since 1.105: +4 -3 lines
Diff to previous 1.105 (colored)

Welcome to the time_t=long long dev_t=uint64_t branch.

Revision 1.100.8.2 / (download) - annotate - [select for diffs], Sun Mar 23 02:05:01 2008 UTC (16 years ago) by matt
Branch: matt-armv6
Changes since 1.100.8.1: +13 -10 lines
Diff to previous 1.100.8.1 (colored) to branchpoint 1.100 (colored) next main 1.101 (colored)

sync with HEAD

Revision 1.100.14.1 / (download) - annotate - [select for diffs], Mon Feb 18 21:06:47 2008 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.100: +532 -341 lines
Diff to previous 1.100 (colored) next main 1.101 (colored)

Sync with HEAD.

Revision 1.84.2.6 / (download) - annotate - [select for diffs], Mon Feb 4 09:24:20 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.84.2.5: +13 -10 lines
Diff to previous 1.84.2.5 (colored) to branchpoint 1.84 (colored) next main 1.85 (colored)

sync with head.

Revision 1.105 / (download) - annotate - [select for diffs], Wed Jan 30 21:09:41 2008 UTC (16 years, 2 months ago) by njoly
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: mjf-devfs2, christos-time_t
Changes since 1.104: +4 -4 lines
Diff to previous 1.104 (colored)

Fix shm_cv/newshm_cv offset value by using the correct sizeof argument
(kcondvar_t -> struct shmid_ds).

ok by rmind@

Revision 1.104 / (download) - annotate - [select for diffs], Sun Jan 27 18:37:50 2008 UTC (16 years, 2 months ago) by rmind
Branch: MAIN
Changes since 1.103: +11 -8 lines
Diff to previous 1.103 (colored)

- sys_shmget: size type must be size_t, not int.  Should avoid possible
  problems with huge allocations.
- shmrealloc: use newshmni for calculation of new sz, shminfo.shmmni
  was a mistake.  Convert sz to size_t type.

Revision 1.84.2.5 / (download) - annotate - [select for diffs], Mon Jan 21 09:46:27 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.84.2.4: +537 -349 lines
Diff to previous 1.84.2.4 (colored) to branchpoint 1.84 (colored)

sync with head

Revision 1.100.8.1 / (download) - annotate - [select for diffs], Wed Jan 9 01:56:25 2008 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
Changes since 1.100: +537 -349 lines
Diff to previous 1.100 (colored)

sync with HEAD

Revision 1.100.20.2 / (download) - annotate - [select for diffs], Tue Jan 8 22:11:44 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.100.20.1: +4 -1 lines
Diff to previous 1.100.20.1 (colored) to branchpoint 1.100 (colored) next main 1.101 (colored)

Sync with HEAD

Revision 1.103 / (download) - annotate - [select for diffs], Mon Jan 7 16:12:54 2008 UTC (16 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.102: +6 -3 lines
Diff to previous 1.102 (colored)

Patch up sysctl locking:

- Lock processes, credentials, filehead etc correctly.
- Acquire a read hold on sysctl_treelock if only doing a query.
- Don't wire down the output buffer. It doesn't work correctly and the code
  regularly does long term sleeps with it held - it's not worth it.
- Don't hold locks other than sysctl_lock while doing copyout().
- Drop sysctl_lock while doing copyout / allocating memory in a few places.
- Don't take kernel_lock for sysctl.
- Fix a number of bugs spotted along the way

Revision 1.100.20.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:56:17 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.100: +536 -351 lines
Diff to previous 1.100 (colored)

Sync with HEAD

Revision 1.102 / (download) - annotate - [select for diffs], Wed Jan 2 11:48:54 2008 UTC (16 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.101: +526 -341 lines
Diff to previous 1.101 (colored)

Merge vmlocking2 to head.

Revision 1.100.16.3 / (download) - annotate - [select for diffs], Wed Dec 26 21:39:46 2007 UTC (16 years, 3 months ago) by ad
Branch: vmlocking2
Changes since 1.100.16.2: +15 -15 lines
Diff to previous 1.100.16.2 (colored) to branchpoint 1.100 (colored) next main 1.101 (colored)

Sync with head.

Revision 1.101 / (download) - annotate - [select for diffs], Thu Dec 20 23:03:12 2007 UTC (16 years, 4 months ago) by dsl
Branch: MAIN
CVS Tags: vmlocking2-base3
Changes since 1.100: +18 -18 lines
Diff to previous 1.100 (colored)

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

Revision 1.100.16.2 / (download) - annotate - [select for diffs], Wed Dec 5 22:58:36 2007 UTC (16 years, 4 months ago) by rmind
Branch: vmlocking2
Changes since 1.100.16.1: +4 -3 lines
Diff to previous 1.100.16.1 (colored) to branchpoint 1.100 (colored)

Decrease shm_realloc_disable in correct places.

Revision 1.100.16.1 / (download) - annotate - [select for diffs], Wed Dec 5 21:13:05 2007 UTC (16 years, 4 months ago) by rmind
Branch: vmlocking2
Changes since 1.100: +525 -341 lines
Diff to previous 1.100 (colored)

- Make SysV shared memory subsystem MP-safe;
- Replace tsleep/wakeup with condvars;
- Replace malloc with kmem;
- Avoid holding of lock while reallocating;
- Fix the check of last segment when reallocating;
- sys_shmat: unmap if uvm_map_pageable() fails;
- Few cosmetics;

Proposed on <tech-kern>.

Revision 1.84.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:41:13 2007 UTC (16 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.84.2.3: +7 -7 lines
Diff to previous 1.84.2.3 (colored) to branchpoint 1.84 (colored)

sync with head.

Revision 1.99.2.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:10:14 2007 UTC (16 years, 9 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.99: +3 -3 lines
Diff to previous 1.99 (colored) next main 1.100 (colored)

Sync with head.

Revision 1.98.2.2 / (download) - annotate - [select for diffs], Fri Jun 8 14:17:26 2007 UTC (16 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.98.2.1: +3 -3 lines
Diff to previous 1.98.2.1 (colored) next main 1.99 (colored)

Sync with head.

Revision 1.96.2.4 / (download) - annotate - [select for diffs], Mon May 7 10:55:47 2007 UTC (16 years, 11 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.96.2.3: +3 -3 lines
Diff to previous 1.96.2.3 (colored) next main 1.97 (colored)

sync with head.

Revision 1.100 / (download) - annotate - [select for diffs], Sun Apr 29 20:23:36 2007 UTC (16 years, 11 months ago) by msaitoh
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, yamt-idlelwp-base8, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, vmlocking-base, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, jmcneill-pm-base, jmcneill-pm, jmcneill-base, hpcarm-cleanup, cube-autoconf-base, cube-autoconf, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: vmlocking2, mjf-devfs, matt-armv6, bouyer-xeni386
Changes since 1.99: +3 -3 lines
Diff to previous 1.99 (colored)

fix typos

Revision 1.96.2.3 / (download) - annotate - [select for diffs], Sat Mar 24 14:56:05 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.96.2.2: +3 -3 lines
Diff to previous 1.96.2.2 (colored)

sync with head.

Revision 1.98.2.1 / (download) - annotate - [select for diffs], Tue Mar 13 16:51:57 2007 UTC (17 years, 1 month ago) by ad
Branch: vmlocking
Changes since 1.98: +3 -3 lines
Diff to previous 1.98 (colored)

Sync with head.

Revision 1.99 / (download) - annotate - [select for diffs], Mon Mar 12 18:18:34 2007 UTC (17 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: mjf-ufs-trans
Changes since 1.98: +3 -3 lines
Diff to previous 1.98 (colored)

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

Revision 1.96.2.2 / (download) - annotate - [select for diffs], Mon Mar 12 05:58:43 2007 UTC (17 years, 1 month ago) by rmind
Branch: yamt-idlelwp
Changes since 1.96.2.1: +5 -5 lines
Diff to previous 1.96.2.1 (colored)

Sync with HEAD.

Revision 1.98 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:10 2007 UTC (17 years, 1 month ago) by christos
Branch: MAIN
Branch point for: vmlocking
Changes since 1.97: +5 -5 lines
Diff to previous 1.97 (colored)

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

Revision 1.96.2.1 / (download) - annotate - [select for diffs], Tue Feb 27 16:54:33 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.96: +5 -5 lines
Diff to previous 1.96 (colored)

- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.84.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:11:19 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.84.2.2: +15 -17 lines
Diff to previous 1.84.2.2 (colored) to branchpoint 1.84 (colored)

sync with head.

Revision 1.97 / (download) - annotate - [select for diffs], Thu Feb 22 06:34:45 2007 UTC (17 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.96: +5 -5 lines
Diff to previous 1.96 (colored)

TRUE -> true, FALSE -> false

Revision 1.96 / (download) - annotate - [select for diffs], Thu Feb 15 15:40:52 2007 UTC (17 years, 2 months ago) by ad
Branch: MAIN
Branch point for: yamt-idlelwp
Changes since 1.95: +8 -8 lines
Diff to previous 1.95 (colored)

Replace some uses of lockmgr() / simplelocks.

Revision 1.95 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:31 2007 UTC (17 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Changes since 1.94: +2 -3 lines
Diff to previous 1.94 (colored)

Merge newlock2 to head.

Revision 1.89.4.3 / (download) - annotate - [select for diffs], Fri Feb 9 21:03:53 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.89.4.2: +6 -7 lines
Diff to previous 1.89.4.2 (colored) to branchpoint 1.89 (colored) next main 1.90 (colored)

Sync with HEAD.

Revision 1.94 / (download) - annotate - [select for diffs], Wed Feb 7 18:45:36 2007 UTC (17 years, 2 months ago) by rmind
Branch: MAIN
CVS Tags: newlock2-nbase, newlock2-base
Changes since 1.93: +6 -7 lines
Diff to previous 1.93 (colored)

PR/28458: shmat(2) shmaddr argument is not honored as intended.
Patch applied, thanks for Minoura Makoto.

Please note, that one should fail if cannot attach to shmaddr,
but not attach it to other place.

OK by uwe@

Revision 1.89.4.2 / (download) - annotate - [select for diffs], Tue Jan 30 13:51:41 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.89.4.1: +2 -3 lines
Diff to previous 1.89.4.1 (colored) to branchpoint 1.89 (colored)

Remove support for SA. Ok core@.

Revision 1.89.4.1 / (download) - annotate - [select for diffs], Fri Jan 12 01:04:07 2007 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.89: +232 -6 lines
Diff to previous 1.89 (colored)

Sync with head.

Revision 1.84.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:50:06 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.84.2.1: +245 -21 lines
Diff to previous 1.84.2.1 (colored) to branchpoint 1.84 (colored)

sync with head.

Revision 1.89.6.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:18:45 2006 UTC (17 years, 4 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.89.6.1: +234 -8 lines
Diff to previous 1.89.6.1 (colored) to branchpoint 1.89 (colored) next main 1.90 (colored)

sync with head.

Revision 1.93 / (download) - annotate - [select for diffs], Tue Nov 28 20:35:16 2006 UTC (17 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm
Changes since 1.92: +6 -6 lines
Diff to previous 1.92 (colored)

Avoid sleeping with a held simple_lock.

Revision 1.92 / (download) - annotate - [select for diffs], Sat Nov 25 21:40:05 2006 UTC (17 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.91: +232 -6 lines
Diff to previous 1.91 (colored)

PR/34837: Mindaguas: Add SysV SHM dynamic reallocation and locking to the
physical memory

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

remove some __unused from function parameters.

Revision 1.89.6.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:07:11 2006 UTC (17 years, 5 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.89: +4 -4 lines
Diff to previous 1.89 (colored)

sync with head

Revision 1.90 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:18 2006 UTC (17 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.89: +4 -4 lines
Diff to previous 1.89 (colored)

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

Revision 1.86.4.1 / (download) - annotate - [select for diffs], Sat Sep 9 02:57:17 2006 UTC (17 years, 7 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.86: +22 -23 lines
Diff to previous 1.86 (colored) next main 1.87 (colored)

sync with head

Revision 1.86.8.3 / (download) - annotate - [select for diffs], Fri Aug 11 15:45:47 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.86.8.2: +15 -17 lines
Diff to previous 1.86.8.2 (colored) to branchpoint 1.86 (colored) next main 1.87 (colored)

sync with head

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

Use the LWP cached credentials where sane.

Revision 1.86.8.2 / (download) - annotate - [select for diffs], Mon Jun 26 12:52:57 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.86.8.1: +6 -6 lines
Diff to previous 1.86.8.1 (colored) to branchpoint 1.86 (colored)

sync with head.

Revision 1.84.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:09:38 2006 UTC (17 years, 10 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.84: +47 -82 lines
Diff to previous 1.84 (colored)

sync with head.

Revision 1.87.2.1 / (download) - annotate - [select for diffs], Mon Jun 19 04:07:16 2006 UTC (17 years, 10 months ago) by chap
Branch: chap-midi
Changes since 1.87: +6 -6 lines
Diff to previous 1.87 (colored) next main 1.88 (colored)

Sync with head.

Revision 1.88 / (download) - annotate - [select for diffs], Wed Jun 7 22:33:41 2006 UTC (17 years, 10 months ago) by kardel
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base
Changes since 1.87: +6 -6 lines
Diff to previous 1.87 (colored)

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

Revision 1.86.6.2 / (download) - annotate - [select for diffs], Thu Jun 1 22:38:09 2006 UTC (17 years, 10 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.86.6.1: +9 -8 lines
Diff to previous 1.86.6.1 (colored) to branchpoint 1.86 (colored) next main 1.87 (colored)

Sync with head.

Revision 1.86.12.1 / (download) - annotate - [select for diffs], Wed May 24 15:50:41 2006 UTC (17 years, 10 months ago) by tron
Branch: peter-altq
Changes since 1.86: +9 -8 lines
Diff to previous 1.86 (colored) next main 1.87 (colored)

Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.86.8.1 / (download) - annotate - [select for diffs], Wed May 24 10:58:41 2006 UTC (17 years, 10 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.86: +9 -8 lines
Diff to previous 1.86 (colored)

sync with head.

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

integrate kauth.

Revision 1.86.10.2 / (download) - annotate - [select for diffs], Sat May 6 23:31:30 2006 UTC (17 years, 11 months ago) by christos
Branch: elad-kernelauth
Changes since 1.86.10.1: +3 -2 lines
Diff to previous 1.86.10.1 (colored) to branchpoint 1.86 (colored) next main 1.87 (colored)

- Move kauth_cred_t declaration to <sys/types.h>
- Cleanup struct ucred; forward declarations that are unused.
- Don't include <sys/kauth.h> in any header, but include it in the c files
  that need it.

Approved by core.

Revision 1.86.10.1 / (download) - annotate - [select for diffs], Wed Mar 8 00:53:41 2006 UTC (18 years, 1 month ago) by elad
Branch: elad-kernelauth
Changes since 1.86: +8 -8 lines
Diff to previous 1.86 (colored)

Adapt to kernel authorization KPI.

Revision 1.86.6.1 / (download) - annotate - [select for diffs], Sat Feb 4 14:30:17 2006 UTC (18 years, 2 months ago) by simonb
Branch: simonb-timecounters
Changes since 1.86: +6 -6 lines
Diff to previous 1.86 (colored)

Adapt for timecounters: mostly use get*time() and use "time_second"
instead of "time.tv_sec".

Revision 1.68.2.6 / (download) - annotate - [select for diffs], Sun Dec 11 10:29:12 2005 UTC (18 years, 4 months ago) by christos
Branch: ktrace-lwp
Changes since 1.68.2.5: +36 -72 lines
Diff to previous 1.68.2.5 (colored) next main 1.69 (colored)

Sync with head.

Revision 1.86 / (download) - annotate - [select for diffs], Wed Dec 7 06:14:13 2005 UTC (18 years, 4 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base, ktrace-lwp-base, elad-kernelauth-base
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb, peter-altq, elad-kernelauth
Changes since 1.85: +21 -63 lines
Diff to previous 1.85 (colored)

Use ANSI function delcs.

Revision 1.85 / (download) - annotate - [select for diffs], Thu Nov 10 18:45:20 2005 UTC (18 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead
Changes since 1.84: +17 -11 lines
Diff to previous 1.84 (colored)

fix debugging; remove some defines that are now in the header file.

Revision 1.82.10.1 / (download) - annotate - [select for diffs], Sun Sep 18 20:09:50 2005 UTC (18 years, 7 months ago) by tron
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0
Changes since 1.82: +4 -3 lines
Diff to previous 1.82 (colored) next main 1.83 (colored)

Pull up following revision(s) (requested by fvdl in ticket #798):
	sys/compat/sunos/sunos_exec.c: revision 1.47
	sys/compat/pecoff/pecoff_emul.c: revision 1.11
	sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.45
	sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.12
	sys/sys/proc.h: revision 1.198
	sys/compat/mach/mach_exec.c: revision 1.56
	sys/compat/freebsd/freebsd_exec.c: revision 1.27
	sys/arch/sparc64/include/vmparam.h: revision 1.27
	sys/kern/kern_resource.c: revision 1.91
	sys/compat/netbsd32/netbsd32_netbsd.c: revision 1.88
	sys/compat/osf1/osf1_exec.c: revision 1.39
	sys/compat/svr4_32/svr4_32_resource.c: revision 1.5
	sys/compat/ultrix/ultrix_misc.c: revision 1.99
	sys/compat/svr4_32/svr4_32_exec.h: revision 1.9
	sys/kern/exec_elf32.c: revision 1.103
	sys/compat/aoutm68k/aoutm68k_exec.c: revision 1.19
	sys/compat/sunos32/sunos32_exec.c: revision 1.20
	sys/compat/hpux/hpux_exec.c: revision 1.46
	sys/compat/darwin/darwin_exec.c: revision 1.40
	sys/kern/sysv_shm.c: revision 1.83
	sys/uvm/uvm_extern.h: revision 1.99
	sys/uvm/uvm_mmap.c: revision 1.89
	sys/kern/kern_exec.c: revision 1.195
	sys/compat/netbsd32/netbsd32.h: revision 1.31
	sys/arch/sparc64/sparc64/svr4_32_machdep.c: revision 1.20
	sys/compat/svr4/svr4_exec.c: revision 1.56
	sys/compat/irix/irix_exec.c: revision 1.41
	sys/compat/ibcs2/ibcs2_exec.c: revision 1.63
	sys/compat/svr4_32/svr4_32_exec.c: revision 1.16
	sys/arch/amd64/include/vmparam.h: revision 1.8
	sys/compat/linux/common/linux_exec.c: revision 1.73
Fix some things regarding COMPAT_NETBSD32 and limits/VM addresses.
* For sparc64 and amd64, define *SIZ32 VM constants.
* Add a new function pointer to struct emul, pointing at a function
  that will return the default VM map address. The default function
  is uvm_map_defaultaddr, which just uses the VM_DEFAULT_ADDRESS
  macro. This gives emulations control over the default map address,
  and allows things to be mapped at the right address (in 32bit range)
  for COMPAT_NETBSD32.
* Add code to adjust the data and stack limits when a COMPAT_NETBSD32
  or COMPAT_SVR4_32 binary is executed.
* Don't use USRSTACK in kern_resource.c, use p_vmspace->vm_minsaddr
  instead (emulations might have set it differently)
* Since this changes struct emul, bump kernel version to 3.99.2
Tested on amd64, compile-tested on sparc64.

Revision 1.82.4.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:24 2005 UTC (18 years, 11 months ago) by kent
Branch: kent-audio2
Changes since 1.82: +6 -4 lines
Diff to previous 1.82 (colored) next main 1.83 (colored)

sync with -current

Revision 1.68.2.5 / (download) - annotate - [select for diffs], Fri Apr 1 14:30:56 2005 UTC (19 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.68.2.4: +6 -4 lines
Diff to previous 1.68.2.4 (colored)

Sync with HEAD.

Revision 1.84 / (download) - annotate - [select for diffs], Fri Apr 1 11:59:37 2005 UTC (19 years ago) by yamt
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, thorpej-vnode-attr-base, thorpej-vnode-attr, kent-audio2-base
Branch point for: yamt-lazymbuf
Changes since 1.83: +4 -3 lines
Diff to previous 1.83 (colored)

merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
  save some resources like pv_entry.  also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.

Revision 1.82.6.2 / (download) - annotate - [select for diffs], Sat Mar 26 18:19:20 2005 UTC (19 years ago) by yamt
Branch: yamt-km
Changes since 1.82.6.1: +4 -3 lines
Diff to previous 1.82.6.1 (colored) to branchpoint 1.82 (colored) next main 1.83 (colored)

sync with head.

Revision 1.83 / (download) - annotate - [select for diffs], Sat Mar 26 05:12:36 2005 UTC (19 years ago) by fvdl
Branch: MAIN
CVS Tags: yamt-km-base4
Changes since 1.82: +4 -3 lines
Diff to previous 1.82 (colored)

Fix some things regarding COMPAT_NETBSD32 and limits/VM addresses.

* For sparc64 and amd64, define *SIZ32 VM constants.
* Add a new function pointer to struct emul, pointing at a function
  that will return the default VM map address. The default function
  is uvm_map_defaultaddr, which just uses the VM_DEFAULT_ADDRESS
  macro. This gives emulations control over the default map address,
  and allows things to be mapped at the right address (in 32bit range)
  for COMPAT_NETBSD32.
* Add code to adjust the data and stack limits when a COMPAT_NETBSD32
  or COMPAT_SVR4_32 binary is executed.
* Don't use USRSTACK in kern_resource.c, use p_vmspace->vm_minsaddr
  instead (emulations might have set it differently)
* Since this changes struct emul, bump kernel version to 3.99.2

Tested on amd64, compile-tested on sparc64.

Revision 1.82.6.1 / (download) - annotate - [select for diffs], Tue Jan 25 12:59:35 2005 UTC (19 years, 2 months ago) by yamt
Branch: yamt-km
Changes since 1.82: +4 -3 lines
Diff to previous 1.82 (colored)

convert to new apis.

Revision 1.68.2.4 / (download) - annotate - [select for diffs], Tue Oct 19 15:58:06 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.68.2.3: +27 -53 lines
Diff to previous 1.68.2.3 (colored)

Sync with HEAD

Revision 1.82 / (download) - annotate - [select for diffs], Sun Oct 17 11:24:42 2004 UTC (19 years, 6 months ago) by jdolecek
Branch: MAIN
CVS Tags: yamt-km-base3, yamt-km-base2, yamt-km-base, netbsd-3-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, netbsd-3, kent-audio2
Changes since 1.81: +3 -3 lines
Diff to previous 1.81 (colored)

fix typo (missing &)

Revision 1.81 / (download) - annotate - [select for diffs], Sun Oct 17 11:23:16 2004 UTC (19 years, 6 months ago) by jdolecek
Branch: MAIN
Changes since 1.80: +3 -3 lines
Diff to previous 1.80 (colored)

use nointr allocator for shmmap_entry_pool - this is always accessed
from process context

Revision 1.80 / (download) - annotate - [select for diffs], Sat Oct 16 13:34:07 2004 UTC (19 years, 6 months ago) by jdolecek
Branch: MAIN
Changes since 1.79: +5 -15 lines
Diff to previous 1.79 (colored)

kill the indirection via struct shm_handle and store pointer to the uvm
object direct to _shm_private; the indirection doesn't serve any
useful purpose and just wastes memory and cpu cycles

Revision 1.76.2.1 / (download) - annotate - [select for diffs], Mon Oct 4 05:19:09 2004 UTC (19 years, 6 months ago) by jmc
Branch: netbsd-2-0
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2
Changes since 1.76: +23 -39 lines
Diff to previous 1.76 (colored) next main 1.77 (colored)

Pullup rev 1.78 (requested by jdolecek in ticket #884)

Fix linux handling of SysV-style shared memory. Fixed Linux VMware display
problems.

Revision 1.79 / (download) - annotate - [select for diffs], Tue Sep 28 19:05:19 2004 UTC (19 years, 6 months ago) by jdolecek
Branch: MAIN
Changes since 1.78: +8 -4 lines
Diff to previous 1.78 (colored)

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 the old Linux VMware3 graphics problem with local display,
and possibly other local Linux X clients using MIT-SHM

Revision 1.78 / (download) - annotate - [select for diffs], Tue Sep 28 17:26:25 2004 UTC (19 years, 6 months ago) by jdolecek
Branch: MAIN
Changes since 1.77: +18 -38 lines
Diff to previous 1.77 (colored)

fold shmat1() back into sys_shmat(), the change in rev 1.64 is not sufficient
for Linux-compatible shmat() behaviour - shmat() for the removed shared memory
segment must work from all callers, the shared memory id could be passed e.g.
to native X server via MIT-SHM

temporarily remove the functionality, the Linux-compatible semantics
will be reimplemented differently

Revision 1.68.2.3 / (download) - annotate - [select for diffs], Tue Sep 21 13:35:15 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.68.2.2: +2 -2 lines
Diff to previous 1.68.2.2 (colored)

Fix the sync with head I botched.

Revision 1.68.2.2 / (download) - annotate - [select for diffs], Sat Sep 18 14:53:03 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.68.2.1: +0 -0 lines
Diff to previous 1.68.2.1 (colored)

Sync with HEAD.

Revision 1.68.2.1 / (download) - annotate - [select for diffs], Tue Aug 3 10:52:56 2004 UTC (19 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.68: +187 -75 lines
Diff to previous 1.68 (colored)

Sync with HEAD

Revision 1.77 / (download) - annotate - [select for diffs], Sun Apr 25 16:42:41 2004 UTC (19 years, 11 months ago) by simonb
Branch: MAIN
Changes since 1.76: +4 -6 lines
Diff to previous 1.76 (colored)

Initialise (most) pools from a link set instead of explicit calls
to pool_init.  Untouched pools are ones that either in arch-specific
code, or aren't initialiased during initial system startup.

 Convert struct session, ucred and lockf to pools.

Revision 1.56.2.2 / (download) - annotate - [select for diffs], Sun Apr 11 02:21:06 2004 UTC (20 years ago) by jmc
Branch: netbsd-1-5
Changes since 1.56.2.1: +5 -1 lines
Diff to previous 1.56.2.1 (colored) to branchpoint 1.56 (colored) next main 1.57 (colored)

Add some missing includes 1.5 needs for the patch from #122 to work correctly

Revision 1.56.2.1 / (download) - annotate - [select for diffs], Thu Apr 8 03:13:19 2004 UTC (20 years ago) by jmc
Branch: netbsd-1-5
Changes since 1.56: +10 -10 lines
Diff to previous 1.56 (colored)

Pullup patch (requested by groo in ticket #122)

Don't use uao_ functions directly; use them through the pgops methods.
Fix missing reference leak in the error path of shmat().

Revision 1.76 / (download) - annotate - [select for diffs], Tue Mar 23 13:22:33 2004 UTC (20 years ago) by junyoung
Branch: MAIN
CVS Tags: netbsd-2-0-base, netbsd-2-0-RC2, netbsd-2-0-RC1
Branch point for: netbsd-2-0
Changes since 1.75: +18 -19 lines
Diff to previous 1.75 (colored)

- Nuke __P().
- Drop trailing spaces.

Revision 1.64.4.2 / (download) - annotate - [select for diffs], Mon Feb 9 13:16:55 2004 UTC (20 years, 2 months ago) by tron
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002
Changes since 1.64.4.1: +3 -2 lines
Diff to previous 1.64.4.1 (colored) to branchpoint 1.64 (colored) next main 1.65 (colored)

Pull up revision 1.75 (requested by he in ticket #1609):
include <uvm/uvm_object.h> for the benefit of ports that don't include
it in <machine/pmap.h>

Revision 1.64.4.1 / (download) - annotate - [select for diffs], Sat Feb 7 20:01:53 2004 UTC (20 years, 2 months ago) by jmc
Branch: netbsd-1-6
Changes since 1.64: +11 -11 lines
Diff to previous 1.64 (colored)

Pullup rev 1.74 (requested by groo in ticket #1604)

Don't use uao_ functions directly; use them through the pgops methods.
Fix missing reference leak in the error path of shmat() mentioned in
Full-Disclosure.

Revision 1.75 / (download) - annotate - [select for diffs], Fri Feb 6 13:46:27 2004 UTC (20 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.74: +3 -2 lines
Diff to previous 1.74 (colored)

include <uvm/uvm_object.h> for the benefit of ports that don't include
it in <machine/pmap.h>

Revision 1.74 / (download) - annotate - [select for diffs], Thu Feb 5 22:28:33 2004 UTC (20 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.73: +11 -11 lines
Diff to previous 1.73 (colored)

- Don't use uao_ functions directly; use them through the pgops methods.
- Fix missing reference leak in the error path of shmat() mentioned in
  Full-Disclosure.

Revision 1.73 / (download) - annotate - [select for diffs], Sat Dec 6 01:53:14 2003 UTC (20 years, 4 months ago) by simonb
Branch: MAIN
Changes since 1.72: +5 -3 lines
Diff to previous 1.72 (colored)

Wrap long line.

Revision 1.72 / (download) - annotate - [select for diffs], Fri Dec 5 22:09:56 2003 UTC (20 years, 4 months ago) by jdolecek
Branch: MAIN
Changes since 1.71: +6 -2 lines
Diff to previous 1.71 (colored)

add #ifdef DEBUG segnum sanity check in shm_delete_mapping()

Revision 1.71 / (download) - annotate - [select for diffs], Sun Oct 26 10:32:24 2003 UTC (20 years, 5 months ago) by jdolecek
Branch: MAIN
Changes since 1.70: +13 -6 lines
Diff to previous 1.70 (colored)

allocate virtual memory for SYSV shm, msg and semaphore structures
separately from the bufpages, so that it would be possible to eventually
make their limits changeable in runtime

make static all local variables which do not need to be exported to other
kernel parts

Revision 1.70 / (download) - annotate - [select for diffs], Wed Sep 10 17:01:04 2003 UTC (20 years, 7 months ago) by drochner
Branch: MAIN
Changes since 1.69: +36 -17 lines
Diff to previous 1.69 (colored)

Fix the "COW" case if a process does a detach() between fork()
and exit(): we have to lookup the entry in the private copy
again, otherwise the wrong list is manipulated.
should fix a panic on postgres shutdown reported by Marc Recht

being here, improve sone debug messages

Revision 1.69 / (download) - annotate - [select for diffs], Tue Sep 9 15:02:45 2003 UTC (20 years, 7 months ago) by drochner
Branch: MAIN
Changes since 1.68: +134 -52 lines
Diff to previous 1.68 (colored)

Make per-process shm segment descriptor magement scale better for large
shminfo.shmseg, in view of the fact that only few processes utilize a
significant fraction of it:
-turn the table into a linked list, elements allocated from a pool(9)
-On fork(), just bump a refcount instead of copying the list; it will
 be decremented on exit() and exec(). Only copy if an attach or detach
 takes place in between, which is rarely the case.

Revision 1.68 / (download) - annotate - [select for diffs], Thu Feb 20 22:16:07 2003 UTC (21 years, 2 months ago) by atatat
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.67: +3 -5 lines
Diff to previous 1.67 (colored)

Introduce "top down" memory management for mmap()ed allocations.  This
means that the dynamic linker gets mapped in at the top of available
user virtual memory (typically just below the stack), shared libraries
get mapped downwards from that point, and calls to mmap() that don't
specify a preferred address will get mapped in below those.

This means that the heap and the mmap()ed allocations will grow
towards each other, allowing one or the other to grow larger than
before.  Previously, the heap was limited to MAXDSIZ by the placement
of the dynamic linker (and the process's rlimits) and the space
available to mmap was hobbled by this reservation.

This is currently only enabled via an *option* for the i386 platform
(though other platforms are expected to follow).  Add "options
USE_TOPDOWN_VM" to your kernel config file, rerun config, and rebuild
your kernel to take advantage of this.

Note that the pmap_prefer() interface has not yet been modified to
play nicely with this, so those platforms require a bit more work
(most notably the sparc) before they can use this new memory
arrangement.

This change also introduces a VM_DEFAULT_ADDRESS() macro that picks
the appropriate default address based on the size of the allocation or
the size of the process's text segment accordingly.  Several drivers
and the SYSV SHM address assignment were changed to use this instead
of each one picking their own "default".

Revision 1.67 / (download) - annotate - [select for diffs], Sat Feb 1 06:23:44 2003 UTC (21 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.66: +4 -2 lines
Diff to previous 1.66 (colored)

Add extensible malloc types, adapted from FreeBSD.  This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant.  Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.

Revision 1.66 / (download) - annotate - [select for diffs], Thu Jan 30 20:03:46 2003 UTC (21 years, 2 months ago) by atatat
Branch: MAIN
Changes since 1.65: +3 -3 lines
Diff to previous 1.65 (colored)

Two small changes to the ELF exec code:

(1) ELFNAME(load_file)() now takes a pointer to the entry point
offset, instead of taking a pointer to the entry point itself.  This
allows proper adjustment of the ultimate entry point at a higher level
if the object containing the entry point is moved before the exec is
finished.

(2) Introduce VMCMD_FIXED, which means the address at which a given
vmcmd describes a mapping is fixed (ie, should not be moved).  Don't
set this for entries pertaining to ld.so.

Also some minor comment/whitespace tweaks.

Revision 1.65 / (download) - annotate - [select for diffs], Sat Jan 18 10:06:36 2003 UTC (21 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.64: +15 -10 lines
Diff to previous 1.64 (colored)

Merge the nathanw_sa branch.

Revision 1.61.2.2 / (download) - annotate - [select for diffs], Sun Jun 23 17:49:38 2002 UTC (21 years, 9 months ago) by jdolecek
Branch: kqueue
Changes since 1.61.2.1: +41 -18 lines
Diff to previous 1.61.2.1 (colored) to branchpoint 1.61 (colored) next main 1.62 (colored)

catch up with -current on kqueue branch

Revision 1.60.2.6 / (download) - annotate - [select for diffs], Wed May 29 21:33:17 2002 UTC (21 years, 10 months ago) by nathanw
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.60.2.5: +3 -2 lines
Diff to previous 1.60.2.5 (colored) next main 1.61 (colored)

#include <sys/sa.h> before <sys/syscallargs.h>, to provide sa_upcall_t
now that <sys/param.h> doesn't include <sys/sa.h>.

(Behold the Power of Ed)

Revision 1.60.2.5 / (download) - annotate - [select for diffs], Wed Apr 17 00:06:19 2002 UTC (22 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.60.2.4: +41 -18 lines
Diff to previous 1.60.2.4 (colored)

Catch up to -current.

Revision 1.64 / (download) - annotate - [select for diffs], Wed Apr 3 11:53:01 2002 UTC (22 years ago) by fvdl
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, nathanw_sa_before_merge, nathanw_sa_base, kqueue-beforemerge, kqueue-base, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, gehenna-devsw-base, gehenna-devsw, fvdl_fs64_base
Branch point for: netbsd-1-6
Changes since 1.63: +41 -18 lines
Diff to previous 1.63 (colored)

Split off the backend of the shmat system call, and find removed segments
if requested. This enables the linux compat code to be bug compatible
(under Linux, shmat() to a removed segment works).

Revision 1.61.2.1 / (download) - annotate - [select for diffs], Thu Jan 10 20:00:10 2002 UTC (22 years, 3 months ago) by thorpej
Branch: kqueue
Changes since 1.61: +4 -2 lines
Diff to previous 1.61 (colored)

Sync kqueue branch with -current.

Revision 1.60.2.4 / (download) - annotate - [select for diffs], Tue Jan 8 00:32:41 2002 UTC (22 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.60.2.3: +2 -3 lines
Diff to previous 1.60.2.3 (colored)

Catch up to -current.

Revision 1.63 / (download) - annotate - [select for diffs], Thu Nov 15 09:48:20 2001 UTC (22 years, 5 months ago) by lukem
Branch: MAIN
CVS Tags: newlock-base, newlock, ifpoll-base, eeh-devprop-base, eeh-devprop
Changes since 1.62: +2 -3 lines
Diff to previous 1.62 (colored)

don't need <sys/types.h> when including <sys/param.h>

Revision 1.60.2.3 / (download) - annotate - [select for diffs], Wed Nov 14 19:16:44 2001 UTC (22 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.60.2.2: +4 -1 lines
Diff to previous 1.60.2.2 (colored)

Catch up to -current.

Revision 1.61.6.1 / (download) - annotate - [select for diffs], Mon Nov 12 21:18:57 2001 UTC (22 years, 5 months ago) by thorpej
Branch: thorpej-mips-cache
Changes since 1.61: +4 -1 lines
Diff to previous 1.61 (colored) next main 1.62 (colored)

Sync the thorpej-mips-cache branch with -current.

Revision 1.62 / (download) - annotate - [select for diffs], Mon Nov 12 15:25:27 2001 UTC (22 years, 5 months ago) by lukem
Branch: MAIN
CVS Tags: thorpej-mips-cache-base
Changes since 1.61: +4 -1 lines
Diff to previous 1.61 (colored)

add RCSIDs

Revision 1.60.2.2 / (download) - annotate - [select for diffs], Mon Apr 9 01:57:57 2001 UTC (23 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.60.2.1: +12 -17 lines
Diff to previous 1.60.2.1 (colored)

Catch up with -current.

Revision 1.52.2.3 / (download) - annotate - [select for diffs], Tue Mar 27 15:32:24 2001 UTC (23 years ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.52.2.2: +11 -16 lines
Diff to previous 1.52.2.2 (colored) to branchpoint 1.52 (colored) next main 1.53 (colored)

Sync with HEAD.

Revision 1.61 / (download) - annotate - [select for diffs], Thu Mar 15 06:10:56 2001 UTC (23 years, 1 month ago) by chs
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base, thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, thorpej-devvp, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-mips-cache, kqueue
Changes since 1.60: +12 -17 lines
Diff to previous 1.60 (colored)

eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS			0
KERN_INVALID_ADDRESS		EFAULT
KERN_PROTECTION_FAILURE		EACCES
KERN_NO_SPACE			ENOMEM
KERN_INVALID_ARGUMENT		EINVAL
KERN_FAILURE			various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE		ENOMEM
KERN_NOT_RECEIVER		<unused>
KERN_NO_ACCESS			<unused>
KERN_PAGES_LOCKED		<unused>

Revision 1.60.2.1 / (download) - annotate - [select for diffs], Mon Mar 5 22:49:46 2001 UTC (23 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.60: +13 -9 lines
Diff to previous 1.60 (colored)

Initial commit of scheduler activations and lightweight process support.

Revision 1.52.2.2 / (download) - annotate - [select for diffs], Wed Nov 22 16:05:25 2000 UTC (23 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.52.2.1: +4 -2 lines
Diff to previous 1.52.2.1 (colored) to branchpoint 1.52 (colored)

Sync with HEAD.

Revision 1.52.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:09:11 2000 UTC (23 years, 5 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.52: +12 -17 lines
Diff to previous 1.52 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.60 / (download) - annotate - [select for diffs], Tue Nov 14 22:16:38 2000 UTC (23 years, 5 months ago) by thorpej
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.59: +4 -2 lines
Diff to previous 1.59 (colored)

NBPG -> PAGE_SIZE

Revision 1.59 / (download) - annotate - [select for diffs], Wed Sep 13 15:00:25 2000 UTC (23 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.58: +2 -2 lines
Diff to previous 1.58 (colored)

Add an align argument to uvm_map() and some callers of that
routine.  Works similarly fto pmap_prefer(), but allows callers
to specify a minimum power-of-two alignment of the region.
How we ever got along without this for so long is beyond me.

Revision 1.58 / (download) - annotate - [select for diffs], Sat Jul 22 16:11:03 2000 UTC (23 years, 9 months ago) by simonb
Branch: MAIN
Changes since 1.57: +1 -4 lines
Diff to previous 1.57 (colored)

Delete a couple of <uvm/uvm_extern.h> includes that were for
<sys/sysctl.h> only.

Revision 1.57 / (download) - annotate - [select for diffs], Tue Jun 27 17:41:40 2000 UTC (23 years, 9 months ago) by mrg
Branch: MAIN
Changes since 1.56: +1 -2 lines
Diff to previous 1.56 (colored)

remove include of <vm/vm.h>

Revision 1.55.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 17:09:19 2000 UTC (23 years, 10 months ago) by minoura
Branch: minoura-xpg4dl
Changes since 1.55: +5 -8 lines
Diff to previous 1.55 (colored) next main 1.56 (colored)

Sync w/ netbsd-1-5-base.

Revision 1.56 / (download) - annotate - [select for diffs], Fri Jun 2 15:53:05 2000 UTC (23 years, 10 months ago) by simonb
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2
Branch point for: netbsd-1-5
Changes since 1.55: +5 -8 lines
Diff to previous 1.55 (colored)

Add new sysctl node "KERN_SYSVIPC_INFO" with "KERN_SYSVIPC_MSG_INFO",
"KERN_SYSVIPC_SEM_INFO" and "KERN_SYSVIPC_SHM_INFO" to return the
info and data structures for the relevent SysV IPC types.  The return
structures use fixed-size types and should be compat32 safe.  All
user-visible changes are protected with
	#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)

Make all variable declarations extern in msg.h, sem.h and shm.h and
add relevent variable declarations to sysv_*.c and remove unneeded
header files from those .c files.

Make compat14 SysV IPC conversion functions and sysctl_file() static.

Change the data pointer to "void *" in sysctl_clockrate(),
sysctl_ntptime(), sysctl_file() and sysctl_doeproc().

Revision 1.55 / (download) - annotate - [select for diffs], Sat Apr 15 16:49:40 2000 UTC (24 years ago) by simonb
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.54: +3 -2 lines
Diff to previous 1.54 (colored)

Remove shmsegs declaration from conf/param.c - it doesn't belong here.
Instead, put it in kern/sysv_shm.c.

Revision 1.54 / (download) - annotate - [select for diffs], Sun Mar 26 20:42:45 2000 UTC (24 years ago) by kleink
Branch: MAIN
Changes since 1.53: +3 -2 lines
Diff to previous 1.53 (colored)

Merge parts of chs-ubc2 into the trunk:
* Remove the casts to vaddr_t from the round_page() and trunc_page() macros to
  make them type-generic, which is necessary i.e. to operate on file offsets
  without truncating them.
* In due course, cast pointer arguments to these macros to an appropriate
  integral type (paddr_t, vaddr_t).

Originally done by Chuck Silvers, updated by myself.

Revision 1.52.8.1 / (download) - annotate - [select for diffs], Mon Dec 27 18:35:52 1999 UTC (24 years, 3 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.52: +5 -5 lines
Diff to previous 1.52 (colored) next main 1.53 (colored)

Pull up to last week's -current.

Revision 1.53 / (download) - annotate - [select for diffs], Fri Dec 3 21:43:20 1999 UTC (24 years, 4 months ago) by ragge
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, chs-ubc2-newbase
Changes since 1.52: +5 -5 lines
Diff to previous 1.52 (colored)

First round of discarding the CL* macros.

Revision 1.52 / (download) - annotate - [select for diffs], Wed Aug 25 05:05:49 1999 UTC (24 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999
Branch point for: wrstuden-devbsize, thorpej_scsipi
Changes since 1.51: +86 -31 lines
Diff to previous 1.51 (colored)

Overhaul of the SVID IPC facilities, primarily to use the types specified
by the Single UNIX Specification version 2, rather than the SVR2-derived
types.  While I was here, I did a namespace sweep to expose the constants
and strucutures, and structure members described by SUSv2; documentation
updates coming shortly.

Fixes kern/8158.

Revision 1.51.4.1 / (download) - annotate - [select for diffs], Wed Aug 11 05:47:05 1999 UTC (24 years, 8 months ago) by chs
Branch: chs-ubc2
Changes since 1.51: +3 -2 lines
Diff to previous 1.51 (colored) next main 1.52 (colored)

add casts for trunc_page() and round_page() args.

Revision 1.51 / (download) - annotate - [select for diffs], Wed Mar 24 05:51:25 1999 UTC (25 years, 1 month ago) by mrg
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame, chs-ubc2-base
Branch point for: chs-ubc2
Changes since 1.50: +2 -66 lines
Diff to previous 1.50 (colored)

completely remove Mach VM support.  all that is left is the all the
header files as UVM still uses (most of) these.

Revision 1.50 / (download) - annotate - [select for diffs], Wed Oct 21 22:24:29 1998 UTC (25 years, 6 months ago) by tron
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach, chs-ubc-base, chs-ubc
Changes since 1.49: +2 -3 lines
Diff to previous 1.49 (colored)

No need to get definition of "SYSV..." from "opt_sysv.h" because they
must be set if these files are compiled.

Revision 1.49 / (download) - annotate - [select for diffs], Mon Oct 19 22:19:27 1998 UTC (25 years, 6 months ago) by tron
Branch: MAIN
Changes since 1.48: +2 -1 lines
Diff to previous 1.48 (colored)

Defopt SYSVMSG, SYSVSEM and SYSVSHM.

Revision 1.48 / (download) - annotate - [select for diffs], Sat Aug 15 03:02:49 1998 UTC (25 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.47: +3 -3 lines
Diff to previous 1.47 (colored)

Make copyright notices with my name consistent.

Revision 1.47 / (download) - annotate - [select for diffs], Thu Aug 13 02:10:58 1998 UTC (25 years, 8 months ago) by eeh
Branch: MAIN
Changes since 1.46: +8 -8 lines
Diff to previous 1.46 (colored)

Merge paddr_t changes into the main branch.

Revision 1.46 / (download) - annotate - [select for diffs], Tue Aug 4 04:03:16 1998 UTC (25 years, 8 months ago) by perry
Branch: MAIN
Changes since 1.45: +2 -2 lines
Diff to previous 1.45 (colored)

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

Revision 1.45.2.1 / (download) - annotate - [select for diffs], Thu Jul 30 14:04:05 1998 UTC (25 years, 8 months ago) by eeh
Branch: eeh-paddr_t
Changes since 1.45: +8 -8 lines
Diff to previous 1.45 (colored) next main 1.46 (colored)

Split vm_offset_t and vm_size_t into paddr_t, psize_t, vaddr_t, and vsize_t.

Revision 1.45 / (download) - annotate - [select for diffs], Fri Jul 24 20:47:59 1998 UTC (25 years, 8 months ago) by thorpej
Branch: MAIN
CVS Tags: eeh-paddr_t-base
Branch point for: eeh-paddr_t
Changes since 1.44: +2 -3 lines
Diff to previous 1.44 (colored)

uvm_deallocate() takes an address and a size, not an address range.  From
ITOH Yasufumi <yasufu-i@is.aist-nara.ac.jp>, PR #5834.

Revision 1.44 / (download) - annotate - [select for diffs], Thu May 7 18:00:49 1998 UTC (25 years, 11 months ago) by kleink
Branch: MAIN
Changes since 1.43: +5 -5 lines
Diff to previous 1.43 (colored)

Various SysV IPC prototype changes.

Revision 1.43 / (download) - annotate - [select for diffs], Tue Feb 10 14:09:49 1998 UTC (26 years, 2 months ago) by mrg
Branch: MAIN
Changes since 1.42: +3 -1 lines
Diff to previous 1.42 (colored)

- add defopt's for UVM, UVMHIST and PMAP_NEW.
- remove unnecessary UVMHIST_DECL's.

Revision 1.42 / (download) - annotate - [select for diffs], Thu Feb 5 07:59:59 1998 UTC (26 years, 2 months ago) by mrg
Branch: MAIN
Changes since 1.41: +39 -2 lines
Diff to previous 1.41 (colored)

initial import of the new virtual memory system, UVM, into -current.

UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code.  i provided some help
getting swap and paging working, and other bug fixes/ideas.  chuck
silvers <chuq@chuq.com> also provided some other fixes.

this is the rest of the MI portion changes.

this will be KNF'd shortly.  :-)

Revision 1.41 / (download) - annotate - [select for diffs], Sat Jan 3 02:50:32 1998 UTC (26 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.40: +22 -23 lines
Diff to previous 1.40 (colored)

Make shmexit() and shmfork() take struct vmspace *'s, not struct proc *'s,
and update internal interfaces appropriately.

Revision 1.38.10.1 / (download) - annotate - [select for diffs], Tue Oct 14 10:26:16 1997 UTC (26 years, 6 months ago) by thorpej
Branch: marc-pcmcia
Changes since 1.38: +49 -25 lines
Diff to previous 1.38 (colored) next main 1.39 (colored)

Update marc-pcmcia branch from trunk.

Revision 1.40 / (download) - annotate - [select for diffs], Thu Oct 9 08:35:13 1997 UTC (26 years, 6 months ago) by drochner
Branch: MAIN
CVS Tags: netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, netbsd-1-3, marc-pcmcia-base
Changes since 1.39: +20 -11 lines
Diff to previous 1.39 (colored)

Fix error handling - call wakeup() in error case too.

Revision 1.39 / (download) - annotate - [select for diffs], Tue Oct 7 10:02:03 1997 UTC (26 years, 6 months ago) by drochner
Branch: MAIN
Changes since 1.38: +36 -21 lines
Diff to previous 1.38 (colored)

Use a swap pager backed VM object for sysV shm instead of kernel VM.
Mostly from FreeBSD.

Revision 1.37.4.1 / (download) - annotate - [select for diffs], Wed Dec 11 09:28:28 1996 UTC (27 years, 4 months ago) by mycroft
Branch: netbsd-1-2
CVS Tags: netbsd-1-2-PATCH001
Changes since 1.37: +11 -1 lines
Diff to previous 1.37 (colored) next main 1.38 (colored)

From trunk:
Fix panic when shmdt(2) is called before shmat(2).

Revision 1.38 / (download) - annotate - [select for diffs], Sun Sep 1 22:53:06 1996 UTC (27 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal, thorpej-setroot, mrg-vm-swap, marc-pcmcia-bp, is-newarp-before-merge, is-newarp-base, is-newarp, bouyer-scsipi
Branch point for: marc-pcmcia
Changes since 1.37: +11 -1 lines
Diff to previous 1.37 (colored)

Calling shmdt(2) before calling shmat(2) would crash the system because
p->p_vmspace->vm_shm would be NULL. Protected the rest of the cases where
that might happen too. This was the reason why sunxdoom would panic the
system in SVR4 emulation.

Revision 1.37 / (download) - annotate - [select for diffs], Sat Mar 16 23:17:13 1996 UTC (28 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-BETA
Branch point for: netbsd-1-2
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored)

Fix printf() formats.

Revision 1.36 / (download) - annotate - [select for diffs], Fri Feb 9 19:00:29 1996 UTC (28 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.35: +1 -3 lines
Diff to previous 1.35 (colored)

More proto fixes

Revision 1.35 / (download) - annotate - [select for diffs], Sun Feb 4 02:17:10 1996 UTC (28 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.34: +31 -22 lines
Diff to previous 1.34 (colored)

First pass at prototyping

Revision 1.34 / (download) - annotate - [select for diffs], Sat Dec 9 04:12:56 1995 UTC (28 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.33: +3 -4 lines
Diff to previous 1.33 (colored)

Remove unused third arg to shmfork().

Revision 1.33 / (download) - annotate - [select for diffs], Sat Oct 7 06:28:44 1995 UTC (28 years, 6 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.32: +11 -11 lines
Diff to previous 1.32 (colored)

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

Revision 1.32 / (download) - annotate - [select for diffs], Tue Sep 19 21:45:21 1995 UTC (28 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.31: +21 -17 lines
Diff to previous 1.31 (colored)

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

Revision 1.31 / (download) - annotate - [select for diffs], Thu Jun 29 11:43:17 1995 UTC (28 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.30: +3 -2 lines
Diff to previous 1.30 (colored)

try to insure that the 'default' address for shm segments is the same
from process to process.  It apparently is on SysV systems, and some
programs depend on this.  Suggested by  John Birrell <jb@werple.mira.net.au>.

Revision 1.30 / (download) - annotate - [select for diffs], Sat Jun 24 20:34:21 1995 UTC (28 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.29: +1 -61 lines
Diff to previous 1.29 (colored)

Extracted all of the compat_xxx routines, and created a library [libcompat]
for them. There are a few #ifdef COMPAT_XX remaining, but they are not easy
or worth eliminating (yet).

Revision 1.29 / (download) - annotate - [select for diffs], Mon Jun 5 12:57:07 1995 UTC (28 years, 10 months ago) by pk
Branch: MAIN
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored)

We need some compat_10 routines if COMPAT_SUNOS is on (PR #1008).

Revision 1.28 / (download) - annotate - [select for diffs], Wed May 10 16:53:00 1995 UTC (28 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored)

tty_tb.c:   need to include ioctl_compat.h in order to compile.
sysv_shm.c: make shm_find_segment_by_shmid global so it can be used by
	    COMPAT_HPUX. There should be a better way...
rest: Add #ifdef COMPAT_HPUX where needed

Revision 1.27 / (download) - annotate - [select for diffs], Thu Dec 22 13:30:40 1994 UTC (29 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.26: +1 -3 lines
Diff to previous 1.26 (colored)

kill the #if 0 around SHM_*LOCK.  makes no difference, though...

Revision 1.26 / (download) - annotate - [select for diffs], Thu Oct 20 04:23:19 1994 UTC (29 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.25: +130 -76 lines
Diff to previous 1.25 (colored)

update for new syscall args description mechanism

Revision 1.23.2.1 / (download) - annotate - [select for diffs], Wed Aug 31 22:12:04 1994 UTC (29 years, 7 months ago) by cgd
Branch: netbsd-1-0
CVS Tags: netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0
Changes since 1.23: +2 -1 lines
Diff to previous 1.23 (colored) next main 1.24 (colored)

from trunk

Revision 1.25 / (download) - annotate - [select for diffs], Wed Aug 31 21:47:36 1994 UTC (29 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.24: +2 -1 lines
Diff to previous 1.24 (colored)

Decrease shm_nused when a segment is deleted.

Revision 1.24 / (download) - annotate - [select for diffs], Mon Aug 22 23:37:17 1994 UTC (29 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.23: +3 -1 lines
Diff to previous 1.23 (colored)

initialize shmmax to `# of pages' at compile time; multiply by NBPG at
boot time (in shminit). This supports architecture families with varying
values for NBPG, and does not break ipcs.

Revision 1.23 / (download) - annotate - [select for diffs], Mon Jul 4 23:25:12 1994 UTC (29 years, 9 months ago) by glass
Branch: MAIN
CVS Tags: netbsd-1-0-base
Branch point for: netbsd-1-0
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored)

returning a gift

Revision 1.22 / (download) - annotate - [select for diffs], Wed Jun 29 06:33:17 1994 UTC (29 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.21: +2 -0 lines
Diff to previous 1.21 (colored)

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

Revision 1.21 / (download) - annotate - [select for diffs], Sat Jun 25 04:10:18 1994 UTC (29 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.20: +1 -1 lines
Diff to previous 1.20 (colored)

shm map is pageable.

Revision 1.20 / (download) - annotate - [select for diffs], Fri Jun 3 21:17:09 1994 UTC (29 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.19: +2 -27 lines
Diff to previous 1.19 (colored)

Use the same algorithm as mmap() with MAP_ANON for placing the segment.

Revision 1.19 / (download) - annotate - [select for diffs], Fri Jun 3 21:06:53 1994 UTC (29 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.18: +0 -1 lines
Diff to previous 1.18 (colored)

Get rid of unneeded bzero().

Revision 1.18 / (download) - annotate - [select for diffs], Fri Jun 3 20:53:38 1994 UTC (29 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.17: +2 -0 lines
Diff to previous 1.17 (colored)

sane initialization.  fix bug kern/274

Revision 1.17 / (download) - annotate - [select for diffs], Wed May 25 10:15:23 1994 UTC (29 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.16: +19 -15 lines
Diff to previous 1.16 (colored)

Update copyright.

Revision 1.16 / (download) - annotate - [select for diffs], Wed May 25 09:55:32 1994 UTC (29 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.15: +35 -8 lines
Diff to previous 1.15 (colored)

If we try to create a key that's already being created, wait.

Revision 1.15 / (download) - annotate - [select for diffs], Wed May 25 09:07:43 1994 UTC (29 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.14: +7 -8 lines
Diff to previous 1.14 (colored)

And finally, some optimization.

Revision 1.14 / (download) - annotate - [select for diffs], Wed May 25 08:59:48 1994 UTC (29 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.13: +78 -77 lines
Diff to previous 1.13 (colored)

Fix this up some more.  (I just read SVID again.)

Revision 1.13 / (download) - annotate - [select for diffs], Wed May 25 08:15:51 1994 UTC (29 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.12: +4 -8 lines
Diff to previous 1.12 (colored)

Generalize ipcperm() a little.

Revision 1.12 / (download) - annotate - [select for diffs], Wed May 25 07:36:53 1994 UTC (29 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.11: +213 -237 lines
Diff to previous 1.11 (colored)

Clean this up a bit, and fix several bugs.

Revision 1.11 / (download) - annotate - [select for diffs], Wed May 25 02:14:27 1994 UTC (29 years, 11 months ago) by hpeyerl
Branch: MAIN
Changes since 1.10: +534 -1 lines
Diff to previous 1.10 (colored)

sysv_shm.c from Adam.
sysv_ipc.c from me.
and various sundry changes to make sysv_ipc.c fit in.
(somewhat untested and not very pleasant reading material)

Revision 1.10 / (download) - annotate - [select for diffs], Sat Jan 8 15:09:35 1994 UTC (30 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.9: +1 -1 lines
Diff to previous 1.9 (colored)

SHM_LOCK and SHM_UNLOCK aren't just HPUXCOMPAT

Revision 1.9 / (download) - annotate - [select for diffs], Sat Jan 8 04:22:36 1994 UTC (30 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.8: +1 -1 lines
Diff to previous 1.8 (colored)

#include vm_user.h.

Revision 1.8 / (download) - annotate - [select for diffs], Sat Dec 18 04:22:02 1993 UTC (30 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.7: +1 -1 lines
Diff to previous 1.7 (colored)

Canonicalize all #includes.

Revision 1.6.2.2 / (download) - annotate - [select for diffs], Sun Nov 14 21:07:19 1993 UTC (30 years, 5 months ago) by mycroft
Branch: magnum
Changes since 1.6.2.1: +1 -1 lines
Diff to previous 1.6.2.1 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored)

Canonicalize all #includes.

Revision 1.6.2.1 / (download) - annotate - [select for diffs], Sun Nov 14 14:47:29 1993 UTC (30 years, 5 months ago) by cgd
Branch: magnum
Changes since 1.6: +1 -1 lines
Diff to previous 1.6 (colored)

Update from trunk:
Add the System V message queue and semaphore facilities.  Implemented
by Daniel Boulet <danny@BouletFermat.ab.ca>

Revision 1.7 / (download) - annotate - [select for diffs], Sun Nov 14 13:23:05 1993 UTC (30 years, 5 months ago) by cgd
Branch: MAIN
Changes since 1.6: +1 -1 lines
Diff to previous 1.6 (colored)

Add the System V message queue and semaphore facilities.  Implemented
by Daniel Boulet <danny@BouletFermat.ab.ca>

Revision 1.6 / (download) - annotate - [select for diffs], Sun Aug 1 19:26:01 1993 UTC (30 years, 8 months ago) by mycroft
Branch: MAIN
CVS Tags: magnum-base
Branch point for: magnum
Changes since 1.5: +1 -1 lines
Diff to previous 1.5 (colored)

Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.

Revision 1.5 / (download) - annotate - [select for diffs], Sat Jul 17 15:24:39 1993 UTC (30 years, 9 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-0-9-patch-001, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9
Changes since 1.4: +1 -1 lines
Diff to previous 1.4 (colored)

Finish moving struct definitions outside of function declarations.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Jul 4 03:59:55 1993 UTC (30 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.3: +1 -1 lines
Diff to previous 1.3 (colored)

shminit has void return type.

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

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

Revision 1.2 / (download) - annotate - [select for diffs], Fri Apr 9 17:16:38 1993 UTC (31 years ago) by cgd
Branch: MAIN
CVS Tags: netbsd-alpha-1, netbsd-0-8
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored)

From: Guido van Rooij <guido@gvr.win.tue.nl>

when mmapping a file, permissions are checked as it should be. When
mprotect()-ing the address range afterwards, no protection was checked
regarding the protection of the file originally opened. So
when you open /usr/bin/su RDONLY and SHARED you could afterwards change
the mmapped region to READ|WRITE. This gave the possibility to obtain
root privs obviously.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 21 09:45:37 1993 UTC (31 years, 1 month ago) by cgd
Branch: WFJ-920714
CVS Tags: patchkit-0-2-2, WFJ-386bsd-01
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored)

initial import of 386bsd-0.1 sources

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

Initial revision

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




CVSweb <webmaster@jp.NetBSD.org>