linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
To: Mark Lord <mlord@pobox.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Kees Cook <keescook@chromium.org>,
	linuxppc-dev@lists.ozlabs.org,
	Andy Lutomirski <luto@amacapital.net>,
	mpe@ellerman.id.au, Will Drewry <wad@chromium.org>
Subject: Re: [PATCH] bpf, powerpc: fix jit for seccomp_data access
Date: Wed, 21 Feb 2018 19:38:50 +0530	[thread overview]
Message-ID: <1519221778.inx201t3s9.naveen@linux.ibm.com> (raw)
In-Reply-To: <2e79ef59-1731-f3a5-9868-c15beb939142@pobox.com>

Mark Lord wrote:
> On 18-02-21 07:52 AM, Mark Lord wrote:
>> On 18-02-21 03:35 AM, Naveen N. Rao wrote:
> ..
>>> Looks good to me, but I am not able to apply this patch. There seems to=
 be whitespace damage.
>>=20
>> Here (attached) is a clean copy.
>=20
> Again, this time with the commit message included!

Thanks. However...
I am able to apply this using 'patch', but not with 'git am' since the=20
headers are missing. FWIW, the usual workflow is to make the changes and=20
commit it into your repository using 'git commit' and then use 'git=20
format-patch' to generate a patch file that you can then post.

I'll defer to Michael on whether he is ok to process this as it is.

>=20
> I am using SECCOMP to filter syscalls on a ppc32 platform,
> and noticed that the JIT compiler was failing on the BPF
> even though the interpreter was working fine.
>=20
> The issue was that the compiler was missing one of the instructions
> used by SECCOMP, so here is a patch to enable JIT for that instruction.
>=20
> Signed-Off-By:  Mark Lord <mlord@pobox.com>

Minot nit: The correct (TM) tag to use is:
Signed-off-by:
(note the case)

>=20
> --- old/arch/powerpc/net/bpf_jit_comp.c 2018-02-16 14:07:01.000000000 -05=
00
> +++ linux/arch/powerpc/net/bpf_jit_comp.c       2018-02-20 14:41:20.80522=
7494 -0500
> @@ -329,6 +329,9 @@ static int bpf_jit_build_body(struct bpf
>                         BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, len) !=
=3D 4);
>                         PPC_LWZ_OFFS(r_A, r_skb, offsetof(struct sk_buff,=
 len));
>                         break;
> +               case BPF_LDX | BPF_W | BPF_ABS: /* A =3D *((u32 *)(seccom=
p_data + K)); */
> +                       PPC_LWZ_OFFS(r_A, r_skb, K);
> +                       break;
>                 case BPF_LDX | BPF_W | BPF_LEN: /* X =3D skb->len; */
>                         PPC_LWZ_OFFS(r_X, r_skb, offsetof(struct sk_buff,=
 len));
>                         break;

Apart from those aspects, for this patch:
Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>


- Naveen

=

  reply	other threads:[~2018-02-21 14:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <d79074fe-2ee1-c132-ef2d-f6bb618b53bb@pobox.com>
     [not found] ` <2a91fe0c-ea85-dd79-6682-66b1301d7e49@iogearbox.net>
     [not found]   ` <53a6b85c-8cb7-d4d0-8234-7ecfb1a709b2@pobox.com>
     [not found]     ` <1519154571.d9vaokens9.naveen@linux.ibm.com>
2018-02-20 19:49       ` [PATCH] bpf, powerpc: fix jit for seccomp_data access Mark Lord
2018-02-21  0:33         ` Michael Ellerman
2018-02-21  0:47           ` Daniel Borkmann
2018-02-22  3:34             ` Michael Ellerman
2018-02-23  5:39         ` Michael Ellerman
     [not found]       ` <2f428cf9-23f3-d1f1-1524-46d6faa17386__30848.5239781023$1519169515$gmane$org@pobox.com>
     [not found]         ` <2f428cf9-23f3-d1f1-1524-46d6faa17386__30848.5239781023$1519169515$gmane$org@ pobox.com>
2018-02-21  8:35           ` [PATCH] " Naveen N. Rao
2018-02-21 12:52             ` Mark Lord
2018-02-21 13:41               ` Mark Lord
2018-02-21 14:08                 ` Naveen N. Rao [this message]
2018-02-22  3:38                   ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1519221778.inx201t3s9.naveen@linux.ibm.com \
    --to=naveen.n.rao@linux.vnet.ibm.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=keescook@chromium.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=luto@amacapital.net \
    --cc=mlord@pobox.com \
    --cc=mpe@ellerman.id.au \
    --cc=wad@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).