Bug 790367
Summary: | ccache keyring test fails on s390 | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Dan Horák <dan> | ||||
Component: | kernel | Assignee: | David Howells <dhowells> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | rawhide | CC: | brueckner, dhowells, gansalmon, itamar, jonathan, kernel-maint, madhu.chinakonda, nalin, nathaniel | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | s390 | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | kernel-2.6.42.7-1.fc15 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | |||||||
: | 795095 (view as bug list) | Environment: | |||||
Last Closed: | 2012-02-21 02:22:48 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 795095 | ||||||
Attachments: |
|
Description
Dan Horák
2012-02-14 10:51:30 UTC
It could be a problem of keyctl interaction with kernel, because keyctl in s390 chroot running on top of F-15 (kernel 2.6.41) also fails <mock-chroot>[root@devel1 /]# keyctl show Session Keyring Unable to dump key: Function not implemented And from running keyutils.s390 on s390x (Fedora 16) [root@devel4 ~]# keyctl show Session Keyring -3: key inaccessible (Function not implemented) switching to keyutils ... [root@devel4 ~]# strace keyctl show execve("/bin/keyctl", ["keyctl", "show"], [/* 21 vars */]) = 0 brk(0) = 0xa5b000 mmap(0x1000, 12884901922, PROT_NONE, MAP_FILE, 0, 0) = 0x7d537000 mmap(0x2000, 12884901922, PROT_NONE, MAP_FILE, 0, 0) = 0x7d535000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open(0xffffffff7d554714, O_RDONLY|O_CLOEXEC) = 3 SYS_197(0x3, 0x3ff7f957210, 0x3ff7f957210, 0x3ff7d55a8d4, 0x3ff00400761, 0x7d55a868, 0x7d55a8f0, 0x7d55a86c, 0, 0x3ff7d55a8d8, 0x3ff7d559fb0, 0x7d552d78, 0xfd549290, 0x7f957108, 0x3fffd0626f0, 0, 0, 0, 0, 0, 0, 0, 0x3, 0, 0x404b000000000000, 0, 0x41341ff000000000, 0, 0, 0, 0, 0) = 0 mmap(0x88eb, 4294967298, PROT_NONE, MAP_FILE, 0, 0) = 0x7d52c000 close(3) = 0 open("/lib/libkeyutils.so.1", O_RDONLY|O_CLOEXEC) = 3 read(3, 0x3ff7f9573ac, 4393751544320) = 512 SYS_197(0x3, 0x3ff7f9572a0, 0x3ff7f9572a0, 0x3ff7d55a8d4, 0x3ff7d55a8f0, 0x7d55a000, 0x7d55a8f0, 0, 0, 0x3ff7d55a8d8, 0x3ff7d559fb0, 0x7d552d78, 0xfd53fd2e, 0x7f957128, 0x3fffd0626f0, 0, 0, 0, 0, 0, 0, 0, 0x3, 0, 0x404b000000000000, 0, 0x41341ff000000000, 0, 0, 0, 0, 0) = 0 mmap(0x2160, 21474838530, PROT_NONE, MAP_FILE, 0, 0) = 0x7d529000 mmap(0x7d52b00000001000, 12884903954, 0x2000 /* PROT_??? */, MAP_FILE, 0, 0) = 0x7d52b000 close(3) = 0 open("/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 read(3, 0x3ff7f957394, 4393751544320) = 512 SYS_197(0x3, 0x3ff7f957288, 0x3ff7f957288, 0x3ff7d55a8d4, 0x3ff7d55a8f0, 0x7d55a000, 0x7d55a8f0, 0, 0, 0x3ff7d55a8d8, 0x3ff7d559fb0, 0x7d552d78, 0xfd53fd2e, 0x7f957110, 0x3fffd0626f0, 0, 0, 0, 0, 0, 0, 0, 0x3, 0, 0x404b000000000000, 0, 0x41341ff000000000, 0, 0, 0, 0, 0) = 0 mmap(0x17f718, 21474838530, PROT_NONE, MAP_FILE|MAP_FIXED|MAP_ANONYMOUS|MAP_POPULATE|MAP_NONBLOCK|MAP_DENYWRITE|MAP_LOCKED|0x7d5400c0, 2102733912, 0xfd54f08a7f957090) = 0x7d3a9000 mmap(0x7d52300000003000, 12884903954, 0x179000 /* PROT_??? */, MAP_FILE|MAP_FIXED|MAP_ANONYMOUS|MAP_POPULATE|MAP_NONBLOCK|MAP_DENYWRITE|MAP_LOCKED|0x7d5400c0, 2102733912, 0xfd54f08a7f957090) = 0x7d523000 mmap(0x7d52600000002718, 12884901938, PROT_NONE, MAP_FILE|MAP_FIXED|MAP_ANONYMOUS|MAP_POPULATE|MAP_NONBLOCK|MAP_DENYWRITE|MAP_LOCKED|0x7d5400c0, 2102733912, 0xfd54f08a7f957090) = 0x7d526000 close(3) = 0 open("/lib/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3 read(3, 0x3ff7f957304, 4393751544320) = 512 SYS_197(0x3, 0x3ff7f9571f8, 0x3ff7f9571f8, 0x3ff7d55a8d4, 0x3ff7d536198, 0x7d55a000, 0x7d536198, 0, 0, 0x3ff7d55a8d8, 0x3ff7d559fb0, 0x7d552d78, 0xfd53fd2e, 0x7f957080, 0x3fffd0626f0, 0, 0, 0, 0, 0, 0, 0, 0x3, 0, 0x404b000000000000, 0, 0x41341ff000000000, 0, 0, 0, 0, 0) = 0 mmap(0x40a4, 21474838530, PROT_NONE, MAP_FILE, 0, 0) = 0x7d3a4000 mmap(0x7d3a700000002000, 12884903954, 0x2000 /* PROT_??? */, MAP_FILE, 0, 0) = 0x7d3a7000 close(3) = 0 mmap(0x1000, 12884901922, PROT_NONE, MAP_FILE, 2140501536, 0x7f957788) = 0x7d3a3000 mprotect(0x7d523000, 4393751552000, PROT_READ) = 0 mprotect(0x7d3a7000, 4393751547904, PROT_READ) = 0 mprotect(0x7d559000, 4393751547904, PROT_READ) = 0 munmap(0x7d52c000, 4393751578859) = 0 geteuid() = 0 getegid() = 0 getgroups(0, 0x3ff00000000) = 1 brk(0) = 0xa5b000 brk(0xa7c000) = 0xa7c000 brk(0) = 0xa7c000 getgroups(1, [?] 0x3ff00a5b008) = 1 SYS_197(0x1, 0x3ff7f957768, 0x3ff7f957768, 0x3ff7d528498, 0x3ff00000000, 0xf, 0xf, 0x7d525aa0, 0, 0x3ffffffffc4, 0x3ff7d525000, 0x7d4ea0b8, 0xfd4119f4, 0x7f957660, 0x7d3a38e0fd0626f0, 0, 0, 0, 0, 0, 0, 0, 0x1, 0, 0x404b000000000000, 0, 0x41341ff000000000, 0, 0, 0, 0, 0) = 0 mmap(0x1000, 12884901922, PROT_NONE, MAP_FILE|MAP_FIXED|MAP_NORESERVE|MAP_NONBLOCK|MAP_GROWSDOWN|MAP_EXECUTABLE|MAP_LOCKED|0x7f940640, 2102617816, 0x7d5364407f957844) = 0x7d534000 write(1, 0x3ff7d534000, 4393751543824Session Keyring ) = 16 keyctl(0x6, 0x3fffffffffd, 0x3ff00000000, 0x3ff00000000, 0x3ff00403bf8) = -1 ENOSYS (Function not implemented) write(1, 0x3ff7d534000, 4393751543856-3: key inaccessible (Function not implemented) ) = 48 exit_group(0) = ? I've swapped strace to 32-bit package and here is the result [root@devel4 ~]# strace keyctl show execve("/bin/keyctl", ["keyctl", "show"], [/* 21 vars */]) = 0 brk(0) = 0x5ed000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7d5e8000 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7d5e6000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=35051, ...}) = 0 mmap(NULL, 35051, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7d5dd000 close(3) = 0 open("/lib/libkeyutils.so.1", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\26\0\0\0\1\0\0\r\330\0\0\0004"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=9844, ...}) = 0 mmap(NULL, 8544, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7d5da000 mmap(0x7d5dc000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7d5dc000 close(3) = 0 open("/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\26\0\0\0\1\0\1\274\264\0\0\0004"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1787456, ...}) = 0 mmap(NULL, 1570584, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7d45a000 mmap(0x7d5d4000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x179000) = 0x7d5d4000 mmap(0x7d5d7000, 10008, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7d5d7000 close(3) = 0 open("/lib/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\26\0\0\0\1\0\0\v\274\0\0\0004"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=17668, ...}) = 0 mmap(NULL, 16548, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7d455000 mmap(0x7d458000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7d458000 close(3) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7d454000 mprotect(0x7d5d4000, 8192, PROT_READ) = 0 mprotect(0x7d458000, 4096, PROT_READ) = 0 mprotect(0x7d60a000, 4096, PROT_READ) = 0 munmap(0x7d5dd000, 35051) = 0 geteuid() = 0 getegid() = 0 getgroups(0, NULL) = 1 brk(0) = 0x5ed000 brk(0x60e000) = 0x60e000 brk(0) = 0x60e000 getgroups(1, [0]) = 1 fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7d5e5000 write(1, "Session Keyring\n", 16Session Keyring ) = 16 keyctl(0x6, 0xfffffffd, 0, 0, 0x403bf8) = -1 ENOSYS (Function not implemented) write(1, "-3: key inaccessible (Function n"..., 48-3: key inaccessible (Function not implemented) ) = 48 exit_group(0) = ? The 32-bit wrapper is included in the kernel if I see correctly [root@devel4 boot]# grep sys_keyctl /boot/System.map-3.1.9-1.fc16.s390x 000000000011f18c T compat_sys_keyctl_wrapper 000000000017d010 W compat_sys_keyctl 0000000000392014 T sys_keyctl [root@devel4 boot]# uname -a Linux devel4.s390.bos.redhat.com 3.1.9-1.fc16.s390x #1 SMP Fri Jan 20 08:19:37 UTC 2012 s390x s390x s390x GNU/Linux If I do: [root@devel4 ~]# grep COMPAT /boot/config-3.1.9-1.fc16.s390x # CONFIG_COMPAT_BRK is not set CONFIG_BLOCK_COMPAT=y CONFIG_COMPAT=y CONFIG_SYSVIPC_COMPAT=y CONFIG_COMPAT_BINFMT_ELF=y # CONFIG_NF_CONNTRACK_PROC_COMPAT is not set I don't see CONFIG_KEYS_COMPAT mentioned - which means that compat_sys_keyctl() is not compiled in. The compat versions of add_key() and request_key() only have asm-based compat wrappers in arch/s390/kernel/compat_wrapper.S and those jump directly to the main routines. The problem appears to be that arch/s390/Kconfig does not invoke KEYS_COMPAT, unlike the x86 and powerpc versions. Created attachment 561908 [details]
Fix to enable 32-bit s390 keyctl() syscall in s390x kernel
I've rebuilt the kernel with the patch and it's fixed [root@devel4 ~]# uname -a Linux devel4.s390.bos.redhat.com 3.2.6-3.fc16.s390x #1 SMP Tue Feb 14 09:14:02 EST 2012 s390x s390x s390x GNU/Linux (reverse-i-search)`ke': ma^C [root@devel4 ~]# keyctl show Session Keyring -3 --alswrv 0 0 keyring: _ses 427096187 --alswrv 0 -1 \_ keyring: _uid.0 [root@devel4 ~]# rpm -q keyutils keyutils-1.5.2-1.fc16.s390 one more component switch :-) I applied the patch from comment #8 to rawhide and f17. Should be in a f17/rawhide soon. I've posted the patch upstream. kernel-3.3.0-0.rc3.git6.2.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/kernel-3.3.0-0.rc3.git6.2.fc17 Package kernel-3.3.0-0.rc3.git6.2.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing kernel-3.3.0-0.rc3.git6.2.fc17' as soon as you are able to, then reboot. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-1820/kernel-3.3.0-0.rc3.git6.2.fc17 then log in and leave karma (feedback). kernel-3.3.0-0.rc3.git7.2.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/kernel-3.3.0-0.rc3.git7.2.fc17 kernel-3.3.0-0.rc3.git7.2.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report. kernel-3.2.7-1.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/kernel-3.2.7-1.fc16 kernel-2.6.42.7-1.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/kernel-2.6.42.7-1.fc15 kernel-3.2.7-1.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report. kernel-2.6.42.7-1.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report. |