From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753292AbcAMXg4 (ORCPT ); Wed, 13 Jan 2016 18:36:56 -0500 Received: from Chamillionaire.breakpoint.cc ([80.244.247.6]:33560 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752847AbcAMXgg (ORCPT ); Wed, 13 Jan 2016 18:36:36 -0500 Date: Thu, 14 Jan 2016 00:36:28 +0100 From: Florian Westphal To: David Miller Cc: koct9i@gmail.com, netdev@vger.kernel.org, dev@openvswitch.org, cascardo@redhat.com, edumazet@google.com, fw@strlen.de, linux-kernel@vger.kernel.org, pshelar@nicira.com, xiyou.wangcong@gmail.com Subject: Re: [PATCH v2] net: preserve IP control block during GSO segmentation Message-ID: <20160113233628.GA10507@breakpoint.cc> References: <145225570625.30903.13936642758071448458.stgit@zurg> <20160113.155112.119405358547782630.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160113.155112.119405358547782630.davem@davemloft.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org David Miller wrote: > From: Konstantin Khlebnikov > Date: Fri, 08 Jan 2016 15:21:46 +0300 > > > Skb_gso_segment() uses skb control block during segmentation. > > This patch adds 32-bytes room for previous control block which > > will be copied into all resulting segments. > > > > This patch fixes kernel crash during fragmenting forwarded packets. > > Fragmentation requires valid IP CB in skb for clearing ip options. > > Also patch removes custom save/restore in ovs code, now it's redundant. > > > > Signed-off-by: Konstantin Khlebnikov > > Link: http://lkml.kernel.org/r/CALYGNiP-0MZ-FExV2HutTvE9U-QQtkKSoE--KN=JQE5STYsjAA@mail.gmail.com > > If this works I definitely prefer this approach to the other patch > where the CB is copied back and forth. I quite frankly don't care and just like you to apply one or the other; use coin toss if needed :-} I would prefer to use a on-stack state since there is no need to use skb->cb (no queueing) but when I gave it a try it got out of hand rather quick :-/ Anyway Konstantins approach is safe since we only need this in ovs/ip forward + nfnetlink_queue cases and in all of these there is enough room at the cb end (for now at least).