Eliminates the memory query loop in copy_frame_to_stack() which checks whether each part of the app stack is writable before copying over the signal frame. This loop grabs the global all_memory_areas lock and if that lookup misses it goes to a maps lookup. This has shown to cause noticeable contention. Instead we perform an overlap check for is_executable_area_writable followed by a TRY_EXCEPT safe write.
Adds a new test linux.bad-signal-stack which tests this by setting up an unwritable alternate stack. It also tests checking for SA_ONSTACK, and we fix #2017 (closed) here to make that work, which is needed for a good test. The existing security-common.decode-bad-stack hits the is_executable_area_writable() case.
Issue: #2214 Fixes #2017 (closed)