Bug 182224 - changing to 64bit mode with setarch from a 32bit userland fails without the -B option
Summary: changing to 64bit mode with setarch from a 32bit userland fails without the -...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: setarch
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jindrich Novy
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-02-21 05:43 UTC by Mike Frysinger
Modified: 2013-07-02 23:14 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-02-21 15:07:23 UTC
Type: ---
Embargoed:


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

Description Mike Frysinger 2006-02-21 05:43:56 UTC
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 05:43:56 UTC
Created attachment 124938 [details]
setarch-1.8-switch-64bit-fallback.patch

Comment 2 Jindrich Novy 2006-02-21 15:07:23 UTC
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 15:43:05 UTC
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 08:11:51 UTC
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.