aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2005-05-01 11:58:58 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-01 11:58:58 -0400
commit15439d74f621ff8252b53136d259781148e6e768 (patch)
tree3c92de3587f0ec51055423a08c1d2a37b7eee877 /arch
parent0b642ede47969d4180b0922d982777fe64379228 (diff)
[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 @@
20#include <asm/pgalloc.h> 20#include <asm/pgalloc.h>
21#include <asm/uaccess.h> 21#include <asm/uaccess.h>
22 22
23static char *sender = "VMRMSVM";
24module_param(sender, charp, 0);
25MODULE_PARM_DESC(sender,
26 "Guest name that may send SMSG messages (default VMRMSVM)");
27
23#include "../../../drivers/s390/net/smsgiucv.h" 28#include "../../../drivers/s390/net/smsgiucv.h"
24 29
25#define CMM_NR_PAGES ((PAGE_SIZE / sizeof(unsigned long)) - 2) 30#define CMM_NR_PAGES ((PAGE_SIZE / sizeof(unsigned long)) - 2)
@@ -367,10 +372,12 @@ static struct ctl_table cmm_dir_table[] = {
367#ifdef CONFIG_CMM_IUCV 372#ifdef CONFIG_CMM_IUCV
368#define SMSG_PREFIX "CMM" 373#define SMSG_PREFIX "CMM"
369static void 374static void
370cmm_smsg_target(char *msg) 375cmm_smsg_target(char *from, char *msg)
371{ 376{
372 long pages, seconds; 377 long pages, seconds;
373 378
379 if (strlen(sender) > 0 && strcmp(from, sender) != 0)
380 return;
374 if (!cmm_skip_blanks(msg + strlen(SMSG_PREFIX), &msg)) 381 if (!cmm_skip_blanks(msg + strlen(SMSG_PREFIX), &msg))
375 return; 382 return;
376 if (strncmp(msg, "SHRINK", 6) == 0) { 383 if (strncmp(msg, "SHRINK", 6) == 0) {