xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] xen/arm: map_dev_mmio_region: printk should be ratelimited
@ 2016-04-07  6:28 Shannon Zhao
  2016-04-07  9:48 ` Julien Grall
  0 siblings, 1 reply; 3+ messages in thread
From: Shannon Zhao @ 2016-04-07  6:28 UTC (permalink / raw)
  To: xen-devel
  Cc: zhaoshenglong, julien.grall, sstabellini, shannon.zhao,
	peter.huangpeng

From: Shannon Zhao <shannon.zhao@linaro.org>

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 <shannon.zhao@linaro.org>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
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;
     }
-- 
2.0.4



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-04-08 14:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-07  6:28 [PATCH v3] xen/arm: map_dev_mmio_region: printk should be ratelimited Shannon Zhao
2016-04-07  9:48 ` Julien Grall
2016-04-08 14:56   ` Konrad Rzeszutek Wilk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).