Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751084AbVKASKl (ORCPT ); Tue, 1 Nov 2005 13:10:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751087AbVKASKl (ORCPT ); Tue, 1 Nov 2005 13:10:41 -0500 Received: from omx2-ext.sgi.com ([192.48.171.19]:8393 "EHLO omx2.sgi.com") by vger.kernel.org with ESMTP id S1751084AbVKASKk (ORCPT ); Tue, 1 Nov 2005 13:10:40 -0500 Date: Tue, 1 Nov 2005 10:10:06 -0800 (PST) From: Christoph Lameter To: "linux-os (Dick Johnson)" cc: Andrew Morton , torvalds@osdl.org, marcelo.tosatti@cyclades.com, kravetz@us.ibm.com, raybry@mpdtxmail.amd.com, lee.schermerhorn@hp.com, linux-kernel@vger.kernel.org, magnus.damm@gmail.com, pj@sgi.com, haveblue@us.ibm.com, kamezawa.hiroyu@jp.fujitsu.com Subject: Re: [PATCH 5/5] Swap Migration V5: sys_migrate_pages interface In-Reply-To: Message-ID: References: <20051101031239.12488.76816.sendpatchset@schroedinger.engr.sgi.com><20051101031305.12488.1224.sendpatchset@schroedinger.engr.sgi.com> <20051031212742.3e43c829.akpm@osdl.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 883 Lines: 21 On Tue, 1 Nov 2005, linux-os (Dick Johnson) wrote: > >> + */ > >> + if ((current->euid ^ task->suid) && (current->euid ^ task->uid) && > >> + (current->uid ^ task->suid) && (current->uid ^ task->uid) && > > > > Obscure. Can you please explain the thinking behind putting this check in > > here? Preferably via a comment... > > Also XOR is not a good substitute for a compare. Except in some > strange corner cases, the code will always take more CPU cycles > because XOR modifies oprands while compares don't need to. May I submit a patch that removes these strange checks both for check_kill_permission and sys_migrate_pages? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/