[PATCH] shmparam

Rui Sousa (Fabian.Frederick@prov-liege.be)
Tue, 5 Oct 1999 09:05:00 +0200


Hi,

Maybe someone could check this patch .... It's against some old
shmparam implementation (/ 2.2.12).Those SHM_RANGE_START & END seem
strange to me as AFAIK no kernel source use its and shmat integrate
NULL client attach references as well.By the way, consider it's
useful : clients _can_ be up to 2GB vm nowadays & SHM_RANGE_START
point to about 1.3 GB ... So what's that stuff ?
Another problem was the SHMSEG definition ... IMHO Process Overflow
_must_ be taken in consideration !

PS : SHM_RANGE_START feature in all architectures : / (shmparams
all over the place)

Regards, Fabian

diff -urN linux.vanilla/include/asm/shmparam.h
linux.fab/include/asm/shmparam.h
--- linux.vanilla/include/asm/shmparam.h Sun Nov 8 23:06:18 1998
+++ linux.fab/include/asm/shmparam.h Tue Oct 5 00:26:03 1999
@@ -1,10 +1,6 @@
#ifndef _ASMI386_SHMPARAM_H
#define _ASMI386_SHMPARAM_H

-/* address range for shared memory attaches if no address passed to
shmat() */
-#define SHM_RANGE_START 0x50000000
-#define SHM_RANGE_END 0x60000000
-
/*
* Format of a swap-entry for shared memory pages currently out in
* swap space (see also mm/swap.c).
@@ -41,6 +37,7 @@
#define SHMALL /* max shm system wide (pages)
*/ \
(1<<(_SHM_IDX_BITS+_SHM_ID_BITS))
#define SHMLBA PAGE_SIZE /* attach addr a
multiple of this */
-#define SHMSEG SHMMNI /* max shared segs per process
*/
+/* 1 level error tolerant for mutual SHM uspace chat */
+#define SHMSEG SHMMNI-1 /* max shared segs per
process */

#endif /* _ASMI386_SHMPARAM_H */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/