Thread (28 messages) flat view 28 messages, 7 authors, 2020-09-25

Re: [PATCH bpf-next 2/6] bpf, net: rework cookie generator as per-cpu one

From: Jakub Kicinski <kuba@kernel.org>
Date: 2020-09-25 15:32:00
Also in: bpf

On Fri, 25 Sep 2020 17:15:17 +0200 Eric Dumazet wrote:
On 9/25/20 5:00 PM, Jakub Kicinski wrote:
quoted
Is this_cpu_inc() in itself atomic?
To answer my own question - it is :)
quoted
                    unlikely((val & (COOKIE_LOCAL_BATCH - 1)) == 0))

Can we reasonably assume we won't have more than 4k CPUs and just
statically divide this space by encoding CPU id in top bits?  
This might give some food to side channel attacks, since this would
give an indication of cpu that allocated the id.

Also, I hear that some distros enabled 8K cpus.
Ok :(
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help