From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexei Starovoitov Subject: Re: [PATCH net-next 5/7] ebpf: export BPF_PSEUDO_MAP_FD to uapi Date: Tue, 10 Feb 2015 17:39:35 -0800 Message-ID: References: <2b58ccd3ab577142297a7995fda7a065e51abef8.1423610452.git.daniel@iogearbox.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: =?UTF-8?B?SmnFmcOtIFDDrXJrbw==?= , Network Development To: Daniel Borkmann Return-path: Received: from mail-qa0-f54.google.com ([209.85.216.54]:65486 "EHLO mail-qa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751075AbbBKBj4 (ORCPT ); Tue, 10 Feb 2015 20:39:56 -0500 Received: by mail-qa0-f54.google.com with SMTP id x12so473385qac.13 for ; Tue, 10 Feb 2015 17:39:55 -0800 (PST) In-Reply-To: <2b58ccd3ab577142297a7995fda7a065e51abef8.1423610452.git.daniel@iogearbox.net> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, Feb 10, 2015 at 4:15 PM, Daniel Borkmann wrote: > We need to export BPF_PSEUDO_MAP_FD to user space, as it's used in > the ELF BPF loader where instructions are being loaded that need > map fixups (relocations). An initial stage loads all maps into the > kernel, and later on replaces related instructions in the eBPF blob > with BPF_PSEUDO_MAP_FD as source register and the actual fd as > immediate value. The kernel verifier recognizes this keyword and > replaces the map fd with a real pointer internally. > > Signed-off-by: Daniel Borkmann oops. thanks. didn't realize that I forgot to add it to uapi. Acked-by: Alexei Starovoitov