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]
Date:	Fri, 14 Jun 2013 13:34:28 +0400
From:	Pavel Emelyanov <xemul@...allels.com>
To:	Stephen Hemminger <stephen@...workplumber.org>
CC:	David Miller <davem@...emloft.net>,
	Linux Netdev List <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] tun: Add ability to create tun device with given
 index

On 06/13/2013 08:52 PM, Stephen Hemminger wrote:
> On Thu, 13 Jun 2013 14:04:54 +0400
> Pavel Emelyanov <xemul@...allels.com> wrote:
> 
>> Tun devices cannot be created with ifidex user wants, but it's
>> required by checkpoint-restore project.
>>
>> Long time ago such ability was implemented for rtnl_ops-based
>> interface for creating links (9c7dafbf net: Allow to create links
>> with given ifindex), but the only API for creating and managing 
>> tuntap devices is ioctl-based and is evolving with adding new ones
>> (cde8b15f tuntap: add ioctl to attach or detach a file form tuntap
>> device).
>>
>> Following that trend, here's how a new ioctl that sets the ifindex
>> for device, that _will_ be created by TUNSETIFF ioctl looks like.
>> So those who want a tuntap device with the ifindex I, should open
>> the tun device, call ioctl(fd, TUNSETIFINDEX, I), then call TUNSETIFF.
>> If setifindex is not called, then it will be generated as before.
>>
>> Is it OK to extend ioctls with this, or should we rather switch the
>> whole tuntap driver on full-featured rtln-ops?
>>
>> Signed-off-by: Pavel Emelyanov <xemul@...allels.com>
>>
> 
> I see no check for the most fundamental thing, the ifindex must be unique!
> 

The register_netdev() will check for this and report -EBUSY if it is (and
add device to list if not, all atomically).

Thanks,
Pavel
--
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