tools/xenstore: don't apply write limiting for privileged domain
PATCH 1/1 tools/xenstore: don't apply write limiting for privileged domain
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.
--- tools/xenstore/xenstored_domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/xenstore/xenstored_domain.c +2 -2
@@ -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);
Signature · 7 lines
2.16.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 6 lines · Juergen Gross
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 <[email protected]>
Quoted 22 lines
--- tools/xenstore/xenstored_domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)tools/xenstore/xenstored_domain.c +2
-2@@ -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);Signature · 1 line
2.16.4
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 22 lines · Wei Liu
Quoted 6 lines · Juergen Gross
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 <[email protected]>Acked-by Wei Liu <[email protected]>Quoted 12 lines
--- tools/xenstore/xenstored_domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)tools/xenstore/xenstored_domain.c +0
-0@@ -918,8 +918,8 @@ void wrl_apply_debit_actual(struct domain *domain) {struct wrl_timestampt now;
Quoted 4 lines
tools/xenstore/xenstored_domain.c void wrl_apply_debit_actual(struct domain *domain) · line 922
Quoted 4 lines
tools/xenstore/xenstored_domain.c +2
-2-if (!domain) -/* sockets escape the write rate limit */ +if (!domain || !domid_is_unprivileged (domain->domid)) +/* sockets and dom0 escape the write rate limit */
Actually I think changing dom0 to "privileged domain" makes more sense here because you're allowed to specify a non-0 domain ID as privileged domid.
If you agree I can fix it while committing.
Wei.
Quoted 6 lines
Quoted 6 lines
tools/xenstore/xenstored_domain.c +0
-0return ;wrl_gettime_now (&now);Signature · 1 line
2.16.4
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 32 lines · Wei Liu
Quoted 22 lines · Wei Liu
Quoted 6 lines · Juergen Gross
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 <[email protected]>Acked-by Wei Liu <[email protected]>Quoted 12 lines
--- tools/xenstore/xenstored_domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)tools/xenstore/xenstored_domain.c +0
-0@@ -918,8 +918,8 @@ void wrl_apply_debit_actual(struct domain *domain) {struct wrl_timestampt now;Quoted 4 lines
tools/xenstore/xenstored_domain.c void wrl_apply_debit_actual(struct domain *domain) · line 922
Quoted 4 lines
tools/xenstore/xenstored_domain.c +2
-2-if (!domain) -/* sockets escape the write rate limit */ +if (!domain || !domid_is_unprivileged (domain->domid)) +/* sockets and dom0 escape the write rate limit */ Actually I think changing dom0 to "privileged domain" makes more sense here because you're allowed to specify a non-0 domain ID as privileged domid.
Quoted 1 line
If you agree I can fix it while committing.
Yes, sure.
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel