netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] bpf: Track MAP pointer alignment
@ 2017-05-15 16:04 David Miller
  0 siblings, 0 replies; only message in thread
From: David Miller @ 2017-05-15 16:04 UTC (permalink / raw)
  To: daniel; +Cc: ast, alexei.starovoitov, netdev


This patch series updates the BPF verifier to properly track MAP
access alignment, just as we already do for packet pointers.

The two main elements of the implementation are putting the register
offset into a shared rather than reg type specific area of the
verifier register tracking strcutre, and also eliding packet pointer
specific checks when managing MAP pointer alignment.

More details of the implementation are in the commit message for patch
#2.

Patch #3 removes alignment restrictions from various test_verifier.c
tests which are no longer necessary with this MAP alignment
infrastructure in place.  Further improvements are possible, but
I didn't want to be overly ambitious here.

In the future we can add some MAP tests to test_align.c as well.

changes since v1:
 - Enforce offset limits just like for packet pointers
 - Handle "CONST_IMM += MAP_VALUE_ADJ"
 - Document effects on state pruning in commit message of patch #2

Signed-off-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-05-15 16:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-15 16:04 [PATCH v2 0/3] bpf: Track MAP pointer alignment David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).