But it's still not clear how to set the stack pointer portably, even after examining the code of Boost.Coroutine. For now, Boost.Context only supports downward stack, and Boost.Coroutine, which happened to be written by the same author, just assumes that the stack always grows downward, which is not really a portable implementation, if future Boost.Context

boost.context is implemented for specific architectures/platforms, e.g. it does not contain generic code which will work in general.
that said -  you can not have a 'portable' implementation.
an architecture/platform determines in which direction the stack grows - at the moment all architectures/platforms supported by boost.context have
downward growing stack.
 
supports upward stack, Boost.Coroutine has to be changed as well.

yes, if in the future an architecture/platform with upward growing stack will be supported, the stack allocator classes have to be modified