Red Hat Bugzilla – Bug 182224
changing to 64bit mode with setarch from a 32bit userland fails without the -B option
Last modified: 2013-07-02 19:14:24 EDT
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
Created attachment 124938 [details]
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.
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
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.