summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2005-05-01 17:58:58 +0200
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-01 17:58:58 +0200
commit15439d74f621ff8252b53136d259781148e6e768 (patch)
tree3c92de3587f0ec51055423a08c1d2a37b7eee877 /arch
parent[PATCH] s390: default storage key (diff)
downloadlinux-15439d74f621ff8252b53136d259781148e6e768.tar.xz
linux-15439d74f621ff8252b53136d259781148e6e768.zip
[PATCH] s390: cmm guest sender id
An arbitrary guest must not be allowed to trigger cmm actions. Only one specific guest namely the one that serves as the resource monitor may send cmm messages. Add a parameter that allows to specify the guest that may send messages. z/VMs resource manager has the name 'VMRMSVM' which is the default. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/mm/cmm.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c
index d30cdb4248a9..f5a5bc09b8fa 100644
--- a/arch/s390/mm/cmm.c
+++ b/arch/s390/mm/cmm.c
@@ -20,6 +20,11 @@
#include <asm/pgalloc.h>
#include <asm/uaccess.h>
+static char *sender = "VMRMSVM";
+module_param(sender, charp, 0);
+MODULE_PARM_DESC(sender,
+ "Guest name that may send SMSG messages (default VMRMSVM)");
+
#include "../../../drivers/s390/net/smsgiucv.h"
#define CMM_NR_PAGES ((PAGE_SIZE / sizeof(unsigned long)) - 2)
@@ -367,10 +372,12 @@ static struct ctl_table cmm_dir_table[] = {
#ifdef CONFIG_CMM_IUCV
#define SMSG_PREFIX "CMM"
static void
-cmm_smsg_target(char *msg)
+cmm_smsg_target(char *from, char *msg)
{
long pages, seconds;
+ if (strlen(sender) > 0 && strcmp(from, sender) != 0)
+ return;
if (!cmm_skip_blanks(msg + strlen(SMSG_PREFIX), &msg))
return;
if (strncmp(msg, "SHRINK", 6) == 0) {