Bug 131145 - struct utmp breaks binary compatibility with 31-bit apps
struct utmp breaks binary compatibility with 31-bit apps
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: glibc (Show other bugs)
3.0
s390x Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-08-27 17:55 EDT by Lev Makhlis
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-08-30 02:12:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Lev Makhlis 2004-08-27 17:55:43 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2)
Gecko/20040803

Description of problem:
On RHEL 3 for s390x, /usr/include/bits/wordsize.h does not define
__WORDSIZE_COMPAT32.  (It does for other "dual" archs, x86_64 and ppc64.)
As a result, struct utmp (whose definition in /usr/include/bits/utmp.h
depends on __WORDSIZE_COMPAT32) is different between 31-bit and 64-bit
applications.  This breaks 31-bit applications running on s390x.

Version-Release number of selected component (if applicable):
2.3.2-95.6

How reproducible:
Always

Steps to Reproduce:
1. Copy /usr/bin/last from a s390 system.
2. Run it on a s390x system.

    

Actual Results:  $ ./last-rhel3-s390
levlinux ts/0lmakhlis                  Wed Dec 31 18:00   still logged in
BVEAUDRY 0                             Wed Dec 31 18:00   still logged in
 
wtmp begins Wed Dec 31 18:00:00 1969


Expected Results:  $ /usr/bin/last
root     pts/1        lnx22sus.bmc.com Fri Aug 27 16:52   still logged in
lmakhlis pts/0        levlinux.boston. Fri Aug 27 16:41   still logged in
bmeister pts/0        BVEAUDRY-WAL-20. Fri Aug 27 14:25 - 14:44  (00:18)
lmakhlis pts/0        levlinux.boston. Fri Aug 27 10:42 - 11:15  (00:33)
lmakhlis pts/0        levlinux.boston. Fri Aug 27 10:15 - 10:27  (00:11)
lmakhlis pts/0        levlinux.boston. Fri Aug 27 09:57 - 10:11  (00:14)
lmakhlis pts/0        levlinux.boston. Fri Aug 27 09:54 - 09:55  (00:00)
bmeister pts/0        sundev9.boston.b Thu Aug 26 15:08 - 15:08  (00:00)
bmeister pts/1        sundev9.boston.b Thu Aug 26 14:24 - 14:30  (00:05)
bmeister pts/1        sundev9.boston.b Wed Aug 25 13:23 - 13:23  (00:00)
bmeister pts/1        sundev9.boston.b Mon Aug 23 12:59 - 13:03  (00:03)
patrol   pts/1        apex.boston.bmc. Tue Aug 17 13:01 - 13:32  (00:30)
lmakhlis pts/1        levlinux.boston. Tue Aug 17 09:34 - 09:34  (00:00)
bmeister pts/0        BVEAUDRY-WAL-20. Tue Aug 17 09:17 - 08:00  (22:42)
bmeister pts/0        qalinux19.boston Wed Aug  4 10:15 - 12:43  (02:27)
 
wtmp begins Wed Aug  4 10:15:53 2004


Additional info:
Comment 1 Jakub Jelinek 2004-08-30 02:12:13 EDT
This can't change, sorry.
It would break all 64-bit s390x programs.
The reason why __WORDSIZE_COMPAT32 has not been defined is that when
it was introduced in glibc, there were already 64-bit s390x apps
out there where the s390* glibc maintainer didn't want to break
compatibility for them.

The only (longterm) solution is try to change all apps which access
utmp/wtmp/lastlog directly to use the glibc interfaces.
When no direct access happens, there can be magic added to glibc
to handle 31-bit from/to 64-bit translations.
Comment 2 Lev Makhlis 2004-08-30 10:43:27 EDT
Magic in glibc is what I hoped could be done.  (Our application
already uses the glibc interfaces.)  Any idea when that can happen? 
RHEL4 maybe?  Should I open an enhancement "bug" for that?

Note You need to log in before you can comment on or make changes to this bug.