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: <a9f75b06-3534-2b8d-de06-4f18dae8ed95@cambridgegreys.com>
Date:   Fri, 12 Jul 2019 10:40:47 +0100
From:   Anton Ivanov <anton.ivanov@...bridgegreys.com>
To:     Richard Weinberger <richard.weinberger@...il.com>,
        Алексей <ne-vlezay80@...dex.ru>
Cc:     netdev@...r.kernel.org, linux-um@...ts.infradead.org
Subject: Re: [PATCH] User mode linux bump maximum MTU tuntap interface
 [RESAND]

On 12/07/2019 10:22, Anton Ivanov wrote:
> On 02/07/2019 15:40, Richard Weinberger wrote:
>> CC'ing um folks.
>>
>> On Tue, Jul 2, 2019 at 3:01 PM Алексей <ne-vlezay80@...dex.ru> wrote:
>>>
>>> Hello, the parameter  ETH_MAX_PACKET limited to 1500 bytes is the not
>>> support jumbo frames.
>>>
>>> This patch change ETH_MAX_PACKET the 65535 bytes to jumbo frame support
>>> with user mode linux tuntap driver.
>>>
>>>
>>> PATCH:
>>>
>>> -------------------
>>>
>>>
>>> diff -ruNP ../linux_orig/linux-5.1/arch/um/include/shared/net_user.h
>>> ./arch/um/include/shared/net_user.h
>>> --- a/arch/um/include/shared/net_user.h    2019-05-06 00:42:58.000000000
>>> +0000
>>> +++ b/arch/um/include/shared/net_user.h    2019-07-02 07:14:13.593333356
>>> +0000
>>> @@ -9,7 +9,7 @@
>>>   #define ETH_ADDR_LEN (6)
>>>   #define ETH_HEADER_ETHERTAP (16)
>>>   #define ETH_HEADER_OTHER (26) /* 14 for ethernet + VLAN + MPLS for
>>> crazy people */
>>> -#define ETH_MAX_PACKET (1500)
>>> +#define ETH_MAX_PACKET (65535)
>>>
>>>   #define UML_NET_VERSION (4)
>>>
>>> -------------------
>>>
>>>
>>
>>
> 
> This does not quite work because in some of the drivers you get extra 
> added on top of this constant.
> 
> I am going to see what can be done to fix the old net* drivers, imho we 
> should start phasing them out in favor of the vector ones.
> 

In fact it does not work even for lower values because the old net_ 
family assumes a contiguous skb buffer and uses read/write functions 
which read the whole packet into it at once. That is the buffer it get 
if it asks for anything less than SKB_WITH_OVERHEAD(PAGE_SIZE).

If it asks for more there is no guarantee that the resulting buffer will 
be contiguous - it may get a segmented skb and will need to use 
appropriate functions to read/write into segments.

If you just up the MTU without fixing the underlying transport you get 
memory corruption.

If we are to support this I have to rewrite the whole driver set and it 
will frankly be easier to just make them use vector drivers underneath 
and set the names to be ethX instead.

In fact, I will probably do a patch that does that the moment I finish 
adding all existing socket transports to vector_user.c.

-- 
Anton R. Ivanov
Cambridgegreys Limited. Registered in England. Company Number 10273661
https://www.cambridgegreys.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ