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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 27 Feb 2013 14:09:07 -0600
From:	Serge Hallyn <serge.hallyn@...ntu.com>
To:	"Raphael S.Carvalho" <raphael.scarv@...il.com>
Cc:	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Serge Hallyn <serge.hallyn@...onical.com>,
	"David S. Miller" <davem@...emloft.net>,
	"Serge E. Hallyn" <serge@...lyn.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] kernel/nsproxy.c: Improving a snippet of code.

Quoting Raphael S.Carvalho (raphael.scarv@...il.com):
> It seems GCC generates a better code in that way, so I changed that statement.
> Btw, they have the same semantic, so I'm sending this patch due to performance issues.
> 
> Signed-off-by: Raphael S.Carvalho <raphael.scarv@...il.com>

Acked-by: Serge E. Hallyn <serge.hallyn@...ntu.com>

> ---
>  kernel/nsproxy.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
> index 78e2ecb..21da3d1 100644
> --- a/kernel/nsproxy.c
> +++ b/kernel/nsproxy.c
> @@ -148,7 +148,8 @@ int copy_namespaces(unsigned long flags, struct task_struct *tsk)
>  	 * means share undolist with parent, so we must forbid using
>  	 * it along with CLONE_NEWIPC.
>  	 */
> -	if ((flags & CLONE_NEWIPC) && (flags & CLONE_SYSVSEM)) {
> +	if ((flags & (CLONE_NEWIPC | CLONE_SYSVSEM)) ==
> +		(CLONE_NEWIPC | CLONE_SYSVSEM)) {
>  		err = -EINVAL;
>  		goto out;
>  	}
> -- 
> 1.7.2.5
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ