From owner-freebsd-current@FreeBSD.ORG Mon Nov 8 14:50:52 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E67F0106564A; Mon, 8 Nov 2010 14:50:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 556F68FC13; Mon, 8 Nov 2010 14:50:51 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id oA8Eolip098975 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 8 Nov 2010 16:50:47 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id oA8EoldF012578; Mon, 8 Nov 2010 16:50:47 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id oA8EolaL012577; Mon, 8 Nov 2010 16:50:47 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 8 Nov 2010 16:50:47 +0200 From: Kostik Belousov To: Andriy Gapon Message-ID: <20101108145047.GH2392@deviant.kiev.zoral.com.ua> References: <4CD3B1D2.30003@icyb.net.ua> <4CD7E401.1010206@freebsd.org> <20101108120403.GC2392@deviant.kiev.zoral.com.ua> <4CD7F5B9.3010606@freebsd.org> <20101108131620.GG2392@deviant.kiev.zoral.com.ua> <4CD80792.7070402@freebsd.org> <4CD80926.2010507@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kljy8TnFHfNvTRLN" Content-Disposition: inline In-Reply-To: <4CD80926.2010507@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-x11@freebsd.org, freebsd-current@freebsd.org, Nathan Whitehorn Subject: Re: radeon_cp_texture: page fault with non-sleepable locks held X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2010 14:50:53 -0000 --kljy8TnFHfNvTRLN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 08, 2010 at 04:28:54PM +0200, Andriy Gapon wrote: > on 08/11/2010 16:22 Nathan Whitehorn said the following: > >=20 > > The other issue is that this can be a legal thing to do. If you have ta= ken care to > > wire the userland buffers ahead of time, there is no problem copying > > copyin()/copyout() with sleepable locks held. The sysctl code does this= . As such, > > you can't check for problems by panicing if sleepable locks are held. >=20 > Nathan, >=20 > very good point, thank you. > BTW, perhaps drm should be doing the same? > It seems that there are quite a few copyin/copyout calls (disguised with = macros) > in e.g. sys/dev/drm/radeon_state.c and likely all of them are under dev_l= ock. > So it would be painful to add unlock+lock around each such call. This would be a DoS, due to the size of the buffers. --kljy8TnFHfNvTRLN Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAkzYDkcACgkQC3+MBN1Mb4jijwCePL+w9ipmTaC51MMQR6tgqxcf /3gAoJsHeLT6J3sdrt5+1Z65UOFjWiiI =v3UB -----END PGP SIGNATURE----- --kljy8TnFHfNvTRLN--