[Spice-devel] [PATCH qxl-wddm-dod 2/8] Mark all functions that should go to non paged sections

Frediano Ziglio fziglio at redhat.com
Tue Oct 4 08:24:36 UTC 2016


> 
> On Wed, Sep 28, 2016 at 10:29:48AM -0400, Frediano Ziglio wrote:
> > > This is extremely dangerous!, this can be working without any errors most
> > > of
> > > the time but in a rare cases this could
> > > cause a crash - in case a non pageable function made pageable by this
> > > patch -
> > > which can be hard to troubleshoot!
> > 
> > Actually this is not far from what the current code is doing right now and
> > the
> > static analyzer will give a warning for new functions.
> > I checked and all non pageable function before this patch are still non
> > pageable.
> 
> Also, functions which are not annotated with QXL_NON_PAGED are expected
> to use the PAGED_CODE() macro, which would give us an assert if this
> situation happens (at least if I have followed all of this correctly ;)
> 
> Christophe
> 

Yes, PAGED_CODE is a runtime assert with make sure that running IRQL allows
paging. But is also used by static analyzer so even if your coverage is
not enough to trigger the issue (and the assert) you have a warning from
the analyzer.

I wrote a script to see the dangerous section changes between this
patch and Sameeh one and there are none (beside the three methods
from the other patch).

Frediano


More information about the Spice-devel mailing list