[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1cab9152-a5bb-17e1-1101-f309a3be6365@kernel.org>
Date: Wed, 16 Mar 2022 08:45:05 -0600
From: David Ahern <dsahern@...nel.org>
To: Menglong Dong <menglong8.dong@...il.com>
Cc: Jakub Kicinski <kuba@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...hat.com>, xeb@...l.ru,
David Miller <davem@...emloft.net>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
Menglong Dong <imagedong@...cent.com>,
Eric Dumazet <edumazet@...gle.com>, Martin Lau <kafai@...com>,
Talal Ahmad <talalahmad@...gle.com>,
Kees Cook <keescook@...omium.org>,
Alexander Lobakin <alobakin@...me>,
Hao Peng <flyingpeng@...cent.com>,
Mengen Sun <mengensun@...cent.com>, dongli.zhang@...cle.com,
LKML <linux-kernel@...r.kernel.org>,
netdev <netdev@...r.kernel.org>,
Biao Jiang <benbjiang@...cent.com>
Subject: Re: [PATCH net-next 1/3] net: gre_demux: add skb drop reasons to
gre_rcv()
On 3/15/22 10:53 PM, Menglong Dong wrote:
> On Wed, Mar 16, 2022 at 11:49 AM David Ahern <dsahern@...nel.org> wrote:
>>
>> On 3/15/22 9:08 PM, Jakub Kicinski wrote:
>>> On Mon, 14 Mar 2022 21:33:10 +0800 menglong8.dong@...il.com wrote:
>>>> + reason = SKB_DROP_REASON_NOT_SPECIFIED;
>>>> if (!pskb_may_pull(skb, 12))
>>>> goto drop;
>>>
>>> REASON_HDR_TRUNC ?
>>>
>>>> ver = skb->data[1]&0x7f;
>>>> - if (ver >= GREPROTO_MAX)
>>>> + if (ver >= GREPROTO_MAX) {
>>>> + reason = SKB_DROP_REASON_GRE_VERSION;
>>>
>>> TBH I'm still not sure what level of granularity we should be shooting
>>> for with the reasons. I'd throw all unexpected header values into one
>>> bucket, not go for a reason per field, per protocol. But as I'm said
>>> I'm not sure myself, so we can keep what you have..
>>
>> I have stated before I do not believe every single drop point in the
>> kernel needs a unique reason code. This is overkill. The reason augments
>> information we already have -- the IP from kfree_skb tracepoint.
>
> Is this reason unnecessary? I'm not sure if the GRE version problem should
> be reported. With versions not supported by the kernel, it seems we
> can't get the
> drop reason from the packet data, as they are fine. And previous seems not
> suitable here, as it is a L4 problem.
>
Generically, it is "no support for a protocol version". That kind of
reason code + the IP tells you GRE is processing a packet with an
unsupported protocol version.
Powered by blists - more mailing lists