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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191126112815.GA32965@lakrids.cambridge.arm.com>
Date:   Tue, 26 Nov 2019 11:28:16 +0000
From:   Mark Rutland <mark.rutland@....com>
To:     Wang ShaoBo <bobo.shaobowang@...wei.com>
Cc:     cj.chengjian@...wei.com, huawei.libin@...wei.com,
        guohanjun@...wei.com, xiexiuqi@...wei.com, wcohen@...hat.com,
        linux-kernel@...r.kernel.org, mtk.manpages@...il.com,
        wezhang@...hat.com, Christoph Hellwig <hch@...radead.org>
Subject: Re: [PATCH] sys_personality: Streamline code in sys_personality()

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.
> 
> Signed-off-by: Wang ShaoBo <bobo.shaobowang@...wei.com>

FWIW, this looks fine to me:

Acked-by: Mark Rutland <mark.rutland@....com>

I'm not sure why I didn't do this initially; adding Christoph in case he
has any comments.

Mark.

> ---
>  kernel/exec_domain.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/kernel/exec_domain.c b/kernel/exec_domain.c
> index 33f07c5f2515..f7a0512ddc23 100644
> --- 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);
>  }
> -- 
> 2.20.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ