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]
Message-ID: <9ce6ca48-9199-dc9c-296a-7ad61fd1ac31@oracle.com>
Date:   Wed, 2 Mar 2022 10:26:05 -0800
From:   Dongli Zhang <dongli.zhang@...cle.com>
To:     imagedong(董梦龙) <imagedong@...cent.com>,
        David Ahern <dsahern@...il.com>,
        Jakub Kicinski <kuba@...nel.org>
Cc:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "rostedt@...dmis.org" <rostedt@...dmis.org>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "ast@...nel.org" <ast@...nel.org>,
        "daniel@...earbox.net" <daniel@...earbox.net>,
        "andrii@...nel.org" <andrii@...nel.org>,
        "joao.m.martins@...cle.com" <joao.m.martins@...cle.com>,
        "joe.jin@...cle.com" <joe.jin@...cle.com>,
        "edumazet@...gle.com" <edumazet@...gle.com>
Subject: Re: [Internet]Re: [PATCH net-next v4 4/4] net: tun: track dropped skb
 via kfree_skb_reason()

Hi Menglong,

On 3/1/22 8:16 PM, imagedong(董梦龙) wrote:
> 
> 
> On 2022/3/2 AM 11:29,“David Ahern”<dsahern@...il.com> write:
> 
>> On 3/1/22 7:50 PM, Jakub Kicinski wrote:
>>> On Sat, 26 Feb 2022 00:49:29 -0800 Dongli Zhang wrote:
>>>> +	SKB_DROP_REASON_SKB_PULL,	/* failed to pull sk_buff data */
>>>> +	SKB_DROP_REASON_SKB_TRIM,	/* failed to trim sk_buff data */
>>>
> [...]
>>>>  	SKB_DROP_REASON_DEV_HDR,	/* there is something wrong with
>>>>  					 * device driver specific header
>>>>  					 */
>>>> +	SKB_DROP_REASON_DEV_READY,	/* device is not ready */
>>>
>>> What is ready? link is not up? peer not connected? can we expand?
>>
>> As I recall in this case it is the tfile for a tun device disappeared -
>> ie., a race condition.
> 
> This seems is that tun is not attached to a file (the tun device file
> is not opened?) Maybe TAP_UNATTACHED is more suitable :)
> 
> 

Thank you very much for the suggestions! TAP_UNATTACHED is more suitable.

The tap/tun are only two of drivers in linux kernel. We have already introduced
another two tap/tun specific reasons.

My concern is we may finally have too many reasons. That's why I am always
trying to define the reason as generic as possible so that they will be re-used
by most networking drivers.

We may expand the reason if it is fine to have too many reasons for skb_drop_reason.

Dongli Zhang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ