All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xen-devel] [PATCH] tools/xenstore: don't apply write limiting for privileged domain
@ 2020-01-31 14:25 Juergen Gross
  2020-01-31 14:55 ` Wei Liu
  0 siblings, 1 reply; 4+ messages in thread
From: Juergen Gross @ 2020-01-31 14:25 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, Ian Jackson, Wei Liu

Xenstore write limiting should not be applied to dom0. Unfortunately
write limiting is disabled only for connections via sockets. When
running in a stubdom Xenstore will apply write limiting to dom0, too.
Change that by testing for the domain to be privileged as well.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 tools/xenstore/xenstored_domain.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/xenstore/xenstored_domain.c b/tools/xenstore/xenstored_domain.c
index 1a83097952..c7c6c574df 100644
--- a/tools/xenstore/xenstored_domain.c
+++ b/tools/xenstore/xenstored_domain.c
@@ -918,8 +918,8 @@ void wrl_apply_debit_actual(struct domain *domain)
 {
 	struct wrl_timestampt now;
 
-	if (!domain)
-		/* sockets escape the write rate limit */
+	if (!domain || !domid_is_unprivileged(domain->domid))
+		/* sockets and dom0 escape the write rate limit */
 		return;
 
 	wrl_gettime_now(&now);
-- 
2.16.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

end of thread, other threads:[~2020-01-31 15:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-31 14:25 [Xen-devel] [PATCH] tools/xenstore: don't apply write limiting for privileged domain Juergen Gross
2020-01-31 14:55 ` Wei Liu
2020-01-31 14:58   ` Wei Liu
2020-01-31 15:15     ` Jürgen Groß

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.