From: Alexei Starovoitov Subject: Re: [bpf PATCH 1/2] bpf: Document sockmap '-target bpf' requirement for PROG_TYPE_SK_MSG Date: Mon, 23 Apr 2018 13:35:11 -0600 Message-ID: <20180423193510.2dm6ur34r6mvtjsv@ast-mbp> References: <20180423191102.21348.85601.stgit@john-Precision-Tower-5810> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: ast@kernel.org, daniel@iogearbox.net, netdev@vger.kernel.org To: John Fastabend Return-path: Received: from mail-pf0-f181.google.com ([209.85.192.181]:45457 "EHLO mail-pf0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932244AbeDWTfO (ORCPT ); Mon, 23 Apr 2018 15:35:14 -0400 Received: by mail-pf0-f181.google.com with SMTP id l27so10132738pfk.12 for ; Mon, 23 Apr 2018 12:35:14 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20180423191102.21348.85601.stgit@john-Precision-Tower-5810> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, Apr 23, 2018 at 12:11:02PM -0700, John Fastabend wrote: > BPF_PROG_TYPE_SK_MSG programs use a 'void *' for both data and the > data_end pointers. Additionally, the verifier ensures that every > accesses into the values is a __u64 read. This correctly maps on > to the BPF 64-bit architecture. > > However, to ensure that when building on 32bit architectures that > clang uses correct types the '-target bpf' option _must_ be > specified. To make this clear add a note to the Documentation. > > Signed-off-by: John Fastabend Acked-by: Alexei Starovoitov