Re: [PATCH RFC] linux-user: Allow gdbstub to ignore page protection

2023-12-21 Thread Ilya Leoshkevich
On Thu, Dec 21, 2023 at 10:33:51AM +1100, Richard Henderson wrote: > On 12/16/23 10:24, Ilya Leoshkevich wrote: > > @@ -377,22 +379,42 @@ int cpu_memory_rw_debug(CPUState *cpu, vaddr addr, > > flags = page_get_flags(page); > > if (!(flags & PAGE_VALID)) > > return

Re: [PATCH RFC] linux-user: Allow gdbstub to ignore page protection

2023-12-20 Thread Richard Henderson
On 12/16/23 10:24, Ilya Leoshkevich wrote: @@ -377,22 +379,42 @@ int cpu_memory_rw_debug(CPUState *cpu, vaddr addr, flags = page_get_flags(page); if (!(flags & PAGE_VALID)) return -1; +prot = ((flags & PAGE_READ) ? PROT_READ : 0) | + ((flags

[PATCH RFC] linux-user: Allow gdbstub to ignore page protection

2023-12-15 Thread Ilya Leoshkevich
Hi, I've noticed that gdbstub behaves differently from gdbserver in that it doesn't allow reading non-readable pages. The below patch works for me, but I'm not sure if I haven't introduced layering violations or race conditions here, so I'm sending this as an RFC. Please let me know if the code ca