diff mbox

[1/3,v2] kvm-s390: Fix printk on SIGP set arch

Message ID 200901221420.27403.borntraeger@de.ibm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Christian Borntraeger Jan. 22, 2009, 1:20 p.m. UTC
Am Thursday 22 January 2009 12:58:57 schrieb Avi Kivity:
> Right, either inject an exception to the guest (if appropriate for the
> arch), or return -ESOMETHING from ioctl(KVM_RUN).

Ok. What about:

[PATCH] kvm-s390: fix printk on SIGP set arch

From: Christian Borntraeger <borntraeger@de.ibm.com>
Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com>

KVM on s390 does not support the ESA/390 architecture. We refuse to 
change the architecture mode and print a warning. This patch removes
the printk for several reasons:

o A malicious can flood host dmesg
o The old message had no newline
o there is no connection between the message and the failing guest 

This patch simply removes the printk. We already set the condition
code to 3 - the guest knows that something went wrong.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
 arch/s390/kvm/sigp.c |    2 --
 1 file changed, 2 deletions(-)



--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Avi Kivity Jan. 22, 2009, 2:23 p.m. UTC | #1
Christian Borntraeger wrote:
> Am Thursday 22 January 2009 12:58:57 schrieb Avi Kivity:
>   
>> Right, either inject an exception to the guest (if appropriate for the
>> arch), or return -ESOMETHING from ioctl(KVM_RUN).
>>     
>
> Ok. What about:
>
> [PATCH] kvm-s390: fix printk on SIGP set arch
>
> From: Christian Borntraeger <borntraeger@de.ibm.com>
> Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com>
>
> KVM on s390 does not support the ESA/390 architecture. We refuse to 
> change the architecture mode and print a warning. This patch removes
> the printk for several reasons:
>
> o A malicious can flood host dmesg
> o The old message had no newline
> o there is no connection between the message and the failing guest 
>
> This patch simply removes the printk. We already set the condition
> code to 3 - the guest knows that something went wrong.
>   

Applied (with the other patches), thanks.  Please include a printk() 
patch in every s390 patchset so people can participate in the review and 
discussion.
diff mbox

Patch

Index: kvm/arch/s390/kvm/sigp.c
===================================================================
--- kvm.orig/arch/s390/kvm/sigp.c
+++ kvm/arch/s390/kvm/sigp.c
@@ -153,8 +153,6 @@  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");
 		rc = 3; /* not operational */
 		break;
 	case 1: