[PATCH v2] net: filter: BPF 'JIT' compiler for PPC64

Benjamin Herrenschmidt benh at kernel.crashing.org
Tue Jul 19 19:22:02 EST 2011


On Tue, 2011-07-19 at 11:06 +0200, Eric Dumazet wrote:
> Please Matt add to your next version this check. I dont think I have
> to
> submit a one line patch later...
> 
> On x86_64, cpu_number field is already 32bit, we have some time before
> it becomes 64bit ;)
> 
> We probably should add some extra check to make sure segment doesnt
> change (%gs on x86_64, r13 on ppc64) on a future linux version.

r13 isn't really a "segment" per-se, it can change if you aren't preempt
disabled, it's the PACA pointer, which is basically a low level per-cpu
data structure, so it will change if you migrate around (but if you are
in softirq context like most of the network stack, then it won't
change).

As for the CPU number being 16-bit, this is really due to how our
spinlocks work, using that as a lock token within the same 32-bit word
as the lock flag etc... We can easily fix that later if needed but I
don't see any emergency for us.

Cheers,
Ben.




More information about the Linuxppc-dev mailing list