On Sat, Feb 4, 2017 at 4:07 AM, Stas Sergeev <stsp@xxxxxxx> wrote:Is this a problem? :)
Currently SS_AUTODISARM is not supported in compatibilitySpurious newline.
mode, but does not return -EINVAL either. This makes dosemu
built with -m32 on x86_64 to crash. Also the kernel's sigaltstack
selftest fails if compiled with -m32.
This patch adds the needed support. It also improves the
selftest output a little (%i changed to %x for bitmasks).
Signed-off-by: Stas Sergeev <stsp@xxxxxxxxxxxxxxxxxxxxx>
Also, should this be cc:stable?It doesn't match the stable submission criteries AFAICS.
diff --git a/include/linux/compat.h b/include/linux/compat.hShould the sas_ss_flags() helper be deleted, perhaps? This code seems
index 6360939..d8535a4 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -711,8 +711,10 @@ int __compat_save_altstack(compat_stack_t __user *, unsigned long);
compat_stack_t __user *__uss = uss; \
struct task_struct *t = current; \
put_user_ex(ptr_to_compat((void __user *)t->sas_ss_sp), &__uss->ss_sp); \
- put_user_ex(sas_ss_flags(sp), &__uss->ss_flags); \
+ put_user_ex(t->sas_ss_flags, &__uss->ss_flags); \
a bit odd -- it no longer does the on_sig_stack(sp) check.. (It
matches the non-compat code.)