From: Krishna Kumar <krkumar@us.ibm.com>
To: "David S. Miller" <davem@redhat.com>
Cc: kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org,
netdev@oss.sgi.com, Krishna Kumar <krkumar@us.ibm.com>
Subject: Re: O/M flags against 2.6.0-test1
Date: Fri, 05 Sep 2003 11:26:47 -0700 [thread overview]
Message-ID: <3F58D567.2050201@us.ibm.com> (raw)
In-Reply-To: <20030804165746.133f370a.davem@redhat.com>
Hi Dave,
> Krishna is away, but let us make more progress on this patch.
I have just got back and I didn't see any follow up on this. I also found
that it is not yet in the 2.6.0-test4 kernel, so would like to find out what
needs to be done to get it included.
To answer your comments :
> Ok, how does this actually work? The code does RTA_PUT(...IFLA_INET6_*...)
> but IFLA_PROTINFO is not actually used anywhere. This cannot work, it makes
> these RTA attributes just look like whatever IFLA_* ones have the
> same values as the inet6 ones in this enumeration.
The inet6_fill_ifinfo adds a IFLA_PROTINFO msg to the skb and then adds the
sub-attribute like IFLA_INET6_FLAGS, IFLA_INET6_CONF, sets the length of
sub-attr, etc. Code snippet :
subattr = (struct rtattr*)skb->tail;
RTA_PUT(skb, IFLA_PROTINFO, 0, NULL);
/* return the device flags */
RTA_PUT(skb, IFLA_INET6_FLAGS, sizeof(__u32), &idev->if_flags);
> > + /* return the device sysctl params */
> > + if ((array = kmalloc(DEVCONF_MAX * sizeof(*array), GFP_KERNEL)) == NULL)
> > + goto rtattr_failure;
> > + ipv6_store_devconf(&idev->cnf, array);
> > + RTA_PUT(skb, IFLA_INET6_CONF, DEVCONF_MAX * sizeof(*array), array);
> This is what I'm talking about. Maybe there is something I'm missing.
> How does APP know to interpret IFLA_INET6_CONF as "sub-attribute"
> of IFLA_PROTINFO?
I think this is answered above. Please correct me if I have missed something.
> Also, missing "memset(array, 0, sizeof(*array));" else we leak
> uninitialized kernel memory into user space.
Is that needed since the array allocated is exactly DEVCONF_MAX sized and the
ipv6_store_devconf writes exactly DEVCONF_MAX entries and the rta_len is marked
accordinging to finish at the end of the array. But I can still add it for
clarity...
> Another bug, GFP_KERNEL memory allocation with dev_base_lock held.
Yes, that should be changed to GFP_ATOMIC.
> Otherwise I am OK with the patch.
OK, should I fix these two bugs and re-submit against test4 kernel ?
Dave, I would like to get the prefix list and O/M flags information included
in 2.4 kernel too, are you OK with that ?
Thanks,
- KK
next prev parent reply other threads:[~2003-09-05 18:26 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-14 22:35 [PATCH 1/4] Prefix List against 2.5.73 Krishna Kumar
2003-07-15 1:17 ` kuznet
2003-07-15 6:59 ` YOSHIFUJI Hideaki / 吉藤英明
2003-07-15 13:20 ` kuznet
2003-07-15 18:34 ` Krishna Kumar
2003-07-16 0:11 ` Krishna Kumar
2003-07-16 0:21 ` kuznet
2003-07-16 8:39 ` YOSHIFUJI Hideaki / 吉藤英明
2003-07-16 18:42 ` [PATCH 1/2] " Krishna Kumar
2003-07-16 18:49 ` Krishna Kumar
2003-07-16 18:50 ` [PATCH 2/2] Prefix List against 2.4.21 Krishna Kumar
2003-07-16 23:41 ` [PATCH 1/4] Prefix List against 2.5.73 kuznet
2003-07-17 0:06 ` Krishna Kumar
2003-07-17 0:38 ` kuznet
2003-07-17 21:12 ` [PATCH 1/2] Prefix List and O/M flags " Krishna Kumar
2003-07-17 22:06 ` [PATCH 2/2] Prefix List and O/M flags against 2.4.21 Krishna Kumar
2003-07-17 22:22 ` YOSHIFUJI Hideaki / 吉藤英明
2003-07-17 22:34 ` Krishna Kumar
2003-07-17 22:47 ` YOSHIFUJI Hideaki / 吉藤英明
2003-07-18 0:37 ` [PATCH 2/2] Prefix List and O/M flags against 2.5.73 Krishna Kumar
2003-07-19 6:47 ` David S. Miller
2003-07-19 7:33 ` YOSHIFUJI Hideaki / 吉藤英明
2003-07-21 0:49 ` kuznet
2003-07-21 12:17 ` David S. Miller
2003-07-21 17:16 ` Krishna Kumar
2003-07-21 1:55 ` [PATCH 2/2] Prefix List and O/M flags against 2.4.21 kuznet
2003-07-21 4:46 ` David S. Miller
2003-07-22 21:50 ` O/M flags against 2.6.0-test1 Krishna Kumar
2003-07-22 22:25 ` YOSHIFUJI Hideaki / 吉藤英明
2003-07-22 22:59 ` Krishna Kumar
2003-07-23 10:13 ` David S. Miller
2003-07-23 22:32 ` Krishna Kumar
2003-07-24 7:07 ` David S. Miller
2003-07-24 14:02 ` kuznet
2003-07-24 14:26 ` YOSHIFUJI Hideaki / 吉藤英明
2003-07-24 14:43 ` kuznet
2003-07-25 0:14 ` Krishna Kumar
2003-07-25 13:22 ` David S. Miller
2003-07-30 0:33 ` Krishna Kumar
2003-07-31 5:02 ` David S. Miller
2003-07-31 20:33 ` Krishna Kumar
2003-08-04 23:57 ` David S. Miller
2003-09-05 18:26 ` Krishna Kumar [this message]
2003-09-12 2:25 ` David S. Miller
2003-09-12 22:36 ` Krishna Kumar
2003-09-12 22:45 ` O/M flags for 2.4.22 (was "Re: O/M flags against 2.6.0-test1") Krishna Kumar
2003-09-13 0:19 ` David S. Miller
2003-09-16 22:06 ` Krishna Kumar
2003-09-20 8:18 ` David S. Miller
2003-07-22 23:52 ` [PATCH] Prefix List against 2.4.21 Krishna Kumar
2003-07-23 10:02 ` David S. Miller
2003-07-17 21:53 ` [PATCH 1/4] Prefix List against 2.5.73 YOSHIFUJI Hideaki / 吉藤英明
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=3F58D567.2050201@us.ibm.com \
--to=krkumar@us.ibm.com \
--cc=davem@redhat.com \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@oss.sgi.com \
--cc=yoshfuji@linux-ipv6.org \
/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.