public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 net-next] bpf: s390: Fix build error caused by the struct bpf_array member name changed
@ 2015-08-11  6:53 Kaixu Xia
  2015-08-11  8:24 ` Daniel Borkmann
  0 siblings, 1 reply; 3+ messages in thread
From: Kaixu Xia @ 2015-08-11  6:53 UTC (permalink / raw)
  To: fengguang.wu, davem, ast, schwidefsky, heiko.carstens
  Cc: linux-kernel, netdev, wangnan0, xiakaixu

There is a build error that "'struct bpf_array' has no member
named 'prog'" on s390. In commit 2a36f0b, the member 'prog' of
struct bpf_array is replaced by 'ptrs'. So this patch fixes it.

Signed-off-by: Kaixu Xia <xiakaixu@huawei.com>
---
 arch/s390/net/bpf_jit_comp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c
index 9f4bbc0..eeda051 100644
--- a/arch/s390/net/bpf_jit_comp.c
+++ b/arch/s390/net/bpf_jit_comp.c
@@ -1032,7 +1032,7 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp, int i
 				      MAX_TAIL_CALL_CNT, 0, 0x2);
 
 		/*
-		 * prog = array->prog[index];
+		 * prog = array->ptrs[index];
 		 * if (prog == NULL)
 		 *         goto out;
 		 */
@@ -1041,7 +1041,7 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp, int i
 		EMIT6_DISP_LH(0xeb000000, 0x000d, REG_1, BPF_REG_3, REG_0, 3);
 		/* lg %r1,prog(%b2,%r1) */
 		EMIT6_DISP_LH(0xe3000000, 0x0004, REG_1, BPF_REG_2,
-			      REG_1, offsetof(struct bpf_array, prog));
+			      REG_1, offsetof(struct bpf_array, ptrs));
 		/* clgij %r1,0,0x8,label0 */
 		EMIT6_PCREL_IMM_LABEL(0xec000000, 0x007d, REG_1, 0, 0, 0x8);
 
-- 
1.8.3.4


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

* Re: [PATCH v2 net-next] bpf: s390: Fix build error caused by the struct bpf_array member name changed
  2015-08-11  6:53 [PATCH v2 net-next] bpf: s390: Fix build error caused by the struct bpf_array member name changed Kaixu Xia
@ 2015-08-11  8:24 ` Daniel Borkmann
  2015-08-11  8:42   ` xiakaixu
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Borkmann @ 2015-08-11  8:24 UTC (permalink / raw)
  To: Kaixu Xia, fengguang.wu, davem, ast, schwidefsky, heiko.carstens
  Cc: linux-kernel, netdev, wangnan0, Michael Holzheu

On 08/11/2015 08:53 AM, Kaixu Xia wrote:
> There is a build error that "'struct bpf_array' has no member
> named 'prog'" on s390. In commit 2a36f0b, the member 'prog' of
> struct bpf_array is replaced by 'ptrs'. So this patch fixes it.
>
> Signed-off-by: Kaixu Xia <xiakaixu@huawei.com>

You were also asked to add a proper Fixes tag :

Fixes: 2a36f0b92eb6 ("bpf: Make the bpf_prog_array_map more generic")

I guess this bug was reported by Fengguang as you have him in Cc ?

If that should be the case, then please also add a "Reported-by:" tag
for his bug report.

Code looks good to me.

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

* Re: [PATCH v2 net-next] bpf: s390: Fix build error caused by the struct bpf_array member name changed
  2015-08-11  8:24 ` Daniel Borkmann
@ 2015-08-11  8:42   ` xiakaixu
  0 siblings, 0 replies; 3+ messages in thread
From: xiakaixu @ 2015-08-11  8:42 UTC (permalink / raw)
  To: Daniel Borkmann
  Cc: fengguang.wu, davem, ast, schwidefsky, heiko.carstens,
	linux-kernel, netdev, wangnan0, Michael Holzheu

于 2015/8/11 16:24, Daniel Borkmann 写道:
> On 08/11/2015 08:53 AM, Kaixu Xia wrote:
>> There is a build error that "'struct bpf_array' has no member
>> named 'prog'" on s390. In commit 2a36f0b, the member 'prog' of
>> struct bpf_array is replaced by 'ptrs'. So this patch fixes it.
>>
>> Signed-off-by: Kaixu Xia <xiakaixu@huawei.com>
> 
> You were also asked to add a proper Fixes tag :
> 
> Fixes: 2a36f0b92eb6 ("bpf: Make the bpf_prog_array_map more generic")
> 
> I guess this bug was reported by Fengguang as you have him in Cc ?
> 
> If that should be the case, then please also add a "Reported-by:" tag
> for his bug report.
> 
> Code looks good to me.

Thanks for your review. Will follow them in the resubmit version.
> 
> .
> 



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

end of thread, other threads:[~2015-08-11  8:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-11  6:53 [PATCH v2 net-next] bpf: s390: Fix build error caused by the struct bpf_array member name changed Kaixu Xia
2015-08-11  8:24 ` Daniel Borkmann
2015-08-11  8:42   ` xiakaixu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox