Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement
Linux 2.0 Unofficial Patches (shm.c.diff-2.0.29)

limit number of locked shm pages (2.0.29)

Joerg Weule (weule@marlene.neurologie.uni-duesseldorf.de)
Tue Dec 2 15:39:00 1997

[Home] [Linux 2.0] [Linux 2.1] [Information] [Software] [Distributions] [Links]

shm.c.diff-2.0.29
This is still patch to limit the number of locked memory pages.

Since my last patches uesd floating point code, I now come up with an 32 bit integer version.

The patch estabishes a new count for the total number of locked pages.

If n := num_physpages, only n-sqrt(n*8MB/PAGE_SIZE) are allowed to lock, for example 0, 4.7, 16, 41 or 96 MB at 8, 16, 32, 64 or 128 MB of physical memory respectively.

Without this patch, root can bring down the system by locking all physical memory.

I think the estabished cound should be a global counter for all locked pages. The mm-system should count all these pages. Is there still a count we should use?

With regards

Joerg




[Home] [Up] [Search] [FeedBack]

Copyleft © The LinuxHQ Project. Licensed under the GNU Public License.
Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.