Opened 6 months ago

Last modified 4 months ago

#28710 new defect

Randomize small allocations in mozjemalloc

Reported by: tom Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: #28707 Points:
Reviewer: Sponsor:

Description

This bug tracks backporting https://bugzilla.mozilla.org/show_bug.cgi?id=1376408 to Tor Browser.

This will increase memory usage and fragmentation, but will make memory allocation slightly more unpredictable and hopefully make it more difficult to exploit certain types of vulnerabilities.

Child Tickets

Change History (3)

comment:1 Changed 5 months ago by tom

Putting this here so I don't lose it.

Talos shows performance regressions (only was able to test Linux/OSX):
https://treeherder.mozilla.org/perf.html#/compare?originalProject=try&originalRevision=db57ad7ff45d3096eb579bb7fb60425d6413287f&newProject=try&newRevision=11d1e0fa67e6198de068be9fa2273a91f56d908e&framework=1&showOnlyComparable=1&showOnlyImportant=1
The worst one goes up to 10%, but there's several around 2.5% and 7.5%

This is the most recent build:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=11d1e0fa67e6198de068be9fa2273a91f56d908e

Windows is broken, this was my most recent attempt to fix it: https://treeherder.mozilla.org/#/jobs?repo=try&revision=2db9b7395f35ea22144cfea29cc836d7674a03fc&selectedJob=216260440
(Compiles, but something causes some tests to fail that normally work.)

comment:2 in reply to:  1 ; Changed 4 months ago by gk

Status: newneeds_information

Replying to tom:

Windows is broken, this was my most recent attempt to fix it: https://treeherder.mozilla.org/#/jobs?repo=try&revision=2db9b7395f35ea22144cfea29cc836d7674a03fc&selectedJob=216260440
(Compiles, but something causes some tests to fail that normally work.)

But that's no problem for us right now as we don't use mozjemalloc anyway on Windows at the moment (alas). So, we should be good with backporting what you already have or should we wait with it?

comment:3 in reply to:  2 Changed 4 months ago by tom

Status: needs_informationnew

Replying to gk:

Replying to tom:

Windows is broken, this was my most recent attempt to fix it: https://treeherder.mozilla.org/#/jobs?repo=try&revision=2db9b7395f35ea22144cfea29cc836d7674a03fc&selectedJob=216260440
(Compiles, but something causes some tests to fail that normally work.)

But that's no problem for us right now as we don't use mozjemalloc anyway on Windows at the moment (alas). So, we should be good with backporting what you already have or should we wait with it?

This is true... However in March I expect we will have an updated version of this patch that does work on Windows. Additionally once we switch to mingwclang we'll be using jemalloc.

So I think it's best to wait just to avoid extra work for a narrow window of deployment...

Note: See TracTickets for help on using tickets.