public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen@asianux.com>
To: Mircea Gherzan <mgherzan@gmail.com>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	nschichan@freebox.fr, daniel.borkmann@tik.ee.ethz.ch,
	David Miller <davem@davemloft.net>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org >> linux-kernel@vger.kernel.org" 
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ARM:net: an issue for k which is u32, never < 0
Date: Tue, 12 Mar 2013 08:01:43 +0800	[thread overview]
Message-ID: <513E7067.5020809@asianux.com> (raw)
In-Reply-To: <CAN9tCgRw9RKRVosMAKqqYTvkEmEXEqjGm3Sp0ajE+ibd+V9a_Q@mail.gmail.com>

于 2013年03月12日 00:54, Mircea Gherzan 写道:
> 2013/3/10 Chen Gang <gang.chen@asianux.com>:
>> >
>> >   k is u32 which never < 0, need type cast, or cause issue.
>> >
>> > Signed-off-by: Chen Gang <gang.chen@asianux.com>
>> > ---
>> >  arch/arm/net/bpf_jit_32.c |    2 +-
>> >  1 files changed, 1 insertions(+), 1 deletions(-)
>> >
>> > diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c
>> > index 6828ef6..a0bd8a7 100644
>> > --- a/arch/arm/net/bpf_jit_32.c
>> > +++ b/arch/arm/net/bpf_jit_32.c
>> > @@ -576,7 +576,7 @@ load_ind:
>> >                         /* x = ((*(frame + k)) & 0xf) << 2; */
>> >                         ctx->seen |= SEEN_X | SEEN_DATA | SEEN_CALL;
>> >                         /* the interpreter should deal with the negative K */
>> > -                       if (k < 0)
>> > +                       if ((int)k < 0)
>> >                                 return -1;
>> >                         /* offset in r1: we might have to take the slow path */
>> >                         emit_mov_i(r_off, k, ctx);
>> > --
>> > 1.7.7.6
> Acked-by: Mircea Gherzan <mgherzan@gmail.com>
> 
> 

  thank you very much.

  :-)

-- 
Chen Gang

Asianux Corporation

      reply	other threads:[~2013-03-12  0:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-10  2:15 [PATCH] ARM:net: an issue for k which is u32, never < 0 Chen Gang
2013-03-10 21:12 ` David Miller
2013-03-11  4:53   ` Chen Gang
2013-03-11 16:47   ` Russell King - ARM Linux
2013-03-12  0:01     ` Chen Gang
2013-03-12 15:33     ` David Miller
2013-03-11 16:54 ` Mircea Gherzan
2013-03-12  0:01   ` Chen Gang [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=513E7067.5020809@asianux.com \
    --to=gang.chen@asianux.com \
    --cc=daniel.borkmann@tik.ee.ethz.ch \
    --cc=davem@davemloft.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mgherzan@gmail.com \
    --cc=nschichan@freebox.fr \
    /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