Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751925AbdITVZG (ORCPT ); Wed, 20 Sep 2017 17:25:06 -0400 Received: from www62.your-server.de ([213.133.104.62]:45439 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751387AbdITVZD (ORCPT ); Wed, 20 Sep 2017 17:25:03 -0400 Message-ID: <59C2DCAD.3090309@iogearbox.net> Date: Wed, 20 Sep 2017 23:25:01 +0200 From: Daniel Borkmann User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Joel Fernandes , linux-kernel@vger.kernel.org CC: netdev@vger.kernel.org, alison@she-devel.com, juri.lelli@arm.com, fengc@google.com, davem@davemloft.net, ast@kernel.org, kernel-team@android.com Subject: Re: [PATCH v4 3/4] samples/bpf: Fix pt_regs issues when cross-compiling References: <20170920161159.25747-1-joelaf@google.com> <20170920161159.25747-3-joelaf@google.com> In-Reply-To: <20170920161159.25747-3-joelaf@google.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 666 Lines: 12 On 09/20/2017 06:11 PM, Joel Fernandes wrote: > BPF samples fail to build when cross-compiling for ARM64 because of incorrect > pt_regs param selection. This is because clang defines __x86_64__ and > bpf_headers thinks we're building for x86. Since clang is building for the BPF > target, it shouldn't make assumptions about what target the BPF program is > going to run on. To fix this, lets pass ARCH so the header knows which target > the BPF program is being compiled for and can use the correct pt_regs code. > > Acked-by: Alexei Starovoitov > Signed-off-by: Joel Fernandes Acked-by: Daniel Borkmann