netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: Krishna Kumar <krkumar@us.ibm.com>
Cc: kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org,
	netdev@oss.sgi.com, krkumar@us.ibm.com
Subject: Re: O/M flags against 2.6.0-test1
Date: Mon, 4 Aug 2003 16:57:46 -0700	[thread overview]
Message-ID: <20030804165746.133f370a.davem@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0307311330200.27478-100000@DYN318430>

On Thu, 31 Jul 2003 13:33:27 -0700 (PDT)
Krishna Kumar <krkumar@us.ibm.com> wrote:

> > Ok, but then please use "__s32".
> 
> OK, slowly getting there :-)
> 
> Latest patch follows :

Krishna is away, but let us make more progress on this patch.
I see some problem with it that still need to be resolved:

> +/* Subtype attributes for IFLA_PROTINFO */
> +enum
> +{
> +	IFLA_INET6_UNSPEC,
> +	IFLA_INET6_FLAGS,	/* link flags			*/
> +	IFLA_INET6_CONF,	/* sysctl parameters		*/
> +	IFLA_INET6_STATS,	/* statistics			*/
> +	IFLA_INET6_MCAST,	/* MC things. What of them?	*/
> +};
> +
> +#define IFLA_INET6_MAX	IFLA_INET6_MCAST

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.

Alexey, how did you intend this stuff to be done?  Cerainly not
like this :-)

> +	/* 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?

Also, missing "memset(array, 0, sizeof(*array));" else we leak
uninitialized kernel memory into user space.

Another bug, GFP_KERNEL memory allocation with dev_base_lock held.

Otherwise I am OK with the patch.

  reply	other threads:[~2003-08-04 23:57 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 [this message]
2003-09-05 18:26                                         ` Krishna Kumar
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=20030804165746.133f370a.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=krkumar@us.ibm.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 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).