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: <20240112090140.u5Lac1X9@linutronix.de>
Date: Fri, 12 Jan 2024 10:01:40 +0100
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Paolo Abeni <pabeni@...hat.com>
Cc: linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
	"David S. Miller" <davem@...emloft.net>,
	Boqun Feng <boqun.feng@...il.com>,
	Daniel Borkmann <daniel@...earbox.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Frederic Weisbecker <frederic@...nel.org>,
	Ingo Molnar <mingo@...hat.com>, Jakub Kicinski <kuba@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Waiman Long <longman@...hat.com>, Will Deacon <will@...nel.org>
Subject: Re: [PATCH net-next 03/24] net: Use __napi_alloc_frag_align()
 instead of open coding it.

On 2023-12-18 08:48:56 [+0100], Paolo Abeni wrote:
> > diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> > index b157efea5dea8..de9397e45718a 100644
> > --- a/net/core/skbuff.c
> > +++ b/net/core/skbuff.c
> > @@ -311,11 +311,8 @@ void *__netdev_alloc_frag_align(unsigned int fragsz, unsigned int align_mask)
> >  
> >  		data = page_frag_alloc_align(nc, fragsz, GFP_ATOMIC, align_mask);
> >  	} else {
> > -		struct napi_alloc_cache *nc;
> > -
> >  		local_bh_disable();
> > -		nc = this_cpu_ptr(&napi_alloc_cache);
> > -		data = page_frag_alloc_align(&nc->page, fragsz, GFP_ATOMIC, align_mask);
> 
> There is a:
> 
> 	fragsz = SKB_DATA_ALIGN(fragsz);
> 
> statement just before the enclosing 'if'. I would consider moving such
> assignment inside the 'then' branch - since __napi_alloc_frag_align()
> already include that.

Okay, moved.

> /P
Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ