From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Chaignon via iovisor-dev Subject: [PATCH bpf-next v4 0/2] bpf: allow map helpers access to map values directly Date: Sun, 22 Apr 2018 23:50:56 +0200 Message-ID: Reply-To: Paul Chaignon Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: iovisor-dev-9jONkmmOlFHEE9lA1F8Ukti2O/JbrIOy@public.gmane.org To: Alexei Starovoitov , Daniel Borkmann , netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Return-path: Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iovisor-dev-bounces-9jONkmmOlFHEE9lA1F8Ukti2O/JbrIOy@public.gmane.org Errors-To: iovisor-dev-bounces-9jONkmmOlFHEE9lA1F8Ukti2O/JbrIOy@public.gmane.org List-Id: netdev.vger.kernel.org Currently, helpers that expect ARG_PTR_TO_MAP_KEY and ARG_PTR_TO_MAP_VALUE can only access stack and packet memory. This patchset allows these helpers to directly access map values by passing registers of type PTR_TO_MAP_VALUE. The first patch changes the verifier; the second adds new test cases. Previous versions of this patchset were sent on the iovisor-dev mailing list only. Changelogs: Changes in v4: - Rebase. Changes in v3: - Bug fixes. - Negative test cases. Changes in v2: - Additional test cases for adjusted maps. Paul Chaignon (2): bpf: allow map helpers access to map values directly tools/bpf: add verifier tests for accesses to map kernel/bpf/verifier.c | 9 +- tools/testing/selftests/bpf/test_verifier.c | 266 ++++++++++++++++++++++++++++ 2 files changed, 274 insertions(+), 1 deletion(-) -- 2.14.1