All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Alexander Graf <agraf@suse.de>
Cc: "Riku Voipio" <riku.voipio@iki.fi>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH] linux-user: Simplify boundary checks on g_posix_timers range
Date: Fri, 22 Aug 2014 12:33:48 +0100	[thread overview]
Message-ID: <CAFEAcA9UAzsx5cuoukD24w+DU+udUGjh+0O2Ni2T_OOidAUsKA@mail.gmail.com> (raw)
In-Reply-To: <1408706366-43407-1-git-send-email-agraf@suse.de>

On 22 August 2014 12:19, Alexander Graf <agraf@suse.de> wrote:
> We check whether the passed in counter value is negative on all calls
> that involve g_posix_timers. However, we AND the value down to 16 bits
> right before the check, so they can never be negative.

...but why exactly are we doing that AND with 0xffff ?? It seems
unlikely that the kernel really allows random garbage in the top
half of the timer ID arguments, so maybe we should drop the
mask and keep the <0 bounds checks?

-- PMM

  reply	other threads:[~2014-08-22 11:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-22 11:19 [Qemu-devel] [PATCH] linux-user: Simplify boundary checks on g_posix_timers range Alexander Graf
2014-08-22 11:33 ` Peter Maydell [this message]
2014-08-22 11:36   ` Andreas Färber
2014-08-22 11:45     ` Peter Maydell
2014-08-22 11:42   ` Alexander Graf
2014-08-22 11:44     ` Peter Maydell
2014-08-22 11:45       ` Alexander Graf
2014-08-22 11:49         ` Peter Maydell
2014-08-22 11:52           ` Alexander Graf

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=CAFEAcA9UAzsx5cuoukD24w+DU+udUGjh+0O2Ni2T_OOidAUsKA@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /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.