lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 26 Jan 2011 21:23:10 +0100
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	David Miller <davem@...emloft.net>
Cc:	joe@...ches.com, netdev@...r.kernel.org, john.r.fastabend@...el.com
Subject: Re: [PATCH net-next-2.6] net_sched: sch_mqprio: dont leak kernel
 memory

Le mercredi 26 janvier 2011 à 11:55 -0800, David Miller a écrit :
> From: Joe Perches <joe@...ches.com>
> > 
> > I think the best style to use memset so that any
> > possible struct padding is guaranteed to be zeroed.
> 
> Such padding does not exist, and we won't add such padding since this is
> a user visible data structure and thus whose layout is cast in stone.
> 
> Anyways, I'm ambivalent to how this is fixed actually.

I am perfectly aware of this ugly memset() style some people prefer, and
5 % of the time they swap 2nd and 3rd param.

Two patches instead of one ;)

In this particular case, I only used existing codestyle: In the same
file I noticed :

vi +322 net/sched/sch_mqprio.c

static int mqprio_dump_class_stats(struct Qdisc *sch, unsigned long cl,
                               struct gnet_dump *d)
{
        struct net_device *dev = qdisc_dev(sch);

        if (cl <= netdev_get_num_tc(dev)) {
                int i;
                struct Qdisc *qdisc;
                struct gnet_stats_queue qstats = {0};
                struct gnet_stats_basic_packed bstats = {0};
                struct netdev_tc_txq tc = dev->tc_to_txq[cl - 1];




--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ