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: <CAL+tcoCW2-T3tkNdV6phLTwEj6Hejp5FR13ZB6jDScUCpTV0yQ@mail.gmail.com>
Date: Wed, 17 Apr 2024 20:14:09 +0800
From: Jason Xing <kerneljasonxing@...il.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: kuba@...nel.org, pabeni@...hat.com, davem@...emloft.net, horms@...nel.org, 
	netdev@...r.kernel.org, Jason Xing <kernelxing@...cent.com>
Subject: Re: [PATCH net-next v2 2/3] net: rps: protect filter locklessly

On Wed, Apr 17, 2024 at 7:58 PM Eric Dumazet <edumazet@...gle.com> wrote:
>
> On Wed, Apr 17, 2024 at 1:52 PM Eric Dumazet <edumazet@...gle.com> wrote:
> >
> > @@ -4668,7 +4668,7 @@ bool rps_may_expire_flow(struct net_device *dev,
> > u16 rxq_index,
> >                 cpu = READ_ONCE(rflow->cpu);
> >                 if (rflow->filter == filter_id && cpu < nr_cpu_ids &&
> >                     ((int)(READ_ONCE(per_cpu(softnet_data,
> > cpu).input_queue_head) -
> > -                          READ_ONCE(rflow->last_qtail)) <
> > +                          rflow->last_qtail) <
> >                      (int)(10 * flow_table->mask)))
> >                         expire = false;
> >         }
>
> Oh well, rps_may_expire_flow() might be called from other contexts, so
> only the  READ_ONCE()
> from get_rps_cpu() is not really necessary.

Thanks for telling me the access logic about qtail in the previous email.

Yes, I'm writing exactly what you're saying now :) I can keep
protecting rflow->cpu and rflow->filter locklessly.

I can remove the unneeded annotations around qtail as you suggested
with those two patches if I can, or you can submit it first. It's up
to you :)

Thanks,
Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ