xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@citrix.com>
To: "Chris (Christopher) Brand" <chris.brand@broadcom.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Cc: Ian Campbell <ian.campbell@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [PATCH] xen: arm: Avoid reading beyond the last module
Date: Mon, 20 Jul 2015 13:32:35 +0100	[thread overview]
Message-ID: <55ACEA63.5040107@citrix.com> (raw)
In-Reply-To: <4EE5B48738DDED408878C97C8E050A8B1D7D4CE3@SJEXCHMB05.corp.ad.broadcom.com>

Hi Chris,

On 17/07/15 21:48, Chris (Christopher) Brand wrote:
> nr_mods is set in add_boot_module() to the number of module
> array elements used. This function also ensures that nr_mods
> never exceeds MAX_MODULES (the size of the array). When looping
> through the array, the correct maximum index is "nr_mods-1",
> not "nr_mods". If the array is full, using the latter will in
> fact access beyond the end of the array.
> This was done correctly in boot_module_find_by_kind() and
> consider_modules() but incorrectly in discard_initial_modules()
> and next_module().
> 
> Signed-off-by: Chris Brand <chris.brand@broadcom.com>

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

Regards,

-- 
Julien Grall

  reply	other threads:[~2015-07-20 12:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-17 20:48 [PATCH] xen: arm: Avoid reading beyond the last module Chris (Christopher) Brand
2015-07-20 12:32 ` Julien Grall [this message]
2015-07-21 14:49   ` Ian Campbell
  -- strict thread matches above, loose matches on Subject: below --
2015-07-16 21:41 Chris (Christopher) Brand
2015-07-17 10:14 ` Julien Grall
2015-07-17 22:15   ` Chris (Christopher) Brand

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=55ACEA63.5040107@citrix.com \
    --to=julien.grall@citrix.com \
    --cc=chris.brand@broadcom.com \
    --cc=ian.campbell@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xen.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).