From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754153AbdFNAVm (ORCPT ); Tue, 13 Jun 2017 20:21:42 -0400 Received: from www62.your-server.de ([213.133.104.62]:40056 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752259AbdFNAVk (ORCPT ); Tue, 13 Jun 2017 20:21:40 -0400 Message-ID: <59408190.6030206@iogearbox.net> Date: Wed, 14 Jun 2017 02:21:36 +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: David Daney , Alexei Starovoitov , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org CC: linux-mips@linux-mips.org, ralf@linux-mips.org Subject: Re: [PATCH 4/4] samples/bpf: Fix tracex5 to work with MIPS syscalls. References: <20170613234938.4823-1-david.daney@cavium.com> <20170613234938.4823-5-david.daney@cavium.com> In-Reply-To: <20170613234938.4823-5-david.daney@cavium.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 On 06/14/2017 01:49 AM, David Daney wrote: > There are two problems: > > 1) In MIPS the __NR_* macros expand to an expression, this causes the > sections of the object file to be named like: > > . > . > . > [ 5] kprobe/(5000 + 1) PROGBITS 0000000000000000 000160 ... > [ 6] kprobe/(5000 + 0) PROGBITS 0000000000000000 000258 ... > [ 7] kprobe/(5000 + 9) PROGBITS 0000000000000000 000348 ... > . > . > . > > The fix here is to use the "asm_offsets" trick to evaluate the macros > in the C compiler and generate a header file with a usable form of the > macros. > > 2) MIPS syscall numbers start at 5000, so we need a bigger map to hold > the sub-programs. > > Signed-off-by: David Daney Acked-by: Daniel Borkmann