<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/s390/net, branch linux-4.10.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.10.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.10.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-12-08T19:25:13Z</updated>
<entry>
<title>bpf: xdp: Allow head adjustment in XDP prog</title>
<updated>2016-12-08T19:25:13Z</updated>
<author>
<name>Martin KaFai Lau</name>
</author>
<published>2016-12-07T23:53:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=17bedab2723145d17b14084430743549e6943d03'/>
<id>urn:sha1:17bedab2723145d17b14084430743549e6943d03</id>
<content type='text'>
This patch allows XDP prog to extend/remove the packet
data at the head (like adding or removing header).  It is
done by adding a new XDP helper bpf_xdp_adjust_head().

It also renames bpf_helper_changes_skb_data() to
bpf_helper_changes_pkt_data() to better reflect
that XDP prog does not work on skb.

This patch adds one "xdp_adjust_head" bit to bpf_prog for the
XDP-capable driver to check if the XDP prog requires
bpf_xdp_adjust_head() support.  The driver can then decide
to error out during XDP_SETUP_PROG.

Signed-off-by: Martin KaFai Lau &lt;kafai@fb.com&gt;
Acked-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: John Fastabend &lt;john.r.fastabend@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>s390/bpf: fix recache skb-&gt;data/hlen for skb_vlan_push/pop</title>
<updated>2016-05-19T07:14:27Z</updated>
<author>
<name>Michael Holzheu</name>
</author>
<published>2016-05-11T19:13:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6edf0aa4f8bbdfbb4d6d786892fa02728d05dc36'/>
<id>urn:sha1:6edf0aa4f8bbdfbb4d6d786892fa02728d05dc36</id>
<content type='text'>
In case of usage of skb_vlan_push/pop, in the prologue we store
the SKB pointer on the stack and restore it after BPF_JMP_CALL
to skb_vlan_push/pop.

Unfortunately currently there are two bugs in the code:

 1) The wrong stack slot (offset 170 instead of 176) is used
 2) The wrong register (W1 instead of B1) is saved

So fix this and use correct stack slot and register.

Fixes: 9db7f2b81880 ("s390/bpf: recache skb-&gt;data/hlen for skb_vlan_push/pop")
Cc: stable@vger.kernel.org # 4.3+
Signed-off-by: Michael Holzheu &lt;holzheu@linux.vnet.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/bpf: reduce maximum program size to 64 KB</title>
<updated>2016-05-19T07:14:27Z</updated>
<author>
<name>Michael Holzheu</name>
</author>
<published>2016-05-12T16:10:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0fa963553a5c28d8f8aabd8878326d3f782045fc'/>
<id>urn:sha1:0fa963553a5c28d8f8aabd8878326d3f782045fc</id>
<content type='text'>
The s390 BFP compiler currently uses relative branch instructions
that only support jumps up to 64 KB. Examples are "j", "jnz", "cgrj",
etc.  Currently the maximum size of s390 BPF programs is set
to 0x7ffff.  If branches over 64 KB are generated the, kernel can
crash due to incorrect code.

So fix this an reduce the maximum size to 64 KB. Programs larger than
that will be interpreted.

Fixes: ce2b6ad9c185 ("s390/bpf: increase BPF_SIZE_MAX")

Cc: stable@vger.kernel.org # 4.3+
Signed-off-by: Michael Holzheu &lt;holzheu@linux.vnet.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>bpf, s390: add support for constant blinding</title>
<updated>2016-05-16T17:49:33Z</updated>
<author>
<name>Daniel Borkmann</name>
</author>
<published>2016-05-13T17:08:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d93a47f735f3455a896e46b18d0ac26fa19639e6'/>
<id>urn:sha1:d93a47f735f3455a896e46b18d0ac26fa19639e6</id>
<content type='text'>
This patch adds recently added constant blinding helpers into the
s390 eBPF JIT. In the bpf_int_jit_compile() path, requirements are
to utilize bpf_jit_blind_constants()/bpf_jit_prog_release_other()
pair for rewriting the program into a blinded one, and to map the
BPF_REG_AX register to a CPU register. The mapping of BPF_REG_AX
is at r12 and similarly like in x86 case performs reloading when
ld_abs/ind is used. When blinding is not used, there's no additional
overhead in the generated image.

When BPF_REG_AX is used, we don't need to emit skb-&gt;data reload when
helper function changed skb-&gt;data, as this will be reloaded later
on anyway from stack on ld_abs/ind, where skb-&gt;data is needed. s390
allows for this w/o much additional complexity unlike f.e. x86.

Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: Michael Holzheu &lt;holzheu@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bpf: prepare bpf_int_jit_compile/bpf_prog_select_runtime apis</title>
<updated>2016-05-16T17:49:32Z</updated>
<author>
<name>Daniel Borkmann</name>
</author>
<published>2016-05-13T17:08:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d1c55ab5e41fcd72cb0a8bef86d3f652ad9ad9f5'/>
<id>urn:sha1:d1c55ab5e41fcd72cb0a8bef86d3f652ad9ad9f5</id>
<content type='text'>
Since the blinding is strictly only called from inside eBPF JITs,
we need to change signatures for bpf_int_jit_compile() and
bpf_prog_select_runtime() first in order to prepare that the
eBPF program we're dealing with can change underneath. Hence,
for call sites, we need to return the latest prog. No functional
change in this patch.

Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bpf: move clearing of A/X into classic to eBPF migration prologue</title>
<updated>2015-12-18T21:04:51Z</updated>
<author>
<name>Daniel Borkmann</name>
</author>
<published>2015-12-17T22:51:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8b614aebecdf2b1f72d51b1527f5a75d218b78e2'/>
<id>urn:sha1:8b614aebecdf2b1f72d51b1527f5a75d218b78e2</id>
<content type='text'>
Back in the days where eBPF (or back then "internal BPF" ;-&gt;) was not
exposed to user space, and only the classic BPF programs internally
translated into eBPF programs, we missed the fact that for classic BPF
A and X needed to be cleared. It was fixed back then via 83d5b7ef99c9
("net: filter: initialize A and X registers"), and thus classic BPF
specifics were added to the eBPF interpreter core to work around it.

This added some confusion for JIT developers later on that take the
eBPF interpreter code as an example for deriving their JIT. F.e. in
f75298f5c3fe ("s390/bpf: clear correct BPF accumulator register"), at
least X could leak stack memory. Furthermore, since this is only needed
for classic BPF translations and not for eBPF (verifier takes care
that read access to regs cannot be done uninitialized), more complexity
is added to JITs as they need to determine whether they deal with
migrations or native eBPF where they can just omit clearing A/X in
their prologue and thus reduce image size a bit, see f.e. cde66c2d88da
("s390/bpf: Only clear A and X for converted BPF programs"). In other
cases (x86, arm64), A and X is being cleared in the prologue also for
eBPF case, which is unnecessary.

Lets move this into the BPF migration in bpf_convert_filter() where it
actually belongs as long as the number of eBPF JITs are still few. It
can thus be done generically; allowing us to remove the quirk from
__bpf_prog_run() and to slightly reduce JIT image size in case of eBPF,
while reducing code duplication on this matter in current(/future) eBPF
JITs.

Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Reviewed-by: Michael Holzheu &lt;holzheu@linux.vnet.ibm.com&gt;
Tested-by: Michael Holzheu &lt;holzheu@linux.vnet.ibm.com&gt;
Cc: Zi Shen Lim &lt;zlim.lnx@gmail.com&gt;
Cc: Yang Shi &lt;yang.shi@linaro.org&gt;
Acked-by: Yang Shi &lt;yang.shi@linaro.org&gt;
Acked-by: Zi Shen Lim &lt;zlim.lnx@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ebpf: migrate bpf_prog's flags to bitfield</title>
<updated>2015-10-03T12:02:39Z</updated>
<author>
<name>Daniel Borkmann</name>
</author>
<published>2015-09-29T23:41:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a91263d520246b63c63e75ddfb072ee6a853fe15'/>
<id>urn:sha1:a91263d520246b63c63e75ddfb072ee6a853fe15</id>
<content type='text'>
As we need to add further flags to the bpf_prog structure, lets migrate
both bools to a bitfield representation. The size of the base structure
(excluding insns) remains unchanged at 40 bytes.

Add also tags for the kmemchecker, so that it doesn't throw false
positives. Even in case gcc would generate suboptimal code, it's not
being accessed in performance critical paths.

Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Alexei Starovoitov &lt;ast@plumgrid.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bpf: s390: Fix build error caused by the struct bpf_array member name changed</title>
<updated>2015-08-11T18:49:40Z</updated>
<author>
<name>Kaixu Xia</name>
</author>
<published>2015-08-11T08:56:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2c9c3bbbbfe9f7f700c30d9ac40c1abca59d39ee'/>
<id>urn:sha1:2c9c3bbbbfe9f7f700c30d9ac40c1abca59d39ee</id>
<content type='text'>
There is a build error that "'struct bpf_array' has no member
named 'prog'" on s390. In commit 2a36f0b92eb6 ("bpf: Make the
bpf_prog_array_map more generic"), the member 'prog' of struct
bpf_array is replaced by 'ptrs'. So this patch fixes it.

Fixes: 2a36f0b92eb6 ("bpf: Make the bpf_prog_array_map more generic")
Reported-by: Wu Fengguang &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Kaixu Xia &lt;xiakaixu@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bpf: provide helper that indicates eBPF was migrated</title>
<updated>2015-07-30T18:13:20Z</updated>
<author>
<name>Daniel Borkmann</name>
</author>
<published>2015-07-30T10:42:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7b36f92934e40d1ee24e5617ddedb852e10086ca'/>
<id>urn:sha1:7b36f92934e40d1ee24e5617ddedb852e10086ca</id>
<content type='text'>
During recent discussions we had with Michael, we found that it would
be useful to have an indicator that tells the JIT that an eBPF program
had been migrated from classic instructions into eBPF instructions, as
only in that case A and X need to be cleared in the prologue. Such eBPF
programs do not set a particular type, but all have BPF_PROG_TYPE_UNSPEC.
Thus, introduce a small helper for cde66c2d88da ("s390/bpf: Only clear
A and X for converted BPF programs") and possibly others in future.

Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Cc: Michael Holzheu &lt;holzheu@linux.vnet.ibm.com&gt;
Acked-by: Alexei Starovoitov &lt;ast@plumgrid.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>s390/bpf: recache skb-&gt;data/hlen for skb_vlan_push/pop</title>
<updated>2015-07-29T21:59:58Z</updated>
<author>
<name>Michael Holzheu</name>
</author>
<published>2015-07-29T19:15:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9db7f2b818809ef2c40fbd64cfcf5ccb0107d7e8'/>
<id>urn:sha1:9db7f2b818809ef2c40fbd64cfcf5ccb0107d7e8</id>
<content type='text'>
Allow eBPF programs attached to TC qdiscs call skb_vlan_push/pop
via helper functions. These functions may change skb-&gt;data/hlen.
This data is cached by s390 JIT to improve performance of ld_abs/ld_ind
instructions. Therefore after a change we have to reload the data.

In case of usage of skb_vlan_push/pop, in the prologue we store
the SKB pointer on the stack and restore it after BPF_JMP_CALL
to skb_vlan_push/pop.

Signed-off-by: Michael Holzheu &lt;holzheu@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
