Skip to content

Fix mmap for JIT code on HarmonyOS NEXT Beta 2#491

Merged
sagudev merged 5 commits intoservo:mainfrom
jschwe:jschwender/harmonyos_mmap
Aug 6, 2024
Merged

Fix mmap for JIT code on HarmonyOS NEXT Beta 2#491
sagudev merged 5 commits intoservo:mainfrom
jschwe:jschwender/harmonyos_mmap

Conversation

@jschwe
Copy link
Member

@jschwe jschwe commented Aug 5, 2024

The Security policy for JIT code is tightening on HarmonyOS . Beta 2 and newer require us to pass MAP_EXECUTABLE (internally same as MAP_JIT) to the committing mmap, otherwise it will fail.

@jschwe jschwe force-pushed the jschwender/harmonyos_mmap branch from e019bd7 to 769b3c9 Compare August 5, 2024 07:20
@jschwe jschwe force-pushed the jschwender/harmonyos_mmap branch 2 times, most recently from ba442a9 to e198e7b Compare August 5, 2024 11:37
Copy link
Member

@sagudev sagudev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to bump mozjs-sys version for this and it would be nice to add ohos in CI (like it is in servo), so we can land with more confidence that it compiles (ideally in separate PR).

@jschwe
Copy link
Member Author

jschwe commented Aug 5, 2024

it would be nice to add ohos in CI

Sure, I'll open a separate PR for that as suggested.

jschwe added 5 commits August 6, 2024 08:39
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
The Security policy for JIT code is tightening and as a first step,
we need to pass `MAP_EXECUTABLE` (internally same as `MAP_JIT`) to the
committing mmap, otherwise it will fail.

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
@jschwe jschwe force-pushed the jschwender/harmonyos_mmap branch from f2ba7a7 to 588ff20 Compare August 6, 2024 06:40
@jschwe jschwe requested a review from sagudev August 6, 2024 06:58
@jschwe jschwe mentioned this pull request Aug 6, 2024
3 tasks
@sagudev sagudev added this pull request to the merge queue Aug 6, 2024
@sagudev sagudev mentioned this pull request Aug 6, 2024
Merged via the queue into servo:main with commit 9e070eb Aug 6, 2024
@jschwe jschwe deleted the jschwender/harmonyos_mmap branch August 6, 2024 12:06
@jschwe jschwe mentioned this pull request Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants