From owner-svn-src-all@FreeBSD.ORG Wed Oct 27 02:43:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82810106566B; Wed, 27 Oct 2010 02:43:06 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 976718FC1E; Wed, 27 Oct 2010 02:43:05 +0000 (UTC) Received: by wwb24 with SMTP id 24so174413wwb.31 for ; Tue, 26 Oct 2010 19:43:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=h/uXWnhOC1KT0bGUXhBAl1KfSXkhYrdGapSRAKipdKQ=; b=EvvyqaN+N+fEnGiA3jTxLZK3fDASoLYFnxlqZBg6QaanA+4Na9lXPLydJvvV8+Asn4 c8+vkblGV+LIxDOdSPEc5BikihQeah1H5B52fvBz7q8vNSt7fA+AxH6HiuWoUASnqZ3E 61oyZKcdIrCwezFMzeK4L/C+eM6a58742BpC4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=VuTITHWOcu+uZVgmReVEs8CKEmEqdRMQxCB9Lha2+zaDXf6vrNoalGF9gaSaCMu42W H2y83eS8Th7n+TR8b33Iwi1R6g/+T2pFaJbpwD8Ffn79uPJ8GcIwydM/e+1qkEPV4mJg 16GFyArFE5Z+nx4xcdvrAWEbHUB2rjV+fpKiw= MIME-Version: 1.0 Received: by 10.216.173.7 with SMTP id u7mr210310wel.50.1288147383254; Tue, 26 Oct 2010 19:43:03 -0700 (PDT) Sender: yanegomi@gmail.com Received: by 10.216.10.198 with HTTP; Tue, 26 Oct 2010 19:43:03 -0700 (PDT) In-Reply-To: <201010270232.o9R2Wsu3084553@svn.freebsd.org> References: <201010270232.o9R2Wsu3084553@svn.freebsd.org> Date: Tue, 26 Oct 2010 19:43:03 -0700 X-Google-Sender-Auth: -glZ_QFwNUvxU71OBOY5nsp1NI8 Message-ID: From: Garrett Cooper To: David Xu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r214409 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Oct 2010 02:43:06 -0000 On Tue, Oct 26, 2010 at 7:32 PM, David Xu wrote: > Author: davidxu > Date: Wed Oct 27 02:32:54 2010 > New Revision: 214409 > URL: http://svn.freebsd.org/changeset/base/214409 > > Log: > =A0If input parameter cpusetsize is zero, give userland size of cpuset ma= sk > =A0kernel is using. > > Modified: > =A0head/sys/kern/kern_cpuset.c > > Modified: head/sys/kern/kern_cpuset.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/kern_cpuset.c Wed Oct 27 02:07:25 2010 =A0 =A0 =A0 =A0(= r214408) > +++ head/sys/kern/kern_cpuset.c Wed Oct 27 02:32:54 2010 =A0 =A0 =A0 =A0(= r214409) > @@ -889,6 +889,10 @@ cpuset_getaffinity(struct thread *td, st > =A0 =A0 =A0 =A0int error; > =A0 =A0 =A0 =A0size_t size; > > + =A0 =A0 =A0 if (uap->cpusetsize =3D=3D 0) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 td->td_retval[0] =3D sizeof(cpuset_t); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 return (0); > + =A0 =A0 =A0 } > =A0 =A0 =A0 =A0if (uap->cpusetsize < sizeof(cpuset_t) || > =A0 =A0 =A0 =A0 =A0 =A0uap->cpusetsize > CPU_MAXSIZE / NBBY) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return (ERANGE); Isn't this requirement partly broken now? [ERANGE] The cpusetsize was either preposterously large or smaller than the kernel set size. Why should cpuset(2) be broken in favor of people not passing valid val= ues? Thanks, -Garrett