mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Wang ShaoBo <bobo.shaobowang@huawei.com>
Cc: cj.chengjian@huawei.com, mark.rutland@arm.com,
	huawei.libin@huawei.com, guohanjun@huawei.com,
	xiexiuqi@huawei.com, wcohen@redhat.com,
	linux-kernel@vger.kernel.org, mtk.manpages@gmail.com,
	wezhang@redhat.com
Subject: Re: [PATCH] sys_personality: Streamline code in sys_personality()
Date: Wed, 27 Nov 2019 01:43:13 -0800	[thread overview]
Message-ID: <20191127094313.GA11668@infradead.org> (raw)
In-Reply-To: <20191126094045.134654-1-bobo.shaobowang@huawei.com>

On Tue, Nov 26, 2019 at 05:40:45PM +0800, Wang ShaoBo wrote:
> SYSCALL_DEFINE1 in kernel/exec_domain.c looks like verbose,
> ksys_personality() can make it more concise.

What do you try to say with this sentence?  I can't really parse it.

> --- a/kernel/exec_domain.c
> +++ b/kernel/exec_domain.c
> @@ -37,10 +37,5 @@ module_init(proc_execdomains_init);
>  
>  SYSCALL_DEFINE1(personality, unsigned int, personality)
>  {
> -	unsigned int old = current->personality;
> -
> -	if (personality != 0xffffffff)
> -		set_personality(personality);
> -
> -	return old;
> +	return ksys_personality(personality);

This looks ok, but I'd much rather just kill ksys_personality and add
an optional arch hook to reject personality settings for the arm64
special case.

      parent reply	other threads:[~2019-11-27  9:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-26  9:40 Wang ShaoBo
2019-11-26 11:28 ` Mark Rutland
2019-11-27  9:43 ` Christoph Hellwig [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=20191127094313.GA11668@infradead.org \
    --to=hch@infradead.org \
    --cc=bobo.shaobowang@huawei.com \
    --cc=cj.chengjian@huawei.com \
    --cc=guohanjun@huawei.com \
    --cc=huawei.libin@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mtk.manpages@gmail.com \
    --cc=wcohen@redhat.com \
    --cc=wezhang@redhat.com \
    --cc=xiexiuqi@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®