Project

General

Profile

Actions

Feature #14141

closed

build utmpd as 64-bit binary

Added by Toomas Soome 4 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

With slightly older screen, I did notice the issue in output of w and who:

tsoome@openindiana:/code/illumos-gate$ w
00:04:43      2 users,  load average: 0,93, 1,06, 1,05
User     tty      login@         idle    JCPU    PCPU what
tsoome   pts/2    23:23:57          2       1       0 /usr/bin/bash
tsoome   pts/1    23:52:22          0       0       0 w
tsoome   pts/3    23:22:05          0       0       0 -
tsoome   pts/3    23:22:05          0       0       0 -
tsoome@openindiana:/code/illumos-gate$ who
tsoome     pts/2        okt  6 23:23    (10.7.33.28)
tsoome     pts/1        okt  6 23:52    (10.7.33.28)
tsoome     pts/3        okt  6 23:22    (:pts/2:S.0)
tsoome     pts/3        okt  6 23:22    (:pts/2:S.0)
tsoome@openindiana:/code/illumos-gate$ 

This system was built with gcc 10 on sparc, and the problem is not about w and who commands, but about 32-bit ABI - gcc 10 does not implement complementing 32-bit signed data to 64-bit (as does gcc 4.4.4). From one hand this is bug, but in this particular case, we can work around by building utmpd as 64-bit binary. It is a bit odd reason, but as good as any other IMO.

Testing done: build/install/boot, the w/who are producing expected output on x86 and on sparc.


Related issues

Related to illumos gate - Bug #2757: 32bit sparc direct system calls should not rely on compiler mannerismsIn ProgressKlaus Ziegler2012-05-21

Actions
Actions #1

Updated by Electric Monk 4 months ago

  • Gerrit CR set to 1742
Actions #2

Updated by Toomas Soome 4 months ago

  • Tracker changed from Bug to Feature
  • Subject changed from w and who should apply nonuserx() filter to build utmpd as 64-bit binary
  • Description updated (diff)
Actions #3

Updated by Robert Mustacchi 4 months ago

Cannot we not fix the SPARC ABI? We keep working around it, but it's actually one of the big pieces (along with cross building) for IPD 19.

Actions #4

Updated by Toomas Soome 4 months ago

Robert Mustacchi wrote in #note-3:

Cannot we not fix the SPARC ABI? We keep working around it, but it's actually one of the big pieces (along with cross building) for IPD 19.

I'm sure we can, just that according to https://www.illumos.org/issues/2757, the full fix is some amount of work in any case.

Actions #5

Updated by Toomas Soome 4 months ago

  • Related to Bug #2757: 32bit sparc direct system calls should not rely on compiler mannerisms added
Actions #6

Updated by Toomas Soome about 2 months ago

  • Description updated (diff)
Actions #7

Updated by Electric Monk about 1 month ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit 2c181cc4d9d2e7a92c98a12cafffc6dadff80019

commit  2c181cc4d9d2e7a92c98a12cafffc6dadff80019
Author: Toomas Soome <tsoome@me.com>
Date:   2021-12-15T17:07:10.000Z

    14141 build utmpd as 64-bit binary
    Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
    Reviewed by: Yuri Pankov <ypankov@tintri.com>
    Reviewed by: Klaus Ziegler <klausz@haus-gisela.de>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF