Changeset 249621 in webkit


Ignore:
Timestamp:
Sep 7, 2019 6:19:08 PM (5 years ago)
Author:
mark.lam@apple.com
Message:

[Follow up fix] Harden protection of the Gigacage Config parameters.
https://bugs.webkit.org/show_bug.cgi?id=201570
<rdar://problem/55134229>

Reviewed by Saam Barati.

The previously landed hardening measures is failing the assertion in
forbidDisablingPrimitiveGigacage() when a replacement heap (e.g. gmalloc) is
used.

  1. forbidDisablingPrimitiveGigacage() should just ensureGigacage() so that we know that the Gigacage is properly configured (whether enabled or disabled).
  2. Strengthen the assertion in forbidDisablingPrimitiveGigacage() to ensure that we have already determined if the Gigacage should be enabled.
  • bmalloc/Gigacage.cpp:

(Gigacage::forbidDisablingPrimitiveGigacage):

Location:
trunk/Source/bmalloc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/bmalloc/ChangeLog

    r249613 r249621  
     12019-09-07  Mark Lam  <mark.lam@apple.com>
     2
     3        [Follow up fix] Harden protection of the Gigacage Config parameters.
     4        https://bugs.webkit.org/show_bug.cgi?id=201570
     5        <rdar://problem/55134229>
     6
     7        Reviewed by Saam Barati.
     8
     9        The previously landed hardening measures is failing the assertion in
     10        forbidDisablingPrimitiveGigacage() when a replacement heap (e.g. gmalloc) is
     11        used.
     12
     13        1. forbidDisablingPrimitiveGigacage() should just ensureGigacage() so that we
     14           know that the Gigacage is properly configured (whether enabled or disabled).
     15        2. Strengthen the assertion in forbidDisablingPrimitiveGigacage() to ensure that
     16           we have already determined if the Gigacage should be enabled.
     17
     18        * bmalloc/Gigacage.cpp:
     19        (Gigacage::forbidDisablingPrimitiveGigacage):
     20
    1212019-09-07  Mark Lam  <mark.lam@apple.com>
    222
  • trunk/Source/bmalloc/bmalloc/Gigacage.cpp

    r249613 r249621  
    306306void forbidDisablingPrimitiveGigacage()
    307307{
    308     RELEASE_BASSERT(GIGACAGE_ALLOCATION_CAN_FAIL || verifyGigacageIsEnabled());
     308    ensureGigacage();
     309    RELEASE_BASSERT(g_gigacageConfig.shouldBeEnabledHasBeenCalled
     310        && (GIGACAGE_ALLOCATION_CAN_FAIL || !g_gigacageConfig.shouldBeEnabled || verifyGigacageIsEnabled()));
     311
    309312    if (!g_gigacageConfig.disablingPrimitiveGigacageIsForbidden) {
    310313        unfreezeGigacageConfig();
Note: See TracChangeset for help on using the changeset viewer.