From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cong Wang Subject: Re: [Patch net v2] mlx5: fixup checksum for short ethernet frame padding Date: Wed, 28 Nov 2018 14:16:29 -0800 Message-ID: References: <20181128061013.3885-1-xiyou.wangcong@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: Linux Kernel Network Developers , Saeed Mahameed To: Eric Dumazet Return-path: Received: from mail-pf1-f176.google.com ([209.85.210.176]:37126 "EHLO mail-pf1-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726368AbeK2JTt (ORCPT ); Thu, 29 Nov 2018 04:19:49 -0500 Received: by mail-pf1-f176.google.com with SMTP id y126so2971908pfb.4 for ; Wed, 28 Nov 2018 14:16:42 -0800 (PST) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Wed, Nov 28, 2018 at 7:00 AM Eric Dumazet wrote: > > Nice packet of death alert. > > pad_len can be 0xFFFFFF67 here, if frame_len is smaller than pad_offset. Unless IP header is malformed, how could it be? Speaking of IP header sanity, I am totally aware of it, I don't check it because I know get_ip_proto() doesn't check either, it must be hardware which verifies the sanity. > > Really I suggest you set ip_summed to CHECKSUM_NONE, then remove the > initial test ( if (likely(frame_len > ETH_ZLEN)) ...) > > Until the firmware is fixed. Hmm, why setting to CHECKSUM_NONE could get rid of the minimum ethernet frame check? I am lost, there is no bug for packet > ETH_ZLEN _for me_, what needs to fix here? Overall, you keep pushing me to fix a bug I don't observe. I don't understand why. If you see it, please come up with your own patch? Why do I have to fix the problem you see?? > > Otherwise frames with a wrong checksum and some non zero padding could > potentially > be seen as correct frames. (Probability of 1/65536) > > Do not focus on your immediate problem (small packets being padded by > a non malicious entity) Again, why _I_ should fix a problem I never observe? Why is it not you who fix the problem you find during code review? No to mention I have no environment to test it even if I really want to fix. I can' take such a risk. Thanks.