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: <55285140.9030902@plumgrid.com>
Date:	Fri, 10 Apr 2015 15:40:00 -0700
From:	Alexei Starovoitov <ast@...mgrid.com>
To:	Eric Dumazet <eric.dumazet@...il.com>,
	Daniel Borkmann <daniel@...earbox.net>
CC:	davem@...emloft.net, jhs@...atatu.com, edumazet@...gle.com,
	netdev@...r.kernel.org
Subject: Re: [PATCH net-next] net: use jump label patching for ingress qdisc
 in __netif_receive_skb_core

On 4/10/15 3:30 PM, Eric Dumazet wrote:
> On Fri, 2015-04-10 at 23:07 +0200, Daniel Borkmann wrote:
>> Even if we make use of classifier and actions from the egress
>> path, we're going into handle_ing() executing additional code
>> on a per-packet cost for ingress qdisc, just to realize that
>> nothing is attached on ingress.
>>
>> Instead, this can just be blinded out as a no-op entirely with
>> the use of a static key. On input fast-path, we already make
>> use of static keys in various places, e.g. skb time stamping,
>> in RPS, etc. It makes sense to not waste time when we're assured
>> that no ingress qdisc is attached anywhere.
>>
>> Enabling/disabling of that code path is being done via two
>> helpers, namely net_{inc,dec}_ingress_queue(), that are being
>> invoked under RTNL mutex when a ingress qdisc is being either
>> initialized or destructed.
>>
>> Signed-off-by: Daniel Borkmann <daniel@...earbox.net>
>
> My concern about jump labels is they add a conditional on arches where
> CONFIG_JUMP_LABEL=n
>
> They look great on x86, but not sure about say MIPS.

mips has HAVE_ARCH_JUMP_LABEL, so it should be fast there.
I think all major archs are covered:
arch/arm/Kconfig:       select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL
arch/arm64/Kconfig:     select HAVE_ARCH_JUMP_LABEL
arch/mips/Kconfig:      select HAVE_ARCH_JUMP_LABEL
arch/powerpc/Kconfig:   select HAVE_ARCH_JUMP_LABEL
arch/s390/Kconfig:      select HAVE_ARCH_JUMP_LABEL if !MARCH_G5
arch/sparc/Kconfig:     select HAVE_ARCH_JUMP_LABEL if SPARC64
arch/x86/Kconfig:       select HAVE_ARCH_JUMP_LABEL


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ