From: "Jan Beulich" <JBeulich@suse.com>
To: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>,
Doug Goldstein <cardoe@cardoe.com>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH v5 1/2] xsm: rework policy_buffer globals
Date: Fri, 08 Jul 2016 02:09:10 -0600 [thread overview]
Message-ID: <577F7BC602000078000FC7EC@prv-mh.provo.novell.com> (raw)
(Re-sending, as I got two bounces)
>>> On 07.07.16 at 17:35, <dgdegra@tycho.nsa.gov> wrote:
> --- a/xen/xsm/flask/hooks.c
> +++ b/xen/xsm/flask/hooks.c
> @@ -1815,7 +1815,7 @@ static struct xsm_operations flask_ops = {
> .xen_version = flask_xen_version,
> };
>
> -__init void flask_init(void)
> +__init void flask_init(const void *policy_buffer, size_t policy_size)
Please take the opportunity and move the __init to its more
conventional place:
void __init flask_init(const void *policy_buffer, size_t policy_size)
> --- a/xen/xsm/xsm_policy.c
> +++ b/xen/xsm/xsm_policy.c
> @@ -28,13 +28,12 @@
> # include <xen/device_tree.h>
> #endif
>
> -char *__initdata policy_buffer = NULL;
> -u32 __initdata policy_size = 0;
> -
> #ifdef CONFIG_MULTIBOOT
> int __init xsm_multiboot_policy_init(unsigned long *module_map,
> const multiboot_info_t *mbi,
> - void *(*bootstrap_map)(const module_t *))
> + void *(*bootstrap_map)(const module_t *),
> + void **policy_buffer,
> + size_t *policy_size)
> {
> int i;
> module_t *mod = (module_t *)__va(mbi->mods_addr);
> @@ -56,8 +55,8 @@ int __init xsm_multiboot_policy_init(unsigned long *module_map,
>
> if ( (xsm_magic_t)(*_policy_start) == XSM_MAGIC )
> {
> - policy_buffer = (char *)_policy_start;
> - policy_size = _policy_len;
> + *policy_buffer = (char *)_policy_start;
> + *policy_size = _policy_len;
With *policy_buffer now being of type void * I don't think this cast is
necessary anymore (or if it is, then it certainly shouldn't needlessly
go through char *).
With at least this latter aspect adjusted
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Thanks for adding this patch,
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next reply other threads:[~2016-07-08 8:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-08 8:09 Jan Beulich [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-07-07 15:35 [PATCH v5 1/2] xsm: rework policy_buffer globals Daniel De Graaf
2016-07-08 8:04 ` Jan Beulich
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=577F7BC602000078000FC7EC@prv-mh.provo.novell.com \
--to=jbeulich@suse.com \
--cc=cardoe@cardoe.com \
--cc=dgdegra@tycho.nsa.gov \
--cc=ian.jackson@eu.citrix.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 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).