Greetings,
0day kernel testing robot got the below dmesg and the first bad commit is
https://github.com/0day-ci/linux/commits/Phil-Sutter/lib-test_rhashtable-...
commit 776c6d679dc8b68c81e210eb07c7418dcd9f47f6
Author: Phil Sutter <phil(a)nwl.cc>
AuthorDate: Fri Jul 21 16:51:31 2017 +0200
Commit: 0day robot <fengguang.wu(a)intel.com>
CommitDate: Sun Jul 23 11:46:57 2017 +0800
lib: test_rhashtable: fix for large entry counts
During concurrent access testing, threadfunc() concatenated thread ID
and object index to create a unique key like so:
| tdata->objs[i].value = (tdata->id << 16) | i;
This breaks if a user passes an entries parameter of 64k or higher,
since 'i' might use more than 16 bits then. Effectively, this will lead
to duplicate keys in the table.
Fix the problem by introducing a struct holding object and thread ID and
using that as key instead of a single integer type field.
Fixes: f4a3e90ba5739 ("rhashtable-test: extend to test concurrency")
Reported by: Manuel Messner <mm(a)skelett.io>
Signed-off-by: Phil Sutter <phil(a)nwl.cc>
54a7d50b92 x86: mark kprobe templates as character arrays, not single characters
776c6d679d lib: test_rhashtable: fix for large entry counts
776c6d679d lib: test_rhashtable: fix for large entry counts
+------------------------------------------------------------------+------------+------------+------------+
| | 54a7d50b92 |
776c6d679d | 776c6d679d |
+------------------------------------------------------------------+------------+------------+------------+
| boot_successes | 33 | 0
| 0 |
| boot_failures | 0 | 13
| 13 |
| invoked_oom-killer:gfp_mask=0x | 0 | 2
| 2 |
| Mem-Info | 0 | 2
| 2 |
| Kernel_panic-not_syncing:Out_of_memory_and_no_killable_processes | 0 | 2
| 2 |
| BUG:KASAN:stack-out-of-bounds | 0 | 11
| 11 |
| kernel_BUG_at_lib/test_rhashtable.c | 0 | 11
| 11 |
| invalid_opcode:#[##] | 0 | 11
| 11 |
| Kernel_panic-not_syncing:Fatal_exception | 0 | 11
| 11 |
+------------------------------------------------------------------+------------+------------+------------+
[ 1.080485] Adding 50000 keys
[ 1.108377] Traversal complete: counted=50000, nelems=50000, entries=50000,
table-jumps=0
[ 1.131479] Traversal complete: counted=50000, nelems=50000, entries=50000,
table-jumps=0
[ 1.133570] Deleting 50000 keys
[ 1.134500] ==================================================================
[ 1.135496] BUG: KASAN: stack-out-of-bounds in jhash+0x2c2/0x496
[ 1.135496] Read of size 1 at addr ffff88001a517d3f by task swapper/1
[ 1.135496]
[ 1.135496] CPU: 0 PID: 1 Comm: swapper Not tainted 4.13.0-rc1-00096-g776c6d6 #1
[ 1.135496] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
1.9.3-20161025_171302-gandalf 04/01/2014
[ 1.135496] Call Trace:
[ 1.135496] dump_stack+0x19/0x1b
[ 1.135496] print_address_description+0x57/0x223
[ 1.135496] ? jhash+0x2c2/0x496
[ 1.135496] kasan_report+0x1ff/0x228
[ 1.135496] __asan_report_load1_noabort+0x14/0x16
[ 1.135496] jhash+0x2c2/0x496
[ 1.135496] ? kstrtoll_from_user+0x122/0x122
[ 1.135496] test_rht_init+0x6c4/0xf4e
[ 1.135496] ? test_kstrtox_init+0x10c8/0x10c8
[ 1.135496] ? __test_string_get_size+0xfc/0xfc
[ 1.135496] ? test_kstrtox_init+0x10c8/0x10c8
[ 1.135496] do_one_initcall+0xfe/0x1cf
[ 1.135496] ? initcall_blacklisted+0x152/0x152
[ 1.135496] ? __wake_up+0x5b/0x71
[ 1.135496] kernel_init_freeable+0x237/0x2e9
[ 1.135496] ? rest_init+0xea/0xea
[ 1.135496] kernel_init+0xc/0x100
[ 1.135496] ? rest_init+0xea/0xea
[ 1.135496] ret_from_fork+0x25/0x30
[ 1.135496]
[ 1.135496] The buggy address belongs to the page:
[ 1.135496] page:ffffea00006945c0 count:0 mapcount:0 mapping: (null)
index:0x0
[ 1.135496] flags: 0x4000000000000000()
[ 1.135496] raw: 4000000000000000 0000000000000000 0000000000000000 00000000ffffffff
# HH:MM RESULT GOOD BAD
GOOD_BUT_DIRTY DIRTY_NOT_BAD
git bisect start a96ad486e9310aecdba786b280c747d19f6b735a
5771a8c08880cdca3bfb4a3fc6d309d6bba20877 --
git bisect bad 6e41ee05baa2f1f9a5938ce0b87e413e6e010af5 # 21:30 B 0 11 24 0
Merge
'linux-review/Ujjal-Singh/dmaengine-ioatdma-Add-intr_coalesce-sysfs-entry/20170723-014602'
into devel-catchup-201707232004
git bisect bad 119d86b31f08df8ce973ac8c621396f71dd46d6c # 21:43 B 0 11 24 0
Merge
'linux-review/Peter-Chen/usb-chipidea-core-do-not-register-extcon-notifier-if-extcon-device-is-not-existed/20170723-112632'
into devel-catchup-201707232004
git bisect good 8d42254e2012cc1c06ec417eee2a932bfd4d3d0f # 22:02 G 11 0 0 0
Merge 'linux-review/Arnd-Bergmann/gpu-ipu-v3-add-DRM-dependency/20170723-193330'
into devel-catchup-201707232004
git bisect good a26a6aacdb39a7459915fd1f921e79fe57be03a9 # 22:14 G 11 0 0 0
Merge
'linux-review/Paolo-Abeni/IP-do-not-modify-ingress-packet-IP-option-in-ip_options_echo/20170723-141426'
into devel-catchup-201707232004
git bisect good 160bc3e3bb8cf536b548aa3410d4c01ed31caf49 # 22:25 G 11 0 0 0
Merge
'linux-review/Paolo-Abeni/net-socket-fix-type-in-assignment-and-trim-long-line/20170723-122027'
into devel-catchup-201707232004
git bisect good dfca354f0da9f892c045610ba27f8315f0246377 # 22:38 G 11 0 0 0
Merge
'linux-review/Dan-Carpenter/bpf-dev_map_alloc-shouldn-t-return-NULL/20170723-115149'
into devel-catchup-201707232004
git bisect bad 29b1e571508fc9dbd361202591abed113370d8bf # 22:52 B 0 11 24 0
Merge
'linux-review/Phil-Sutter/lib-test_rhashtable-fix-for-large-entry-counts/20170723-114651'
into devel-catchup-201707232004
git bisect bad 776c6d679dc8b68c81e210eb07c7418dcd9f47f6 # 23:02 B 0 11 24 0
lib: test_rhashtable: fix for large entry counts
# first bad commit: [776c6d679dc8b68c81e210eb07c7418dcd9f47f6] lib: test_rhashtable: fix
for large entry counts
git bisect good 54a7d50b9205b5064628c1d10de6531d2d9fbc90 # 23:26 G 33 0 0 0
x86: mark kprobe templates as character arrays, not single characters
# extra tests with CONFIG_DEBUG_INFO_REDUCED
git bisect bad 776c6d679dc8b68c81e210eb07c7418dcd9f47f6 # 23:38 B 0 11 24 0
lib: test_rhashtable: fix for large entry counts
# extra tests on HEAD of linux-devel/devel-catchup-201707232004
git bisect bad a96ad486e9310aecdba786b280c747d19f6b735a # 23:38 B 0 13 29 0
0day head guard for 'devel-catchup-201707232004'
# extra tests on tree/branch
linux-review/Phil-Sutter/lib-test_rhashtable-fix-for-large-entry-counts/20170723-114651
git bisect bad 776c6d679dc8b68c81e210eb07c7418dcd9f47f6 # 23:41 B 0 11 26 2
lib: test_rhashtable: fix for large entry counts
# extra tests with first bad commit reverted
git bisect good 20801c68d1237163c0a17839f37e63d6862bfce0 # 00:04 G 11 0 0 0
Revert "lib: test_rhashtable: fix for large entry counts"
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/lkp Intel Corporation