Re: bpf: handling non BPF register names in inline assembly with -target bpf

2018-04-11 Thread Yonghong Song
On 4/11/18 4:17 PM, Arnaldo Carvalho de Melo wrote: Em Wed, Apr 11, 2018 at 04:47:29PM -0300, Arnaldo Carvalho de Melo escreveu: Em Wed, Apr 11, 2018 at 12:22:37PM -0700, Yonghong Song escreveu: Look at test bpf-script-test-kbuild.c, I think you can drop uapi/asm/ptrace.h from include file li

Re: bpf: handling non BPF register names in inline assembly with -target bpf

2018-04-11 Thread Arnaldo Carvalho de Melo
Em Wed, Apr 11, 2018 at 04:47:29PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Wed, Apr 11, 2018 at 12:22:37PM -0700, Yonghong Song escreveu: > > Look at test bpf-script-test-kbuild.c, I think you can drop > > uapi/asm/ptrace.h from include file list. This way, you do not need > > __BPF__ in x86

Re: bpf: handling non BPF register names in inline assembly with -target bpf

2018-04-11 Thread Arnaldo Carvalho de Melo
Em Wed, Apr 11, 2018 at 09:37:46AM -0700, Yonghong Song escreveu: > Hi, Arnaldo, > When I studied the bpf compilation issue with latest linus/net-next > kernel (https://patchwork.kernel.org/patch/10333829/), an alternative > approach I tried is to use __BPF__ macro. You mean you used an alternat

Re: bpf: handling non BPF register names in inline assembly with -target bpf

2018-04-11 Thread Arnaldo Carvalho de Melo
Em Wed, Apr 11, 2018 at 12:22:37PM -0700, Yonghong Song escreveu: > Look at test bpf-script-test-kbuild.c, I think you can drop > uapi/asm/ptrace.h from include file list. This way, you do not need > __BPF__ in x86/include/asm/asm.h. At the same time, you can > remove __BPF__ as well. That's even

Re: bpf: handling non BPF register names in inline assembly with -target bpf

2018-04-11 Thread Yonghong Song
On 4/11/18 11:39 AM, Arnaldo Carvalho de Melo wrote: Em Wed, Apr 11, 2018 at 09:37:46AM -0700, Yonghong Song escreveu: Hi, Arnaldo, When I studied the bpf compilation issue with latest linus/net-next kernel (https://patchwork.kernel.org/patch/10333829/), an alternative approach I tried is

bpf: handling non BPF register names in inline assembly with -target bpf

2018-04-11 Thread Yonghong Song
Hi, Arnaldo, When I studied the bpf compilation issue with latest linus/net-next kernel (https://patchwork.kernel.org/patch/10333829/), an alternative approach I tried is to use __BPF__ macro. The following patch introduced "#ifndef __BPF__" in arch/x86/include/asm/asm.h for some inline assembl