Greetings,
0day kernel testing robot got the below dmesg and the first bad commit is
https://github.com/0day-ci/linux/commits/ira-weiny-intel-com/PKS-Add-Prot...
commit 49c53ea42446d57d71f42c4df24d1e3d5355ea7d
Author: Ira Weiny <ira.weiny(a)intel.com>
AuthorDate: Tue Jul 14 00:02:17 2020 -0700
Commit: 0day robot <lkp(a)intel.com>
CommitDate: Tue Jul 14 15:10:38 2020 +0800
kmap: Add stray write protection for device pages
Device managed pages may have additional protections. These protections
need to be removed prior to valid use by kernel users.
Check for special treatment of device managed pages in kmap and take
action if needed. We use kmap as an interface for generic kernel code
because under normal circumstances it would be a bug for general kernel
code to not use kmap prior to accessing kernel memory. Therefore, this
should allow any valid kernel users to seamlessly use these pages
without issues.
Signed-off-by: Ira Weiny <ira.weiny(a)intel.com>
f4cf975573 memremap: Add zone device access protection
49c53ea424 kmap: Add stray write protection for device pages
5ac3c0b479 Enable stray write protection
+------------------------------------------+------------+------------+------------+
| | f4cf975573 | 49c53ea424 | 5ac3c0b479 |
+------------------------------------------+------------+------------+------------+
| boot_successes | 34 | 0 | 0 |
| boot_failures | 1 | 16 | 4 |
| kernel_BUG_at_mm/usercopy.c | 1 | | |
| invalid_opcode:#[##] | 1 | 16 | 4 |
| EIP:usercopy_abort | 1 | | |
| Kernel_panic-not_syncing:Fatal_exception | 1 | 16 | 4 |
| kernel_BUG_at_arch/x86/mm/physaddr.c | 0 | 16 | 4 |
| EIP:__phys_addr | 0 | 16 | 4 |
+------------------------------------------+------------+------------+------------+
If you fix the issue, kindly add following tag
Reported-by: kernel test robot <lkp(a)intel.com>
[ 0.999589] Calibrating delay loop (skipped) preset value.. 5852.65 BogoMIPS
(lpj=11705304)
[ 1.003610] pid_max: default: 4096 minimum: 301
[ 1.004586] Mount-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[ 1.005827] Mountpoint-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[ 1.008477] ------------[ cut here ]------------
[ 1.009218] kernel BUG at arch/x86/mm/physaddr.c:80!
[ 1.010013] invalid opcode: 0000 [#1] DEBUG_PAGEALLOC
[ 1.011586] CPU: 0 PID: 0 Comm: swapper Not tainted 5.8.0-rc5-00020-g49c53ea42446d #1
[ 1.011586] EIP: __phys_addr+0x3c/0x51
[ 1.011586] Code: e5 56 8d b0 00 00 00 c0 53 89 c3 74 0b e8 09 37 0c 00 84 c0 74 02 0f
0b a1 c0 85 35 42 85 c0 74 18 89 f2 c1 ea 0c 39 d0 73 02 <0f> 0b 89 d8 e8 b5 18 00
00 39 f0 74 02 0f 0b 89 f0 5b 5e 5d c3 a1
[ 1.011586] EAX: 000b73fe EBX: ffffc000 ECX: fffff000 EDX: 000bfffc
[ 1.011586] ESI: bfffc000 EDI: ffffd000 EBP: 41993ea0 ESP: 41993e98
[ 1.011586] DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 EFLAGS: 00210283
[ 1.011586] CR0: 80050033 CR2: ffffffff CR3: 01c32000 CR4: 00000690
[ 1.011586] Call Trace:
[ 1.011586] ? kmap_to_page+0x45/0x50
[ 1.011586] ? kernel_init_free_pages+0x70/0x99
[ 1.011586] ? get_page_from_freelist+0x117/0x210
[ 1.011586] ? __alloc_pages_nodemask+0xec/0x1aa
[ 1.011586] ? dup_mmap+0x269/0x2b3
[ 1.011586] ? pte_alloc_one+0x13/0x56
[ 1.011586] ? __pte_alloc+0x10/0x6d
[ 1.011586] ? __get_locked_pte+0x6f/0x80
[ 1.011586] ? poking_init+0x2c/0x5f
[ 1.011586] ? cgroup1_pidlist_destroy_all+0x79/0x79
[ 1.011586] ? start_kernel+0x38a/0x3ac
[ 1.011586] ? i386_start_kernel+0x42/0x44
[ 1.011586] ? startup_32_smp+0x15f/0x170
[ 1.011586] Modules linked in:
[ 1.011601] ---[ end trace 037186089f0f8c42 ]---
[ 1.012322] EIP: __phys_addr+0x3c/0x51
# HH:MM RESULT GOOD BAD
GOOD_BUT_DIRTY DIRTY_NOT_BAD
git bisect start f5083c06fdc3721beb7cd6e7fa2c4cc546c3e95d
11ba468877bb23f28956a35e896356252d63c983 --
git bisect bad 86b5401941180114da056eb852febba2d6d971e2 # 00:07 B 0 4 20 0
Merge 'gpio/gpiochip-no-driver-h' into devel-catchup-202007141826
git bisect good c687873febc1b411cb14ce9e169205577e2d4eb1 # 00:16 G 10 0 0 0
Merge
'linux-review/Petr-Mladek/selftests-livepatch-adopt-to-newer-sysctl-error-format/20200714-171325'
into devel-catchup-202007141826
git bisect bad b29c2d2bc3998fecd0b150cb23d3d3a39414e356 # 00:16 B 0 7 23 0
Merge 'djwong-xfs/xfs-5.8-fixes' into devel-catchup-202007141826
git bisect good d6ab6668a07ebaff89a0199170844b2e18dbb1ed # 00:25 G 11 0 0 0
Merge 'intel-gvt-linux/gvt-next' into devel-catchup-202007141826
git bisect bad 750e9f881e1c39daa1e4b58aed0d00a9a2db62a7 # 00:25 B 0 4 20 0
Merge
'linux-review/Karthik-B-S/Asynchronous-flip-implementation-for-i915/20200714-095304'
into devel-catchup-202007141826
git bisect bad 07cd5657e8f884ec71ba4050239ff66bfb2804b9 # 00:30 B 0 4 20 0
Merge
'linux-review/ira-weiny-intel-com/PKS-Add-Protection-Keys-Supervisor-PKS-support/20200714-151030'
into devel-catchup-202007141826
git bisect good 512580bd914f55275d53fdb3661ad8682d5ceba6 # 01:26 G 10 0 0 0
x86/pks: Add PKS Test code
git bisect bad 49c53ea42446d57d71f42c4df24d1e3d5355ea7d # 01:39 B 0 2 18 0
kmap: Add stray write protection for device pages
git bisect good cb4c357f146b6f0a22715b9fda561fe975b4d527 # 01:49 G 10 0 0 0
drivers/dax: Expand lock scope to cover the use of addresses
git bisect good f4cf975573f250eb0ddbfc2ac4770336a14f49c1 # 02:17 G 11 0 0 0
memremap: Add zone device access protection
# first bad commit: [49c53ea42446d57d71f42c4df24d1e3d5355ea7d] kmap: Add stray write
protection for device pages
git bisect good f4cf975573f250eb0ddbfc2ac4770336a14f49c1 # 02:24 G 31 0 1 1
memremap: Add zone device access protection
# extra tests with debug options
git bisect bad 49c53ea42446d57d71f42c4df24d1e3d5355ea7d # 02:35 B 0 4 20 0
kmap: Add stray write protection for device pages
# extra tests on head commit of
linux-review/ira-weiny-intel-com/PKS-Add-Protection-Keys-Supervisor-PKS-support/20200714-151030
git bisect bad 5ac3c0b479bff80370d8f7d5769d4fb3ed1d9935 # 02:52 B 0 4 20 0
Enable stray write protection
# bad: [5ac3c0b479bff80370d8f7d5769d4fb3ed1d9935] Enable stray write protection
# extra tests on revert first bad commit
git bisect good 0be65bffafa6fad7a6b9d7ea47aa82b402d4f589 # 03:11 G 10 0 0 0
Revert "kmap: Add stray write protection for device pages"
# good: [0be65bffafa6fad7a6b9d7ea47aa82b402d4f589] Revert "kmap: Add stray write
protection for device pages"
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/lkp@lists.01.org