From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Avi Kivity <avi@redhat.com>, kvm@vger.kernel.org
Cc: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>,
Carsten Otte <cotte@de.ibm.com>, Olaf Schnapper <os@de.ibm.com>
Subject: [PATCH 1/3] kvm-s390: Fix printk on SIGP set arch
Date: Thu, 22 Jan 2009 10:27:38 +0100 [thread overview]
Message-ID: <200901221027.38992.borntraeger@de.ibm.com> (raw)
In-Reply-To: <200901221026.13261.borntraeger@de.ibm.com>
From: Christian Borntraeger <borntraeger@de.ibm.com>
KVM on s390 does not support the ESA/390 architecture. We refuse to
change the architecture mode and print a warning. While testing a
crashme for kvm, I spotted two problems with the printk:
o A malicious can flood host dmesg
o There was no newline at the end of the printk
This patch fixes both problems.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
arch/s390/kvm/sigp.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Index: kvm/arch/s390/kvm/sigp.c
===================================================================
--- kvm.orig/arch/s390/kvm/sigp.c
+++ kvm/arch/s390/kvm/sigp.c
@@ -153,8 +153,9 @@ static int __sigp_set_arch(struct kvm_vc
switch (parameter & 0xff) {
case 0:
- printk(KERN_WARNING "kvm: request to switch to ESA/390 mode"
- " not supported");
+ if (printk_ratelimit())
+ printk(KERN_WARNING "kvm: request to switch to ESA/390"
+ " mode not supported\n");
rc = 3; /* not operational */
break;
case 1:
next prev parent reply other threads:[~2009-01-22 9:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-22 9:26 [PATCH 0/3] kvm-s390: three kernel fixes Christian Borntraeger
2009-01-22 9:27 ` Christian Borntraeger [this message]
2009-01-22 11:17 ` [PATCH 1/3] kvm-s390: Fix printk on SIGP set arch Heiko Carstens
2009-01-22 11:26 ` Carsten Otte
2009-01-22 11:44 ` Heiko Carstens
2009-01-22 11:58 ` Avi Kivity
2009-01-22 12:14 ` Carsten Otte
2009-01-22 13:20 ` [PATCH 1/3 v2] " Christian Borntraeger
2009-01-22 14:23 ` Avi Kivity
2009-01-22 11:41 ` [PATCH 1/3] " Amit Shah
2009-01-22 9:28 ` [PATCH 2/3] kvm-s390: Fix problem state check for b2 intercepts Christian Borntraeger
2009-01-22 9:29 ` [PATCH 3/3] kvm-s390: Fix SIGP set prefix ioctl Christian Borntraeger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200901221027.38992.borntraeger@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=avi@redhat.com \
--cc=cotte@de.ibm.com \
--cc=ehrhardt@linux.vnet.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=os@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.