From: David Miller <davem@davemloft.net>
To: penguin-kernel@I-love.SAKURA.ne.jp
Cc: eric.dumazet@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH] Prevent reading uninitialized memory with socketfilters
Date: Wed, 10 Nov 2010 10:32:34 -0800 (PST) [thread overview]
Message-ID: <20101110.103234.183039029.davem@davemloft.net> (raw)
In-Reply-To: <201011102325.JAF82308.OSVLFHtFJMQFOO@I-love.SAKURA.ne.jp>
From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Date: Wed, 10 Nov 2010 23:25:08 +0900
> Just I thought...
>
>> unsigned int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen)
>> {
>> struct sock_filter *fentry; /* We walk down these */
> Can't this be "const struct sock_filter *"?
>> (...snipped...)
>> for (pc = 0; pc < flen; pc++) {
>> fentry = &filter[pc];
> Can't we do
> u32 f_k = fentry->k;
> and replace 27 repetition of fentry->k with f_k?
Yes, this feedback seems reasonable, I'll make these changes when I
apply Eric's patch, thanks!
next prev parent reply other threads:[~2010-11-10 18:32 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-09 22:28 [PATCH] Prevent reading uninitialized memory with socket filters Dan Rosenberg
2010-11-09 23:03 ` Joe Perches
2010-11-10 5:28 ` David Miller
2010-11-10 5:53 ` Eric Dumazet
2010-11-10 7:22 ` Eric Dumazet
2010-11-10 14:25 ` [PATCH] Prevent reading uninitialized memory with socketfilters Tetsuo Handa
2010-11-10 18:32 ` David Miller [this message]
2010-11-10 18:39 ` David Miller
2010-11-10 20:57 ` Ben Hutchings
2010-11-10 20:59 ` David Miller
2010-11-10 21:25 ` Ben Hutchings
2010-11-10 11:12 ` [PATCH] Prevent reading uninitialized memory with socket filters Dan Rosenberg
2010-11-10 13:19 ` Dan Rosenberg
2010-11-10 18:07 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2010-11-10 18:18 [PATCH] Prevent reading uninitialized memory with socketfilters Dan Rosenberg
2010-11-10 18:21 ` David Miller
2010-11-10 18:33 ` Eric Dumazet
2010-11-10 18:38 ` David Miller
2010-11-10 18:25 Dan Rosenberg
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=20101110.103234.183039029.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
/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).