Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262138AbUIDNl0 (ORCPT ); Sat, 4 Sep 2004 09:41:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262837AbUIDNlZ (ORCPT ); Sat, 4 Sep 2004 09:41:25 -0400 Received: from colin2.muc.de ([193.149.48.15]:63506 "HELO colin2.muc.de") by vger.kernel.org with SMTP id S262138AbUIDNkV (ORCPT ); Sat, 4 Sep 2004 09:40:21 -0400 Date: 4 Sep 2004 15:40:20 +0200 Date: Sat, 4 Sep 2004 15:40:20 +0200 From: Andi Kleen To: Anton Blanchard Cc: Paul Jackson , akpm@osdl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Fix argument checking in sched_setaffinity Message-ID: <20040904134020.GG33964@muc.de> References: <20040831183655.58d784a3.pj@sgi.com> <20040901015922.GM26072@krispykreme> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040901015922.GM26072@krispykreme> User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1260 Lines: 28 On Wed, Sep 01, 2004 at 11:59:22AM +1000, Anton Blanchard wrote: > > > I notice that you didn't bother with the fractional byte that is handled > > by 'endmask' in mm/mempolicy.c:get_nodes(). But I really don't give a > > hoot - either way is fine by me. > > > > I've written a couple of code snippets that manage to intuit the size of > > the kernel's cpumask dynamically from user space, by probing with > > various sched_getaffinity() calls. But since your patch only changes > > the errors generated by sched_setaffinity() [that's "set", not "get"], I > > will not experience any grief from this subtle change in the kernel's > > API. > > > > Should you lock hotplug before calling get_user_cpu_mask(), since > > get_user_cpu_mask() depends on cpu_online_mask()? > > FYI the NUMA API and affinity code is broken on 64bit big endian. We > really need a get/set compat bitmap and use it. How does this look? > Not well tested yet... Looks good from a quick review. But there is nothing to call it? -Andi - 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/