If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Allow madvise MADV_NOHUGEPAGE (and MADV_HUGEPAGE), used by jemalloc

RESOLVED FIXED in Firefox 55

Status

()

Core
Security: Process Sandboxing
RESOLVED FIXED
4 months ago
4 months ago

People

(Reporter: jld, Assigned: jld)

Tracking

Trunk
mozilla55
Unspecified
Linux
Points:
---

Firefox Tracking Flags

(firefox53 wontfix, firefox54 wontfix, firefox55 fixed)

Details

(Whiteboard: sblc3)

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

4 months ago
Similarly to bug 1303813, our jemalloc will use MADV_{NO,}HUGEPAGE if they're defined at compile time.  We've recently gotten some reports from Gentoo users (bug 1303813 comment #16, bug 1356038 comment #5) where we're trying to use it and the seccomp-bpf policy doesn't allow it.

Huge page advice has been around since 2011 (kernel 2.6.38), but builds are still using CentOS 6 (kernel 2.6.32 with a lot of patches), which would explain why this isn't happening on official builds.

This feature does expose some attack surface (e.g., possible bugs in multiprocessor TLB shootdown when changing page sizes) but judging by https://github.com/jemalloc/jemalloc/issues/243 it seems to be important for performance.

Note that as of Firefox 54 (bug 1286865) this will no longer cause crashes on non-Nightly builds; instead, the syscalls will return failure, which jemalloc ignores.
(Assignee)

Updated

4 months ago
status-firefox53: --- → wontfix
status-firefox54: --- → wontfix
status-firefox55: --- → affected
Whiteboard: sblc2 → sblc3
Comment hidden (mozreview-request)

Comment 2

4 months ago
mozreview-review
Comment on attachment 8870187 [details]
Bug 1364533 - Allow madvise huge page hints.

https://reviewboard.mozilla.org/r/141634/#review146098
Attachment #8870187 - Flags: review?(gpascutto) → review+

Comment 3

4 months ago
Pushed by jedavis@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c8a8173ef138
Allow madvise huge page hints. r=gcp

Comment 4

4 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/c8a8173ef138
Status: NEW → RESOLVED
Last Resolved: 4 months ago
status-firefox55: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.