Bugtraq mailing list archives

Re: HP-UX setprivgrp()


From: Valdis.Kletnieks () vt edu (Valdis.Kletnieks () vt edu)
Date: Fri, 8 Nov 1996 15:02:07 -0500


--==_Exmh_167594504P
Content-Type: text/plain; charset=us-ascii

On Thu, 07 Nov 1996 22:51:54 +0100, you said:

Maybe a race condition can be won between the times the setuid bits
are changed by chown().

  Don't bother trying, system calls are atomic... but you can use this

Have you in fact verified that this is guaranteed true on a multiprocessor
system?  Remember that the other side(s) of the machine can still be
running, and the kernel needs to explicitly lock out any activity that
it doesn't want to be seen.

Doing this in an efficient manner is in fact the single hardest thing with
building a good MP system - you have to minimize the locked sections of code
so the other CPUs can proceed as often as possible.  I haven't checked a
Unix kernel, but IBM's VM operating system has on the order of 200 or so
different locks to provide as fine granularity as needed.  Of course,
sometimes the lock turns out to be a bit TOO granular.. ;)
--
                                Valdis Kletnieks
                                Computer Systems Engineer
                                Virginia Tech



--==_Exmh_167594504P
Content-Type: application/pgp-signature

-----BEGIN PGP MESSAGE-----
Version: 2.6.2

iQCVAwUBMoORvdQBOOoptg9JAQE5LgP+OctSqK5A1TmqAXhLco7a7JAdin4xjeVW
+Wka+sMx9y9w2sTGxIg/8yy7uFPR55aJxfL4grmTBMb3OIcUvsIbxLEGxqqqjwgP
RYVKS13I8jx2woG9p2CN2g7408UioJ+IhaiXP5qURyjCQDKDLzMvQEj7+BUtQtsY
Bt6kA5PtTIU=
=RsNP
-----END PGP MESSAGE-----

--==_Exmh_167594504P--



Current thread: