From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mika Kuoppala Subject: Re: [PATCH 1/1] drm/i915: shorten i915_next_seqno debugfs output Date: Thu, 11 Apr 2013 19:15:55 +0300 Message-ID: <87bo9lxcuc.fsf@gaia.fi.intel.com> References: <1365686532-6682-1-git-send-email-mika.kuoppala@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 7D006E5BF9 for ; Thu, 11 Apr 2013 09:16:24 -0700 (PDT) In-Reply-To: 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: Kees Cook Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org Kees Cook writes: > On Thu, Apr 11, 2013 at 6:22 AM, Mika Kuoppala > wrote: >> commit 647416f9eefe7699754b01b9fc82758fde83248c >> Author: Kees Cook >> Date: Sun Mar 10 14:10:06 2013 -0700 >> >> drm/i915: use simple attribute in debugfs routines >> >> made i915_next_seqno debugfs entry to crop it's output >> if returned value was large enough. Using simple_attr >> will limit the output to 24 bytes. Fix this by returning >> only the value and nothing else. >> >> Cc: Kees Cook >> Signed-off-by: Mika Kuoppala > > Oh! Thanks for catching that. What a weird limitation. > > What about max freq, min freq, and wedged? Do those run the risk of > truncation too? max and min freq should be safe, and wedged too on 32bit platforms. But if gpu is declared wedged on host with 64bit atomic_t, it will crop the output. -Mika