From: Heiko Carstens Subject: Re: [PATCH 1/3] kvm-s390: Fix printk on SIGP set arch Date: Thu, 22 Jan 2009 12:17:07 +0100 Message-ID: <20090122121707.2dffd96b@osiris.boeblingen.de.ibm.com> References: <200901221026.13261.borntraeger@de.ibm.com> <200901221027.38992.borntraeger@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Avi Kivity , kvm@vger.kernel.org, Christian Ehrhardt , Carsten Otte , Olaf Schnapper To: Christian Borntraeger Return-path: Received: from mtagate5.uk.ibm.com ([195.212.29.138]:62086 "EHLO mtagate5.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751182AbZAVLST (ORCPT ); Thu, 22 Jan 2009 06:18:19 -0500 Received: from d06nrmr1407.portsmouth.uk.ibm.com (d06nrmr1407.portsmouth.uk.ibm.com [9.149.38.185]) by mtagate5.uk.ibm.com (8.13.8/8.13.8) with ESMTP id n0MBH9rC109694 for ; Thu, 22 Jan 2009 11:17:10 GMT Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id n0MBH9bQ2019404 for ; Thu, 22 Jan 2009 11:17:09 GMT Received: from d06av03.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n0MBH8hB013739 for ; Thu, 22 Jan 2009 11:17:09 GMT In-Reply-To: <200901221027.38992.borntraeger@de.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, 22 Jan 2009 10:27:38 +0100 Christian Borntraeger wrote: > 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. [...] > - 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"); Why don't you just remove the printk? IMHO it's rather pointless.