From: "Jürgen Groß" <jgross@suse.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
George Dunlap <george.dunlap@citrix.com>,
Ian Jackson <iwj@xenproject.org>, Julien Grall <julien@xen.org>,
Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH v3 2/8] xen/hypfs: switch write function handles to const
Date: Wed, 16 Dec 2020 17:17:25 +0100 [thread overview]
Message-ID: <be37658b-2a56-8506-70d0-e74328b61c5a@suse.com> (raw)
In-Reply-To: <bdd553b4-968a-ff71-4bac-2824f86ba869@suse.com>
[-- Attachment #1.1.1: Type: text/plain, Size: 1187 bytes --]
On 16.12.20 17:08, Jan Beulich wrote:
> On 09.12.2020 17:09, Juergen Gross wrote:
>> --- a/xen/include/xen/guest_access.h
>> +++ b/xen/include/xen/guest_access.h
>> @@ -26,6 +26,11 @@
>> type *_x = (hnd).p; \
>> (XEN_GUEST_HANDLE_PARAM(type)) { _x }; \
>> })
>> +/* Same for casting to a const type. */
>> +#define guest_handle_const_cast(hnd, type) ({ \
>> + const type *_x = (const type *)((hnd).p); \
>> + (XEN_GUEST_HANDLE_PARAM(const_##type)) { _x }; \
>> +})
>
> Afaict this allow casting from e.g. uint to const_ulong. We
> don't want to permit this (i.e. if really needed one is to
> go through two steps). I think all it takes is dropping the
> cast:
>
> #define guest_handle_const_cast(hnd, type) ({ \
> const type *_x = (hnd).p; \
> (XEN_GUEST_HANDLE_PARAM(const_##type)) { _x }; \
> })
>
> With this
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
> and I'd be okay making the adjustment while committing
> (provided it works and I didn't overlook anything).
At least it is still compiling, and I guess that was the main
concern.
Juergen
[-- Attachment #1.1.2: OpenPGP_0xB0DE9DD628BF132F.asc --]
[-- Type: application/pgp-keys, Size: 3135 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
next prev parent reply other threads:[~2020-12-16 16:17 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-09 16:09 [PATCH v3 0/8] xen: support per-cpupool scheduling granularity Juergen Gross
2020-12-09 16:09 ` [PATCH v3 1/8] xen/cpupool: support moving domain between cpupools with different granularity Juergen Gross
2020-12-16 17:52 ` Dario Faggioli
2020-12-17 7:49 ` Jan Beulich
2020-12-17 7:54 ` Jürgen Groß
2020-12-09 16:09 ` [PATCH v3 2/8] xen/hypfs: switch write function handles to const Juergen Gross
2020-12-16 16:08 ` Jan Beulich
2020-12-16 16:17 ` Jürgen Groß [this message]
2020-12-16 16:35 ` Jan Beulich
2020-12-09 16:09 ` [PATCH v3 3/8] xen/hypfs: add new enter() and exit() per node callbacks Juergen Gross
2020-12-16 16:16 ` Jan Beulich
2020-12-16 16:24 ` Jürgen Groß
2020-12-16 16:36 ` Jan Beulich
2020-12-16 17:12 ` Jürgen Groß
2020-12-09 16:09 ` [PATCH v3 4/8] xen/hypfs: support dynamic hypfs nodes Juergen Gross
2020-12-17 11:01 ` Jan Beulich
2020-12-17 11:24 ` Jürgen Groß
2020-12-09 16:09 ` [PATCH v3 5/8] xen/hypfs: add support for id-based dynamic directories Juergen Gross
2020-12-17 11:28 ` Jan Beulich
2020-12-17 11:32 ` Jürgen Groß
2020-12-17 12:14 ` Jan Beulich
2020-12-18 8:57 ` Jürgen Groß
2020-12-18 9:09 ` Jan Beulich
2020-12-18 12:41 ` Jürgen Groß
2020-12-21 8:26 ` Jan Beulich
2021-01-18 7:25 ` Jürgen Groß
2021-01-18 7:59 ` Jan Beulich
2020-12-09 16:09 ` [PATCH v3 6/8] xen/cpupool: add cpupool directories Juergen Gross
2020-12-17 15:54 ` Jan Beulich
2020-12-17 16:10 ` Dario Faggioli
2020-12-09 16:09 ` [PATCH v3 7/8] xen/cpupool: add scheduling granularity entry to cpupool entries Juergen Gross
2020-12-17 15:57 ` Jan Beulich
2020-12-09 16:09 ` [PATCH v3 8/8] xen/cpupool: make per-cpupool sched-gran hypfs node writable Juergen Gross
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=be37658b-2a56-8506-70d0-e74328b61c5a@suse.com \
--to=jgross@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@citrix.com \
--cc=iwj@xenproject.org \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=sstabellini@kernel.org \
--cc=wl@xen.org \
--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 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).