xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: jgross@suse.com, xen-devel@lists.xenproject.org,
	Stefano Stabellini <stefano.stabellini@xilinx.com>,
	Volodymyr_Babchuk@epam.com
Subject: Re: [Xen-devel] [PATCH v4] xen/arm: domain_build: harden make_cpus_node()
Date: Thu, 10 Oct 2019 10:47:00 +0100	[thread overview]
Message-ID: <19ead95b-5b0c-bbfa-17b8-b5a2c2a3addd@arm.com> (raw)
In-Reply-To: <20191010004211.31017-1-sstabellini@kernel.org>

Hi Stefano,

On 10/10/19 1:42 AM, Stefano Stabellini wrote:
> make_cpus_node() is using a static buffer to generate the FDT node name.
> While mpdir_aff is a 64-bit integer, we only ever use the bits [23:0] as
> only AFF{0, 1, 2} are supported for now.
> 
> To avoid any potential issues in the future, check that mpdir_aff has
> only bits [23:0] set.
> 
> Take the opportunity to reduce the size of the buffer. Indeed, only 8
> characters are needed to print a 32-bit hexadecimal number. So
> sizeof("cpu@") + 8 + 1 (for '\0') = 13 characters is sufficient.
> 
> Fixes: c81a791d34 (xen/arm: Set 'reg' of cpu node for dom0 to match MPIDR's affinity)
> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>

Reviewed-by: Julien Grall <julien.grall@arm.com>

Cheers,

-- 
Julien Grall

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

      parent reply	other threads:[~2019-10-10  9:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10  0:42 [Xen-devel] [PATCH v4] xen/arm: domain_build: harden make_cpus_node() Stefano Stabellini
2019-10-10  6:13 ` Jürgen Groß
2019-10-10  9:47 ` Julien Grall [this message]

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=19ead95b-5b0c-bbfa-17b8-b5a2c2a3addd@arm.com \
    --to=julien.grall@arm.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=jgross@suse.com \
    --cc=sstabellini@kernel.org \
    --cc=stefano.stabellini@xilinx.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).