https://github.com/torvalds/linux
Revision 02608e02fbec04fccf2eb0cc8d8082f65c0a4286 authored by Laura Abbott on 21 December 2016, 20:32:54 UTC, committed by Herbert Xu on 27 December 2016, 09:32:11 UTC
Christopher Covington reported a crash on aarch64 on recent Fedora kernels: kernel BUG at ./include/linux/scatterlist.h:140! Internal error: Oops - BUG: 0 [#1] PREEMPT SMP Modules linked in: CPU: 2 PID: 752 Comm: cryptomgr_test Not tainted 4.9.0-11815-ge93b1cc #162 Hardware name: linux,dummy-virt (DT) task: ffff80007c650080 task.stack: ffff800008910000 PC is at sg_init_one+0xa0/0xb8 LR is at sg_init_one+0x24/0xb8 ... [<ffff000008398db8>] sg_init_one+0xa0/0xb8 [<ffff000008350a44>] test_acomp+0x10c/0x438 [<ffff000008350e20>] alg_test_comp+0xb0/0x118 [<ffff00000834f28c>] alg_test+0x17c/0x2f0 [<ffff00000834c6a4>] cryptomgr_test+0x44/0x50 [<ffff0000080dac70>] kthread+0xf8/0x128 [<ffff000008082ec0>] ret_from_fork+0x10/0x50 The test vectors used for input are part of the kernel image. These inputs are passed as a buffer to sg_init_one which eventually blows up with BUG_ON(!virt_addr_valid(buf)). On arm64, virt_addr_valid returns false for the kernel image since virt_to_page will not return the correct page. Fix this by copying the input vectors to heap buffer before setting up the scatterlist. Reported-by: Christopher Covington <cov@codeaurora.org> Fixes: d7db7a882deb ("crypto: acomp - update testmgr with support for acomp") Signed-off-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 7ce7d89
Tip revision: 02608e02fbec04fccf2eb0cc8d8082f65c0a4286 authored by Laura Abbott on 21 December 2016, 20:32:54 UTC
crypto: testmgr - Use heap buffer for acomp test input
crypto: testmgr - Use heap buffer for acomp test input
Tip revision: 02608e0
File | Mode | Size |
---|---|---|
partitions | ||
Kconfig | -rw-r--r-- | 4.9 KB |
Kconfig.iosched | -rw-r--r-- | 1.6 KB |
Makefile | -rw-r--r-- | 1.0 KB |
badblocks.c | -rw-r--r-- | 14.5 KB |
bio-integrity.c | -rw-r--r-- | 14.3 KB |
bio.c | -rw-r--r-- | 49.9 KB |
blk-cgroup.c | -rw-r--r-- | 35.8 KB |
blk-core.c | -rw-r--r-- | 92.3 KB |
blk-exec.c | -rw-r--r-- | 3.2 KB |
blk-flush.c | -rw-r--r-- | 16.4 KB |
blk-integrity.c | -rw-r--r-- | 12.3 KB |
blk-ioc.c | -rw-r--r-- | 10.2 KB |
blk-lib.c | -rw-r--r-- | 9.9 KB |
blk-map.c | -rw-r--r-- | 5.9 KB |
blk-merge.c | -rw-r--r-- | 19.4 KB |
blk-mq-cpumap.c | -rw-r--r-- | 2.3 KB |
blk-mq-pci.c | -rw-r--r-- | 1.5 KB |
blk-mq-sysfs.c | -rw-r--r-- | 12.9 KB |
blk-mq-tag.c | -rw-r--r-- | 11.1 KB |
blk-mq-tag.h | -rw-r--r-- | 2.2 KB |
blk-mq.c | -rw-r--r-- | 63.8 KB |
blk-mq.h | -rw-r--r-- | 2.9 KB |
blk-settings.c | -rw-r--r-- | 28.2 KB |
blk-softirq.c | -rw-r--r-- | 4.3 KB |
blk-stat.c | -rw-r--r-- | 5.9 KB |
blk-stat.h | -rw-r--r-- | 1.1 KB |
blk-sysfs.c | -rw-r--r-- | 22.6 KB |
blk-tag.c | -rw-r--r-- | 10.0 KB |
blk-throttle.c | -rw-r--r-- | 42.7 KB |
blk-timeout.c | -rw-r--r-- | 5.9 KB |
blk-wbt.c | -rw-r--r-- | 17.6 KB |
blk-wbt.h | -rw-r--r-- | 3.9 KB |
blk-zoned.c | -rw-r--r-- | 7.6 KB |
blk.h | -rw-r--r-- | 9.0 KB |
bounce.c | -rw-r--r-- | 5.8 KB |
bsg-lib.c | -rw-r--r-- | 6.4 KB |
bsg.c | -rw-r--r-- | 22.9 KB |
cfq-iosched.c | -rw-r--r-- | 127.1 KB |
cmdline-parser.c | -rw-r--r-- | 4.9 KB |
compat_ioctl.c | -rw-r--r-- | 20.8 KB |
deadline-iosched.c | -rw-r--r-- | 11.3 KB |
elevator.c | -rw-r--r-- | 23.7 KB |
genhd.c | -rw-r--r-- | 45.0 KB |
ioctl.c | -rw-r--r-- | 15.1 KB |
ioprio.c | -rw-r--r-- | 5.1 KB |
noop-iosched.c | -rw-r--r-- | 2.6 KB |
partition-generic.c | -rw-r--r-- | 16.6 KB |
scsi_ioctl.c | -rw-r--r-- | 19.5 KB |
t10-pi.c | -rw-r--r-- | 4.8 KB |
Computing file changes ...