<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/arch/s390/kernel/dis.c, branch jd/unified-crypt-queue</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/arch/s390/kernel/dis.c?h=jd%2Funified-crypt-queue</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/arch/s390/kernel/dis.c?h=jd%2Funified-crypt-queue'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2019-11-12T10:24:10Z</updated>
<entry>
<title>s390/disassembler: don't hide instruction addresses</title>
<updated>2019-11-12T10:24:10Z</updated>
<author>
<name>Ilya Leoshkevich</name>
<email>iii@linux.ibm.com</email>
</author>
<published>2019-10-31T17:25:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=544f1d62e3e6c6e6d17a5e56f6139208acb5ff46'/>
<id>urn:sha1:544f1d62e3e6c6e6d17a5e56f6139208acb5ff46</id>
<content type='text'>
Due to kptr_restrict, JITted BPF code is now displayed like this:

000000000b6ed1b2: ebdff0800024  stmg    %r13,%r15,128(%r15)
000000004cde2ba0: 41d0f040      la      %r13,64(%r15)
00000000fbad41b0: a7fbffa0      aghi    %r15,-96

Leaking kernel addresses to dmesg is not a concern in this case, because
this happens only when JIT debugging is explicitly activated, which only
root can do.

Use %px in this particular instance, and also to print an instruction
address in show_code and PCREL (e.g. brasl) arguments in print_insn.
While at present functionally equivalent to %016lx, %px is recommended
by Documentation/core-api/printk-formats.rst for such cases.

Signed-off-by: Ilya Leoshkevich &lt;iii@linux.ibm.com&gt;
Reviewed-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/disassembler: update opcode table</title>
<updated>2019-06-04T13:03:58Z</updated>
<author>
<name>Martin Schwidefsky</name>
<email>schwidefsky@de.ibm.com</email>
</author>
<published>2019-02-14T15:41:53Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=fc20f0c1d7d4c67cab0788c3920aa82a48f43cfe'/>
<id>urn:sha1:fc20f0c1d7d4c67cab0788c3920aa82a48f43cfe</id>
<content type='text'>
Sync with binutils and add a couple of missing instructions.

Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390: kernel: add SPDX identifiers to the remaining files</title>
<updated>2017-11-24T14:37:12Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2017-11-24T14:00:32Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=a17ae4c3a6add7579e9962df5dd12cb1f3bed431'/>
<id>urn:sha1:a17ae4c3a6add7579e9962df5dd12cb1f3bed431</id>
<content type='text'>
It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Update the arch/s390/kernel/ files with the correct SPDX license
identifier based on the license text in the file itself.  The SPDX
identifier is a legally binding shorthand, which can be used instead of
the full boiler plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Arnaldo Carvalho de Melo &lt;acme@kernel.org&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Cc: Philippe Ombredanne &lt;pombredanne@nexb.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/disassembler: correct disassembly lines alignment</title>
<updated>2017-11-24T10:02:41Z</updated>
<author>
<name>Vasily Gorbik</name>
<email>gor@linux.vnet.ibm.com</email>
</author>
<published>2017-11-23T09:50:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=26f4e759ef9b8a2bab1823d692ed6d56d40b66e3'/>
<id>urn:sha1:26f4e759ef9b8a2bab1823d692ed6d56d40b66e3</id>
<content type='text'>
176.718956 Krnl Code: 00000000004d38b0: a54c0018        llihh   %r4,24
176.718956 	   00000000004d38b4: b9080014        agr     %r1,%r4
           ^
Using a tab to align disassembly lines which follow the first line with
"Krnl Code: " doesn't always work, e.g. if there is a prefix (timestamp
or syslog prefix) which is not 8 chars aligned. Go back to alignment
with spaces.

Fixes: b192571d1ae3 ("s390/disassembler: increase show_code buffer size")
Signed-off-by: Vasily Gorbik &lt;gor@linux.vnet.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/disassembler: remove confusing code</title>
<updated>2017-11-20T07:51:02Z</updated>
<author>
<name>Heiko Carstens</name>
<email>heiko.carstens@de.ibm.com</email>
</author>
<published>2017-11-17T08:50:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=de35089cc82c33f8be1dec5a0c3d7a05cf91720d'/>
<id>urn:sha1:de35089cc82c33f8be1dec5a0c3d7a05cf91720d</id>
<content type='text'>
When searching the opcode offset table within find_insn() the check
"entry-&gt;opcode == 0" was intended to clarify that 1-byte opcodes, the
first one being 0, are special.

However there is no mnemonic for an illegal opcode starting with 0.
Therefore there is also no opcode offset table entry that matches,
which again means that the check never is true. Therefore just remove
the confusing check, and add a comment which hopefully explains how
this works.

Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/disassembler: increase show_code buffer size</title>
<updated>2017-11-16T12:12:44Z</updated>
<author>
<name>Vasily Gorbik</name>
<email>gor@linux.vnet.ibm.com</email>
</author>
<published>2017-11-15T13:15:36Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=b192571d1ae375e0bbe0aa3ccfa1a3c3704454b9'/>
<id>urn:sha1:b192571d1ae375e0bbe0aa3ccfa1a3c3704454b9</id>
<content type='text'>
Current buffer size of 64 is too small. objdump shows that there are
instructions which would require up to 75 bytes buffer (with current
formating). 128 bytes "ought to be enough for anybody".

Also replaces 8 spaces with a single tab to reduce the memory footprint.

Fixes the following KASAN finding:

BUG: KASAN: stack-out-of-bounds in number+0x3fe/0x538
Write of size 1 at addr 000000005a4a75a0 by task bash/1282

CPU: 1 PID: 1282 Comm: bash Not tainted 4.14.0+ #215
Hardware name: IBM 2964 N96 702 (z/VM 6.4.0)
Call Trace:
([&lt;000000000011eeb6&gt;] show_stack+0x56/0x88)
 [&lt;0000000000e1ce1a&gt;] dump_stack+0x15a/0x1b0
 [&lt;00000000004e2994&gt;] print_address_description+0xf4/0x288
 [&lt;00000000004e2cf2&gt;] kasan_report+0x13a/0x230
 [&lt;0000000000e38ae6&gt;] number+0x3fe/0x538
 [&lt;0000000000e3dfe4&gt;] vsnprintf+0x194/0x948
 [&lt;0000000000e3ea42&gt;] sprintf+0xa2/0xb8
 [&lt;00000000001198dc&gt;] print_insn+0x374/0x500
 [&lt;0000000000119346&gt;] show_code+0x4ee/0x538
 [&lt;000000000011f234&gt;] show_registers+0x34c/0x388
 [&lt;000000000011f2ae&gt;] show_regs+0x3e/0xa8
 [&lt;000000000011f502&gt;] die+0x1ea/0x2e8
 [&lt;0000000000138f0e&gt;] do_no_context+0x106/0x168
 [&lt;0000000000139a1a&gt;] do_protection_exception+0x4da/0x7d0
 [&lt;0000000000e55914&gt;] pgm_check_handler+0x16c/0x1c0
 [&lt;000000000090639e&gt;] sysrq_handle_crash+0x46/0x58
([&lt;0000000000000007&gt;] 0x7)
 [&lt;00000000009073fa&gt;] __handle_sysrq+0x102/0x218
 [&lt;0000000000907c06&gt;] write_sysrq_trigger+0xd6/0x100
 [&lt;000000000061d67a&gt;] proc_reg_write+0xb2/0x128
 [&lt;0000000000520be6&gt;] __vfs_write+0xee/0x368
 [&lt;0000000000521222&gt;] vfs_write+0x21a/0x278
 [&lt;000000000052156a&gt;] SyS_write+0xda/0x178
 [&lt;0000000000e555cc&gt;] system_call+0xc4/0x270

The buggy address belongs to the page:
page:000003d1016929c0 count:0 mapcount:0 mapping:          (null) index:0x0
flags: 0x0()
raw: 0000000000000000 0000000000000000 0000000000000000 ffffffff00000000
raw: 0000000000000100 0000000000000200 0000000000000000 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 000000005a4a7480: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
 000000005a4a7500: 00 00 00 00 00 00 00 00 f2 f2 f2 f2 00 00 00 00
&gt;000000005a4a7580: 00 00 00 00 f3 f3 f3 f3 00 00 00 00 00 00 00 00
                               ^
 000000005a4a7600: 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 f8 f8
 000000005a4a7680: f2 f2 f2 f2 f2 f2 f8 f8 f2 f2 f3 f3 f3 f3 00 00
==================================================================

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.vnet.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/disassembler: generate opcode tables from text file</title>
<updated>2017-11-08T21:11:02Z</updated>
<author>
<name>Heiko Carstens</name>
<email>heiko.carstens@de.ibm.com</email>
</author>
<published>2017-11-06T12:29:56Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=8bc1e4ec79c0fcd48ff8914566fe960c34f27bc2'/>
<id>urn:sha1:8bc1e4ec79c0fcd48ff8914566fe960c34f27bc2</id>
<content type='text'>
The current way of adding new instructions to the opcode tables is
painful and error prone. Therefore add, similar to binutils, a text
file which contains all opcodes and the corresponding mnemonics and
instruction formats.

A small gen_opcode_table tool then generates a header file with the
required enums and opcode table initializers at the prepare step of
the kernel build.

This way only a simple text file has to be maintained, which can be
rather easily extended.

Unlike before where there were plenty of opcode tables and a large
switch statement to find the correct opcode table, there is now only
one opcode table left which contains all instructions. A second opcode
offset table now contains offsets within the opcode table to find
instructions which have the same opcode prefix. In order to save space
all 1-byte opcode instructions are grouped together at the end of the
opcode table. This is also quite similar to like it was before.

In addition also move and change code and definitions within the
disassembler. As a side effect this reduces the size required for the
code and opcode tables by ~1.5k.

Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/disassembler: remove insn_to_mnemonic()</title>
<updated>2017-11-08T21:10:49Z</updated>
<author>
<name>Heiko Carstens</name>
<email>heiko.carstens@de.ibm.com</email>
</author>
<published>2017-11-06T12:28:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=dac6dc267d0e906fa9263462d4ebd78970a8b511'/>
<id>urn:sha1:dac6dc267d0e906fa9263462d4ebd78970a8b511</id>
<content type='text'>
insn_to_mnemonic() was introduced ages ago for KVM debugging, but is
unused in the meantime. Therefore remove it.

Acked-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/disassembler: add new z14 instructions</title>
<updated>2017-09-29T13:52:24Z</updated>
<author>
<name>Heiko Carstens</name>
<email>heiko.carstens@de.ibm.com</email>
</author>
<published>2017-09-27T07:45:00Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=e0d281d067f6514f8afdae919e5990958136f197'/>
<id>urn:sha1:e0d281d067f6514f8afdae919e5990958136f197</id>
<content type='text'>
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/disassembler: add missing z13 instructions</title>
<updated>2017-09-29T13:52:18Z</updated>
<author>
<name>Heiko Carstens</name>
<email>heiko.carstens@de.ibm.com</email>
</author>
<published>2017-09-26T14:15:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=ea7c360b10081a3d0d42a8eab5249f7c2a258b4e'/>
<id>urn:sha1:ea7c360b10081a3d0d42a8eab5249f7c2a258b4e</id>
<content type='text'>
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
</feed>
