Michael Holzheu 272fa59ccb s390/dis: Fix handling of format specifiers
The print_insn() function returns strings like "lghi %r1,0". To escape the
'%' character in sprintf() a second '%' is used. For example "lghi %%r1,0"
is converted into "lghi %r1,0".

After print_insn() the output string is passed to printk(). Because format
specifiers like "%r" or "%f" are ignored by printk() this works by chance
most of the time. But for instructions with control registers like
"lctl %c6,%c6,780" this fails because printk() interprets "%c" as
character format specifier.

Fix this problem and escape the '%' characters twice.

For example "lctl %%%%c6,%%%%c6,780" is then converted by sprintf()
into "lctl %%c6,%%c6,780" and by printk() into "lctl %c6,%c6,780".

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2015-12-18 14:43:21 +01:00
..
2015-11-14 09:09:37 -08:00
2015-11-10 10:05:17 -08:00
2015-11-12 15:26:39 -08:00
2015-11-10 16:24:25 -08:00
2015-11-24 19:34:40 +01:00
2015-11-09 16:36:10 -08:00
2015-11-16 17:05:53 +11:00
2015-11-06 22:54:49 +01:00
2015-11-11 09:16:10 -08:00