bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bpf: s390: add JIT support for bpf line info
@ 2019-08-29 16:13 Yauheni Kaliuta
  2019-08-29 16:16 ` Yauheni Kaliuta
  0 siblings, 1 reply; 7+ messages in thread
From: Yauheni Kaliuta @ 2019-08-29 16:13 UTC (permalink / raw)
  To: bpf; +Cc: daniel, iii, jolsa

This adds support for generating bpf line info for JITed programs
like commit 6f20c71d8505 ("bpf: powerpc64: add JIT support for bpf
line info") does for powerpc.

Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
---

The patch is on top of "bpf: s390: add JIT support for multi-function
programs"

---
 arch/s390/net/bpf_jit_comp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c
index b6801d854c77..4ef783b67dfc 100644
--- a/arch/s390/net/bpf_jit_comp.c
+++ b/arch/s390/net/bpf_jit_comp.c
@@ -1420,6 +1420,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *fp)
 	fp->jited_len = jit.size;
 
 	if (!fp->is_func || extra_pass) {
+		bpf_prog_fill_jited_linfo(fp, jit.addrs);
 free_addrs:
 		kfree(jit.addrs);
 		kfree(jit_data);
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] bpf: s390: add JIT support for bpf line info
  2019-08-29 16:13 [PATCH] bpf: s390: add JIT support for bpf line info Yauheni Kaliuta
@ 2019-08-29 16:16 ` Yauheni Kaliuta
  2019-08-29 20:02   ` [PATCH v2] " Yauheni Kaliuta
  0 siblings, 1 reply; 7+ messages in thread
From: Yauheni Kaliuta @ 2019-08-29 16:16 UTC (permalink / raw)
  To: bpf; +Cc: daniel, iii, jolsa

Hi!

Hold on, I should check it a bit more.

>>>>> On Thu, 29 Aug 2019 19:13:30 +0300, Yauheni Kaliuta  wrote:

 > This adds support for generating bpf line info for JITed programs
 > like commit 6f20c71d8505 ("bpf: powerpc64: add JIT support for bpf
 > line info") does for powerpc.

 > Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
 > ---

 > The patch is on top of "bpf: s390: add JIT support for multi-function
 > programs"

 > ---
 >  arch/s390/net/bpf_jit_comp.c | 1 +
 >  1 file changed, 1 insertion(+)

 > diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c
 > index b6801d854c77..4ef783b67dfc 100644
 > --- a/arch/s390/net/bpf_jit_comp.c
 > +++ b/arch/s390/net/bpf_jit_comp.c
 > @@ -1420,6 +1420,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *fp)
 > fp-> jited_len = jit.size;
 
 >  	if (!fp->is_func || extra_pass) {
 > +		bpf_prog_fill_jited_linfo(fp, jit.addrs);
 >  free_addrs:
 >  		kfree(jit.addrs);
 >  		kfree(jit_data);
 > -- 
 > 2.22.0


-- 
WBR,
Yauheni Kaliuta

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2] bpf: s390: add JIT support for bpf line info
  2019-08-29 16:16 ` Yauheni Kaliuta
@ 2019-08-29 20:02   ` Yauheni Kaliuta
  2019-08-30 11:39     ` Ilya Leoshkevich
  2019-08-30 11:51     ` [PATCH v3] " Yauheni Kaliuta
  0 siblings, 2 replies; 7+ messages in thread
From: Yauheni Kaliuta @ 2019-08-29 20:02 UTC (permalink / raw)
  To: bpf; +Cc: daniel, iii, jolsa, yauheni.kaliuta

This adds support for generating bpf line info for JITed programs
like commit 6f20c71d8505 ("bpf: powerpc64: add JIT support for bpf
line info") does for powerpc, but it should pass the array starting
from 1 like x86, see commit 7c2e988f400e ("bpf: fix x64 JIT code
generation for jmp to 1st insn".

That fixes test_btf.

Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
---

The patch is on top of "bpf: s390: add JIT support for multi-function
programs"

V1->V1:

- pass address array starting from element 1.

---
 arch/s390/net/bpf_jit_comp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c
index b6801d854c77..ce88211b9c6c 100644
--- a/arch/s390/net/bpf_jit_comp.c
+++ b/arch/s390/net/bpf_jit_comp.c
@@ -1420,6 +1420,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *fp)
 	fp->jited_len = jit.size;
 
 	if (!fp->is_func || extra_pass) {
+		bpf_prog_fill_jited_linfo(fp, jit.addrs + 1);
 free_addrs:
 		kfree(jit.addrs);
 		kfree(jit_data);
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] bpf: s390: add JIT support for bpf line info
  2019-08-29 20:02   ` [PATCH v2] " Yauheni Kaliuta
@ 2019-08-30 11:39     ` Ilya Leoshkevich
  2019-08-30 11:47       ` Yauheni Kaliuta
  2019-08-30 11:51     ` [PATCH v3] " Yauheni Kaliuta
  1 sibling, 1 reply; 7+ messages in thread
From: Ilya Leoshkevich @ 2019-08-30 11:39 UTC (permalink / raw)
  To: Yauheni Kaliuta; +Cc: bpf, daniel, jolsa

> Am 29.08.2019 um 22:02 schrieb Yauheni Kaliuta <yauheni.kaliuta@redhat.com>:
> 
> This adds support for generating bpf line info for JITed programs
> like commit 6f20c71d8505 ("bpf: powerpc64: add JIT support for bpf
> line info") does for powerpc, but it should pass the array starting
> from 1 like x86, see commit 7c2e988f400e ("bpf: fix x64 JIT code
> generation for jmp to 1st insn".
> 
> That fixes test_btf.
> 
> Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
> ---
> 
> The patch is on top of "bpf: s390: add JIT support for multi-function
> programs"
> 
> V1->V1:
> 
> - pass address array starting from element 1.
> 
> ---
> arch/s390/net/bpf_jit_comp.c | 1 +
> 1 file changed, 1 insertion(+)
> 
> diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c
> index b6801d854c77..ce88211b9c6c 100644
> --- a/arch/s390/net/bpf_jit_comp.c
> +++ b/arch/s390/net/bpf_jit_comp.c
> @@ -1420,6 +1420,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *fp)
> 	fp->jited_len = jit.size;
> 
> 	if (!fp->is_func || extra_pass) {
> +		bpf_prog_fill_jited_linfo(fp, jit.addrs + 1);
> free_addrs:
> 		kfree(jit.addrs);
> 		kfree(jit_data);
> -- 
> 2.22.0
> 

Checkpatch complains about the missing ")" at the end of 7c2e988f400e
commit description. With that fixed:

Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Tested-by: Ilya Leoshkevich <iii@linux.ibm.com>

Thanks!

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] bpf: s390: add JIT support for bpf line info
  2019-08-30 11:39     ` Ilya Leoshkevich
@ 2019-08-30 11:47       ` Yauheni Kaliuta
  0 siblings, 0 replies; 7+ messages in thread
From: Yauheni Kaliuta @ 2019-08-30 11:47 UTC (permalink / raw)
  To: Ilya Leoshkevich; +Cc: bpf, daniel, jolsa

Hi, Ilya!

>>>>> On Fri, 30 Aug 2019 13:39:19 +0200, Ilya Leoshkevich  wrote:

 >> Am 29.08.2019 um 22:02 schrieb Yauheni Kaliuta <yauheni.kaliuta@redhat.com>:
 >> 
 >> This adds support for generating bpf line info for JITed programs
 >> like commit 6f20c71d8505 ("bpf: powerpc64: add JIT support for bpf
 >> line info") does for powerpc, but it should pass the array starting
 >> from 1 like x86, see commit 7c2e988f400e ("bpf: fix x64 JIT code
 >> generation for jmp to 1st insn".
 >> 
 >> That fixes test_btf.
 >> 
 >> Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
 >> ---
 >> 
 >> The patch is on top of "bpf: s390: add JIT support for multi-function
 >> programs"
 >> 
 >> V1-> V1:
 >> 
 >> - pass address array starting from element 1.
 >> 
 >> ---
 >> arch/s390/net/bpf_jit_comp.c | 1 +
 >> 1 file changed, 1 insertion(+)
 >> 
 >> diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c
 >> index b6801d854c77..ce88211b9c6c 100644
 >> --- a/arch/s390/net/bpf_jit_comp.c
 >> +++ b/arch/s390/net/bpf_jit_comp.c
 >> @@ -1420,6 +1420,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *fp)
 fp-> jited_len = jit.size;
 >> 
 >> if (!fp->is_func || extra_pass) {
 >> +		bpf_prog_fill_jited_linfo(fp, jit.addrs + 1);
 >> free_addrs:
 >> kfree(jit.addrs);
 >> kfree(jit_data);
 >> -- 
 >> 2.22.0
 >> 

 > Checkpatch complains about the missing ")" at the end of
 > 7c2e988f400e commit description. With that fixed:

Huh, looks like I did not run checkpatch after the very last
editing :((

Thanks! Just a moment

 > Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
 > Tested-by: Ilya Leoshkevich <iii@linux.ibm.com>

 > Thanks!

-- 
WBR,
Yauheni Kaliuta

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v3] bpf: s390: add JIT support for bpf line info
  2019-08-29 20:02   ` [PATCH v2] " Yauheni Kaliuta
  2019-08-30 11:39     ` Ilya Leoshkevich
@ 2019-08-30 11:51     ` Yauheni Kaliuta
  2019-09-03 13:40       ` Daniel Borkmann
  1 sibling, 1 reply; 7+ messages in thread
From: Yauheni Kaliuta @ 2019-08-30 11:51 UTC (permalink / raw)
  To: bpf; +Cc: daniel, iii, jolsa

This adds support for generating bpf line info for JITed programs
like commit 6f20c71d8505 ("bpf: powerpc64: add JIT support for bpf
line info") does for powerpc, but it should pass the array starting
from 1 like x86, see commit 7c2e988f400e ("bpf: fix x64 JIT code
generation for jmp to 1st insn").

That fixes test_btf.

Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
---

The patch is on top of "bpf: s390: add JIT support for multi-function
programs"
 
V1->V2:

- pass address array starting from element 1.

V2->V3:

- Fix braces in the commit message.

---
 arch/s390/net/bpf_jit_comp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c
index b6801d854c77..ce88211b9c6c 100644
--- a/arch/s390/net/bpf_jit_comp.c
+++ b/arch/s390/net/bpf_jit_comp.c
@@ -1420,6 +1420,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *fp)
 	fp->jited_len = jit.size;
 
 	if (!fp->is_func || extra_pass) {
+		bpf_prog_fill_jited_linfo(fp, jit.addrs + 1);
 free_addrs:
 		kfree(jit.addrs);
 		kfree(jit_data);
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v3] bpf: s390: add JIT support for bpf line info
  2019-08-30 11:51     ` [PATCH v3] " Yauheni Kaliuta
@ 2019-09-03 13:40       ` Daniel Borkmann
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Borkmann @ 2019-09-03 13:40 UTC (permalink / raw)
  To: Yauheni Kaliuta, bpf; +Cc: iii, jolsa

On 8/30/19 1:51 PM, Yauheni Kaliuta wrote:
> This adds support for generating bpf line info for JITed programs
> like commit 6f20c71d8505 ("bpf: powerpc64: add JIT support for bpf
> line info") does for powerpc, but it should pass the array starting
> from 1 like x86, see commit 7c2e988f400e ("bpf: fix x64 JIT code
> generation for jmp to 1st insn").
> 
> That fixes test_btf.
> 
> Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>

Applied, thanks! Few notes: please carry on Acked-by/Tested-by from
prior version since there haven't been fundamental changes. I've done
that manually now. Also, the reference above to x86 is somewhat
misleading since both JITs fill the addr array in a different manner
and the commit you've referenced is a bug fix (which would be good
if someone double checks on s390x).

Thanks,
Daniel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-09-03 13:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-29 16:13 [PATCH] bpf: s390: add JIT support for bpf line info Yauheni Kaliuta
2019-08-29 16:16 ` Yauheni Kaliuta
2019-08-29 20:02   ` [PATCH v2] " Yauheni Kaliuta
2019-08-30 11:39     ` Ilya Leoshkevich
2019-08-30 11:47       ` Yauheni Kaliuta
2019-08-30 11:51     ` [PATCH v3] " Yauheni Kaliuta
2019-09-03 13:40       ` Daniel Borkmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).