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: <58F52BA5.1090808@iogearbox.net>
Date:   Mon, 17 Apr 2017 22:55:01 +0200
From:   Daniel Borkmann <daniel@...earbox.net>
To:     David Miller <davem@...emloft.net>
CC:     sparclinux@...r.kernel.org, netdev@...r.kernel.org, ast@...nel.org
Subject: Re: [PATCH RFC] sparc64: eBPF JIT

On 04/17/2017 09:03 PM, David Miller wrote:
> From: Daniel Borkmann <daniel@...earbox.net>
> Date: Mon, 17 Apr 2017 20:44:35 +0200
>
>> On 04/17/2017 05:38 AM, David Miller wrote:
>>> +/* Map BPF registers to SPARC registers */
>>> +static const int bpf2sparc[] = {
>>> + /* return value from in-kernel function, and exit value from eBPF */
>>> +	[BPF_REG_0] = I5,
>>> +
>>> +	/* arguments from eBPF program to in-kernel function */
>>> +	[BPF_REG_1] = I0,
>>> +	[BPF_REG_2] = I1,
>>> +	[BPF_REG_3] = I2,
>>> +	[BPF_REG_4] = I3,
>>> +	[BPF_REG_5] = I4,
>>> +
>>> + /* callee saved registers that in-kernel function will preserve */
>>> +	[BPF_REG_6] = L0,
>>> +	[BPF_REG_7] = L1,
>>> +	[BPF_REG_8] = L2,
>>> +	[BPF_REG_9] = L3,
>>> +
>>> +	/* read-only frame pointer to access stack */
>>> +	[BPF_REG_FP] = FP,
>>
>> On a quick initial glance, you also need to map BPF_REG_AX. If
>> I understand the convention correctly, you could use L7 for that.
>>
>> You can test for it through tools/testing/selftests/bpf/test_kmod.sh
>> which exercises the test_bpf.ko under various sysctl combinations as
>> part of the BPF selftest suite.
>
> Oh I see, it's used for constant blinding.  I can use a global register
> for that since it's only used as a temporary right?

Yeah, correct.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ