]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commit
Changes to common source files; not directly applicable to open-vm-tools
authorOliver Kurth <okurth@vmware.com>
Fri, 27 Jul 2018 18:46:20 +0000 (11:46 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 27 Jul 2018 18:46:20 +0000 (11:46 -0700)
commit58a05f680a7c11eeb2fbb576579969c1895bb01d
tree418c288bbcc78bd8d5d4e7c7bf8a39a977ebf965
parent1ba390a66aa6a7821bfaae018248e4f005da6512
Changes to common source files; not directly applicable to open-vm-tools

MXUser: Lock tracking causes panic

MXUser locks require a unique serial number so the lock stats code
can proprly differentiate between each lock. We can't depend on the
name to be unique as some locks are created and deleted many times,
reusing their names.

The serial number is also used to avoid ASLR attacks... we can't use
the address of a lock... and even if we did, it's possible for that
address to be reused... MXUser locks are dynamically allocated.

The lock tracking code tracks the number of locks and this is now
causing an issue. Way back when it was thought that seeing what
was deemed a huge number of locks indicated a problem... but today
we think those limits are getting quite small.

Enlarge the serial number space to 64-bits. If we constantly create 1M
locks per second it would take over 500000 years before we would have
a problem like this again.
open-vm-tools/lib/lock/ul.c
open-vm-tools/lib/lock/ulBarrier.c
open-vm-tools/lib/lock/ulExcl.c
open-vm-tools/lib/lock/ulInt.h
open-vm-tools/lib/lock/ulIntShared.h
open-vm-tools/lib/lock/ulRW.c
open-vm-tools/lib/lock/ulRec.c
open-vm-tools/lib/lock/ulSema.c
open-vm-tools/lib/lock/ulStats.c