lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180326160925.7ccecf5d@redhat.com>
Date:   Mon, 26 Mar 2018 16:09:25 +0200
From:   Jesper Dangaard Brouer <brouer@...hat.com>
To:     Eric Dumazet <eric.dumazet@...il.com>
Cc:     netdev@...r.kernel.org,
        BjörnTöpel <bjorn.topel@...el.com>,
        magnus.karlsson@...el.com, eugenia@...lanox.com,
        Jason Wang <jasowang@...hat.com>,
        John Fastabend <john.fastabend@...il.com>,
        Eran Ben Elisha <eranbe@...lanox.com>,
        Saeed Mahameed <saeedm@...lanox.com>, galp@...lanox.com,
        Daniel Borkmann <borkmann@...earbox.net>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>,
        Tariq Toukan <tariqt@...lanox.com>, brouer@...hat.com
Subject: Re: [bpf-next V5 PATCH 11/15] page_pool: refurbish version of
 page_pool code

On Fri, 23 Mar 2018 06:28:13 -0700
Eric Dumazet <eric.dumazet@...il.com> wrote:

> On 03/23/2018 05:18 AM, Jesper Dangaard Brouer wrote:
> 
> > +
> > +	/* Note, below struct compat code was primarily needed when
> > +	 * page_pool code lived under MM-tree control, given mmots and
> > +	 * net-next trees progress in very different rates.
> > +	 *
> > +	 * Allow kernel devel trees and driver to progress at different rates
> > +	 */
> > +	param_copy_sz = PAGE_POOL_PARAMS_SIZE;
> > +	memset(&pool->p, 0, param_copy_sz);
> > +	if (params->size < param_copy_sz) {
> > +		/* Older module calling newer kernel, handled by only
> > +		 * copying supplied size, and keep remaining params zero
> > +		 */
> > +		param_copy_sz = params->size;
> > +	} else if (params->size > param_copy_sz) {
> > +		/* Newer module calling older kernel. Need to validate
> > +		 * no new features were requested.
> > +		 */
> > +		unsigned char *addr = (unsigned char *)params + param_copy_sz;
> > +		unsigned char *end  = (unsigned char *)params + params->size;
> > +
> > +		for (; addr < end; addr++) {
> > +			if (*addr != 0)
> > +				return -E2BIG;
> > +		}
> > +	}  
> 
> I do not see the need for this part.

Okay, then I'll just drop it.
I'm considering changing page_pool_create() to just take everything
as parameters.

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ