Re: [PATCH v7 05/20] linux-user: Clear translations and tb_jmp_cache on mprotect()

2022-08-31 Thread Richard Henderson
On 8/31/22 00:17, Ilya Leoshkevich wrote: page_set_flags(start, start + len, page_flags); +    tb_invalidate_phys_range(start, start + len); + +    CPU_FOREACH(cpu) { +    cpu_tb_jmp_cache_clear(cpu); +    } + mmap_unlock(); return 0;  error: I think adding

Re: [PATCH v7 05/20] linux-user: Clear translations and tb_jmp_cache on mprotect()

2022-08-30 Thread Ilya Leoshkevich
On Tue, 2022-08-23 at 15:05 -0700, Richard Henderson wrote: > From: Ilya Leoshkevich > > Currently it's possible to execute pages that do not have PAGE_EXEC > if there is an existing translation block. Fix by clearing > tb_jmp_cache > and invalidating TBs, which forces recheck of permission

[PATCH v7 05/20] linux-user: Clear translations and tb_jmp_cache on mprotect()

2022-08-23 Thread Richard Henderson
From: Ilya Leoshkevich Currently it's possible to execute pages that do not have PAGE_EXEC if there is an existing translation block. Fix by clearing tb_jmp_cache and invalidating TBs, which forces recheck of permission bits. Signed-off-by: Ilya Leoshkevich Message-Id: