[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5fe8754f-9c55-a99e-73ef-9a0f254366d9@fb.com>
Date: Wed, 10 May 2017 09:15:02 -0700
From: Alexei Starovoitov <ast@...com>
To: David Miller <davem@...emloft.net>, <daniel@...earbox.net>
CC: <alexei.starovoitov@...il.com>, <netdev@...r.kernel.org>
Subject: Re: bpf pointer alignment validation
On 5/10/17 8:57 AM, David Miller wrote:
> From: Daniel Borkmann <daniel@...earbox.net>
> Date: Wed, 10 May 2017 17:51:50 +0200
>
>> Would probably be good nevertheless to have this as a flag for
>> program loads, which gets then passed through to the verifier to
>> explicitly enable strict alignment checks.
>>
>> Might certainly aide developing & testing programs on archs with
>> efficient unaligned access and later actually running them on archs
>> that don't have it. (And at minimum, it also helps for checking
>> the test suite against the verifier.)
>
> Ok, I can implement this flag.
>
> The only question is where to put it? An unused bit in the program
> type? :-)
just add '__u32 prog_flags' to bpf_attr PROG_LOAD anon union.
There was no need for such flags in the past, hence no flags field
existed. Now it's time.
Powered by blists - more mailing lists