Re: michael_mic in crypto api?

2006-07-15 Thread Michael Wu
On Saturday 15 July 2006 03:37, Herbert Xu wrote: > I suppose the question is that what do you gain by moving it out? > If all else being equal then it's better to have a standardised > interface for accessing it. > Simplicity and consistency. Whereas the relatively simple mic part of the TKIP alg

Re: sch_htb compile fix.

2006-07-15 Thread David Miller
From: Dave Jones <[EMAIL PROTECTED]> Date: Sat, 15 Jul 2006 03:41:12 -0400 > net/sched/sch_htb.c: In function 'htb_change_class': > net/sched/sch_htb.c:1605: error: expected ';' before 'do_gettimeofday' > > Signed-off-by: Dave Jones <[EMAIL PROTECTED]> Thanks for catching this Dave. - To unsubsc

Re: [PATCH] clear skb cb on IP input

2006-07-15 Thread David Miller
From: Stephen Hemminger <[EMAIL PROTECTED]> Date: Sat, 15 Jul 2006 08:50:58 -0700 > Since skb->cb is aligned, we could optimize the initialization > slightly by just using: > *(unsigned long *)skb->cb = 0; Well, that depends upon two things. 1) How much of the ip_options really needs to be z

Re: [PATCH] clear skb cb on IP input

2006-07-15 Thread David Miller
From: Herbert Xu <[EMAIL PROTECTED]> Date: Sat, 15 Jul 2006 23:28:34 +1000 > At least this lets us get rid of a few other memsets :) > > [IPV4]: Get rid of redundant IPCB->opts initialisation > > Now that we always zero the IPCB->opts in ip_rcv, it is no longer > necessary to do so before callin

Re: [PATCH] Fix slab corruption with netem

2006-07-15 Thread Stephen Hemminger
Guillaume Chazarain wrote: Stephen Hemminger wrote : -struct netem_skb_cb *cb = (struct netem_skb_cb *)skb->cb; +/* We don't fill cb now as skb_unshare() may invalidate it */ +struct netem_skb_cb *cb = NULL; Would rather leave it unitialized, rather than setting to NULL. I find

Re: [PATCH 3/7] NetLabel: CIPSOv4 engine

2006-07-15 Thread Paul Moore
On Saturday 15 July 2006 6:39 pm, James Morris wrote: > On Fri, 14 Jul 2006, [EMAIL PROTECTED] wrote: > > +int cipso_v4_cache_add(const struct sk_buff *skb, > > + const struct netlbl_lsm_secattr *secattr) > > +{ > > It seems that this cache grows without bounds, correct? Unless I

Re: [PATCH 3/7] NetLabel: CIPSOv4 engine

2006-07-15 Thread James Morris
On Fri, 14 Jul 2006, [EMAIL PROTECTED] wrote: > +int cipso_v4_cache_add(const struct sk_buff *skb, > +const struct netlbl_lsm_secattr *secattr) > +{ It seems that this cache grows without bounds, correct? Also, how do you handle the case of a change to a cached mapping? -

Re: [PATCH] [PKT_SCHED] HTB: Add missing semicolon to fix compilation

2006-07-15 Thread Roland Dreier
Never mind -- looks like davej sent the fix directly to Linus already. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] [PKT_SCHED] HTB: Add missing semicolon to fix compilation

2006-07-15 Thread Roland Dreier
The commit b3a6251915df9e3d80d4a0d32bd8d24223906688, "[PKT_SCHED] HTB: initialize upper bound properly", broke my compile because the new line it added was missing a final semicolon. Cc: Stephen Hemminger <[EMAIL PROTECTED]> Cc: Jamal Hadi Salim <[EMAIL PROTECTED]> Signed-off-by: Roland Dreier <[E

Re: [PATCH] Fix slab corruption with netem

2006-07-15 Thread Guillaume Chazarain
Stephen Hemminger wrote : -struct netem_skb_cb *cb = (struct netem_skb_cb *)skb->cb; +/* We don't fill cb now as skb_unshare() may invalidate it */ +struct netem_skb_cb *cb = NULL; Would rather leave it unitialized, rather than setting to NULL. I find that strange. If someone mi

Re: [PATCH] clear skb cb on IP input

2006-07-15 Thread Stephen Hemminger
Herbert Xu wrote: David Miller <[EMAIL PROTECTED]> wrote: Thank goodness this thing is only 3-words in size, this is going to run on every single IPv4 packet received by the system. :-/ At least this lets us get rid of a few other memsets :) [IPV4]: Get rid of redundant IPCB->opts ini

Re: [PATCH] Fix slab corruption with netem

2006-07-15 Thread Stephen Hemminger
Guillaume Chazarain wrote: Hello, CONFIG_DEBUG_SLAB found the following bug: netem_enqueue() in sch_netem.c gets a pointer inside a slab object: struct netem_skb_cb *cb = (struct netem_skb_cb *)skb->cb; But then, the slab object may be freed: skb = skb_unshare(skb, GFP_ATOMIC) cb is still poin

Re: [PATCH 3/7] NetLabel: CIPSOv4 engine

2006-07-15 Thread Paul Moore
On Saturday 15 July 2006 9:15 am, James Morris wrote: > On Fri, 14 Jul 2006, [EMAIL PROTECTED] wrote: > > +int cipso_v4_doi_add(struct cipso_v4_doi *doi_def) > > +{ > > + if (doi_def == NULL || doi_def->doi == CIPSO_V4_DOI_UNKNOWN) > > + return -EINVAL; > > + > > + doi_def->valid = 1;

Re: [PATCH 3/7] NetLabel: CIPSOv4 engine

2006-07-15 Thread Paul Moore
On Saturday 15 July 2006 9:11 am, James Morris wrote: > On Sat, 15 Jul 2006, James Morris wrote: > > > + /* XXX - In both cases, this is kinda ugly as we have to go through > > > +the list once to determine how large of a buffer we need, > > > +drop the locks, allocate the buffer, grab the

Re: [RFC] HTB initialize upper bound properly

2006-07-15 Thread Yoichi Yuasa
On Fri, 14 Jul 2006 16:32:45 -0700 (PDT) David Miller <[EMAIL PROTECTED]> wrote: > From: Jamal Hadi Salim <[EMAIL PROTECTED]> > Date: Fri, 14 Jul 2006 18:06:26 -0400 > > > On Fri, 2006-14-07 at 12:03 -0700, Stephen Hemminger wrote: > > > The upper bound for HTB time diff needs to be scaled to PSC

Re: [PATCH 3/7] NetLabel: CIPSOv4 engine

2006-07-15 Thread Paul Moore
On Saturday 15 July 2006 9:08 am, James Morris wrote: > On Fri, 14 Jul 2006, [EMAIL PROTECTED] wrote: > > +struct sk_buff *cipso_v4_doi_dump_all(const size_t headroom) > > +{ > > + struct sk_buff *skb; > > + unsigned char *buf; > > + struct cipso_v4_doi *iter; > > + u32 doi_cnt = 0; > > +

Re: [PATCH 3/7] NetLabel: CIPSOv4 engine

2006-07-15 Thread Paul Moore
On Friday 14 July 2006 10:18 pm, James Morris wrote: > > If you're in a permanent cleanup phase, why bother clearing all of these > global variables and using temporary pointers? > > Why not just simply free each entry? The way this is coded makes it seem > like you're unsure about the safety of t

Re: [PATCH 3/7] NetLabel: CIPSOv4 engine

2006-07-15 Thread Paul Moore
On Friday 14 July 2006 10:03 pm, James Morris wrote: > On Fri, 14 Jul 2006, [EMAIL PROTECTED] wrote: > > +/** > > + * cipso_v4_bitmap_walk - Walk a bitmap looking for a bit > > > > + * cipso_v4_bitmap_setbit - Sets a single bit in a bitmap > > Can you use lib/bitmap.c instead? I looked at using th

Re: [PATCH 2/7] NetLabel: core network changes

2006-07-15 Thread Paul Moore
On Friday 14 July 2006 7:34 pm, James Morris wrote: > On Fri, 14 Jul 2006, [EMAIL PROTECTED] wrote: > > +static inline void netlbl_put_hdr(unsigned char *buffer, > > + const u32 msg_type, > > + const u16 msg_len, > > +

Re: [PATCHv2 2.6.18-rc1-mm2 1/3] net: UDP-Lite generic support

2006-07-15 Thread Herbert Xu
Gerrit Renker <[EMAIL PROTECTED]> wrote: > > diff -Nurp a/net/core/sock.c b/net/core/sock.c > --- a/net/core/sock.c 2006-07-06 09:08:24.0 +0100 > +++ b/net/core/sock.c 2006-07-14 10:17:50.0 +0100 > @@ -479,7 +479,12 @@ set_rcvbuf: >break; > >

Re: [PATCH] clear skb cb on IP input

2006-07-15 Thread Herbert Xu
David Miller <[EMAIL PROTECTED]> wrote: > > Thank goodness this thing is only 3-words in size, this is going to > run on every single IPv4 packet received by the system. :-/ At least this lets us get rid of a few other memsets :) [IPV4]: Get rid of redundant IPCB->opts initialisation Now that w

Re: [PATCH 3/7] NetLabel: CIPSOv4 engine

2006-07-15 Thread James Morris
On Fri, 14 Jul 2006, [EMAIL PROTECTED] wrote: > +int cipso_v4_doi_add(struct cipso_v4_doi *doi_def) > +{ > + if (doi_def == NULL || doi_def->doi == CIPSO_V4_DOI_UNKNOWN) > + return -EINVAL; > + > + doi_def->valid = 1; > + INIT_RCU_HEAD(&doi_def->rcu); > + INIT_LIST_HEAD

Re: [PATCH 3/7] NetLabel: CIPSOv4 engine

2006-07-15 Thread James Morris
On Sat, 15 Jul 2006, James Morris wrote: > > + /* XXX - In both cases, this is kinda ugly as we have to go through > > + the list once to determine how large of a buffer we need, > > + drop the locks, allocate the buffer, grab the locks, and > > + finally fill the buffer. The pro

Re: [PATCH 3/7] NetLabel: CIPSOv4 engine

2006-07-15 Thread James Morris
On Fri, 14 Jul 2006, [EMAIL PROTECTED] wrote: > +struct sk_buff *cipso_v4_doi_dump_all(const size_t headroom) > +{ > + struct sk_buff *skb; > + unsigned char *buf; > + struct cipso_v4_doi *iter; > + u32 doi_cnt = 0; > + ssize_t buf_len; > + > + /* XXX - In both cases, this

Re: [PATCH 08/10] MLSXFRM: Add security context to acquire messages using PF_KEY

2006-07-15 Thread Herbert Xu
On Fri, Jul 14, 2006 at 09:54:59AM -0400, James Morris wrote: > > Herbert, any review from you on this would be greatly appreciated. Looks good to me. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~he

Re: michael_mic in crypto api?

2006-07-15 Thread Herbert Xu
Michael Wu <[EMAIL PROTECTED]> wrote: > > Is there really a point to having michael_mic in crypto api? The only users > are 802.11 stacks. I can imagine arc4 being used for other purposes, but > michael_mic is very much wireless only. The only advantage of keeping > michael_mic in crypto seems

sch_htb compile fix.

2006-07-15 Thread Dave Jones
net/sched/sch_htb.c: In function 'htb_change_class': net/sched/sch_htb.c:1605: error: expected ';' before 'do_gettimeofday' Signed-off-by: Dave Jones <[EMAIL PROTECTED]> --- linux-2.6.17.noarch/net/sched/sch_htb.c~2006-07-15 03:40:14.0 -0400 +++ linux-2.6.17.noarch/net/sched/sch_htb.