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: <20140327.152319.1469721259196062415.davem@davemloft.net>
Date:	Thu, 27 Mar 2014 15:23:19 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	dborkman@...hat.com
Cc:	ast@...mgrid.com, netdev@...r.kernel.org, hagen@...u.net,
	keescook@...omium.org, pmoore@...hat.com, mingo@...nel.org,
	hpa@...ux.intel.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v3 8/9] net: filter: rework/optimize internal
 BPF interpreter's instruction set

From: Daniel Borkmann <dborkman@...hat.com>
Date: Wed, 26 Mar 2014 22:06:09 +0100

>   - Adds swab insns for 32/64-bit

I don't like this.

You don't want a swab instruction, you want "endian X to endian Y".  Just
like we have "cpu_to_le32()", "le32_to_cpu()" et al. in the kernel.

That way the user can be completely oblivious as to the endianness of
the cpu it's running on.

So if you ask for a "to little endian" swab, if the chip is
little-endian then no code needs to be emitted at all, it's a nop.

There is zero reason for the BPF program emitted by userspace to be
dependant upon the cpu endianness.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ