<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>237278</bug_id>
          
          <creation_ts>2022-02-28 10:16:54 -0800</creation_ts>
          <short_desc>Remove release assert when UI process is blocking IOSurface IOKit access</short_desc>
          <delta_ts>2022-03-01 14:07:56 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Misc.</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Per Arne Vollan">pvollan</reporter>
          <assigned_to name="Per Arne Vollan">pvollan</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>darin</cc>
    
    <cc>ggaren</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>slewis</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1846682</commentid>
    <comment_count>0</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2022-02-28 10:16:54 -0800</bug_when>
    <thetext>Remove release assert in IOSurface::bytesPerRowAlignment() when UI process is blocking IOSurface IOKit access.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1846686</commentid>
    <comment_count>1</comment_count>
      <attachid>453405</attachid>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2022-02-28 10:19:18 -0800</bug_when>
    <thetext>Created attachment 453405
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1846714</commentid>
    <comment_count>2</comment_count>
      <attachid>453405</attachid>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2022-02-28 11:21:28 -0800</bug_when>
    <thetext>Comment on attachment 453405
Patch

I&apos;m not sure why we&apos;d special-case this one, and not the other places where we make IOKit calls which need to be removed before we can enable blocking?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1846730</commentid>
    <comment_count>3</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2022-02-28 12:53:18 -0800</bug_when>
    <thetext>(In reply to Simon Fraser (smfr) from comment #2)
&gt; Comment on attachment 453405 [details]
&gt; Patch
&gt; 
&gt; I&apos;m not sure why we&apos;d special-case this one, and not the other places where
&gt; we make IOKit calls which need to be removed before we can enable blocking?

This IOKit call only takes place in the UI process. We&apos;re brokering the value to the WebContent process.

Thanks for reviewing!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1846778</commentid>
    <comment_count>4</comment_count>
      <attachid>453405</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2022-02-28 14:33:10 -0800</bug_when>
    <thetext>Comment on attachment 453405
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=453405&amp;action=review

&gt; Source/WebCore/platform/graphics/cocoa/IOSurface.mm:299
&gt; +            // 64 bytes is currently the alignment on all platforms.
&gt; +            alignment = 64;

Why not just return a constant? We don’t need to call IOSurface just to feel good.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1846783</commentid>
    <comment_count>5</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2022-02-28 14:41:34 -0800</bug_when>
    <thetext>(In reply to Darin Adler from comment #4)
&gt; Comment on attachment 453405 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=453405&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/platform/graphics/cocoa/IOSurface.mm:299
&gt; &gt; +            // 64 bytes is currently the alignment on all platforms.
&gt; &gt; +            alignment = 64;
&gt; 
&gt; Why not just return a constant? We don’t need to call IOSurface just to feel
&gt; good.

That is a good point. I kept the IOSurface call in case the constant should change at some point.

Thanks for reviewing!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1846812</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-02-28 15:27:59 -0800</bug_when>
    <thetext>Committed r290618 (247891@main): &lt;https://commits.webkit.org/247891@main&gt;

All reviewed patches have been landed. Closing bug and clearing flags on attachment 453405.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1846813</commentid>
    <comment_count>7</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-02-28 15:29:15 -0800</bug_when>
    <thetext>&lt;rdar://problem/89585043&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1846814</commentid>
    <comment_count>8</comment_count>
      <attachid>453405</attachid>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2022-02-28 15:31:27 -0800</bug_when>
    <thetext>Comment on attachment 453405
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=453405&amp;action=review

&gt; Source/WebCore/platform/graphics/cocoa/IOSurface.mm:297
&gt; +            RELEASE_LOG_FAULT(Layers, &quot;Sandbox does not allow IOSurface IOKit access.&quot;);

RELEASE_LOG_FAULT produces a CrashTracer report. Does this code path execute frequently? If so, it will become our top CrashTracer report (even if the user does not experience a process termination). Do we have other options for gathering whatever information we&apos;re trying to gather here?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1847021</commentid>
    <comment_count>9</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2022-03-01 07:41:26 -0800</bug_when>
    <thetext>(In reply to Geoffrey Garen from comment #8)
&gt; Comment on attachment 453405 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=453405&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/platform/graphics/cocoa/IOSurface.mm:297
&gt; &gt; +            RELEASE_LOG_FAULT(Layers, &quot;Sandbox does not allow IOSurface IOKit access.&quot;);
&gt; 
&gt; RELEASE_LOG_FAULT produces a CrashTracer report. Does this code path execute
&gt; frequently? If so, it will become our top CrashTracer report (even if the
&gt; user does not experience a process termination). Do we have other options
&gt; for gathering whatever information we&apos;re trying to gather here?

That is a very good point. The code path is expected to execute very infrequently, although I still think it makes sense to avoid possible crash reports. I will change this to log an error instead.

Thanks for reviewing!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1847053</commentid>
    <comment_count>10</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2022-03-01 09:23:27 -0800</bug_when>
    <thetext>Reopening to attach new patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1847054</commentid>
    <comment_count>11</comment_count>
      <attachid>453503</attachid>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2022-03-01 09:23:28 -0800</bug_when>
    <thetext>Created attachment 453503
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1847188</commentid>
    <comment_count>12</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-03-01 14:07:51 -0800</bug_when>
    <thetext>Committed r290675 (247946@main): &lt;https://commits.webkit.org/247946@main&gt;

All reviewed patches have been landed. Closing bug and clearing flags on attachment 453503.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>453405</attachid>
            <date>2022-02-28 10:19:18 -0800</date>
            <delta_ts>2022-02-28 18:00:30 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-237278-20220228101918.patch</filename>
            <type>text/plain</type>
            <size>1778</size>
            <attacher name="Per Arne Vollan">pvollan</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0N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ICAgICAgIC8vIDY0
IGJ5dGVzIGlzIGN1cnJlbnRseSB0aGUgYWxpZ25tZW50IG9uIGFsbCBwbGF0Zm9ybXMuCisgICAg
ICAgICAgICBhbGlnbm1lbnQgPSA2NDsKKyAgICAgICAgfQogICAgIH0KICAgICByZXR1cm4gYWxp
Z25tZW50OwogfQo=
</data>
<flag name="commit-queue"
          id="480836"
          type_id="3"
          status="-"
          setter="ews-feeder"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>453503</attachid>
            <date>2022-03-01 09:23:28 -0800</date>
            <delta_ts>2022-03-01 14:07:54 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-237278-20220301092328.patch</filename>
            <type>text/plain</type>
            <size>1608</size>
            <attacher name="Per Arne Vollan">pvollan</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDI5MDY1MSkKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE2IEBACisyMDIyLTAzLTAxICBQZXIgQXJu
ZSBWb2xsYW4gIDxwdm9sbGFuQGFwcGxlLmNvbT4KKworICAgICAgICBSZW1vdmUgcmVsZWFzZSBh
c3NlcnQgd2hlbiBVSSBwcm9jZXNzIGlzIGJsb2NraW5nIElPU3VyZmFjZSBJT0tpdCBhY2Nlc3MK
KyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTIzNzI3OAor
ICAgICAgICA8cmRhcjovL3Byb2JsZW0vODk1ODUwNDM+CisKKyAgICAgICAgVW5yZXZpZXdlZCwg
YWRkcmVzcyByZXZpZ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aWdubWVudC4KICAgICAgICAgaWYgKGFsaWdubWVudCA8
PSAxKSB7Ci0gICAgICAgICAgICBSRUxFQVNFX0xPR19GQVVMVChMYXllcnMsICJTYW5kYm94IGRv
ZXMgbm90IGFsbG93IElPU3VyZmFjZSBJT0tpdCBhY2Nlc3MuIik7CisgICAgICAgICAgICBSRUxF
QVNFX0xPR19FUlJPUihMYXllcnMsICJTYW5kYm94IGRvZXMgbm90IGFsbG93IElPU3VyZmFjZSBJ
T0tpdCBhY2Nlc3MuIik7CiAgICAgICAgICAgICAvLyA2NCBieXRlcyBpcyBjdXJyZW50bHkgdGhl
IGFsaWdubWVudCBvbiBhbGwgcGxhdGZvcm1zLgogICAgICAgICAgICAgYWxpZ25tZW50ID0gNjQ7
CiAgICAgICAgIH0K
</data>

          </attachment>
      

    </bug>

</bugzilla>