All of lore.kernel.org
 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

* Re: [PATCH v3] xen/arm: map_dev_mmio_region: printk should be ratelimited
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Julien Grall @ 2016-04-07  9:48 UTC (permalink / raw)
  To: Shannon Zhao, xen-devel; +Cc: sstabellini, shannon.zhao, peter.huangpeng

Hi Shannon,

On 07/04/16 07:28, Shannon Zhao wrote:
> 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>

Acked-by: Julien Grall <julien.grall@arm.com>

Regards,

> ---
> 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;
>       }
>

-- 
Julien Grall

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

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

* Re: [PATCH v3] xen/arm: map_dev_mmio_region: printk should be ratelimited
  2016-04-07  9:48 ` Julien Grall
@ 2016-04-08 14:56   ` Konrad Rzeszutek Wilk
  0 siblings, 0 replies; 3+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-04-08 14:56 UTC (permalink / raw)
  To: Julien Grall
  Cc: peter.huangpeng, shannon.zhao, xen-devel, sstabellini, Shannon Zhao

On Thu, Apr 07, 2016 at 10:48:53AM +0100, Julien Grall wrote:
> Hi Shannon,
> 
> On 07/04/16 07:28, Shannon Zhao wrote:
> >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>
> 
> Acked-by: Julien Grall <julien.grall@arm.com>
> 
> Regards,

Applied.

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

^ permalink raw reply	[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 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.