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]
Date:	Fri, 30 Mar 2012 11:11:51 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Jan Seiffert <kaffeemonster@...glemail.com>
Cc:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	"David S. Miller" <davem@...emloft.net>,
	Matt Evans <matt@...abs.org>
Subject: Re: [REGRESSION][PATCH] bpf_jit drops the ball on indirect negative
 mem references

Le jeudi 29 mars 2012 à 13:54 +0200, Jan Seiffert a écrit :

> 
> +	.p2align 1
>  bpf_slow_path_word:
>  	bpf_slow_path_common(4)
>  	js	bpf_error
> @@ -115,6 +116,7 @@ bpf_slow_path_word:
>  	bswap	%eax
>  	ret
>  
> +	.p2align 1
>  bpf_slow_path_half:
>  	bpf_slow_path_common(2)
>  	js	bpf_error
> @@ -123,12 +125,14 @@ bpf_slow_path_half:
>  	movzwl	%ax,%eax
>  	ret

All these ".p2align 1" are noise for this patch.

This should be done as separate patch, explaining the rationale.

...

>  			case BPF_S_LD_W_IND:
> -				func = sk_load_word_ind;
> +				func = sk_load_word;
>  common_load_ind:		seen |= SEEN_DATAREF | SEEN_XREG;
>  				t_offset = func - (image + addrs[i]);
> -				EMIT1_off32(0xbe, K);	/* mov imm32,%esi   */
> +				if (K) {
> +					EMIT2(0x8d, 0xb3); /* lea imm32(%rbx),%esi */
> +					EMIT(K, 4);
> +				} else {
> +					EMIT2(0x89,0xde); /* mov %ebx,%esi */
> +				}
>  				EMIT1_off32(0xe8, t_offset);	/* call sk_load_xxx_ind */
>  				break;


Please add the code for imm8 offsets as well ?

if (is_imm8(K))
	EMIT3(0x8d, 0x73, K); /* lea imm8(%rbx),%esi */
else
	EMIT2_off32(0x8d, 0xb3, K); /* lea imm32(%rbx),%esi */

Thanks



--
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