[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1310131824180.2262@linmac>
Date: Sun, 13 Oct 2013 18:25:34 +0400 (MSK)
From: malc <av1474@...tv.ru>
To: Vladimir Murzin <murzin.v@...il.com>
cc: David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
kaffeemonster@...glemail.com, edumazet@...gle.com,
mingo@...hat.com, tglx@...utronix.de
Subject: Re: [PATCH 2/3] net: bpf jit: x86: optimize choose_load_func error
path
On Sun, 13 Oct 2013, Vladimir Murzin wrote:
> On Fri, Oct 11, 2013 at 02:56:13PM -0400, David Miller wrote:
> > From: Vladimir Murzin <murzin.v@...il.com>
> > Date: Tue, 8 Oct 2013 20:31:49 +0400
> >
[..snip..]
> -common_load: seen |= SEEN_DATAREF;
> +common_load:
> + if (!func) {
> + CLEAR_A();
> + EIT_JMP(cleanup_addr - addrs[i]);
EMIT? (likewise elsewhere)
> + break;
> + }
> +
> + seen |= SEEN_DATAREF;
> t_offset = func - (image + addrs[i]);
> EMIT1_off32(0xbe, K); /* mov imm32,%esi */
> EMIT1_off32(0xe8, t_offset); /* call */
> @@ -624,6 +631,13 @@ common_load: seen |= SEEN_DATAREF;
> goto common_load;
> case BPF_S_LDX_B_MSH:
> func = CHOOSE_LOAD_FUNC(K, sk_load_byte_msh);
> +
> + if (!func) {
> + CLEAR_A();
> + EIT_JMP(cleanup_addr - addrs[i]);
> + break;
> + }
> +
> seen |= SEEN_DATAREF | SEEN_XREG;
> t_offset = func - (image + addrs[i]);
> EMIT1_off32(0xbe, K); /* mov imm32,%esi */
>
--
mailto:av1474@...tv.ru
--
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