[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180723.214109.32924668491950691.davem@davemloft.net>
Date: Mon, 23 Jul 2018 21:41:09 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: davejwatson@...com
Cc: vakul.garg@....com, netdev@...r.kernel.org, borisp@...lanox.com,
aviadye@...lanox.com, doronrk@...com
Subject: Re: [net-next v5 3/3] net/tls: Remove redundant array allocation.
From: Dave Watson <davejwatson@...com>
Date: Mon, 23 Jul 2018 09:35:09 -0700
> I don't think this patch is safe as-is. sgin_arr is a stack array of
> size MAX_SKB_FRAGS (+ overhead), while my read of skb_cow_data is that
> it walks the whole chain of skbs from skb->next, and can return any
> number of segments. Therefore we need to heap allocate. I think I
> copied the IPSEC code here.
Ok I see what you are saying.
So it means that, when a non-NULL sgout is passed into decrypt_skb(),
via decrypt_skb_update(), via tls_sw_recvmsg() it means that it is the
zerocopy case and you know that you only have page frags and no SKB
frag list, right?
I agree with you that this change is therefore incorrect.
Powered by blists - more mailing lists