Message ID | 20201004050436.1406738-1-krisman@collabora.com |
---|---|
State | Accepted |
Headers | show |
Series | um: Remove dead usage of TIF_IA32 | expand |
On Sun, 2020-10-04 at 01:04 -0400, Gabriel Krisman Bertazi wrote: > > Also, I think the variable clean up it performs is not needed as 64-bit > UML doesn't run 32-bit binaries as far as I can tell Yep, that's true. I was looking into it once _very_ briefly, but no :) johannes
----- Ursprüngliche Mail ----- > Von: "Johannes Berg" <johannes@sipsolutions.net> > An: "Gabriel Krisman Bertazi" <krisman@collabora.com>, "Jeff Dike" <jdike@addtoit.com>, "richard" <richard@nod.at>, > "anton ivanov" <anton.ivanov@cambridgegreys.com> > CC: kernel@collabora.com, "linux-um" <linux-um@lists.infradead.org>, oleg@redhat.com > Gesendet: Sonntag, 4. Oktober 2020 22:10:17 > Betreff: Re: [PATCH] um: Remove dead usage of TIF_IA32 > On Sun, 2020-10-04 at 01:04 -0400, Gabriel Krisman Bertazi wrote: >> >> Also, I think the variable clean up it performs is not needed as 64-bit >> UML doesn't run 32-bit binaries as far as I can tell > > Yep, that's true. I was looking into it once _very_ briefly, but no :) Yep. UML has no IA32 emulation and never had. Looks like a copy&paste leftover. Thanks, //richard
diff --git a/arch/x86/um/ptrace_64.c b/arch/x86/um/ptrace_64.c index 09a085bde0d4..1401899dee9b 100644 --- a/arch/x86/um/ptrace_64.c +++ b/arch/x86/um/ptrace_64.c @@ -52,14 +52,6 @@ static const int reg_offsets[] = int putreg(struct task_struct *child, int regno, unsigned long value) { -#ifdef TIF_IA32 - /* - * Some code in the 64bit emulation may not be 64bit clean. - * Don't take any chances. - */ - if (test_tsk_thread_flag(child, TIF_IA32)) - value &= 0xffffffff; -#endif switch (regno) { case R8: case R9: @@ -137,10 +129,7 @@ int poke_user(struct task_struct *child, long addr, long data) unsigned long getreg(struct task_struct *child, int regno) { unsigned long mask = ~0UL; -#ifdef TIF_IA32 - if (test_tsk_thread_flag(child, TIF_IA32)) - mask = 0xffffffff; -#endif + switch (regno) { case R8: case R9:
This seems like a dead artifact since TIF_IA32 is not even defined as a TI flag for UM. Looking back in git history, it made sense in the old days, but it is apparently not used since UM was split out of the x86 arch/. It is also going away from the x86 tree soon. Also, I think the variable clean up it performs is not needed as 64-bit UML doesn't run 32-bit binaries as far as I can tell, and 32-bit UML has 32-bit ulong. Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com> --- arch/x86/um/ptrace_64.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)