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-08-07 09:57:39 +02:00
2015-08-07 09:57:39 +02:00
2012-05-16 14:42:41 +02:00
2015-06-25 09:39:26 +02:00
2011-01-05 12:47:31 +01:00
2015-03-25 11:49:33 +01:00
2015-03-25 11:49:33 +01:00
2015-11-16 12:51:11 +01:00
2015-01-22 12:16:01 +01:00
2015-03-25 11:49:33 +01:00
2015-10-27 09:33:57 +01:00
2015-03-25 11:49:33 +01:00
2015-11-16 12:04:41 +01:00
2015-03-25 11:49:33 +01:00
2015-11-16 12:51:07 +01:00
2015-10-14 14:32:01 +02:00
2015-03-25 11:49:33 +01:00