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] [day] [month] [year] [list]
Message-ID: <1283520496.2453.784.camel@edumazet-laptop>
Date:	Fri, 03 Sep 2010 15:28:16 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Diego Elio Pettenò <flameeyes@...il.com>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] sctp: implement SIOCINQ ioctl() (take 2)

Le vendredi 03 septembre 2010 à 14:39 +0200, Diego Elio Pettenò a
écrit :
> Il giorno ven, 03/09/2010 alle 08.55 +0200, Eric Dumazet ha scritto:
> > 
> > 
> > why use an 'unsigned long', since user pointer is a 'int *' ? 
> 
> I really just picked up the basic SIOCINQ from UDP/RDP
> 

I see, dont copy it then :)

net/ipv4/udp.c is right :

        case SIOCOUTQ:
        {
                int amount = sk_wmem_alloc_get(sk);

                return put_user(amount, (int __user *)arg);
        }

        case SIOCINQ:
        {
                unsigned int amount = first_packet_length(sk);

                if (amount)
                        /*
                         * We will only return the amount
                         * of this packet since that is all
                         * that will be read.
                         */
                        amount -= sizeof(struct udphdr);

                return put_user(amount, (int __user *)arg);
        }


Lets try to make it right too for sctp ;)

Thanks


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