From: "Wangshaobo (bobo)" <bobo.shaobowang@huawei.com>
To: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: <mark.rutland@arm.com>, <hch@infradead.org>,
<cj.chengjian@huawei.com>, <huawei.libin@huawei.com>,
<xiexiuqi@huawei.com>, <yangyingliang@huawei.com>,
<guohanjun@huawei.com>, <wcohen@redhat.com>,
<linux-kernel@vger.kernel.org>, <mtk.manpages@gmail.com>,
<wezhang@redhat.com>
Subject: Re: [PATCH] sys_personality: Add a optional arch hook arch_check_personality() for common sys_personality()
Date: Thu, 9 Jan 2020 16:45:22 +0800 [thread overview]
Message-ID: <dcdf6142-20c3-c064-6edf-8fcc921c4d00@huawei.com> (raw)
In-Reply-To: <20200109065424.GA84503@light.dominikbrodowski.net>
Thanks for your reply, I wiil send it in version 2
Thanks,
wangshaobo
在 2020/1/9 14:54, Dominik Brodowski 写道:
> On Thu, Jan 09, 2020 at 09:38:46AM +0800, Wang ShaoBo wrote:
>> currently arm64 use __arm64_sys_arm64_personality() as its default
>> syscall. But using a normal hook arch_check_personality() can reject
>> personality settings for special case of different archs.
> Thanks for your patch!
>
>> SYSCALL_DEFINE1(personality, unsigned int, personality)
>> {
>> - unsigned int old = current->personality;
>> + int check;
>>
>> - if (personality != 0xffffffff)
>> - set_personality(personality);
>> + check = arch_check_personality(personality);
>> + if (check)
>> + return check;
>>
>> - return old;
>> + return ksys_personality(personality);
>> }
> Please leave the default check and call to set_personality()
> in here and remove the now-unneeded ksys_personality() from
> include/linux/syscalls.h
>
> Thanks,
> Dominik
>
> .
prev parent reply other threads:[~2020-01-09 8:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-09 1:38 Wang ShaoBo
2020-01-09 6:54 ` Dominik Brodowski
2020-01-09 8:45 ` Wangshaobo (bobo) [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=dcdf6142-20c3-c064-6edf-8fcc921c4d00@huawei.com \
--to=bobo.shaobowang@huawei.com \
--cc=cj.chengjian@huawei.com \
--cc=guohanjun@huawei.com \
--cc=hch@infradead.org \
--cc=huawei.libin@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
--cc=mark.rutland@arm.com \
--cc=mtk.manpages@gmail.com \
--cc=wcohen@redhat.com \
--cc=wezhang@redhat.com \
--cc=xiexiuqi@huawei.com \
--cc=yangyingliang@huawei.com \
/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®