From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Barnes Subject: Re: [PATCH] drm/i915: prevent division by zero when asking for chipset power Date: Fri, 11 Nov 2011 07:36:44 -0800 Message-ID: <20111111073644.535ebb6f@jbarnes-desktop> References: <1320929486-6800-1-git-send-email-eugeni.dodonov@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1743287055==" Return-path: Received: from oproxy7-pub.bluehost.com (oproxy7-pub.bluehost.com [67.222.55.9]) by gabe.freedesktop.org (Postfix) with SMTP id C87BEA0E0A for ; Fri, 11 Nov 2011 07:36:24 -0800 (PST) In-Reply-To: <1320929486-6800-1-git-send-email-eugeni.dodonov@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Eugeni Dodonov Cc: intel-gfx@lists.freedesktop.org, stable@vger.kernel.org List-Id: intel-gfx@lists.freedesktop.org --===============1743287055== Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/_vMLfCyg_3VppVZYvGsZFuz"; protocol="application/pgp-signature" --Sig_/_vMLfCyg_3VppVZYvGsZFuz Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 10 Nov 2011 10:51:26 -0200 Eugeni Dodonov wrote: > This prevents an in-kernel division by zero which happens when we are > asking for i915_chipset_val too quickly, or within a race condition > between the power monitoring thread and userspace accesses via debugfs. >=20 > The issue can be reproduced easily via the following command: > while ``; do cat /sys/kernel/debug/dri/0/i915_emon_status; done >=20 > This is particularly dangerous because it can be triggered by > a non-privileged user by just reading the debugfs entry. >=20 > This issue was also found independently by Konstantin Belousov > , who proposed a similar patch. >=20 > Reported-by: Konstantin Belousov > Acked-by: Jesse Barnes > Acked-by: Keith Packard > Cc: > Signed-off-by: Eugeni Dodonov > --- Yep, looks fine, thanks for pushing this Eugeni. --=20 Jesse Barnes, Intel Open Source Technology Center --Sig_/_vMLfCyg_3VppVZYvGsZFuz Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBAgAGBQJOvUEMAAoJEIEoDkX4Qk9ht5YQAJpLKm8Mbp9fhdUcCy7sN1PW YpgTIhtgcZiOgClTyyazCMRHNK68uYyFtjjpkKuuPGzipbZbjGHv7j0N3W9cvUJ0 0Pin+e2DzDD1b4RepmCVc4C2smhpVo0XM1FfUCojzoOOq8CaZ4Eew6o5ElNpjYGM stYkHZjDSMizLqWghOFKVE4Th7LtNxiL6iybYrootHPYCZzQYHmb4HLI/xGFuLfW i8s7ZHow1TvQa9IwZa8ujeACTKxraHnGDKToyDiVUfc9oSBWNoT9rYkx2xfrKq42 H2BQYSY/5dHdzRtxNlEbrrtflNvuqQoWzxQD1q858MYk+kmDSx4V1mJ7wJ+Q109Z CxIbsK8UjMa6QGNf9RSHfnGBNXDyepFQAyTbCRnh0KeCNFCnYj5olzHrJOUIcplO i8D1+jeWTdUrhC9TN/kCp8locD1DvXj++pFJdtqJxgzaba0NKEAsDirJpzMHqv29 Rkl1DIVBzaRrsakeZx4+Xt4+jgVyJKK217OBVmOoeJqQ7FxbDK8S0BWRuiFbDL/7 jdi8etvvFtyn1y+YRA5471+Ey7zJJydW7m4spCPSpZ1Etbd/BNFJWC1ZFSOElNyu 3E4JaeyowW1AChHTVXoH9U/4Jf3SnSoo50/yZ9gZb8i9AmWN0nAu0MJbnKW00My8 opMMluKqEHCk6NEddQw8 =b2hw -----END PGP SIGNATURE----- --Sig_/_vMLfCyg_3VppVZYvGsZFuz-- --===============1743287055== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============1743287055==--