From patchwork Thu Apr 7 06:28:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 65227 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp288719lbc; Wed, 6 Apr 2016 23:36:31 -0700 (PDT) X-Received: by 10.31.8.68 with SMTP id 65mr601695vki.150.1460010991611; Wed, 06 Apr 2016 23:36:31 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id 198si1404350vki.132.2016.04.06.23.36.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Apr 2016 23:36:31 -0700 (PDT) Received-SPF: neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ao3Wz-0001YM-If; Thu, 07 Apr 2016 06:35:05 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ao3Wx-0001YG-Up for xen-devel@lists.xen.org; Thu, 07 Apr 2016 06:35:04 +0000 Received: from [193.109.254.147] by server-2.bemta-14.messagelabs.com id 30/2A-03301-79FF5075; Thu, 07 Apr 2016 06:35:03 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrDIsWRWlGSWpSXmKPExsVSPpHPSXfaf9Z wgw9zjSyWfFzM4sDocXT3b6YAxijWzLyk/IoE1oyPE96zF6xir7i2qI+5gfEzaxcjF4eQwClG iUcb3rBAOLsZJTZuu8fWxcjJwSagK/Fx4xR2EFtEQFZiddccdpAiZoGZjBL9v/4xgySEBfwkJ nbMAWtgEVCRaHi+HyzOK+Au8fXePrBmCQENiZW9E1gg4oISJ2c+AbOZBSQkDr54wQxRoyjRtv 4kG4QtKXFwxQ2wiyRAzvsyby8TRMJUYuXjRUwTGPlnIZk1C8msBYxMqxjVi1OLylKLdC31koo y0zNKchMzc3QNDU30clOLixPTU3MSk4r1kvNzNzECQ44BCHYw9k9xPsQoycGkJMqb9pQ1XIgv KT+lMiOxOCO+qDQntfgQowwHh5IE76Z/QDnBotT01Iq0zBxg8MOkJTh4lER4K0HSvMUFibnFm ekQqVOMuhwLftxeyyTEkpeflyolzhsKUiQAUpRRmgc3AhaJlxhlpYR5GYGOEuIpSC3KzSxBlX /FKM7BqCTMewBkCk9mXgncpldARzABHVEvzARyREkiQkqqgbHuh9bJpa7XHeQzpKSYdvI82uI lHC28r+Psz3jzuiPBzQc/NN64LOwq3zWxfSeLrsO2/xe7Dr+UXP1869K44MxLGT8dIi+clHt4 jlk3cS7z+XezIp7ffpT/coLm7CC2sIDwc5MXGRu3rI9gbHaa+n1y4b4pLBM3m+wKr3FdvqLhJ 1dVHIt4sYISS3FGoqEWc1FxIgDlUYdJvwIAAA== X-Env-Sender: zhaoshenglong@huawei.com X-Msg-Ref: server-13.tower-27.messagelabs.com!1460010898!36128596!1 X-Originating-IP: [119.145.14.66] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTE5LjE0NS4xNC42NiA9PiA4NTI3\n X-StarScan-Received: X-StarScan-Version: 8.28; banners=-,-,- X-VirusChecked: Checked Received: (qmail 16116 invoked from network); 7 Apr 2016 06:35:02 -0000 Received: from szxga03-in.huawei.com (HELO szxga03-in.huawei.com) (119.145.14.66) by server-13.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 7 Apr 2016 06:35:02 -0000 Received: from 172.24.1.36 (EHLO SZXEML423-HUB.china.huawei.com) ([172.24.1.36]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id BZK80068; Thu, 07 Apr 2016 14:28:33 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by SZXEML423-HUB.china.huawei.com (10.82.67.154) with Microsoft SMTP Server id 14.3.235.1; Thu, 7 Apr 2016 14:28:22 +0800 From: Shannon Zhao To: Date: Thu, 7 Apr 2016 14:28:14 +0800 Message-ID: <1460010494-3100-1-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 MIME-Version: 1.0 X-Originating-IP: [10.177.16.142] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090204.5705FE12.0065, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 31f61ba70f4ef5515ce290cf315f5b05 Cc: zhaoshenglong@huawei.com, julien.grall@arm.com, sstabellini@kernel.org, shannon.zhao@linaro.org, peter.huangpeng@huawei.com Subject: [Xen-devel] [PATCH v3] xen/arm: map_dev_mmio_region: printk should be ratelimited X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" From: Shannon Zhao The function map_dev_mmio_region is used in a hypercall. Therefore all printks should be ratelimited to avoid a malicious guest flooding the console. Signed-off-by: Shannon Zhao Reviewed-by: Konrad Rzeszutek Wilk Acked-by: Julien Grall --- v3: update commit message --- xen/arch/arm/p2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index 0011708..db21433 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -1284,7 +1284,7 @@ int map_dev_mmio_region(struct domain *d, res = map_mmio_regions(d, start_gfn, nr, mfn); if ( res < 0 ) { - printk(XENLOG_ERR "Unable to map [%#lx - %#lx] in Dom%d\n", + printk(XENLOG_G_ERR "Unable to map [%#lx - %#lx] in Dom%d\n", start_gfn, start_gfn + nr - 1, d->domain_id); return res; }