Re: [PATCH] uprobes/x86: fix detection of 32-bit user mode

2019-08-26 Thread Thomas Gleixner
On Sat, 24 Aug 2019, Thomas Gleixner wrote: > On Fri, 23 Aug 2019, Andy Lutomirski wrote: > > > On Aug 23, 2019, at 5:03 PM, Thomas Gleixner wrote: > > > > > >> On Sat, 24 Aug 2019, Thomas Gleixner wrote: > > >> On Fri, 23 Aug 2019, Andy Lutomirski wrote: > > On Aug 23, 2019, at 4:44 PM, Tho

Re: [PATCH] uprobes/x86: fix detection of 32-bit user mode

2019-08-23 Thread Thomas Gleixner
On Fri, 23 Aug 2019, Andy Lutomirski wrote: > > On Aug 23, 2019, at 5:03 PM, Thomas Gleixner wrote: > > > >> On Sat, 24 Aug 2019, Thomas Gleixner wrote: > >> On Fri, 23 Aug 2019, Andy Lutomirski wrote: > On Aug 23, 2019, at 4:44 PM, Thomas Gleixner wrote: > > >> On Sat, 24 Aug 201

Re: [PATCH] uprobes/x86: fix detection of 32-bit user mode

2019-08-23 Thread Andy Lutomirski
> On Aug 23, 2019, at 5:03 PM, Thomas Gleixner wrote: > >> On Sat, 24 Aug 2019, Thomas Gleixner wrote: >> On Fri, 23 Aug 2019, Andy Lutomirski wrote: On Aug 23, 2019, at 4:44 PM, Thomas Gleixner wrote: >> On Sat, 24 Aug 2019, Thomas Gleixner wrote: >> On Sun, 28 Jul 2019, S

Re: [PATCH] uprobes/x86: fix detection of 32-bit user mode

2019-08-23 Thread Thomas Gleixner
On Sat, 24 Aug 2019, Thomas Gleixner wrote: > On Fri, 23 Aug 2019, Andy Lutomirski wrote: > > > On Aug 23, 2019, at 4:44 PM, Thomas Gleixner wrote: > > > > > >> On Sat, 24 Aug 2019, Thomas Gleixner wrote: > > >>> On Sun, 28 Jul 2019, Sebastian Mayr wrote: > > >>> > > >>> -static inline int sizeo

Re: [PATCH] uprobes/x86: fix detection of 32-bit user mode

2019-08-23 Thread Thomas Gleixner
On Fri, 23 Aug 2019, Andy Lutomirski wrote: > > On Aug 23, 2019, at 4:44 PM, Thomas Gleixner wrote: > > > >> 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 p

Re: [PATCH] uprobes/x86: fix detection of 32-bit user mode

2019-08-23 Thread Andy Lutomirski
> On Aug 23, 2019, at 4:44 PM, Thomas Gleixner wrote: > >> 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() ?

Re: [PATCH] uprobes/x86: fix detection of 32-bit user mode

2019-08-23 Thread Thomas Gleixner
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_mo

Re: [PATCH] uprobes/x86: fix detection of 32-bit user mode

2019-08-23 Thread Thomas Gleixner
Sebastian, On Sun, 28 Jul 2019, Sebastian Mayr wrote: sorry for the delay.. > 32-bit processes running on a 64-bit kernel are not always detected > correctly, causing the process to crash when uretprobes are installed. > The reason for the crash is that in_ia32_syscall() is used to determine > t

Re: [PATCH] uprobes/x86: fix detection of 32-bit user mode

2019-08-19 Thread Thomas Gleixner
On Mon, 19 Aug 2019, Sebastian Mayr wrote: > > @@ -1056,7 +1056,7 @@ bool arch_uprobe_skip_sstep(struct arch_uprobe > > *auprobe, struct pt_regs *regs) > > unsigned long > > arch_uretprobe_hijack_return_addr(unsigned long trampoline_vaddr, > > struct pt_regs *regs) > > { > > - int rasize = siz

Re: [PATCH] uprobes/x86: fix detection of 32-bit user mode

2019-08-19 Thread Sebastian Mayr
On Sun, 2019-07-28 at 17:26 +0200, Sebastian Mayr wrote: > 32-bit processes running on a 64-bit kernel are not always detected > correctly, causing the process to crash when uretprobes are > installed. > The reason for the crash is that in_ia32_syscall() is used to > determine > the process's mode,