OS-4215: lxbrand rt_sigreturn(2) could try to recover in the face of stack shenanigans

Details

Issue Type:Bug
Priority:4 - Normal
Status:Resolved
Created at:2015-04-22T01:10:03.000Z
Updated at:2015-10-21T17:57:33.000Z

People

Created by:Former user
Reported by:Former user
Assigned to:Former user

Resolution

Fixed: A fix for this issue is checked into the tree and tested.
(Resolution Date: 2015-04-22T20:43:09.000Z)

Fix Versions

2015-04-30 Newton (Release Date: 2015-04-30)

Related Issues

Labels

lxbrand

Description

It would appear that there exists software that takes a crowbar to the service door, busting through any facade of decency in order that it might thrust its unwashed hands into the clean room that is the specific implementation details of the signal delivery frame assembled by the kernel. In doing so, the software makes it rather difficult for lx_rt_sigreturn (and lx_sigreturn) to locate the original native signal delivery frame that we need to use when attempting to return from the signal handler.

We can attempt to maintain a parallel tracking structure in the call frames of the interposing signal handler. Ideally this will allow us to, when finding our delivery frame corrupted or relocated, locate the matching native context anyway. Critically this parallel structure should not be used for regular operation, but rather only in a last-ditch attempt to make pathologically broken software work at all. It will likely also break in spectacular fashion if the precise 1:1 mapping between signals delivered and rt_sigreturn(2) calls made is not maintained.

Comments

Comment by Former user
Created at 2015-04-22T20:42:58.000Z

illumos-joyent commit dd0537e (branch master, by Joshua M. Clulow)

OS-4214 lxbrand 64-bit signal delivery frame not quite right
OS-4215 lxbrand rt_sigreturn(2) could try to recover in the face of stack shenanigans
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>


Comment by Former user
Created at 2015-04-23T05:12:54.000Z

illumos-joyent commit 5f2993a (branch master, by Joshua M. Clulow)

OS-4214 lxbrand 64-bit signal delivery frame not quite right (fix DEBUG build)
OS-4215 lxbrand rt_sigreturn(2) could try to recover in the face of stack shenanigans (fix DEBUG build)