Bug 182224 - changing to 64bit mode with setarch from a 32bit userland fails without the -B option
changing to 64bit mode with setarch from a 32bit userland fails without the -...
Product: Fedora
Classification: Fedora
Component: setarch (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jindrich Novy
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2006-02-21 00:43 EST by Mike Frysinger
Modified: 2013-07-02 19:14 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-21 10:07:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
setarch-1.8-switch-64bit-fallback.patch (731 bytes, patch)
2006-02-21 00:43 EST, Mike Frysinger
no flags Details | Diff

  None (edit)
Description Mike Frysinger 2006-02-21 00:43:56 EST
on a ppc64 kernel with a ppc32 userland, running `ppc64 uname -m` fails ...

samething happens on a ppc64 kernel with a ppc64 userland, but running `ppc32
ppc64 uname -m` ...

however, utilizing the -B option and everything is peachy:
ppc32 ppc64 -B uname -m

older versions of linux64 (before the setarch package existed) would always
force the "-B option", so i never noticed this before ... plus, the current
error message doesnt give any indication why it failed

so i propose the following ... if setarch is told to change to a 64bit
personality (PER_LINUX) and it fails, and no additional options were given, then
spit out a warning and retry with the 32bit limitation
Comment 1 Mike Frysinger 2006-02-21 00:43:56 EST
Created attachment 124938 [details]
Comment 2 Jindrich Novy 2006-02-21 10:07:23 EST
Sorry, I don't like this idea. One should specify the -B personality explicitely
and setarch shouldn't try to do it himself if it's not explicitely defined. The
patch is indeed quite ugly and might be a source of bugs in the future. I mean
infinite loop for instance.
Comment 3 Mike Frysinger 2006-02-21 10:43:05 EST
it cant hit an infinite loop as the condition to hit the goto is changed before
making the jump back

at any rate, i should have labeled the bug as a [RFC] ... thanks for your comments
Comment 4 Jindrich Novy 2006-02-22 03:11:51 EST
I think the default behaviour of ppc32 or ppc64 with the -B option would be
better set, say, by making an alias in .bashrc than hardwiring it into setarch.
Thanks for the RFE anyway.

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