https://github.com/torvalds/linux
Revision 1a73d9310e093fc3adffba4d0a67b9fab2ee3f63 authored by Paul Burton on 02 June 2017, 18:35:01 UTC, committed by Ralf Baechle on 15 June 2017, 09:47:42 UTC
The code handling the pop76 opcode (ie. bnezc & jialc instructions) in
__compute_return_epc_for_insn() needs to set the value of $31 in the
jialc case, which is encoded with rs = 0. However its check to
differentiate bnezc (rs != 0) from jialc (rs = 0) was unfortunately
backwards, meaning that if we emulate a bnezc instruction we clobber $31
& if we emulate a jialc instruction it actually behaves like a jic
instruction.

Fix this by inverting the check of rs to match the way the instructions
are actually encoded.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Fixes: 28d6f93d201d ("MIPS: Emulate the new MIPS R6 BNEZC and JIALC instructions")
Cc: stable <stable@vger.kernel.org> # v4.0+
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/16178/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 698b851
History
Tip revision: 1a73d9310e093fc3adffba4d0a67b9fab2ee3f63 authored by Paul Burton on 02 June 2017, 18:35:01 UTC
MIPS: Fix bnezc/jialc return address calculation
Tip revision: 1a73d93
File Mode Size
ABI
DocBook
EDID
PCI
RCU
accounting
acpi
admin-guide
aoe
arm
arm64
auxdisplay
backlight
blackfin
block
blockdev
bus-devices
cdrom
cgroup-v1
cma
connector
console
core-api
cpu-freq
cpuidle
cris
crypto
dev-tools
device-mapper
devicetree
dmaengine
doc-guide
driver-api
driver-model
early-userspace
extcon
fault-injection
fb
features
filesystems
firmware_class
fmc
fpga
frv
gpio
gpu
hid
hwmon
i2c
ia64
ide
iio
infiniband
input
ioctl
isdn
kbuild
kdump
laptops
leds
lightnvm
livepatch
locking
m68k
md
media
memory-devices
metag
mic
mips
misc-devices
mmc
mn10300
mtd
namespaces
netlabel
networking
nfc
nios2
nvdimm
nvmem
parisc
pcmcia
perf
phy
platform
power
powerpc
pps
prctl
process
pti
ptp
rapidio
s390
scheduler
scsi
security
serial
sh
sound
sparc
sphinx
sphinx-static
spi
sysctl
target
thermal
timers
trace
translations
usb
userspace-api
virtual
vm
w1
watchdog
wimax
x86
xtensa
.gitignore -rw-r--r-- 13 bytes
00-INDEX -rw-r--r-- 15.1 KB
Changes l--------- 19 bytes
CodingStyle -rw-r--r-- 48 bytes
DMA-API-HOWTO.txt -rw-r--r-- 34.6 KB
DMA-API.txt -rw-r--r-- 27.8 KB
DMA-ISA-LPC.txt -rw-r--r-- 5.2 KB
DMA-attributes.txt -rw-r--r-- 6.9 KB
IPMI.txt -rw-r--r-- 29.4 KB
IRQ-affinity.txt -rw-r--r-- 2.5 KB
IRQ-domain.txt -rw-r--r-- 10.6 KB
IRQ.txt -rw-r--r-- 962 bytes
Intel-IOMMU.txt -rw-r--r-- 3.8 KB
Makefile -rw-r--r-- 12 bytes
Makefile.sphinx -rw-r--r-- 4.4 KB
SAK.txt -rw-r--r-- 2.8 KB
SM501.txt -rw-r--r-- 2.8 KB
SubmittingPatches -rw-r--r-- 54 bytes
bcache.txt -rw-r--r-- 23.4 KB
bt8xxgpio.txt -rw-r--r-- 4.3 KB
btmrvl.txt -rw-r--r-- 2.9 KB
bus-virt-phys-mapping.txt -rw-r--r-- 7.9 KB
cachetlb.txt -rw-r--r-- 17.1 KB
cgroup-v2.txt -rw-r--r-- 59.5 KB
circular-buffers.txt -rw-r--r-- 8.4 KB
clk.txt -rw-r--r-- 10.4 KB
conf.py -rw-r--r-- 17.1 KB
cpu-load.txt -rw-r--r-- 3.0 KB
cputopology.txt -rw-r--r-- 5.3 KB
crc32.txt -rw-r--r-- 8.5 KB
dcdbas.txt -rw-r--r-- 3.6 KB
debugging-modules.txt -rw-r--r-- 954 bytes
debugging-via-ohci1394.txt -rw-r--r-- 7.4 KB
dell_rbu.txt -rw-r--r-- 4.9 KB
digsig.txt -rw-r--r-- 2.8 KB
docutils.conf -rw-r--r-- 158 bytes
dontdiff -rw-r--r-- 2.5 KB
efi-stub.txt -rw-r--r-- 3.2 KB
eisa.txt -rw-r--r-- 7.1 KB
flexible-arrays.txt -rw-r--r-- 5.5 KB
futex-requeue-pi.txt -rw-r--r-- 5.0 KB
gcc-plugins.txt -rw-r--r-- 2.9 KB
highuid.txt -rw-r--r-- 2.4 KB
hw_random.txt -rw-r--r-- 3.5 KB
hwspinlock.txt -rw-r--r-- 12.7 KB
index.rst -rw-r--r-- 2.5 KB
intel_txt.txt -rw-r--r-- 10.2 KB
io-mapping.txt -rw-r--r-- 3.2 KB
io_ordering.txt -rw-r--r-- 1.9 KB
iostats.txt -rw-r--r-- 8.0 KB
irqflags-tracing.txt -rw-r--r-- 2.3 KB
isa.txt -rw-r--r-- 5.2 KB
isapnp.txt -rw-r--r-- 433 bytes
kernel-doc-nano-HOWTO.txt -rw-r--r-- 11.8 KB
kernel-per-CPU-kthreads.txt -rw-r--r-- 13.2 KB
kobject.txt -rw-r--r-- 18.0 KB
kprobes.txt -rw-r--r-- 30.8 KB
kref.txt -rw-r--r-- 8.4 KB
kselftest.txt -rw-r--r-- 3.2 KB
ldm.txt -rw-r--r-- 3.8 KB
lockup-watchdogs.txt -rw-r--r-- 4.1 KB
logo.gif -rw-r--r-- 16.0 KB
logo.txt -rw-r--r-- 563 bytes
lzo.txt -rw-r--r-- 7.8 KB
mailbox.txt -rw-r--r-- 4.1 KB
memory-barriers.txt -rw-r--r-- 115.9 KB
memory-hotplug.txt -rw-r--r-- 18.0 KB
men-chameleon-bus.txt -rw-r--r-- 6.1 KB
nommu-mmap.txt -rw-r--r-- 12.7 KB
ntb.txt -rw-r--r-- 6.3 KB
numastat.txt -rw-r--r-- 836 bytes
padata.txt -rw-r--r-- 7.3 KB
parport-lowlevel.txt -rw-r--r-- 32.2 KB
percpu-rw-semaphore.txt -rw-r--r-- 1.1 KB
phy.txt -rw-r--r-- 7.5 KB
pi-futex.txt -rw-r--r-- 5.7 KB
pinctrl.txt -rw-r--r-- 50.4 KB
pnp.txt -rw-r--r-- 6.8 KB
preempt-locking.txt -rw-r--r-- 5.2 KB
printk-formats.txt -rw-r--r-- 10.3 KB
pwm.txt -rw-r--r-- 6.1 KB
rbtree.txt -rw-r--r-- 13.3 KB
remoteproc.txt -rw-r--r-- 12.7 KB
rfkill.txt -rw-r--r-- 5.0 KB
robust-futex-ABI.txt -rw-r--r-- 8.7 KB
robust-futexes.txt -rw-r--r-- 9.4 KB
rpmsg.txt -rw-r--r-- 13.3 KB
rtc.txt -rw-r--r-- 10.3 KB
sgi-ioc4.txt -rw-r--r-- 2.0 KB
siphash.txt -rw-r--r-- 6.1 KB
smsc_ece1099.txt -rw-r--r-- 2.4 KB
static-keys.txt -rw-r--r-- 11.8 KB
svga.txt -rw-r--r-- 14.1 KB
switchtec.txt -rw-r--r-- 3.1 KB
sync_file.txt -rw-r--r-- 3.1 KB
tee.txt -rw-r--r-- 5.1 KB
this_cpu_ops.txt -rw-r--r-- 11.1 KB
unaligned-memory-access.txt -rw-r--r-- 10.4 KB
vfio-mediated-device.txt -rw-r--r-- 14.1 KB
vfio.txt -rw-r--r-- 21.3 KB
video-output.txt -rw-r--r-- 1.1 KB
xillybus.txt -rw-r--r-- 17.7 KB
xz.txt -rw-r--r-- 5.7 KB
zorro.txt -rw-r--r-- 2.9 KB

back to top