From: Ian Campbell <Ian.Campbell@citrix.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian.Jackson@eu.citrix.com, xen-devel@lists.xensource.com,
wei.liu2@citrix.com, dslutz@verizon.com
Subject: Re: [PATCH v3] libxl_set_memory_target: retain the same maxmem offset on top of the current target
Date: Mon, 2 Feb 2015 14:31:42 +0000 [thread overview]
Message-ID: <1422887502.19293.31.camel@citrix.com> (raw)
In-Reply-To: <1422544138-28917-1-git-send-email-stefano.stabellini@eu.citrix.com>
On Thu, 2015-01-29 at 15:08 +0000, Stefano Stabellini wrote:
> @@ -4775,6 +4781,14 @@ retry_transaction:
> new_target_memkb = current_target_memkb + target_memkb;
> } else
> new_target_memkb = target_memkb - videoram;
> +
> + if (new_target_memkb <= 0) {
> + LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
> + "cannot set memory target to 0 or less than 0.\n");
new_target_memkb is uint32 so it can't be less than zero.
In fact, there looks to be some under/overflow bugs hidden in this
function. e.g. in "new_target_memkb = target_memkb" (since target is
signed)
Ian.
next prev parent reply other threads:[~2015-02-02 14:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-29 15:08 [PATCH v3] libxl_set_memory_target: retain the same maxmem offset on top of the current target Stefano Stabellini
2015-02-02 14:31 ` Ian Campbell [this message]
2015-02-25 15:17 ` Stefano Stabellini
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=1422887502.19293.31.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=dslutz@verizon.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xensource.com \
/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.