From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sowmini Varadhan Subject: Re: [PATCH RFC net-next] packet: always ensure that we pass hard_header_len bytes in skb_headlen() to the driver Date: Mon, 30 Jan 2017 11:26:03 -0500 Message-ID: <20170130162603.GF3590@oracle.com> References: <20170127020836.GH29475@oracle.com> <20170127151119.GB25829@oracle.com> <20170127170320.GD25829@oracle.com> <20170127200639.GF25829@oracle.com> <20170127215848.GG25829@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: David Miller , Network Development To: Willem de Bruijn Return-path: Received: from userp1040.oracle.com ([156.151.31.81]:42134 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932440AbdA3Q0N (ORCPT ); Mon, 30 Jan 2017 11:26:13 -0500 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On (01/27/17 19:19), Willem de Bruijn wrote: > > other than ax25, are there variable length header protocols out there > > without ->validate, and which need the CAP_RAW_SYSIO branch? > > I don't know. An exhaustive search of protocols (by header_ops) may be > needed to say for sure. > > If there are none, then the solution indeed is quite simple. I tried to start that exhaustive search, and it can be quite daunting: if you are doing this by just code-inspection, it's easy to get it wrong.. I havent quite given up yet, but it may be simpler to have the drivers support some defensive code against bogus skb's in the Tx path (the drivers will know, for sure, what's the min non-paged len they need anyway). --Sowmini