From: Stas Sergeev <stsp@list.ru>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Stas Sergeev <stsp@users.sourceforge.net>,
Shuah Khan <shuahkh@osg.samsung.com>,
Andrew Morton <akpm@linux-foundation.org>,
Jiri Kosina <jkosina@suse.cz>, Al Viro <viro@zeniv.linux.org.uk>,
Stephen Bates <stephen.bates@pmcs.com>,
Milosz Tanski <milosz@adfin.com>,
Andy Lutomirski <luto@kernel.org>, Ingo Molnar <mingo@kernel.org>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
Helge Deller <deller@gmx.de>,
Wang Xiaoqiang <wangxq10@lzu.edu.cn>,
Dave Hansen <dave.hansen@linux.intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] sigaltstack: support SS_AUTODISARM for CONFIG_COMPAT
Date: Sat, 4 Feb 2017 20:54:59 +0300 [thread overview]
Message-ID: <c1b48d0f-9ecb-bdd7-840f-b09d4e5653a3@list.ru> (raw)
In-Reply-To: <CALCETrVoTE1XDa3uLkP9iEO0=bO1TqTdWqCgr4+vtiam=wm4=w@mail.gmail.com>
04.02.2017 20:32, Andy Lutomirski пишет:
> On Sat, Feb 4, 2017 at 4:07 AM, Stas Sergeev <stsp@list.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@users.sourceforge.net>
>>
> Spurious newline.
Is this a problem? :)
> Also, should this be cc:stable?
It doesn't match the stable submission criteries AFAICS.
Can we declare it "obviously correct" and the problem
it fixes "critical"? If so, I'll need to strip the %i -> %x
change from it as it doesn't pass the stable submission
guidelines.
>> 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.)
sas_ss_flags() is still used in sigaltstack() code and
in signal delivery code, so why do you think it should
be removed? It is needed to return the correct status
via sigaltstack() and for deciding whether to switch stacks.
But saving and restoring to/from uc_stack must be done
with raw flags. I don't think we need to check on_sig_stack()
when saving to uc_stack, or do we?
prev parent reply other threads:[~2017-02-04 17:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170204120711.15935-1-stsp@list.ru>
2017-02-04 17:32 ` Andy Lutomirski
2017-02-04 17:54 ` Stas Sergeev [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c1b48d0f-9ecb-bdd7-840f-b09d4e5653a3@list.ru \
--to=stsp@list.ru \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@linux.intel.com \
--cc=deller@gmx.de \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=luto@kernel.org \
--cc=milosz@adfin.com \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=shuahkh@osg.samsung.com \
--cc=stephen.bates@pmcs.com \
--cc=stsp@users.sourceforge.net \
--cc=viro@zeniv.linux.org.uk \
--cc=wangxq10@lzu.edu.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®