Greetings,
0day kernel testing robot got the below dmesg and the first bad commit is
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git afs-next
commit fcbd06ff703a11e7b771010ede92177ce406491c
Author: David Howells <dhowells(a)redhat.com>
AuthorDate: Wed May 15 15:54:06 2019 +0100
Commit: David Howells <dhowells(a)redhat.com>
CommitDate: Wed May 15 16:08:55 2019 +0100
keys: Cache result of request_key*() temporarily in task_struct
If a filesystem uses keys to hold authentication tokens, then it needs a
token for each VFS operation that might perform an authentication check -
either by passing it to the server, or using to perform a check based on
authentication data cached locally.
For open files this isn't a problem, since the key should be cached in the
file struct since it represents the subject performing operations on that
file descriptor.
During pathwalk, however, there isn't anywhere to cache the key, except
perhaps in the nameidata struct - but that isn't exposed to the
filesystems. Further, a pathwalk can incur a lot of operations, calling
one or more of the following, for instance:
->lookup()
->permission()
->d_revalidate()
->d_automount()
->get_acl()
->getxattr()
on each dentry/inode it encounters - and each one may need to call
request_key(). And then, at the end of pathwalk, it will call the actual
operation:
->mkdir()
->mknod()
->getattr()
->open()
...
which may need to go and get the token again.
However, it is very likely that all of the operations on a single
dentry/inode - and quite possibly a sequence of them - will all want to use
the same authentication token, which suggests that caching it would be a
good idea.
To this end:
(1) Make it so that a positive result of request_key() and co. that didn't
require upcalling to userspace is cached temporarily in task_struct.
(2) The cache is 1 deep, so a new result displaces the old one.
(3) The key is released by exit and by notify-resume.
(4) The cache is cleared in a newly forked process.
Signed-off-by: David Howells <dhowells(a)redhat.com>
279301e23b afs: Support RCU pathwalk
fcbd06ff70 keys: Cache result of request_key*() temporarily in task_struct
+-------------------------------------------------+------------+------------+
| | 279301e23b | fcbd06ff70 |
+-------------------------------------------------+------------+------------+
| boot_successes | 47 | 0 |
| boot_failures | 1 | 16 |
| BUG:soft_lockup-CPU##stuck_for#s | 1 | |
| RIP:_raw_spin_unlock_irqrestore | 1 | |
| Kernel_panic-not_syncing:softlockup:hung_tasks | 1 | |
| BUG:kernel_reboot-without-warning_in_boot_stage | 0 | 16 |
+-------------------------------------------------+------------+------------+
If you fix the issue, kindly add following tag
Reported-by: kernel test robot <lkp(a)intel.com>
[ 0.522324] ACPI: Early table checksum verification disabled
[ 0.533773] ACPI: RSDP 0x00000000000F6870 000014 (v00 BOCHS )
[ 0.548005] ACPI: RSDT 0x000000001FFE15C9 000030 (v01 BOCHS BXPCRSDT 00000001 BXPC
00000001)
[ 0.563969] ACPI: FACP 0x000000001FFE149D 000074 (v01 BOCHS BXPCFACP 00000001 BXPC
00000001)
[ 0.579681] ACPI: DSDT 0x000000001FFE0040 00145D (v01 BOCHS BXPCDSDT 00000001 BXPC
00000001)
BUG: kernel reboot-without-warning in boot stage
# HH:MM RESULT GOOD BAD
GOOD_BUT_DIRTY DIRTY_NOT_BAD
git bisect start fcbd06ff703a11e7b771010ede92177ce406491c
80f232121b69cc69a31ccb2b38c1665d770b0710 --
git bisect good 51a8f00b122709a1e18050c8b906b1ae391166c9 # 09:12 G 10 0 3 3
afs: Fix double inc of vnode->cb_break
git bisect good 3f33c85c0f065b3a36489f60dd0ff2e9f2d49ec7 # 09:38 G 11 0 2 2
afs: Make vnode->cb_interest RCU safe
git bisect good a97498e28bdbf6b3a05e3b8970e09ffe024a7264 # 09:57 G 10 0 2 2
afs: Fix application of the results of a inline bulk status fetch
git bisect good c2025bd0bd948893650455b7b2b45d7e36b58408 # 10:10 G 10 0 1 1
afs: Provide an RCU-capable key lookup
git bisect good 279301e23b8444ce1f1ea0c94b0d3428a9a10ec4 # 10:27 G 11 0 3 4
afs: Support RCU pathwalk
# first bad commit: [fcbd06ff703a11e7b771010ede92177ce406491c] keys: Cache result of
request_key*() temporarily in task_struct
git bisect good 279301e23b8444ce1f1ea0c94b0d3428a9a10ec4 # 23:12 G 30 0 5 9
afs: Support RCU pathwalk
# extra tests on HEAD of dhowells-fs/afs-next
git bisect bad fcbd06ff703a11e7b771010ede92177ce406491c # 23:12 B 0 16 48 0
keys: Cache result of request_key*() temporarily in task_struct
# extra tests on tree/branch dhowells-fs/afs-next
git bisect bad fcbd06ff703a11e7b771010ede92177ce406491c # 23:17 B 0 16 48 0
keys: Cache result of request_key*() temporarily in task_struct
# extra tests with first bad commit reverted
git bisect good 88b215f57280bb88b175f8cfc8dd3e09ea54dc55 # 23:34 G 10 0 0 0
Revert "keys: Cache result of request_key*() temporarily in task_struct"
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/lkp Intel Corporation