<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/arch/mips/net, branch linux-4.15.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.15.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.15.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2017-11-01T00:09:17Z</updated>
<entry>
<title>MIPS: bpf: Fix a typo in build_one_insn()</title>
<updated>2017-11-01T00:09:17Z</updated>
<author>
<name>Wei Yongjun</name>
<email>weiyongjun1@huawei.com</email>
</author>
<published>2017-10-13T09:25:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6a2932a463d526e362a6b4e112be226f1d18d088'/>
<id>urn:sha1:6a2932a463d526e362a6b4e112be226f1d18d088</id>
<content type='text'>
Fix a typo in build_one_insn().

Fixes: b6bd53f9c4e8 ("MIPS: Add missing file for eBPF JIT.")
Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; # 4.13+
Patchwork: https://patchwork.linux-mips.org/patch/17491/
Signed-off-by: James Hogan &lt;jhogan@kernel.org&gt;
</content>
</entry>
<entry>
<title>MIPS: bpf: Fix uninitialised target compiler error</title>
<updated>2017-10-09T12:53:38Z</updated>
<author>
<name>Matt Redfearn</name>
<email>matt.redfearn@imgtec.com</email>
</author>
<published>2017-09-27T08:14:58Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=94c3390ab84a6b449accc7351ffda4a0c17bdb92'/>
<id>urn:sha1:94c3390ab84a6b449accc7351ffda4a0c17bdb92</id>
<content type='text'>
Compiling ebpf_jit.c with gcc 4.9 results in a (likely spurious)
compiler warning, as gcc has detected that the variable "target" may be
used uninitialised. Since -Werror is active, this is treated as an error
and causes a kernel build failure whenever CONFIG_MIPS_EBPF_JIT is
enabled.

arch/mips/net/ebpf_jit.c: In function 'build_one_insn':
arch/mips/net/ebpf_jit.c:1118:80: error: 'target' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
    emit_instr(ctx, j, target);
                                                                                ^
cc1: all warnings being treated as errors

Fix this by initialising "target" to 0. If it really is used
uninitialised this would result in a jump to 0 and a detectable run time
failure.

Signed-off-by: Matt Redfearn &lt;matt.redfearn@imgtec.com&gt;
Fixes: b6bd53f9c4e8 ("MIPS: Add missing file for eBPF JIT.")
Cc: James Hogan &lt;james.hogan@imgtec.com&gt;
Cc: David Daney &lt;david.daney@cavium.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Colin Ian King &lt;colin.king@canonical.com&gt;
Cc: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: &lt;stable@vger.kernel.org&gt; # v4.13+
Patchwork: https://patchwork.linux-mips.org/patch/17375/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS,bpf: fix missing break in switch statement</title>
<updated>2017-08-22T23:18:00Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2017-08-22T22:46:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4a00aa057759d713e1296ecbc614fa560d569977'/>
<id>urn:sha1:4a00aa057759d713e1296ecbc614fa560d569977</id>
<content type='text'>
There is a missing break causing a fall-through and setting
ctx.use_bbit_insns to the wrong value. Fix this by adding the
missing break.

Detected with cppcheck:
"Variable 'ctx.use_bbit_insns' is reassigned a value before the old
one has been used. 'break;' missing?"

Fixes: 8d8d18c3283f ("MIPS,bpf: Fix using smp_processor_id() in preemptible splat.")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Acked-by: David Daney &lt;david.daney@cavium.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>MIPS,bpf: Cache value of BPF_OP(insn-&gt;code) in eBPF JIT.</title>
<updated>2017-08-21T17:31:34Z</updated>
<author>
<name>David Daney</name>
<email>david.daney@cavium.com</email>
</author>
<published>2017-08-18T23:40:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6035b3faf3e58ee6eb423a45a1b7b7c3b4c8dc9f'/>
<id>urn:sha1:6035b3faf3e58ee6eb423a45a1b7b7c3b4c8dc9f</id>
<content type='text'>
The code looks a little cleaner if we replace BPF_OP(insn-&gt;code) with
the local variable bpf_op.  Caching the value this way also saves 300
bytes (about 1%) in the code size of the JIT.

Signed-off-by: David Daney &lt;david.daney@cavium.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>MIPS, bpf: Implement JLT, JLE, JSLT and JSLE ops in the eBPF JIT.</title>
<updated>2017-08-21T17:31:34Z</updated>
<author>
<name>David Daney</name>
<email>david.daney@cavium.com</email>
</author>
<published>2017-08-18T23:40:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a67b375fdc5b21ae3a15761f9c5ef7bd352b5f7d'/>
<id>urn:sha1:a67b375fdc5b21ae3a15761f9c5ef7bd352b5f7d</id>
<content type='text'>
Signed-off-by: David Daney &lt;david.daney@cavium.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>MIPS,bpf: Fix using smp_processor_id() in preemptible splat.</title>
<updated>2017-08-21T17:31:34Z</updated>
<author>
<name>David Daney</name>
<email>david.daney@cavium.com</email>
</author>
<published>2017-08-18T23:40:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8d8d18c3283f0cf72f6ac41f337d5b6f818649b6'/>
<id>urn:sha1:8d8d18c3283f0cf72f6ac41f337d5b6f818649b6</id>
<content type='text'>
If the kernel is configured with preemption enabled we were getting
warning stack traces for use of current_cpu_type().

Fix by moving the test between preempt_disable()/preempt_enable() and
caching the results of the CPU type tests for use during code
generation.

Signed-off-by: David Daney &lt;david.daney@cavium.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>MIPS: Add missing file for eBPF JIT.</title>
<updated>2017-08-04T18:23:58Z</updated>
<author>
<name>David Daney</name>
<email>david.daney@cavium.com</email>
</author>
<published>2017-08-04T00:10:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b6bd53f9c4e825fca82fe1392157c78443c814ab'/>
<id>urn:sha1:b6bd53f9c4e825fca82fe1392157c78443c814ab</id>
<content type='text'>
Inexplicably, commit f381bf6d82f0 ("MIPS: Add support for eBPF JIT.")
lost a file somewhere on its path to Linus' tree.  Add back the
missing ebpf_jit.c so that we can build with CONFIG_BPF_JIT selected.

This version of ebpf_jit.c is identical to the original except for two
minor change need to resolve conflicts with changes merged from the
BPF branch:

A) Set prog-&gt;jited_len = image_size;
B) Use BPF_TAIL_CALL instead of BPF_CALL | BPF_X

Fixes: f381bf6d82f0 ("MIPS: Add support for eBPF JIT.")
Signed-off-by: David Daney &lt;david.daney@cavium.com&gt;
Acked-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>MIPS: Add support for eBPF JIT.</title>
<updated>2017-06-28T10:22:39Z</updated>
<author>
<name>David Daney</name>
<email>david.daney@cavium.com</email>
</author>
<published>2017-06-13T22:28:46Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f381bf6d82f032b7410185b35d000ea370ac706b'/>
<id>urn:sha1:f381bf6d82f032b7410185b35d000ea370ac706b</id>
<content type='text'>
Since the eBPF machine has 64-bit registers, we only support this in
64-bit kernels.  As of the writing of this commit log test-bpf is showing:

  test_bpf: Summary: 316 PASSED, 0 FAILED, [308/308 JIT'ed]

All current test cases are successfully compiled.

Many examples in samples/bpf are usable, specifically tracex5 which
uses tail calls works.

Signed-off-by: David Daney &lt;david.daney@cavium.com&gt;
Cc: Alexei Starovoitov &lt;ast@kernel.org&gt;
Cc: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Cc: Markos Chandras &lt;markos.chandras@imgtec.com&gt;
Cc: Matt Redfearn &lt;matt.redfearn@imgtec.com&gt;
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/16369/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: BPF: Fix multiple problems in JIT skb access helpers.</title>
<updated>2017-04-10T09:56:05Z</updated>
<author>
<name>David Daney</name>
<email>david.daney@cavium.com</email>
</author>
<published>2017-03-14T21:21:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a81507c79f4ae9a0f9fb1054b59b62a090620dd9'/>
<id>urn:sha1:a81507c79f4ae9a0f9fb1054b59b62a090620dd9</id>
<content type='text'>
o Socket data is unsigned, so use unsigned accessors instructions.

 o Fix path result pointer generation arithmetic.

 o Fix half-word byte swapping code for unsigned semantics.

Signed-off-by: David Daney &lt;david.daney@cavium.com&gt;
Cc: James Hogan &lt;james.hogan@imgtec.com&gt;
Cc: Alexei Starovoitov &lt;ast@kernel.org&gt;
Cc: Steven J. Hill &lt;steven.hill@cavium.com&gt;
Cc: linux-mips@linux-mips.org
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/15747/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: BPF: Quit clobbering callee saved registers in JIT code.</title>
<updated>2017-04-10T09:56:05Z</updated>
<author>
<name>David Daney</name>
<email>david.daney@cavium.com</email>
</author>
<published>2017-03-14T21:21:43Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1ef0910cfd681f0bd0b81f8809935b2006e9cfb9'/>
<id>urn:sha1:1ef0910cfd681f0bd0b81f8809935b2006e9cfb9</id>
<content type='text'>
If bpf_needs_clear_a() returns true, only actually clear it if it is
ever used.  If it is not used, we don't save and restore it, so the
clearing has the nasty side effect of clobbering caller state.

Also, don't emit stack pointer adjustment instructions if the
adjustment amount is zero.

Signed-off-by: David Daney &lt;david.daney@cavium.com&gt;
Cc: James Hogan &lt;james.hogan@imgtec.com&gt;
Cc: Alexei Starovoitov &lt;ast@kernel.org&gt;
Cc: Steven J. Hill &lt;steven.hill@cavium.com&gt;
Cc: linux-mips@linux-mips.org
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/15745/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
</feed>
