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: <ZiDr+1fsQ6S4thVT@gauss3.secunet.de>
Date: Thu, 18 Apr 2024 11:46:35 +0200
From: Steffen Klassert <steffen.klassert@...unet.com>
To: Simon Horman <horms@...nel.org>
CC: <netdev@...r.kernel.org>, <devel@...ux-ipsec.org>, Paul Wouters
	<paul@...ats.ca>, Antony Antony <antony.antony@...unet.com>, Tobias Brunner
	<tobias@...ongswan.org>, Daniel Xu <dxu@...uu.xyz>
Subject: Re: [PATCH ipsec-next 1/3] xfrm: Add support for per cpu xfrm state
 handling.

On Sun, Apr 14, 2024 at 12:05:34PM +0100, Simon Horman wrote:
> On Fri, Apr 12, 2024 at 08:05:51AM +0200, Steffen Klassert wrote:
> 
> ...
> 
> > diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
> 
> ...
> 
> > @@ -1115,13 +1120,18 @@ static void xfrm_state_look_at(struct xfrm_policy *pol, struct xfrm_state *x,
> >  							&fl->u.__fl_common))
> >  			return;
> >  
> > +		if (x->pcpu_num != UINT_MAX && x->pcpu_num != pcpu_id)
> > +			return;
> > +
> >  		if (!*best ||
> > +		    ((*best)->pcpu_num == UINT_MAX && x->pcpu_num == pcpu_id) ||
> >  		    (*best)->km.dying > x->km.dying ||
> >  		    ((*best)->km.dying == x->km.dying &&
> >  		     (*best)->curlft.add_time < x->curlft.add_time))
> >  			*best = x;
> >  	} else if (x->km.state == XFRM_STATE_ACQ) {
> > -		*acq_in_progress = 1;
> > +		if (!*best || (*best && x->pcpu_num == pcpu_id))
> 
> Hi Steffen,
> 
> a minor nit from my side: I think this can be expressed as follows.
> 
> 		if (!*best || x->pcpu_num == pcpu_id)

Indeed, thanks Simon!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ