[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1908240142000.1939@nanos.tec.linutronix.de>
Date: Sat, 24 Aug 2019 01:44:18 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Sebastian Mayr <me@....st>
cc: Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
LKML <linux-kernel@...r.kernel.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Dmitry Safonov <dsafonov@...tuozzo.com>,
Oleg Nesterov <oleg@...hat.com>,
Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Subject: Re: [PATCH] uprobes/x86: fix detection of 32-bit user mode
On Sat, 24 Aug 2019, Thomas Gleixner wrote:
> On Sun, 28 Jul 2019, Sebastian Mayr wrote:
>
> > -static inline int sizeof_long(void)
> > +static inline int sizeof_long(struct pt_regs *regs)
> > {
> > - return in_ia32_syscall() ? 4 : 8;
>
> This wants a comment.
>
> > + return user_64bit_mode(regs) ? 8 : 4;
The more simpler one liner is to check
test_thread_flag(TIF_IA32)
which is only true for IA32 and independent of syscalls, exceptions ...
Thanks,
tglx
Powered by blists - more mailing lists