Re: [PATCH v2] target/s390x: Fix translation exception on illegal instruction

2021-04-14 Thread Cornelia Huck
On Wed, 14 Apr 2021 12:39:36 +0200 Cornelia Huck wrote: > On Wed, 14 Apr 2021 12:27:03 +0200 > Ilya Leoshkevich wrote: > > > On Wed, 2021-04-14 at 11:19 +0200, Ilya Leoshkevich wrote: > > > On Wed, 2021-04-14 at 10:38 +0200, Cornelia Huck wrote: > > > > On Tue, 13 Apr 2021 18:52:57 +0200

Re: [PATCH v2] target/s390x: Fix translation exception on illegal instruction

2021-04-14 Thread Cornelia Huck
On Wed, 14 Apr 2021 12:27:03 +0200 Ilya Leoshkevich wrote: > On Wed, 2021-04-14 at 11:19 +0200, Ilya Leoshkevich wrote: > > On Wed, 2021-04-14 at 10:38 +0200, Cornelia Huck wrote: > > > On Tue, 13 Apr 2021 18:52:57 +0200 > > > Ilya Leoshkevich wrote: > > > > > > > Hitting an uretprobe in a

Re: [PATCH v2] target/s390x: Fix translation exception on illegal instruction

2021-04-14 Thread Ilya Leoshkevich
On Wed, 2021-04-14 at 11:19 +0200, Ilya Leoshkevich wrote: > On Wed, 2021-04-14 at 10:38 +0200, Cornelia Huck wrote: > > On Tue, 13 Apr 2021 18:52:57 +0200 > > Ilya Leoshkevich wrote: > > > > > Hitting an uretprobe in a s390x TCG guest causes a SIGSEGV. What > > > happens is: > > > > > > * uretp

Re: [PATCH v2] target/s390x: Fix translation exception on illegal instruction

2021-04-14 Thread Ilya Leoshkevich
On Wed, 2021-04-14 at 10:38 +0200, Cornelia Huck wrote: > On Tue, 13 Apr 2021 18:52:57 +0200 > Ilya Leoshkevich wrote: > > > Hitting an uretprobe in a s390x TCG guest causes a SIGSEGV. What > > happens is: > > > > * uretprobe maps a userspace page containing an invalid > > instruction. > > * ure

Re: [PATCH v2] target/s390x: Fix translation exception on illegal instruction

2021-04-14 Thread Cornelia Huck
On Tue, 13 Apr 2021 18:52:57 +0200 Ilya Leoshkevich wrote: > Hitting an uretprobe in a s390x TCG guest causes a SIGSEGV. What > happens is: > > * uretprobe maps a userspace page containing an invalid instruction. > * uretprobe replaces the target function's return address with the > address of

Re: [PATCH v2] target/s390x: Fix translation exception on illegal instruction

2021-04-14 Thread David Hildenbrand
On 13.04.21 18:52, Ilya Leoshkevich wrote: Hitting an uretprobe in a s390x TCG guest causes a SIGSEGV. What happens is: * uretprobe maps a userspace page containing an invalid instruction. * uretprobe replaces the target function's return address with the address of that page. * When tb_gen_c

Re: [PATCH v2] target/s390x: Fix translation exception on illegal instruction

2021-04-13 Thread Richard Henderson
On 4/13/21 9:52 AM, Ilya Leoshkevich wrote: Hitting an uretprobe in a s390x TCG guest causes a SIGSEGV. What happens is: * uretprobe maps a userspace page containing an invalid instruction. * uretprobe replaces the target function's return address with the address of that page. * When tb_gen_

[PATCH v2] target/s390x: Fix translation exception on illegal instruction

2021-04-13 Thread Ilya Leoshkevich
Hitting an uretprobe in a s390x TCG guest causes a SIGSEGV. What happens is: * uretprobe maps a userspace page containing an invalid instruction. * uretprobe replaces the target function's return address with the address of that page. * When tb_gen_code() is called on that page, tb->size ends up