Date: Thu, 21 Jun 2007 11:32:31 +0200 From: Christian Kandeler <christian.kandeler@hob.de> To: <ia64@freebsd.org> Subject: Syscalls and RSE Message-ID: <200706211132.32524.christian.kandeler@hob.de>
next in thread | raw e-mail | index | archive | help
Hi, I think I have spotted a problem with the Backing Store switch for syscalls. In epc_syscall, no flushrs is done; instead, the number of dirty registers is saved. But isn't it necessary in this case to restore the RNAT register after setting the new BspStore? Imagine the case where we enter the syscall with BSP > BspStore and the location of a NaT collection in between. In such a case a subsequent RSE store in the kernel will write a partly undefined value to the next NaT collection address in the kernel backing store. This value will later be copied to the user space backing store by ia64_flush_dirty(), which also increases the saved user space BspStore by the number of dirty registers. As a consequence, when the user space BspStore is restored in epc_syscall_return, BspLoad will point to a location above the invalid NaT collection, which will subsequently be restored by RSE loads in user space and potentially contaminate stacked registers with NaT bits (or erroneously remove NaT bits from registers that should have them, depending on which bits of the "undefined" value are 1). Regards, Christian Kandeler
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706211132.32524.christian.kandeler>
