Subject: CVS commit: syssrc
To: None <source-changes@netbsd.org>
From: Bill Sommerfeld <sommerfeld@netbsd.org>
List: source-changes
Date: 08/29/2000 17:33:28
Module Name:	syssrc
Committed By:	sommerfeld
Date:		Tue Aug 29 14:33:28 UTC 2000

Modified Files:
	syssrc/sys/compat/common: compat_util.c
	syssrc/sys/compat/hpux: hpux_file.c
	syssrc/sys/compat/ibcs2: ibcs2_misc.c ibcs2_stat.c
	syssrc/sys/compat/linux/common: linux_file.c linux_misc_notalpha.c
	syssrc/sys/compat/svr4: svr4_stat.c

Log Message:
Emulation stackgap sanity checks, based partly on fixes from
FreeBSD-SA00:42.

Change stackgap_alloc to bounds-check the allocation vs. the stack
gap, returning NULL if there isn't room for the allocation.

Change emul_find() to check for a NULL return from stackgap_alloc()
and convert that into ENAMETOOLONG.

Reorder various emulation syscalls so that all *_CHECK_ALT_{EXIST,CREAT}
calls (which turn into emul_find() under the covers come *after* small,
fixed-size stackgap_alloc() calls.

Clean up ibcs2 {get,set}groups.


To generate a diff of this commit:
cvs rdiff -r1.15 -r1.16 syssrc/sys/compat/common/compat_util.c
cvs rdiff -r1.13 -r1.14 syssrc/sys/compat/hpux/hpux_file.c
cvs rdiff -r1.51 -r1.52 syssrc/sys/compat/ibcs2/ibcs2_misc.c
cvs rdiff -r1.15 -r1.16 syssrc/sys/compat/ibcs2/ibcs2_stat.c
cvs rdiff -r1.28 -r1.29 syssrc/sys/compat/linux/common/linux_file.c
cvs rdiff -r1.57 -r1.58 syssrc/sys/compat/linux/common/linux_misc_notalpha.c
cvs rdiff -r1.39 -r1.40 syssrc/sys/compat/svr4/svr4_stat.c

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