On 9/22/26 12:22, Mikulas Patocka wrote:
BTW. what happens with synchronous signals inside the TB? (i.e. SIGSEGV
due to writing into a write-protected page)

Synchronous signals like that exit the translation block right away, leading
to the signal being delivered.

So, the TB can exit halfway through?

When I was analyzing the bug 2998, I found out that Qemu marks pages with
executed code as read-only. When the program writes into them, it
invalidates the translated code and marks the pages as read-write.

How does this interact with TBs exits? What happens if we write into a
read-only page in the middle of the TB?

If it's just about tracking writes to a page with translations, we won't exit the TB. We'll restart the faulting store by returning from the signal handler. So the gUSA region isn't affected.

"Real" faults to inaccessible pages will reach the signal handler, and unwind_gusa() will revert the region before stacking the signal frame.


r~

Reply via email to