kernel-hacking-2024-linux-s.../arch/s390/include/asm
Martin Schwidefsky 70f5dc514c [S390] cputime: fix overflow on 31 bit systems
The cputime_to_msecs / cputime_to_clock_t and cputime64_to_clock_t
cause fixpoint divide exceptions if the cputime is too large.
On a machine that collected 49.7 days worth of idle time reading
from /proc/stat will generate oopses like this:

Kernel BUG at 001b0c92 [verbose debug info unavailable]
fixpoint divide exception: 0009 [#13] SMP
Modules linked in: ipv6
CPU: 1 Tainted: G      D   2.6.27.10 #5
Process cat (pid: 21352, task: 1fb34138, ksp: 1d2a3d98)
Krnl PSW : 070c2000 801b0c92 (show_stat+0x2ca/0x68c)
           R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:2 PM:0
Krnl GPRS: 00000001 00001388 00000bb8 0015d2a1
           00000000 00000000 000003e8 0001fd91
           00000000 00000000 0000129d eecd2ff0
           1cc533b9 0036f780 801b0bce 1d2a3cc0
Krnl Code: 801b0c86: f18890abf198       mvo     171(9,%r9),408(9,%r15)
           801b0c8c: 98abf170           lm      %r10,%r11,368(%r15)
           801b0c90: 1da1               dr      %r10,%r1
          >801b0c92: 90abf170           stm     %r10,%r11,368(%r15)
           801b0c96: 98abf190           lm      %r10,%r11,400(%r15)
           801b0c9a: 1da1               dr      %r10,%r1
           801b0c9c: 90abf190           stm     %r10,%r11,400(%r15)
           801b0ca0: 18a3               lr      %r10,%r3
Call Trace:
([<00000000001b09f4>] show_stat+0x2c/0x68c)
 [<000000000018dcee>] seq_read+0xb2/0x364
 [<00000000001a9980>] proc_reg_read+0x68/0x98
 [<00000000001705ee>] vfs_read+0x6e/0xe8
 [<0000000000170732>] sys_read+0x36/0x78
 [<000000000010f750>] sysc_do_restart+0x12/0x16
 [<0000000077f3ad6a>] 0x77f3ad6a
 <4>---[ end trace 1436ea9559d3de9e ]---

Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-10-29 15:05:13 +01:00
..
airq.h
appldata.h
atomic.h
auxvec.h
bitops.h
bitsperlong.h
bug.h
bugs.h
byteorder.h
cache.h
cacheflush.h
ccwdev.h
ccwgroup.h
checksum.h
chpid.h
chsc.h
cio.h
cmb.h
compat.h
cpcmd.h
cpu.h
cputime.h [S390] cputime: fix overflow on 31 bit systems 2009-10-29 15:05:13 +01:00
crw.h
current.h
dasd.h
debug.h
delay.h [S390] Provide arch specific mdelay implementation. 2009-10-06 10:35:08 +02:00
device.h
diag.h
div64.h
dma.h
ebcdic.h
elf.h [S390] 64-bit register support for 31-bit processes 2009-10-06 10:35:10 +02:00
emergency-restart.h
errno.h
etr.h
extmem.h
fb.h
fcntl.h
fcx.h
ftrace.h
futex.h
hardirq.h
hugetlb.h
idals.h
io.h
ioctl.h
ioctls.h
ipcbuf.h
ipl.h
irq.h
irq_regs.h
irqflags.h
isc.h
itcw.h
Kbuild
kdebug.h
kexec.h
kmap_types.h
kprobes.h
kvm.h
kvm_host.h
kvm_para.h
kvm_virtio.h
linkage.h
local.h
lowcore.h [S390] hibernate: Do real CPU swap at resume time 2009-09-22 22:58:46 +02:00
mathemu.h
mman.h mm: remove duplicate asm/mman.h files 2009-09-22 07:17:42 -07:00
mmu.h
mmu_context.h
module.h
monwriter.h
msgbuf.h
mutex.h
nmi.h
page.h
param.h
pci.h
percpu.h
perf_event.h perf: Do the big rename: Performance Counters -> Performance Events 2009-09-21 14:28:04 +02:00
pgalloc.h
pgtable.h
poll.h
posix_types.h
processor.h [S390] fix disabled_wait inline assembly clobber list 2009-09-22 22:58:45 +02:00
ptrace.h [S390] 64-bit register support for 31-bit processes 2009-10-06 10:35:10 +02:00
qdio.h
qeth.h
reset.h
resource.h
rwsem.h
s390_ext.h
scatterlist.h
schid.h
sclp.h
scsw.h
seccomp.h
sections.h
segment.h
sembuf.h
setup.h
sfp-machine.h
sfp-util.h
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h
sigp.h
smp.h cpumask: remove arch_send_call_function_ipi 2009-09-24 09:34:47 +09:30
socket.h
sockios.h
sparsemem.h
spinlock.h
spinlock_types.h
stat.h
statfs.h
string.h
suspend.h
swab.h
syscall.h
sysinfo.h
system.h
tape390.h
termbits.h
termios.h
thread_info.h
timer.h
timex.h
tlb.h
tlbflush.h
todclk.h
topology.h cpumask: remove obsolete topology_core_siblings and topology_thread_siblings: s390 2009-09-24 09:34:42 +09:30
types.h
uaccess.h
ucontext.h [S390] 64-bit register support for 31-bit processes 2009-10-06 10:35:10 +02:00
unaligned.h
unistd.h perf: Do the big rename: Performance Counters -> Performance Events 2009-09-21 14:28:04 +02:00
user.h
vdso.h
vtoc.h
xor.h
zcrypt.h