Description of problem: Problem found by the GDB testsuite. Version-Release number of selected component (if applicable): kernel-2.6.18-75.el5.rm4.s390x (FAIL) kernel-2.6.18-77.el5.s390x (FAIL) kernel-2.6.18-53.el5.s390x (RHEL-5.1) surprisingly PASSes kernel-2.6.9-67.0.1.EL.s390x (RHEL-4.6) PASSes How reproducible: Always. Steps to Reproduce: 1. http://sourceware.org/systemtap/wiki/utrace/tests 2. Testcase there: http://sources.redhat.com/cgi-bin/cvsweb.cgi/~checkout~/tests/ptrace-tests/tests/user-area-access.c?cvsroot=systemtap Actual results: user-area-access: user-area-access.c:134: main: Assertion `memcmp (&u.user, &u2.user, sizeof u.byte) == 0' failed. Aborted Expected results: <nothing>, rc=0 Additional info: there is an s390x (only s390x) regression: kernel-2.6.18-53.el5.s390x -> kernel-2.6.18-75.el5.rm4.s390x Reproducer so far on RHEL-5.1 with upgraded only the kernel: wget http://porkchop.devel.redhat.com/brewroot/packages/gdb/6.5/37.el5/src/gdb-6.5-37.el5.src.rpm rpmbuild -bc /usr/src/redhat/SPECS/gdb.spec cd /usr/src/redhat/BUILD/gdb-6.5/build-s390x-redhat-linux-gnu/gdb/testsuite runtest gdb.base/call-ar-st.exp ../gdb -nx -ex 'file gdb.base/call-ar-st' -ex 'b 1209' -ex 'r' -ex 'print print_double_array(double_array)' -ex 'print print_char_array(char_array)' -> inferior SEGV Testsuite regression against RHEL-5.1: (gdb) print print_char_array(char_array) array_c : ========= -Z -aZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZ -aZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZ -aZaZaZaZaZaZaZaZaZa -$2 = void -(gdb) PASS: gdb.base/call-ar-st.exp: print print_char_array(char_array) +Program received signal SIGSEGV, Segmentation fault. +vfprintf@@GLIBC_2.4 () from /lib64/libc.so.6 +The program being debugged was signaled while in a function called from GDB. +GDB remains in the frame where the signal was received. +To change this behavior use "set unwindonsignal on" +Evaluation of the expression containing the function (print_char_array) will be abandoned. +(gdb) FAIL: gdb.base/call-ar-st.exp: print print_char_array(char_array) (pattern 3) QA: Covered by the testcase `user-area-access' of `/kernel/syscalls/ptrace'.
This bugzilla has Keywords: Regression. Since no regressions are allowed between releases, it is also being proposed as a blocker for this release. Please resolve ASAP.
Created attachment 293842 [details] Fix. I hope this is an obvious fix but sure the testsuites needs to be rerun with it. It is a regression from: linux-2.6-utrace-s390-regs-fixes.patch
There still remains a regression since RHEL-4 for: biarch-tests/user-area-access as currently the utrace kernels always zeroes on 32-bit s390 the 4 bytes aligned/unused area in between: struct user_regs_struct { ... long unsigned int orig_gpr2; <- HERE are 4 aligned bytes s390_fp_regs fp_regs; ... }; I would rather fix the testcase - or do you rather fix the kernel to be completely backward compatible?
It looks to me like the RHEL-4 kernel is actually returning a word of nearby kernel memory, not anything sane. It is a bug and maybe even a security/safety issue that lets you write that word with POKEUSR. It should be an error or ignored to try to write that word. It should probably read back as zero rather than garbage/internal information leak. If anyone cared, you could file a RHEL4 bug for that. So, fix the test case not to expect this to work. I applied the other fix to upstream utrace, and we'll call this bug just about that issue and not the padding word thing.
Regression was introduced the patch in 2.6.18-60.el5 built on Fri Dec 14 2007. - [utrace] s390 regs fixes (Roland McGrath ) [325451]
in kernel-2.6.18-104.el5 You can download this test kernel from http://people.redhat.com/dzickus/el5
Release note added. If any revisions are required, please set the "requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: (s390)
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2009-0225.html