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
.gitignore -rw-r--r-- 12 bytes
Kconfig -rw-r--r-- 1.3 KB
Makefile -rw-r--r-- 758 bytes
asymmetric_keys.h -rw-r--r-- 518 bytes
asymmetric_type.c -rw-r--r-- 6.7 KB
public_key.c -rw-r--r-- 3.1 KB
public_key.h -rw-r--r-- 1.1 KB
rsa.c -rw-r--r-- 6.7 KB
signature.c -rw-r--r-- 1.3 KB
x509.asn1 -rw-r--r-- 1.6 KB
x509_cert_parser.c -rw-r--r-- 12.8 KB
x509_parser.h -rw-r--r-- 1.4 KB
x509_public_key.c -rw-r--r-- 5.8 KB
x509_rsakey.asn1 -rw-r--r-- 130 bytes

back to top