From: Wei Liu <wl@xen.org>
To: Juergen Gross <jgross@suse.com>
Cc: xen-devel@lists.xenproject.org,
Ian Jackson <ian.jackson@eu.citrix.com>, Wei Liu <wl@xen.org>
Subject: Re: [Xen-devel] [PATCH] tools/xenstore: don't apply write limiting for privileged domain
Date: Fri, 31 Jan 2020 14:58:32 +0000 [thread overview]
Message-ID: <20200131145832.wx7idhgeqo7qfcoc@debian> (raw)
In-Reply-To: <20200131145544.wzm7537gpzmx3bov@debian>
On Fri, Jan 31, 2020 at 02:55:44PM +0000, Wei Liu wrote:
> On Fri, Jan 31, 2020 at 03:25:57PM +0100, Juergen Gross wrote:
> > 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>
>
> Acked-by: Wei Liu <wl@xen.org>
>
> > ---
> > 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 */
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.
> > 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
next prev parent reply other threads:[~2020-01-31 14:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2020-01-31 15:15 ` Jürgen Groß
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200131145832.wx7idhgeqo7qfcoc@debian \
--to=wl@xen.org \
--cc=ian.jackson@eu.citrix.com \
--cc=jgross@suse.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.