Wire page containing theOnly read it on the attempt to deliver signal in ast(). If the word is set, sigfastblocknal is not delivered and word is kept, and access it through direct map or sf instead of performing fueword(9) or casueword(9preventing interruption of interruptible sleeps by signals until userspace calls sigfastblock(UNBLOCK).
I do not like two things in tThis approachway, this is why I did not implemented it that way. Firstthe only spurious EINTR that userspace can see while in critical section is on first interruptible sleep, if the page gets unmapped or remapped, kernel doeif a signal is pending. It is believed that it is not catch it automaimportant for rtld and lbithr critically sections. Right now I only handle fork(2) for CoW, where the page is recalculated. I might add some code to vm_map_delete() which would ultimately send a signalIt might be visible for the application code e.g. for the callback of dl_iterate_phdr(3), beforebut again the patchbelief is considered finishedthat the non-compliance is acceptable.
Second,For now I added the fact thatknob to enable the page is wired adds one wired page per threadword read on syscall entry to be able to diagnose possible issues due to spurious EINTR.
Anyway, this should eliminate fueword(2) and CLAC/STAC around accesses, which are indeed serializing on some modern CPUs (undocumented).[This is not tested]