Revision 3af57f78c38131b7a66e2b01e06fdacae01992a3 authored by Heiko Carstens on 17 January 2014, 08:37:15 UTC, committed by David S. Miller on 18 January 2014, 02:54:49 UTC
The s390 bpf jit compiler emits the signed divide instructions "dr" and "d"
for unsigned divisions.
This can cause problems: the dividend will be zero extended to a 64 bit value
and the divisor is the 32 bit signed value as specified A or X accumulator,
even though A and X are supposed to be treated as unsigned values.

The divide instrunctions will generate an exception if the result cannot be
expressed with a 32 bit signed value.
This is the case if e.g. the dividend is 0xffffffff and the divisor either 1
or also 0xffffffff (signed: -1).

To avoid all these issues simply use unsigned divide instructions.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 75b99db
History
File Mode Size
partitions
Kconfig -rw-r--r-- 3.6 KB
Kconfig.iosched -rw-r--r-- 1.6 KB
Makefile -rw-r--r-- 844 bytes
blk-cgroup.c -rw-r--r-- 28.8 KB
blk-cgroup.h -rw-r--r-- 16.7 KB
blk-core.c -rw-r--r-- 87.2 KB
blk-exec.c -rw-r--r-- 3.2 KB
blk-flush.c -rw-r--r-- 15.7 KB
blk-integrity.c -rw-r--r-- 11.6 KB
blk-ioc.c -rw-r--r-- 10.2 KB
blk-iopoll.c -rw-r--r-- 5.9 KB
blk-lib.c -rw-r--r-- 7.0 KB
blk-map.c -rw-r--r-- 8.2 KB
blk-merge.c -rw-r--r-- 13.1 KB
blk-mq-cpu.c -rw-r--r-- 2.2 KB
blk-mq-cpumap.c -rw-r--r-- 2.3 KB
blk-mq-sysfs.c -rw-r--r-- 9.5 KB
blk-mq-tag.c -rw-r--r-- 4.6 KB
blk-mq-tag.h -rw-r--r-- 894 bytes
blk-mq.c -rw-r--r-- 33.8 KB
blk-mq.h -rw-r--r-- 1.4 KB
blk-settings.c -rw-r--r-- 26.3 KB
blk-softirq.c -rw-r--r-- 4.4 KB
blk-sysfs.c -rw-r--r-- 16.0 KB
blk-tag.c -rw-r--r-- 9.8 KB
blk-throttle.c -rw-r--r-- 46.0 KB
blk-timeout.c -rw-r--r-- 5.2 KB
blk.h -rw-r--r-- 7.8 KB
bsg-lib.c -rw-r--r-- 6.0 KB
bsg.c -rw-r--r-- 23.6 KB
cfq-iosched.c -rw-r--r-- 120.5 KB
cmdline-parser.c -rw-r--r-- 4.8 KB
compat_ioctl.c -rw-r--r-- 20.8 KB
deadline-iosched.c -rw-r--r-- 11.3 KB
elevator.c -rw-r--r-- 24.1 KB
genhd.c -rw-r--r-- 44.1 KB
ioctl.c -rw-r--r-- 10.7 KB
noop-iosched.c -rw-r--r-- 2.7 KB
partition-generic.c -rw-r--r-- 14.0 KB
scsi_ioctl.c -rw-r--r-- 19.2 KB

back to top