lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrVoTE1XDa3uLkP9iEO0=bO1TqTdWqCgr4+vtiam=wm4=w@mail.gmail.com>
Date:   Sat, 4 Feb 2017 09:32:29 -0800
From:   Andy Lutomirski <luto@...capital.net>
To:     Stas Sergeev <stsp@...t.ru>
Cc:     Stas Sergeev <stsp@...rs.sourceforge.net>,
        Shuah Khan <shuahkh@....samsung.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Jiri Kosina <jkosina@...e.cz>,
        Al Viro <viro@...iv.linux.org.uk>,
        Stephen Bates <stephen.bates@...s.com>,
        Milosz Tanski <milosz@...in.com>,
        Andy Lutomirski <luto@...nel.org>,
        Ingo Molnar <mingo@...nel.org>,
        "Peter Zijlstra (Intel)" <peterz@...radead.org>,
        Helge Deller <deller@....de>,
        Wang Xiaoqiang <wangxq10@....edu.cn>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Sasha Levin <sasha.levin@...cle.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sigaltstack: support SS_AUTODISARM for CONFIG_COMPAT

On Sat, Feb 4, 2017 at 4:07 AM, Stas Sergeev <stsp@...t.ru> wrote:
> Currently SS_AUTODISARM is not supported in compatibility
> 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@...rs.sourceforge.net>
>

Spurious newline.  Also, should this be cc:stable?

> CC: Shuah Khan <shuahkh@....samsung.com>
> CC: Andrew Morton <akpm@...ux-foundation.org>
> CC: Jiri Kosina <jkosina@...e.cz>
> CC: Al Viro <viro@...iv.linux.org.uk>
> CC: Stephen Bates <stephen.bates@...s.com>
> CC: Milosz Tanski <milosz@...in.com>
> CC: Andy Lutomirski <luto@...nel.org>
> CC: Ingo Molnar <mingo@...nel.org>
> CC: "Peter Zijlstra (Intel)" <peterz@...radead.org>
> CC: Helge Deller <deller@....de>
> CC: Wang Xiaoqiang <wangxq10@....edu.cn>
> CC: Dave Hansen <dave.hansen@...ux.intel.com>
> CC: Sasha Levin <sasha.levin@...cle.com>
> CC: linux-kernel@...r.kernel.org
> ---
>  include/linux/compat.h                    |  4 +++-
>  kernel/signal.c                           | 11 +++++++++--
>  tools/testing/selftests/sigaltstack/sas.c |  7 ++++---
>  3 files changed, 16 insertions(+), 6 deletions(-)
>
> diff --git a/include/linux/compat.h b/include/linux/compat.h
> 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); \

Should the sas_ss_flags() helper be deleted, perhaps?  This code seems
a bit odd -- it no longer does the on_sig_stack(sp) check..  (It
matches the non-compat code.)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ