Re: [Qemu-devel] [PATCH] translate-all.c: Remove writable protection feature for tb_alloc_page()

2016-01-14 Thread Chen Gang
On 2016年01月14日 18:30, Peter Maydell wrote: > On 14 January 2016 at 10:26, Chen Gang wrote: >> On 2016年01月14日 18:05, Peter Maydell wrote: >>> If we don't mark the page as non-writeable when we generate a TB >>> from it, how do we detect when guest code later writes to

Re: [Qemu-devel] [PATCH] translate-all.c: Remove writable protection feature for tb_alloc_page()

2016-01-14 Thread Peter Maydell
On 14 January 2016 at 06:03, wrote: > From: Chen Gang > > Guest may allocate a readable, writable, and executable page, then write > data on the page, and execute data as code on the page too, then write > anther data still within the page.

Re: [Qemu-devel] [PATCH] translate-all.c: Remove writable protection feature for tb_alloc_page()

2016-01-14 Thread Peter Maydell
On 14 January 2016 at 10:26, Chen Gang wrote: > On 2016年01月14日 18:05, Peter Maydell wrote: >> If we don't mark the page as non-writeable when we generate a TB >> from it, how do we detect when guest code later writes to that >> page (which means we need to invalidate

Re: [Qemu-devel] [PATCH] translate-all.c: Remove writable protection feature for tb_alloc_page()

2016-01-14 Thread Chen Gang
On 2016年01月14日 18:05, Peter Maydell wrote: > On 14 January 2016 at 06:03, wrote: >> From: Chen Gang >> >> Guest may allocate a readable, writable, and executable page, then write >> data on the page, and execute data as code on the page too,

[Qemu-devel] [PATCH] translate-all.c: Remove writable protection feature for tb_alloc_page()

2016-01-13 Thread chengang
From: Chen Gang Guest may allocate a readable, writable, and executable page, then write data on the page, and execute data as code on the page too, then write anther data still within the page. So remove this feature from linux-user: it not only consumes a little