Date: Thu, 15 Sep 2005 15:03:48 +0000 (UTC) From: "Christian S.J. Peron" <csjp@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern imgact_elf.c vfs_lookup.c vfs_syscalls.c Message-ID: <200509151503.j8FF3m5i086438@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
csjp 2005-09-15 15:03:48 UTC
FreeBSD src repository
Modified files:
sys/kern imgact_elf.c vfs_lookup.c vfs_syscalls.c
Log:
Improve the MP safeness associated with the creation of symbolic
links and the execution of ELF binaries. Two problems were found:
1) The link path wasn't tagged as being MP safe and thus was not properly
protected.
2) The ELF interpreter vnode wasnt being locked in namei(9) and thus was
insufficiently protected.
This commit makes the following changes:
-Sets the MPSAFE flag in NDINIT for symbolic link paths
-Sets the MPSAFE flag in NDINIT and introduce a vfslocked variable which
will be used to instruct VFS_UNLOCK_GIANT to unlock Giant if it has been
picked up.
-Drop in an assertion into vfs_lookup which ensures that if the MPSAFE
flag is NOT set, that we have picked up giant. If not panic (if WITNESS
compiled into the kernel). This should help us find conditions where vnode
operations are in-sufficiently protected.
This is a RELENG_6 candidate.
Discussed with: jeff
MFC after: 4 days
Revision Changes Path
1.163 +7 -3 src/sys/kern/imgact_elf.c
1.82 +2 -0 src/sys/kern/vfs_lookup.c
1.394 +1 -1 src/sys/kern/vfs_syscalls.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509151503.j8FF3m5i086438>
