[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Add ability to provide ifname when using netdev
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] [PATCH] Add ability to provide ifname when using netdev bridge or tap helper |
Date: |
Wed, 17 Jan 2018 10:28:52 -0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
On 01/17/2018 07:39 AM, Paolo Bonzini wrote:
> On 17/01/2018 11:31, Daniel P. Berrange wrote:
>>
>> eg consider the user asks for a tap device called eth1. To the
>> sysadmin the user's tap device now looks like a physical NIC.
>> This can be even worse if the host does physical NIC hotplug,
>> or uses SRIOV. eg consider the host as eth0 -> eth7 for SRIOV
>> NICs, and eth3 is given to a guest. Now a user uses the setuid
>> helper to ask for a TAP called eth3. When the SRIOV device is
>> later released by the guest it will end up called eth8, as the
>> TAP device occupies eth3. In bad cases this could even cause
>> the host mgmt layer to configure bogus addresses on the eth3
>> TAP device instead of the SRIOV device.
>>
>> If we want to allow ifname to be set via the setuid helper, then IMHO,
>> the config file for the helper *must* whitelist the various permitted
>> naming patterns.
>
> Indeed, a similar patch has been proposed several times, and always the
> response was the same as Daniel's. :)
Can this be added to docs/netdev-helpers.rst and with a comment
referencing this file in qemu-bridge-helper.c ?