[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201011102325.JAF82308.OSVLFHtFJMQFOO@I-love.SAKURA.ne.jp>
Date: Wed, 10 Nov 2010 23:25:08 +0900
From: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To: eric.dumazet@...il.com
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] Prevent reading uninitialized memory with socketfilters
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?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists