Subject: CVS commit: src/sys/compat
To: None <source-changes@NetBSD.org>
From: Emmanuel Dreyfus <manu@netbsd.org>
List: source-changes
Date: 11/13/2003 13:40:39
Module Name:	src
Committed By:	manu
Date:		Thu Nov 13 13:40:39 UTC 2003

Modified Files:
	src/sys/compat/darwin: darwin_ioframebuffer.c darwin_iohidsystem.c
	src/sys/compat/mach: Makefile files.mach mach_bootstrap.c
	    mach_bootstrap.h mach_clock.c mach_clock.h mach_host.c mach_host.h
	    mach_iokit.c mach_iokit.h mach_message.c mach_message.h mach_port.c
	    mach_port.h mach_semaphore.c mach_semaphore.h mach_task.c
	    mach_task.h mach_thread.c mach_thread.h mach_vm.c mach_vm.h
Added Files:
	src/sys/compat/mach: mach_services.c mach_services.h
	    mach_services.master makemachservices.sh
Removed Files:
	src/sys/compat/mach: mach_namemap.c

Log Message:
Enforce good santity checks with Mach messages sizes:
1) make sure Mach servers will not work on data beyond the end of the
   request message buffer.
2) make sure that on copying out the reply message buffer, we will not
   leak kernel data located after the buffer.
3) make sure that the server will not overwrite memory beyond the end
   of the reply message buffer. That check is the responsability of the
   server, there is just a DIAGNOSTIC test to check everything is in
   good shape. All currently implemented servers in NetBSD have been
   modified to check for this condition

While we are here, build the mach services table (formerly in mach_namemap.c)
and the services prototypes automatically from mach_services.master, just
as this is done for system calls.

The next step would be to fold the message formats in the mach_services.master
file, but this tends to be difficult, as some messages are quite long and
complex.


To generate a diff of this commit:
cvs rdiff -r1.23 -r1.24 src/sys/compat/darwin/darwin_ioframebuffer.c
cvs rdiff -r1.22 -r1.23 src/sys/compat/darwin/darwin_iohidsystem.c
cvs rdiff -r1.2 -r1.3 src/sys/compat/mach/Makefile \
    src/sys/compat/mach/mach_bootstrap.h src/sys/compat/mach/mach_semaphore.h
cvs rdiff -r1.12 -r1.13 src/sys/compat/mach/files.mach \
    src/sys/compat/mach/mach_thread.h
cvs rdiff -r1.8 -r1.9 src/sys/compat/mach/mach_bootstrap.c \
    src/sys/compat/mach/mach_clock.c src/sys/compat/mach/mach_task.h
cvs rdiff -r1.5 -r1.6 src/sys/compat/mach/mach_clock.h \
    src/sys/compat/mach/mach_semaphore.c
cvs rdiff -r1.22 -r1.23 src/sys/compat/mach/mach_host.c
cvs rdiff -r1.11 -r1.12 src/sys/compat/mach/mach_host.h
cvs rdiff -r1.24 -r1.25 src/sys/compat/mach/mach_iokit.c
cvs rdiff -r1.21 -r1.22 src/sys/compat/mach/mach_iokit.h
cvs rdiff -r1.27 -r1.28 src/sys/compat/mach/mach_message.c
cvs rdiff -r1.17 -r1.18 src/sys/compat/mach/mach_message.h
cvs rdiff -r1.35 -r0 src/sys/compat/mach/mach_namemap.c
cvs rdiff -r1.43 -r1.44 src/sys/compat/mach/mach_port.c
cvs rdiff -r1.28 -r1.29 src/sys/compat/mach/mach_port.h
cvs rdiff -r0 -r1.1 src/sys/compat/mach/mach_services.c \
    src/sys/compat/mach/mach_services.h \
    src/sys/compat/mach/mach_services.master \
    src/sys/compat/mach/makemachservices.sh
cvs rdiff -r1.31 -r1.32 src/sys/compat/mach/mach_task.c
cvs rdiff -r1.23 -r1.24 src/sys/compat/mach/mach_thread.c
cvs rdiff -r1.33 -r1.34 src/sys/compat/mach/mach_vm.c
cvs rdiff -r1.18 -r1.19 src/sys/compat/mach/mach_vm.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.